Message Parsing Interpreter - More Complex Substitution

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}}}}}}

Read more about this topic:  Message Parsing Interpreter

Famous quotes containing the words complex and/or substitution:

    It would be naive to think that peace and justice can be achieved easily. No set of rules or study of history will automatically resolve the problems.... However, with faith and perseverance,... complex problems in the past have been resolved in our search for justice and peace. They can be resolved in the future, provided, of course, that we can think of five new ways to measure the height of a tall building by using a barometer.
    Jimmy Carter (James Earl Carter, Jr.)

    To play is nothing but the imitative substitution of a pleasurable, superfluous and voluntary action for a serious, necessary, imperative and difficult one. At the cradle of play as well as of artistic activity there stood leisure, tedium entailed by increased spiritual mobility, a horror vacui, the need of letting forms no longer imprisoned move freely, of filling empty time with sequences of notes, empty space with sequences of form.
    Max J. Friedländer (1867–1958)