Don't click here unless you want to be banned.

LSL Wiki : MiniSlogo

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
Mini Second logo, or Minislogo, is a subset of the Slogo protocol/language. The main differences is that Minislog has a simpler parser and fewer tokens to look for. Unlike other protocols, Minislog isn't meant for any specific task, but instead is to be a general-purpose protocol.

Groupings: Square brackets. [ and ]
Whitespace: Spaces, tabs, and returns.
Tokens: Alphanumeric strings. a-z, A-Z, 0-9, and underscore (_)
Quote: "
Note that greater than and less than ( < and > ) are not used, nor is parenthesis ( ), curly brackets { }, pipes |, slashes \ /, colons (:;), or math symbols (*&^%$#@!-+=) as functions. Slogo has uses for these, which the minislog parser does not handle.

Tokens are broken subcategorized into numeric literals (3, 5.2, 4E6, -4), String literals ("Hello, "World, "Thisobject, "f35cc46b-de75-9437-c5bf-067d16964a84 ) and commands (Make, Tell, Ask, DoAction, llPizza). Named variables and constants (x, y, ORDER_PIZZA_HUT, ) are not implemented, as the parser does not have a name lookup table. Do note that the minus is allowed in string literals, necessary for UUIDs. Also note that all string literals have a quote preceding the text, to differentiate from a command, but do not have a trailing quote. This is a carryover from logo. Finally, logo, and thereby, Slogo and Minislog are case insensitive.

Tokens are grouped into lists by brackets, separated by white space. No commas are used. Unlike LSL, Lists may contain sublists. Indeed, sometimes, that's the only way. A vector is simply a list of three numeric literals. A rotation is simply a list of 4 numeric literals.

Minislog, therefore is a series of commands, string literals, numeric literals, and lists thereof.

There are two essential commands that should be supported by all minislog-compatible devices.

Tell is a function/command with two arguments, a list of what to do, and string literal of who should do it. For example, if there is a object called Dominos that can be told to deliver, the command:
Tell "Dominos [Deliver]
will do. It is legal to instruct an object by its UUID, replacing "Dominos with the quotes followed by the hexidecimal UUID. However, for our samples, easily readable text will be used. Furthermore, one of the advantages of Slogo is to instruct several similarly-named objects at the same time, or to make programming easy. Because the what is a list, you can send multiple commands, or pass arguments to the individual commands. The brackets indicate to minislog (Or more importantly, to other programs on the same channel who are NOT Domino, so they know how much to skip) which are commands to be told.
Tell "Dominos [Wait 5 Deliver] Tell "Pizza_Hut [GiveOut "Dominos 5 NewPizza]
In the above example, it is likely that Pizza_Hut, as instructed, will offer its own command to Dominos before performing the NewPizza command. Also, it is likely you want to adjust some variables or properties of the instructed code. While one could use another custom function, it is best to use logo conventions.
Tell "Dominos [make "couponvalue 5 make "target [45 78.2 92.6]]

Future plans
One design that hasn't been implemented or fully speced out is the attributes, or more, what the string literals will apply.
Tell "Dominos [make "pos [23 45.6 341.56] make "rot [0 0 0 1] make "shape "box]
And possibly, like llSetPrimitiveParams, there will be a way to make several at once.
Tell "Dominos [make "attr ["pos [23 45.6 341.56] "rot [0 0 0 1] "shape "box]]
Alternatively, logo does not use make for the position of the turtle, instead using the functions pos and setpos :x :y. So it might be that properties that require actions when set will use wrapper function/tokens reflecting LSL.
Tell "Dominos [setpos [23 45.6 341.56] setrot [0 0 0 1] setattr ["shape "box "color [0.4 0.5 1.0]]]


Additionally, Wait in logo causes a program to delay for n 60ths of a second. So to instruct a minislog-compliant primative to change random colors twice could go like:
Tell "Color-Ball [make "color [.5 0 1] wait 180 make "color [1 .5 0]]
Obviously, thought is needed on how to specify which side (Or which prim!) the color is applied to. Furthermore, logo uses the literals "true and "false to handle boolean logic, while LSL uses integers. A well-behaved minislog-compliant script should adhere to "true and "false where applicable.

Finally, while Tell and Make have been defined and will be implemented in the first iteration, other commands are reserved for future use: Ask, Reply, Authenticate, Decrypt
There is one comment on this page. [Display comments/form]