Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LSL-Editor

Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
11-28-2007 12:14
From: Alphons Jano
As of today release 2.26 of LSL-Editor can be downloaded (or let the auto update do the job).

LSL-Editor: is a standalone Windows "Editor / Compiler / Debugger / Syntax checker / Runtime environment" for Second Life scripts, based on .NET framework. Because it does not need Second Life grid nor viewer, it is very useful when the grid is down for maintenance, or when you are not connected to it. It can compile and execute many LSL scripts, but also the code completion, features make it a "must have". An HTML Help LSLWiki can be downloaded and used within LSLEditor to make this a true offline working environment.

This is just a maintenance release.

Have fun!


It does have several limitations, can't preview llSetText, memmory is infinite, and instruction execution is100x faster than in SL.
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-28-2007 16:59
Would be great if the open dialog box allowed for selecting more then one file.

Good job btw, I no longer have to explicitly compile my ESL to target LSLEditor (that is until I find the next incompatibility).

"Debug->Syntax Checker" does not show warnings if you have "Skip Warnings when compiling" checked.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
11-28-2007 18:25
From: Strife Onizuka
Would be great if the open dialog box allowed for selecting more then one file.

Good job btw, I no longer have to explicitly compile my ESL to target LSLEditor (that is until I find the next incompatibility).

"Debug->Syntax Checker" does not show warnings if you have "Skip Warnings when compiling" checked.
:p

You can open several scripts at once, they'll appear as tabs in their respective order.
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-28-2007 21:49
From: Bobbyb30 Zohari
:p

You can open several scripts at once, they'll appear as tabs in their respective order.


I know, thats why it's strange the file dialog box has been set to only allow selecting of one file. If it were configured for multi-select you could use shift or ctrl to select multiple files.

That said I have another features request. A command line switch that starts running the script opened by the command line.

