This tutorial is intended to provide a concise introduction to Muq MUF for experienced programmers.
If you are not an experienced programmer, you may wish to read the Elementary Muf Programming tutorial instead of this one. (If you are a tinyMuck MUF programmer, you may wish to start by reading Appendix I, which compares Muq MUF to tinyMuck MUF.)
MUF (Multi-User Forth) is the traditional name for the reverse-polish programming notation used to application programming on the tinyMuck family of servers.
Muq's cultural roots lie in the tinyMuck community, but Muq MUF has only the haziest relationship to tinyMuck MUF. Muq MUF is arguably more closely related to CommonLisp than to tinyMuck MUF.
In the Muq manual set, 'MUF' when not otherwise qualified should always be understood as referring to Muq MUF, not tinyMuck MUF.
MUF attempts to maximize the traditional strengths of Forth family languages, such a simple, transparent, highly customizable compilers, while fixing many of its traditional weaknesses, such as lack of local variables and frequent use of the RESET button during debugging.
MUF has somewhat C-style control structures, C-style printf formatting, modern datastructures including Lisp-style lists and objects with multiple inheritance, internal pre-emptive multitasking, a limited infix path notation that overcomes some of the worst verbosity problems of traditional Forths, and a sophisticated exception handling facility. Among many other things!
MUF is particularly appropriate for interactive throwaway hacking, since it is concise, evaluates expressions right-to-left exactly in the order you type them, and publishes intermediate states visibly on the stack as you go.
MUF is less appropriate (but usable) for programming of large projects. It is less readable than C-style infix notation for such archival code, and the lack of strong type checking means you wind up having to hunt down at runtime bugs which a language like Java would have reported at compiletime.
Go to the first, previous, next, last section, table of contents.