Talk:Chatbot

From Second Life Wiki
Revision as of 05:14, 26 September 2007 by Ppaatt Lynagh (talk | contribs) (archive the story of how we reverse-engineered, doc'ed, and worked around the limits on cascading else-if's)
Jump to navigation Jump to search

Call for Linux volunteers

You can help by running Linux to test the Chatbot, even if you have been running Mac OS X or Windows.

See: http://wiki.secondlife.com/wiki/LSL_Write_Once_Debug_Everywhere#Running_Linux

Wishes

We could/ should soon add ...

  • say if llGetSunDirection changes or not when World > Force Sun > Region Default shows sunrise, noon, sunset, midnight, or what
  • resynch the Chatbot and Hello Avatar examples, e.g., the Chatbot should learn to llSleep after llSetStatus STATUS_PHYSICS

We could/ should soon add ...

  • move to owner and stop moving
  • parsing of prefix monadic + - arithmetic operators, for scalar and vectors and rotations
  • parsing of infix dyadic + - * / % arithmetic operators with precedence, on pairs of values of the same type, on vector/ rotation pairs, on rotation/ vector pairs

Rethink

I have by now thought thru a new design for ducking our ill-defined not-quite-cross-platform-reproducible script resource limits by dividing the work out via llMessageLinked.

Sorry as yet I'm thinking in the deeply geeky slang of compiler folk. Out in that world, my thinking runs as follows.

http://members.aol.com/ppaatt/#%5B%5BReverse%20Polish%20LSL%5D%5D is my definition of Reverse Polish LSL. I figure we want to chat ordinary LSL onto a channel, then see (forward) Polish chatted on a channel. In translating from ordinary LSL, we'd chat the depth-first Polish first, i.e., the leftmost ( ... ) found, with just values as parameters. We'd then see the result chatted on a channel, which will let us form the next expression out.

I plan to head that way here as soon as I get some more time slices free to work this. That way will let us divide the else-if's arbitrarily into indefinitely many functions.

I figure we can define monadic == to mean evaluate a name.

I figure we can use simply-quoted URL-encoding to pass strings around.

I figure we want to distinguish no result, void result, non-list non-void result, possibly-empty list result. I figure we count the "no results" til we have enough, to know when no one listening can make sense of the Polish LSL that was chatted.

-- Ppaatt Lynagh

Bugs

This Chatbot script works reasonably well for some of us ... how about you? If not, why not?

Bug: Channel number omitted, comma included, in echo of list value

STEPS TO REPRODUCE:

/7 [a, b, c] // a list value

EXPECTED RESULTS:

/7 [a, b, c] // a list value
[a, b, c]

ACTUAL RESULTS:

// [a, b, c] // a list value
, [a, b, c]

See? The channel number 7 is missing from the echo, broken by design.

See? A spurious string ", " of comma and blank appears before the expected result, who knows why.

Another example that produces the spurious ", " is:

/7 [llGetFreeMemory(), llGetFreeMemory(), llGetFreeMemory()]

Thus likely this bug is with output of type list, not with input of type list.

-- Ppaatt Lynagh 07:42, 14 September 2007 (PDT)

Bugs That May Have Been Fixed

Bug: (316, 48) : ERROR Syntax Error

The thousand lines of Chatbot script is script enough to confuse some compilers.

The LSL Write Once Debug Everywhere article explains how you can develop LSL scripts that run well and compile without error in many places.

The LSL Errors article explains the astonishing 2007-08 Windows compiler limit of about a dozen cascaded else-if's (astonishing when contrasted to the Mac limit of about five hundred).

The talk archive at http://wiki.secondlife.com/w/index.php?title=Talk:Chatbot&oldid=32867#Bug:_.28316.2C_48.29_:_ERROR_Syntax_Error tells the story of how Col, Huney, Ppaatt and Tim reverse-engineered, documented, and worked around the limits on cascading else-if's.

-- Ppaatt Lynagh 06:14, 26 September 2007 (PDT)