So I could execute a command "lsleditor.exe /d monkeys.lsl" and it would run the script without me having to press F5.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Tarquin Janus
Registered User
Join date: 31 Jan 2007
Posts: 5
Remove Formatting
11-29-2007 05:30
Don't know about anyone else but I'm finding that I do all my development with this tool now. I can check responses from websites without needing to add debug say commands, reliably check XML-RPC requests (that's a novelty).

Something I find is that SL converts the tab to 4 white spaces. I have a complex script that's 14k characters in size, but removing all them white spaces reduces it to just under 9k Then removing all unnecessary spaces and carraige returns saved a further 2k reducing the script to 7k (!!!!!!! Half the size!!!!!). The format feature is really usefull, but to get a bit more zip out of SL's 16k limit, a format remover would be mint!! (would it improve performance like doing the same for javascript or CSS? anyone know?)

Add a charachter count so we can see if we're hitting the limit and in danger of a stack overflow. I've mentioned this to Alphons already but thought it would be good to post out in the open.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-29-2007 06:18
From: Tarquin Janus
Don't know about anyone else but I'm finding that I do all my development with this tool now. I can check responses from websites without needing to add debug say commands, reliably check XML-RPC requests (that's a novelty).

Something I find is that SL converts the tab to 4 white spaces. I have a complex script that's 14k characters in size, but removing all them white spaces reduces it to just under 9k Then removing all unnecessary spaces and carraige returns saved a further 2k reducing the script to 7k (!!!!!!! Half the size!!!!!). The format feature is really usefull, but to get a bit more zip out of SL's 16k limit, a format remover would be mint!! (would it improve performance like doing the same for javascript or CSS? anyone know?)

Add a charachter count so we can see if we're hitting the limit and in danger of a stack overflow. I've mentioned this to Alphons already but thought it would be good to post out in the open.


When you upload a script to SL, your client compiles the LSL to bytecode (LSO), whitespace and comments are not expressed in the bytecode; they have no effect on the script. Stripping all comments and whitespace won't make your script run faster, only harder to read and maintain. The limit on LSL text is 64kb. Don't feel bad, when I started writing LSL I thought the same thing. My first real scripting project had almost no whitespace and used single & double letter variable names.

------

I found another gotcha.

When typing chat it doesn't support "//" as you know "/x" where x is an integer allows you to specify the channel to chat on. What "//" does is chat on the previously specified channel. So if you issued "/4 blah" and then "// again" both messages would be sent on channel 4.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Patrick2 Chama
Registered User
Join date: 15 Sep 2006
Posts: 52
11-29-2007 08:36
I love this program, but the text entry window is not very responsive. If you could replace it with a more responsive model it would be great, something like TextPad (my usual development environment).
Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
11-29-2007 12:24
You need to update the download version on lsleditor.org because when you download it, it automatically requests to be updated to a newer version.
_____________________
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
11-29-2007 12:34
Controlled by an option on the Tools>Options>Environment>General.
Sorry misread your post. You are right but Alphons is usually very quick at keeping things in line, in fact he may have done it will I type.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-29-2007 21:45
LSLEditor's llModPow doesn't work properly, I've created a hack that does an OK job of working around it but I don't think it is the correct solution. It seems to work but I haven't tested the boarder conditions.

CODE

//llModPow is the current implementation of llModPow in LSLEditor
//This function is recursive but i doubt it will recurse more then 1.
integer ModPow(integer x, integer y, integer m)
{
if(!x) return 0;
integer k = 1+llCeil(llLog(llAbs(x)) / 0.69314718055994530941723212145818);//ceil(log2(x))
integer w = 32;
integer p = w / k;
integer r = y / p;
integer f = y % p;
integer z = 1;
if(r) z = ModPow(llModPow(x,p,m),r,m);
if(f) z = (z * llModPow(x,f,m)) % m;
return z;
}


You can learn about how to implement this function here:
http://www.cs.washington.edu/education/courses/csep590/06wi/
http://www.cs.washington.edu/education/courses/csep590/06wi/lectures/

Current results of running this:
CODE

//Test Code
default
{
state_entry()
{
integer x=3;integer y=0;integer m=5;
for(; y < 64; y++)
llOwnerSay(llList2CSV([x,y,m, ModPow(x,y,m), llModPow(x,y,m)]));
}
}


LSLEditor: 3, 0, 5, 1, 1
LSLEditor: 3, 1, 5, 3, 3
LSLEditor: 3, 2, 5, 4, 4
LSLEditor: 3, 3, 5, 2, 2
LSLEditor: 3, 4, 5, 1, 1
LSLEditor: 3, 5, 5, 3, 3
LSLEditor: 3, 6, 5, 4, 4
LSLEditor: 3, 7, 5, 2, 2
LSLEditor: 3, 8, 5, 1, 1
LSLEditor: 3, 9, 5, 3, 3
LSLEditor: 3, 10, 5, 4, 4
LSLEditor: 3, 11, 5, 2, 2
LSLEditor: 3, 12, 5, 1, 1
LSLEditor: 3, 13, 5, 3, 3
LSLEditor: 3, 14, 5, 4, 4
LSLEditor: 3, 15, 5, 2, 2
LSLEditor: 3, 16, 5, 1, 1
LSLEditor: 3, 17, 5, 3, 3
LSLEditor: 3, 18, 5, 4, 4
LSLEditor: 3, 19, 5, 2, 2
LSLEditor: 3, 20, 5, 1, -3
LSLEditor: 3, 21, 5, 3, -3
LSLEditor: 3, 22, 5, 4, -3
LSLEditor: 3, 23, 5, 2, -3
LSLEditor: 3, 24, 5, 1, -3
LSLEditor: 3, 25, 5, 3, -3
LSLEditor: 3, 26, 5, 4, -3
LSLEditor: 3, 27, 5, 2, -3
LSLEditor: 3, 28, 5, 1, -3
LSLEditor: 3, 29, 5, 3, -3
LSLEditor: 3, 30, 5, 4, -3
LSLEditor: 3, 31, 5, 2, -3
LSLEditor: 3, 32, 5, 1, -3
LSLEditor: 3, 33, 5, 3, -3
LSLEditor: 3, 34, 5, 4, -3
LSLEditor: 3, 35, 5, 2, -3
LSLEditor: 3, 36, 5, 1, -3
LSLEditor: 3, 37, 5, 3, -3
LSLEditor: 3, 38, 5, 4, -3
LSLEditor: 3, 39, 5, 2, -3
LSLEditor: 3, 40, 5, 1, -3
LSLEditor: 3, 41, 5, 3, -3
LSLEditor: 3, 42, 5, 4, -3
LSLEditor: 3, 43, 5, 2, -3
LSLEditor: 3, 44, 5, 1, -3
LSLEditor: 3, 45, 5, 3, -3
LSLEditor: 3, 46, 5, 4, -3
LSLEditor: 3, 47, 5, 2, -3
LSLEditor: 3, 48, 5, 1, -3
LSLEditor: 3, 49, 5, 3, -3
LSLEditor: 3, 50, 5, 4, -3
LSLEditor: 3, 51, 5, 2, -3
LSLEditor: 3, 52, 5, 1, -3
LSLEditor: 3, 53, 5, 3, -3
LSLEditor: 3, 54, 5, 4, -3
LSLEditor: 3, 55, 5, 2, -3
LSLEditor: 3, 56, 5, 1, -3
LSLEditor: 3, 57, 5, 3, -3
LSLEditor: 3, 58, 5, 4, -3
LSLEditor: 3, 59, 5, 2, -3
LSLEditor: 3, 60, 5, 1, -3
LSLEditor: 3, 61, 5, 3, -3
LSLEditor: 3, 62, 5, 4, -3
LSLEditor: 3, 63, 5, 2, -3

SL: 3, 0, 5, 1, 1
SL: 3, 1, 5, 3, 3
SL: 3, 2, 5, 4, 4
SL: 3, 3, 5, 2, 2
SL: 3, 4, 5, 1, 1
SL: 3, 5, 5, 3, 3
SL: 3, 6, 5, 4, 4
SL: 3, 7, 5, 2, 2
SL: 3, 8, 5, 1, 1
SL: 3, 9, 5, 3, 3
SL: 3, 10, 5, 4, 4
SL: 3, 11, 5, 2, 2
SL: 3, 12, 5, 1, 1
SL: 3, 13, 5, 3, 3
SL: 3, 14, 5, 4, 4
SL: 3, 15, 5, 2, 2
SL: 3, 16, 5, 1, 1
SL: 3, 17, 5, 3, 3
SL: 3, 18, 5, 4, 4
SL: 3, 19, 5, 2, 2
SL: 3, 20, 5, 1, 1
SL: 3, 21, 5, 3, 3
SL: 3, 22, 5, 4, 4
SL: 3, 23, 5, 2, 2
SL: 3, 24, 5, 1, 1
SL: 3, 25, 5, 3, 3
SL: 3, 26, 5, 4, 4
SL: 3, 27, 5, 2, 2
SL: 3, 28, 5, 1, 1
SL: 3, 29, 5, 3, 3
SL: 3, 30, 5, 4, 4
SL: 3, 31, 5, 2, 2
SL: 3, 32, 5, 1, 1
SL: 3, 33, 5, 3, 3
SL: 3, 34, 5, 4, 4
SL: 3, 35, 5, 2, 2
SL: 3, 36, 5, 1, 1
SL: 3, 37, 5, 3, 3
SL: 3, 38, 5, 4, 4
SL: 3, 39, 5, 2, 2
SL: 3, 40, 5, 1, 1
SL: 3, 41, 5, 3, 3
SL: 3, 42, 5, 4, 4
SL: 3, 43, 5, 2, 2
SL: 3, 44, 5, 1, 1
SL: 3, 45, 5, 3, 3
SL: 3, 46, 5, 4, 4
SL: 3, 47, 5, 2, 2
SL: 3, 48, 5, 1, 1
SL: 3, 49, 5, 3, 3
SL: 3, 50, 5, 4, 4
SL: 3, 51, 5, 2, 2
SL: 3, 52, 5, 1, 1
SL: 3, 53, 5, 3, 3
SL: 3, 54, 5, 4, 4
SL: 3, 55, 5, 2, 2
SL: 3, 56, 5, 1, 1
SL: 3, 57, 5, 3, 3
SL: 3, 58, 5, 4, 4
SL: 3, 59, 5, 2, 2
SL: 3, 60, 5, 1, 1
SL: 3, 61, 5, 3, 3
SL: 3, 62, 5, 4, 4
SL: 3, 63, 5, 2, 2
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
release 2.27 of LSL-Editor
12-05-2007 08:58
As of today release 2.27 of LSL-Editor can be downloaded (or let the auto update do the job).

LSL-Editor: is a standalone Windows "Editor / Compiler / Debugger / Syntax checker / Runtime environment" for Second Life scripts, based on .NET framework. Because it does not need Second Life grid nor viewer, it is very useful when the grid is down for maintenance, or when you are not connected to it. It can compile and execute many LSL scripts, but also the code completion, features make it a "must have". An HTML Help LSLWiki can be downloaded and used within LSLEditor to make this a true offline working environment.

This is just a maintenance release. Some oops and crashes have been fixed. Also the llModPow is re-implemented, thanks Strife! Also many thanks to my donators and bugreport senders.

Have fun (again) ;-)
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
12-05-2007 17:07
I keep getting the following error message in the bottom window:
Invalid search path 'C:\Program Files\Microsoft Visual Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' new.lsl -4 0

What's causing this and how can I fix it. I reinstalled Visual Studio but it did no good.
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
12-05-2007 18:36
Hello Monica Balut,

LSLEditor does not use 'C:\Program Files\Microsoft Visual Studio\VC98\lib' nor a 'LIB environment variable'. I think it is a local issue. Open up some command window (run cmd on windows XP) and type 'set' to see all your local venvironment vars. Maybe one or more are in error....

-A.
Bobby Dayton
Test Pilot for Airfix
Join date: 15 Nov 2003
Posts: 206
12-06-2007 00:54
Does anyone know if there is a version of the .net framework that is portable, ie run from a memory stick. I like using the LSL editor while at work as cant run SL there. But we also cannot install anything on our PC's. .Net isn't installed on them.

On a separate but somewhat related note. I have a PocketPC which has .net installed on it. I am wondering what the possibility of porting LSL editor to that. A portable LSL editing and testing enviroment. Very nice.
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
Upgrading to LSLEditor 2.27 (.2896)
12-06-2007 05:48
LSLEditor 2.24 and above had problems on simple verbose debug messages. It is advised to upgrade to the just uploaded 2.27 (.2896) by Help -> Download Update

To me this clarifies a lot of downloads from the archive....

To Bobby Dayton, I think .NET framework is to complex to ship on a stick, however I do like the Idea to have some U3 application. If possible, I will adapt LSLEditor. For now, I can not help you, maybe others.

More info on:
http://www.u3.com
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-06-2007 09:55
You might be able to run LSLEditor in Mono. It maybe be possible to run Mono without having to install it. If not Mono is open source.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-06-2007 20:04
I found a couple bugs with llBase64ToString.

1) It requires perfect padding and complains if it doesn't get it. LSL doesn't.
2) It produces null characters which messes things up.

