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:

    In ordinary speech the words perception and sensation tend to be used interchangeably, but the psychologist distinguishes. Sensations are the items of consciousness—a color, a weight, a texture—that we tend to think of as simple and single. Perceptions are complex affairs that embrace sensation together with other, associated or revived contents of the mind, including emotions.
    Jacques Barzun (b. 1907)

    Virtue is the adherence in action to the nature of things, and the nature of things makes it prevalent. It consists in a perpetual substitution of being for seeming, and with sublime propriety God is described as saying, I A—.
    Ralph Waldo Emerson (1803–1882)