Difference between revisions of "Talk:Chatbot"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎News: - LSL_Protocol/ListMessage has code now - likely the seed of what will replace the first draft of the Chatbot)
 
(44 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Bugs ==
== Call for Volunteers ==


This Chatbot script works for some of us ... how about you? If not, why not?
You can help by adding bugs, fixing bugs, and adding comments here to tell us why and how you are or are not working with your own Chatbot.


=== (316, 48) : ERROR Syntax Error ===
You can help by running the Chatbot in Linux, even if you have been running only Mac OS X or Windows on your computer.


<pre>(316, 48) : ERROR Syntax Error
See: http://wiki.secondlife.com/wiki/LSL_Write_Once_Debug_Everywhere#Running_Linux
Second Life 1.18.2 (0) Aug 10 2007 09:34:24 (Second Life Release)</pre>


-- kindly reported by e-mail
== News ==


I suspect we're facing some difficulty in perfecting the accuracy of the copy/ paste of a thousand lines of script.
The [[LSL_Protocol/ListMessage]] article now has a little code in an example - likely the seed of what will replace the first draft of the Chatbot.


The Second Life client app that works for me says it was released to me just ~3 minutes later:
== Wishes ==
Help > About Second Life is "Second Life 1.18.2 (0) Aug 10 2007 09:37:04 (Second Life Release)"


Here I see:
We could/ should soon add ...


<pre>Compile successful, saving...
* rewrite to use the [[LSL_Protocol/ListMessage]] to divide the work of interpreting LSL among indefinitely many scripts via [[llMessageLinked]] and [[link_message]]
Save complete.</pre>


...
We could/ should soon add ...


"Line 316, Column 0" in world is:
* say if [[llGetSunDirection]] changes or not when World > Force Sun > Region Default shows sunrise, noon, sunset, midnight, or what -- likely it doesn't, the object doesn't know what its owning or creating avatar sees
<pre>return [llRequestAgentData(llList2Key(ps, 0), llList2Integer(ps, 1))];</pre>
 
We could/ should soon add ...
 
* move to owner and stop moving.
 
* parsing of prefix monadic + - arithmetic operators, for scalar and vectors and rotations


Hard to understand how that syntax can be wrong while the previous syntax is correct.
* parsing of infix dyadic + - * / % arithmetic operators with precedence, on pairs of values of the same type, on vector/ rotation pairs, on rotation/ vector pairs


...
* forever periodically resynch or somehow merge the [[Chatbot]] and [[Hello Avatar]] examples


I've stored a copy of this script as Chatbot-lsl-20070913.txt at
== Bugs ==
http://members.aol.com/ppaatt/indexed/secondlife/


My integrity checks on the script here are:
This Chatbot script works reasonably well for some of us ... how about you? If not, why not?


<pre>$ ls -l Chatbot-lsl.txt
=== Bug: Channel number omitted, comma included, in echo of list value ===
-rw-r--r--@ 1 pat  staff  22876 13 Sep 20:02 Chatbot-lsl.txt
$ openssl md5 Chatbot-lsl.txt
MD5(Chatbot-lsl.txt)= 9373258278a20329c7ba39353454059c
$ </pre>


Does that copy work for you?
STEPS TO REPRODUCE:
<pre>/7 [a, b, c] // a list value</pre>


-- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 20:12, 13 September 2007 (PDT)
EXPECTED RESULTS:
<pre>/7 [a, b, c] // a list value
[a, b, c]
</pre>


A: Sorry, Ppaatt, no. I get
ACTUAL RESULTS:
<pre>// [a, b, c] // a list value
, [a, b, c]
</pre>


<code>(316, 48) : ERROR Syntax Error </code>
See? The channel number 7 is missing from the echo, broken by design.


even when using the source @ aol.com. But as I don't use Linux, I couldn't check integrety.
See? A spurious string ", " of comma and blank appears before the expected result, who knows why.


--[[User:Huney Jewell|Huney Jewell]] 21:32, 13 September 2007 (PDT)
Another example that produces the spurious ", " is:
<pre>/7 [llGetFreeMemory(), llGetFreeMemory(), llGetFreeMemory()]</pre>


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


Ppaatt, thanks for the response
-- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 07:42, 14 September 2007 (PDT)


Your volunteer status is noted and appeciated.
== Bugs That May Have Been Fixed ==


I tried commenting out blocks of code before/after but still got the same error. It is not that line that is the problem, rather elsewhere.
=== Bug: (316, 48) : ERROR Syntax Error ===


Maybe the unix/windows CR/LF issue?
The thousand lines of Chatbot script is script enough to confuse some compilers.


I also tried the saved version you mentioned, but also had problems.
The [[LSL Write Once Debug Everywhere]] article explains how you can develop LSL scripts that run well and compile without error in many places.


Could I suggest making a box with the script in it available somewhere in SL?
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).


Regards
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.


TimZim Teatime
-- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 06:14, 26 September 2007 (PDT)


== Wishes ==
== Rethink ==


We could/ should soon add ...
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.


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


* discover the time of day -- say if World > Force Sun > Region Default would show sunrise, noon, sunset, midnight, or what
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.


* move to owner and stop moving
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.


* parsing of prefix monadic + - arithmetic operators, for scalar and vectors and rotations
I figure we can define monadic == to mean evaluate a name.


* parsing of infix dyadic + - * / % arithmetic operators with precedence, on pairs of values of the same type, on vector/ rotation pairs, on rotation/ vector pairs
I figure we can use simply-quoted URL-encoding to pass strings around.


Also the [[Chatbot]] and [[Hello Avatar]] examples should learn from each other, e.g.:
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.


<pre>
-- [[User:Ppaatt Lynagh|Ppaatt Lynagh]]
llSetStatus(STATUS_PHYSICS, FALSE); llSleep(0.1);
llSetLocalRot(llRotBetween(<1, 0, 0>, llGetSunDirection())); // turn the East face to the Sun
</pre>

Latest revision as of 21:13, 14 October 2007

Call for Volunteers

You can help by adding bugs, fixing bugs, and adding comments here to tell us why and how you are or are not working with your own Chatbot.

You can help by running the Chatbot in Linux, even if you have been running only Mac OS X or Windows on your computer.

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

News

The LSL_Protocol/ListMessage article now has a little code in an example - likely the seed of what will replace the first draft of the Chatbot.

Wishes

We could/ should soon add ...

We could/ should soon add ...

  • say if llGetSunDirection changes or not when World > Force Sun > Region Default shows sunrise, noon, sunset, midnight, or what -- likely it doesn't, the object doesn't know what its owning or creating avatar sees

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

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)

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