Message Parsing Interpreter

Message Parsing Interpreter

The Message Parsing Interpreter (MPI for short, not to be confused with the Message Passing Interface) is a Lisp-like programming language based on text replacement that is used on Fuzzball MUCK servers, starting with version 2.2fb5.00. It is generally considered easier to learn and use than MUF, and enjoys a large popularity among Fuzzball MUCK users.

Amusingly, MPI originally stood for "My Personal Insanity" — a temporary project name used by the programmer when it was first implemented during a 3 week coding binge. It was later backronymed to "Message Parsing Interpreter" to keep the acronym, yet sound more respectable.

When online, the command MPI CATEGORY provides a listing of the available MPI topics arranged by function. The most common use for MPI is for report generation and formatting text strings, however it does support the creation of macros, conditional logic, and looping for a limited number of iterations.

Contents

Command Structure

MPI could be viewed as a form of markup language as instructions are encapsulated within bracket marks to differentiate them from regular text. The MPI command is specified first, followed by a colon, and then command arguments, separated by commas. If one of the arguments is a string that contains a comma, it is escaped by using a backslash or the {lit:} (for literal) command.

{ command : argument1, argument2 }

Commands can be nested, taking the place of one or more arguments within the parent command to form more complex code:

{tell: {name:me} just looked at {name:this}., {owner:this}}

Hello World

The standard "Hello World" program would look like this:

{tell:Hello World, me}

More complex substitution

More complex code in MPI may become difficult to read. Some examples: This sequence informs the user of the next database save:

Next scheduled save will occur at {convsecs:{add:{prop:_sys/dumpinterval,#0},
{prop:_sys/lastdumptime,#0}}}\, being in {ltimestr:{subt:{add:
{prop:_sys/dumpinterval,#0},{prop:_sys/lastdumptime,#0}},{secs}}} 

Next, a loop of a fixed range of iterations that generates random text. A property named ascii on the same object would need to be loaded with the ASCII characters from the 32-127:

{null:{store:,launchcode,this},{if:{&arg},{store:{min:60,{max:1,{&arg}}},count,this},
{store:{dice:60},count,this}},{while:{not:{eq:-1,{store:{subt:{prop:count,this},1},count,this}}},
{store:{prop:launchcode,this}{midstr:{prop:ascii,this},{store:{dice:94},tempcharval,this},
{prop:tempcharval,this}},launchcode,this}}}

Combining MPI with the MUCK properties system can allow for a loop with an indefinite number of iterations. One might place this inside a property named delayloop and then {eval} it:

{delay:{prop:seconds,this},{lit:Hello World{null:{if:{awake:me},{eval:{prop:delayloop,this}}}}}}

See also

External links



Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • MPI — Contents 1 Ethnic group 2 Science, information technology and engineering 3 Medicine …   Wikipedia

  • MUF (programming language) — MUF (short for Multi User Forth ) is a Forth based programming language used on TinyMUCK MUCK servers and their descendants, including Fuzzball MUCK, ProtoMUCK and GlowMUCK. MUF is the system programming language for TinyMUCK systems. Many… …   Wikipedia

  • TinyMUCK — or, more broadly, a MUCK, is a type of user extendible online text based role playing game, designed for role playing and social interaction. [ [http://www.realityfault.org/programmer/docs/index.html TinyMUCK c2.2fb5.3.x Documentation] ] The… …   Wikipedia

  • Perl — This article is about the programming language. For other uses, see Perl (disambiguation). Perl Paradig …   Wikipedia

  • Command Prompt — For other uses, see Command prompt (disambiguation). CMD redirects here. For other uses, see CMD (disambiguation). Command Prompt A component of Microsoft Windows …   Wikipedia

  • Forth (programming language) — infobox programming language name = Forth paradigm = Procedural, stack oriented year = 1970s designer = Charles H. Moore typing = typeless dialects = colorForth, Open Firmware implementations = Forth, Inc., GNU Forth, MPE influenced by =… …   Wikipedia

  • Command Prompt (Windows) — Infobox Windows component name = Command Prompt logo size = 64px caption = Command Prompt in Windows Vista| included with = Windows NT Windows CE OS/2 replaces = COMMAND.COM replaced by = related components = Windows PowerShell Batch filecmd.exe… …   Wikipedia

  • Eval — In some programming languages, eval is a function which eval uates a string as though it were an expression and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the… …   Wikipedia

  • Prolog — infobox programming language paradigm = Logic programming year = 1972 designer = Alain Colmerauer implementations = BProlog, ECLiPSe, Ciao Prolog, GNU Prolog, Quintus, SICStus, Strawberry, SWI Prolog, YAP Prolog, tuProlog dialects = ISO Prolog,… …   Wikipedia

  • YAML — (IPAEng|ˈjæməl, rhymes with camel ) is a human readable data serialization format that takes concepts from languages such as XML, C, Python, Perl, as well as the format for electronic mail as specified by RFC [http://www.rfc… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”