PyMUV
This is a pure python implementation of the MUV 2.0 compiler. It takes C-like MUV language source code, and compiles it to the more inscrutable forth-based MUF language, suitable for uploading to an fb6 (or later) Fuzzball MUCK chat server.
The MUV 2.0 Language
Creating MUF programs is an ugly, painful, nearly write-only experience, and that’s coming from the coder who designed most of the language. Why spend massive amounts of time debugging and keeping track of stack items, when you can write code in a more modern, readable language?
Instead of writing cryptic code like:
: showspecies[ -- ret ]
var obj
loc @ contents_array
foreach obj ! pop
obj @ player? if
obj @ "species" getpropstr dup not if pop "Unknown" then
obj @ "sex" getpropstr dup not if pop "Unknown" then
obj @
"%-30D %-10s %-30s"
fmtstring
me @ swap notify
then
repeat
;
You can write:
func showspecies() {
for (var obj in contents_array(loc)) {
if (player?(obj)) {
ftell(
"%-30D %-10s %-30s",
obj,
getpropstr(obj, "sex") || "Unknown",
getpropstr(obj, "species") || "Unknown"
);
}
}
}
Installation
Install using PyPi:
pip install pymuv
Installing from sources:
python3 setup.py build install
Usage
The muv program expects the input MUV source file to be given on the command-line. The MUF output will, by default, be written to STDOUT. Error messages will be printed to STDERR, and the return code will be non-zero if errors were found:
muv sourcefile.muv >outfile.muf
You can use -w PROGNAME to wrap the output in MUF editor commands:
muv -w cmd-whospecies whospecies.muv >whospecies.muf
Using -o OUTFILE will write the output MUF code to OUTFILE instead of STDOUT:
muv -o whospecies.muf whospecies.muv
Adding a -d to the command-line will add debugging code to the MUF output. Each line of MUV will add code like: "foo.muv:23" pop to the MUF output:
muv -d -o whospecies.muf whospecies.muv
Links
Language reference: <https://github.com/revarbat/pymuv/blob/master/MUVREF.rst>
Metadata
Release files for pymuv 0.9.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymuv-0.9.9-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / pymuv-0.9.9-py2.py3-none-any.whl
| Download URL | pymuv-0.9.9-py2.py3-none-any.whl |
|---|---|
| Size | 52.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
827c1730f0e6099e9abd6391f2bea526b89e82a94a690a296c8542f2dd204fe6
|
|
BLAKE2b-256 checksum How to use checksums |
fcb460ab17addfc6da1b37ed144b0e63f0eca6043ad4b0b6dddd366648d0966f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Security for pymuv 0.9.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.