prev| toc| next
 

3.2 Overview: MUF

MUF — a dialect of FORTH — is one of two programming languages implemented on all MUCKs, the other being MPI. The speed and efficiency of MUF make MUCKs readily user-extensible: powerful new commands and programs can be soft-coded into the database. Although the only place you'll be able to use it is on MUCKs, MUF is a real programming language: once you've learned it, you can truthfully say you know how to program computers, and concepts and habits of thought you pick up as a Mucker will be useful in learning languages with widespread RL applications.

MUF is an extensible, structured, stack-based, compiled language.

Extensible:
If there isn't a command to do what you want, you can make one.

Structured:
A MUF program consists of `functions' or `words' ... blocks of code that are executed as a unit and `call' each other as needed. It doesn't matter (to the computer) whether you put all your code on one long line or every word on a new line (it matters a lot to people who are trying to read your code). White space (any combination of spaces, tabs, or new lines) separates words, and the order of the words and their positioning between the symbols that start and end a function are what matter. The program is composed of `functions' or `words' that each perform a specific task.

Stack-based:
You do everything by manipulating a stack, a set of `last-in-first-out' values like HP calculators use.

Compiled:
You write a program that people can read, with semi-normal words like pop and rot and remove_prop (this is your source code) and then a part of the server, the MUF compiler, turns it into arcane stuff that computers can read (this is your object code). You won't ever see the object code.

Before You Begin:

In order to program in MUF, you'll need a Mucker bit, a flag that lets you use the MUF editor. A wiz will need to set this, so page one and ask. There are three levels of mucker bits, M1 (apprentice), M2 (journeyman), and M3 (master) (wizards are considered M4).

As a new Mucker, you'll get an M1 bit. M1's have access to most of the functions, but not all; output from an M1 program to anyone other than the owner of the program is prefaced by the user's name; and the program won't be able to send messages to or retrieve information from remote locations. An M1 bit is essentially MUF with training wheels. Once you've written a couple M1 programs that work, you can show them to a wiz and ask for an M2 bit. M2's can't use all the functions, but you can make truly useful programs at the M2 level: bulletin board or book programs, specialized exits and locks, morphing programs, etc.

M3 bits are dandy to have, but they are hard to come by on large mucks, and for good reason. An M3 bit gives its owner considerable power over the data base, approaching that of a wizard: an inept or malintentioned M3 coder could cause serious problems. In fact, M3's are in some ways more of a security risk than Wizard bits: wiz bits are more powerful, but all commands issued by a wizard are logged; this is not necessarily true of M3 programs and players. To get an M3 bit on a well established MUCK, you will need to write some very good programs and have shown yourself to be a trustworthy player over time. In general, it's easier to get an M3 on newer, smaller MUCKs.

There are two commands that are good to know Before you Begin. One is man, the online manual command. Typing man pop would tell you about the MUF primitive pop. The other is @q. This aborts a foreground program you have running. If you find yourself in a run-away or locked-up program, type @q to get out of it.

prev| toc| top| next