Try: llOwnerSay(llBase64ToString("SGkAA===";) + " there";);
In SL you get "Hi there"
In LSLEditor you get an error.

Try: llOwnerSay(llBase64ToString("SGkAAA==";) + " there";);
In SL you get "Hi there"
In LSLEditor you get "Hi"

I'm willing to bet it doesn't error bad UTF-8 chars the same way but that isn't a bug that i have interest in atm.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Bobbyb30 Zohari
SL Mentor Coach
Join date: 11 Nov 2006
Posts: 466
12-07-2007 03:56
If we open multiple tabs, and compile, it attempts to compile all the scripts...Maybe you could fix that.
_____________________
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-07-2007 07:13
I think that is a feature so you can run and have multiple scripts interact with each other.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-07-2007 19:29
LSLEditor fails to compile or pass the "LSL Language Test"
https://wiki.secondlife.com/wiki/LSL_Language_Test

To compile it needs quaternion specified as a synonym for rotation.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-07-2007 20:08
Strife has a new XTEA script in the wiki:
https://wiki.secondlife.com/wiki/XTEA

Works fine in LSLEditor unless you use .,' etc..............

This works :

Mary had a little lamb Its fleece was white as snow

but:

Mary had a little lamb. Its fleece was white as snow

Mary had a little lamb, Its fleece was white as snow

Mary had a little lamb It's fleece was white as snow

all fail and throw an "Invalid length for a Base-64 char array" error.

They will work in world.

Hoping the extra info will help with narrow down the Base-64 problem Strife mentioned

BUT>>>>>>>>>>>>>>> Enjoy your weekend first Alphonse. Your dedication & hard work are still highly appreciated.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-07-2007 22:27
I have a pad function that deals with the error message but then causes the null problem ^^;

CODE

string Base64Pad(string in)
{
integer len = llStringLength(in);
return in + llDeleteSubString("AAAA",0, ~-(len % 4));
}
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
12-08-2007 07:10
From: Strife Onizuka
LSLEditor fails to compile or pass the "LSL Language Test"
https://wiki.secondlife.com/wiki/LSL_Language_Test

To compile it needs quaternion specified as a synonym for rotation.


Great test script. I changed some internals to pass all tests, except the ones due to left-to-right evaluation nature of LSLEditor. (Known issue) Just uploaded the beta for testing.

Now I have to solve some other internal-issues (private live) just put up the Christmas tree and all ;-)


cheers.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-08-2007 09:17
Depending which function you use to convert a float to a string, the number of decimal places is either 5 or 6.

Don't put us before RL.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Wyatt Burton
Registered User
Join date: 11 Jan 2007
Posts: 49
12-11-2007 07:07
Alphons,

The following runs iin LSLEditor but doesn't compile in SL.

list myList=[];
for (integer i=0; i<200; i++) { myList = myList + ; }

However the following does:

list myList=[];
integer i;
for ( i=0; i<200; i++) { myList = myList + ; }
1 ... 5 6 7 8 9 10 11 12 13