LSL-Editor
|
|
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
|
11-05-2007 07:00
From: Ralph Doctorow I really disagree with the premise of this post, LSLEditor is a fantanstic effort which Alphons is doing for his own reasons and making available for free. IMHO there's no option for "can we leave it to Alphons alone" or not. It's his baby and he's doing a remarkable job of it. I think you missed the point that I was trying to make. I never intended that we take over the work, but I was concerned that like a lot of developers we get so tied up in our work that we tend to forget to preserve it for posterity. Accidents can happen. Now the work I am doing within SL could be thrown away and no one would really miss it but I would not want that to happen to LSLEditor. However Alphons' reply above more than adequately assures me and I hope all others that we can leave it to Alphons. He has all the bases covered. Alphons, Good luck with the new DSL connection and we all look forward to the new releases.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-05-2007 07:07
Well Hell, I was really hoping the reply was going to be two knocks and he actually sacrified a few brain cells instead Welcome back!
_____________________
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
|
|
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
|
11-06-2007 08:27
From: Jesse Barnett Well Hell, I was really hoping the reply was going to be two knocks  In my "other Second-Life", I am accompanied by this avatar, for almost 20 years now 
|
|
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
|
11-06-2007 08:47
Wow !!!
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
11-06-2007 09:06
Nice to know you have something pleasant to look at (okay, understatement) when your eyes get tired of looking at code. And thanks again for taking your eyes off of that pleasant sight to continue to work on code that helps all of us SO MUCH!
While you do not want *me* kissing you for your wonderful work, perhaps she could give you an extra for us!
Thanks, Baron
|
|
Trevor Langdon
Second Life Resident
Join date: 20 Oct 2004
Posts: 149
|
11-06-2007 15:26
From: Alphons Jano  In my "other Second-Life", I am accompanied by this avatar, for almost 20 years now  Here, here!!! So, for life of me, I can't figure out how you manage to get coding in edgewise Thank You "other Second-Life" avatar for sharing Alphons with us 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-06-2007 17:02
She looks wonderful and I am soooo glad you have a well rounded life Alphons. I was kind of worrying that you had been working too hard. But now I see you have your grounding to keep you inline.
Mine is a little 11 year old in pigtails who gently pulls me away from the computer when necessary.
_____________________
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
|
|
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
|
11-10-2007 08:06
Hi Alphons,
May I ask what your plans for implementing the following in LSLEditor versions to come. 1. llCreateLink llBreakLink and associated events and commands 2. llMessageLinked and associated link_message handling. 3. llRezObject and associated object_rez and on_rez handling.
I ask to assist me in preparing a set of test scenarios which will hopefully assist you in testing.
If I am being impertinent in asking please let me know.
Regards Gregory
|
|
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
|
11-14-2007 06:52
Yes, the linking and the Rez functions have to be implemented. I have been working on too many levels and far to many projects to make some good progression on the Editor, so I think I have to prioritise my work a bit. Today I will post a new (minor) update. Linking en rezzing, have to go in combination with the SolutionExplorer. Now scripts have to be visible on an editor tab to execute. If rezzing a scripts, it could open a new tab, or just run in the background, presenting some executing list of runnable objects, when clicked upon, showing the debug console for the object. Well, just some thoughts on the subject. And, hey all asking is free. Thanks for offering help, but first some new code has to be added to LSLEditor before any testing is useful. -A.
|
|
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
|
(minor) release 2.24 of LSL-Editor
11-14-2007 06:52
As of today release 2.24 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 release contains a few bug fixes. Thanks to all the beta-testers and bugreport senders. Have fun!
|
|
Gregory McLeod
Registered User
Join date: 21 Oct 2006
Posts: 278
|
11-14-2007 07:20
Thanks for the reply Alphons and I will await your pleasure.
|
|
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
|
release 2.25 of LSL-Editor
11-22-2007 15:22
As of today release 2.25 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.
I'm really busy doing other project at the moment, so this release contains only a few bug fixes.
Have fun!
|
|
hiro Voss
Registered User
Join date: 6 Oct 2006
Posts: 57
|
I had a hang today...
11-22-2007 23:40
I was debugging a couple of very small scripts and had LSL - Editor end up hanging. When I look at the TaskManager I noticed the memory usage was crazy big. Just wanted to let you know. I've attached a screenshot of the Processes tab.
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
11-23-2007 02:12
I sent a bug report on this but will post here also in case others have the same problem. Starting with 2.22 llMessageLinked link_message no longer works.
_____________________
There are no stupid questions, just stupid people.
|
|
Alphons Jano
Dancer
Join date: 27 Sep 2006
Posts: 121
|
11-25-2007 08:09
hiro Voss, Can you send me some bugreport including a script so I can fix the bug. But it is also possible to program a simple loop doing the same thing. So I have to check it myself if there is some memory leak or not. Laurence Corleone, got your bugreport. The message linking does work, but it has to be in a solution explorer environment to work correctly. But remember, the implementation is not 100% complete. Check the status on internals on the help section of the website. have fun -A.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-25-2007 13:34
if llBase64ToInteger is fed too short a string it crashes the script. This is not the proper behavior.  Matter of fact it complains about the length when it shouldn't.
_____________________
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
|
11-25-2007 14:25
Hello Strife Onizuka, On the llBase64ToInteger function, Garbage in, rubbish out... Second Life returns some random number when feeding trash to this function. A programmer never gets to know there is an error, or worse, relies on the current "behavior" of SL.... which is random. I think it is better to leave it this way, throwing an Oops, but emulating SL is what we want, I guess... I'll put it on my list. cheers.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-25-2007 19:56
From: Alphons Jano Hello Strife Onizuka, On the llBase64ToInteger function, Garbage in, rubbish out... Second Life returns some random number when feeding trash to this function. A programmer never gets to know there is an error, or worse, relies on the current "behavior" of SL.... which is random. I think it is better to leave it this way, throwing an Oops, but emulating SL is what we want, I guess... I'll put it on my list. cheers. I would love it to throw a warning but to crash the script is a bit drastic. And it doesn't fill the integer with total junk, only the bytes it has no data for. My script knows when there is going to be junk and ignores it. LSL only requires 6 to 8 chars for an integer, requiring exactly 8 is a pain in the ass (as I have to crop AND pad the base64 strings). That said, I've been chasing down what I thought was a bug in my code, which turns out not to be. list k = [0xb5c0fbcf];
default { state_entry() {//You would think that both numbers output by the llOwnerSay would be the same, you would be wrong. integer a = 0xb5c0fbcf; //list k = [0xb5c0fbcf];//List scope does not matter, same result for local and global. llOwnerSay(llList2CSV([a, llList2Integer(k,0)])); } }
If you want a script to test out for the base64 stuff, try this... ////////////////////////////////////////////////////////////////////////////////////// // // UTF-8 MD5 // Version 1.0 Alpha // ESL Compiled: "Nov 25 2007", "23:00:43" // Copyright (C) 2007 Strife Onizuka // Based on Pseudo-code from http://en.wikipedia.org/wiki/MD5 // // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; // version 3 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this library. If not, see <http://www.gnu.org/licenses/> // or write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA // //////////////////////////////////////////////////////////////////////////////////////
//===================================================// // Combined Library // // "Nov 25 2007", "23:00:43" // // Copyright (C) 2004-2007, Strife Onizuka (cc-by) // // http://creativecommons.org/licenses/by/3.0/ // //===================================================// //{
//Functions marked "Mono Safe" are safe for use in LSLEditor & Mono //Functions marked "LSO Safe" are safe for use in LSO //Functions marked "Double Safe" are safe for use in VM's that support doubles (Mono, LSLEditor). //Mono is the future VM for LSL, LSO is the current VM of LSL. //To achieve safety, the functions require more bytecode and sacrifice a bit of performance.
string TrimRight(string src, string chrs)//Mono Safe, LSO Safe { integer i = llStringLength(src); integer j = i; do;while(~llSubStringIndex(chrs, llGetSubString(src, i = (~-(j = i)), i)) && j); return llDeleteSubString(src, j, 0xFFFF); }
string hexc="0123456789ABCDEF";
//} Combined Library
list k1 = [ -680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329]; list k2 = [ -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734]; list k3 = [ -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651]; list k4 = [ -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551];
list r1 = [7, 12, 17, 22]; list r2 = [5, 9, 14, 20]; list r3 = [4, 11, 16, 23]; list r4 = [6, 10, 15, 21];
string UTF8_MD5(string plain) { integer H1 = 1732584193; integer H2 = -271733879; integer H3 = -1732584194; integer H4 = 271733878;
//OR on the extra bit. integer j = llStringLength(plain) << 3; integer b = (~-(((j + 552) & -512) >> 5)); integer T = llBase64ToInteger((TrimRight(llGetSubString(plain = llStringToBase64(plain), -4, -1),"=")) + "AAAA"); string buf = "AAA"; integer i = -5; do buf += buf; while((i = -~i)); if(j) { i = 0x800000; if(T & 0xFF00) i = 0x00000080; else if(T & 0xFF0000) i = 0x00008000; } else T = 0x80000000;//T is corrupt because of https://jira.secondlife.com/browse/SVC-104 // llOwnerSay(llList2CSV([i,j])); plain = llGetSubString( llDeleteSubString(plain, -4, -1) + llGetSubString(llIntegerToBase64(T | i), 0, 5) + buf, 0, ((b << 4) / 3) - 7) + llGetSubString(llIntegerToBase64((((j & 0xFF) << 20) | ((j & 0xFF00) << 4) | ((j >> 12) & 0xFF0) | ((j >> 28) & 0xF)) >> ((b % 3) << 1)), 0, 5) + "AAAAAAAA"; integer S = i = 0; list x; do { integer A = H1; integer B = H2; integer C = H3; integer D = H4; integer F = j = 0; x = []; do { T = llBase64ToInteger(buf = llGetSubString(plain, T = ((i + j) << 4) / 3, T+6)) << (S = (((i + j) % 3) << 1)); if(S) T = T | (llBase64ToInteger("A" + (llDeleteSubString(buf, 0, 1))) >> (6 - S)); x += (T = (((T & 0xFF) << 24) | ((T & 0xFF00) << 8) | ((T >> 8) & 0xFF00) | ((T >> 24) & 0xFF)));
F = A + llList2Integer(k1, j) + T + (D ^ (B & (C ^ D))); S = B; T = llList2Integer(r1, j & 3); B += (F << T) | ((F >> (32 - T)) & ~(-1 << T)); A = D; D = C; C = S; } while(16 > (j = -~j)); do { F = A + llList2Integer(k2, j & 15) + (C ^ (D & (B ^ C))) + llList2Integer(x, (5 * j + 1) & 15); S = B; T = llList2Integer(r2, j & 3); B += (F << T) | ((F >> (32 - T)) & ~(-1 << T)); A = D; D = C; C = S; } while(32 > (j = -~j)); do { F = A + llList2Integer(k3, j & 15) + (B ^ C ^ D) + llList2Integer(x, (3 * j + 5) & 15); S = B; T = llList2Integer(r3, j & 3); B += (F << T) | ((F >> (32 - T)) & ~(-1 << T)); A = D; D = C; C = S; } while(48 > (j = -~j)); do { S = B; T = llList2Integer(r4, j & 3); F = A + llList2Integer(k4, j & 15) + (C ^ (B | (~D))) + llList2Integer(x, (7 * j) & 15); B += (F << T) | ((F >> (32 - T)) & ~(-1 << T)); A = D; D = C; C = S; } while(64 > (j = -~j)); llOwnerSay(llList2CSV(x)); H1 += A; H2 += B; H3 += C; H4 += D; }while(b > (i += 16)); x = [H4, H3, H2, H1]; i = -4; buf = ""; do { T = llList2Integer(x,i); j = 32; do buf = llGetSubString(hexc, b = ((T >> (j - 4)) & 0xF), b) + llGetSubString(hexc, b = ((T >> (j - 8)) & 0xF), b) + buf; while ((j -= 8)); }while ((i = -~i)); return buf; }
integer go(string in, string answer) { llOwnerSay(""); llResetTime(); string out = UTF8_MD5(in); float t = llGetTime(); llOwnerSay(llDumpList2String(([out,t,llStringLength(in)]),",")); if(answer) { llOwnerSay(answer); return answer == out; } return TRUE; }
default {
state_entry() { llListen(0, "", "", ""); if(go("","D41D8CD98F00B204E9800998ECF8427E")) if(go("abc","900150983CD24FB0D6963F7D28E17F72")) go("The quick brown fox jumps over the lazy dog","9E107D9D372BB6826BD81D3542A419D6"); // llOwnerSay((string)llGetTime()); } listen(integer a, string b, key c, string d) { llOwnerSay(UTF8_MD5(d)); } }
If you want a version of the code that doesn't crash your VM see: https://wiki.secondlife.com/wiki/MD5
_____________________
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
|
11-25-2007 20:53
Can't run the UTF-8 MD5 script in LSLEditor. It will throw an error on the empty "do" on line 47. And running the same script through lslint says:
function `Base64_MD5' declared but never used. new.lsl 177 1
Take that back. You can run it if you check "skip warnings while compiling"
_____________________
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
|
11-25-2007 23:00
From: Jesse Barnett Take that back. You can run it if you check "skip warnings while compiling" That was one of the first things I turned off.  Didn't want to but it was treating warnings like errors. It's not like LSLInt where you can banish messages, funny thing, with LSLInt I treat warnings as errors then banish them or fix them. Totally off-topic: I just finished adding a reply feature to my GM Forum Admin script. Now I can merge, reply to, move and close threads in bulk without even having to read them. 
_____________________
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
|
11-26-2007 04:49
From: Strife Onizuka integer a = 0xb5c0fbcf; list k = [0xb5c0fbcf];
Yes, the list constructor was in error, it is fixed in the next release (or try the beta). As a bonus, llBase64ToInteger returns some random integer when feeding junk, it does not parse, incorrect nor incomplete strings. After testing, LSL does return non-random data when using less than 6 chars also. (try AAEA it returns 65536 which is somehow correct ...) off for now.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-26-2007 16:15
From: Alphons Jano Yes, the list constructor was in error, it is fixed in the next release (or try the beta). As a bonus, llBase64ToInteger returns some random integer when feeding junk, it does not parse, incorrect nor incomplete strings. After testing, LSL does return non-random data when using less than 6 chars also. (try AAEA it returns 65536 which is somehow correct ...) off for now. The problem with the LSL's llBase64ToInteger is that it overflows the buffer when it converts the base64 to an integer. Evidence suggests what they do is convert the base64 string to a binary string then just change the pointer type from a char to an integer. When the resulting string is too short it parses the null and reads past it, overflowing the string. The "random" bits are what ever was in memory before. I have of course reported this to LL and provided them with a Base64ToInteger function that doesn't suffer from this flaw (it doesn't place any requirements on the input string). LSL returns the currect result always when provided 6 -> 8 base64 characters (not counting "=" characters) http://jira.secondlife.com/browse/SVC-104Of course if LSL had functions for byte access to the datatypes, I wouldn't have to write such ugly functions. I'll try the latest beta, and thanks for getting on top of this. Now if it could detect when a script is changed by an external application then ask to reload it, the world would be a great place (I'm writing code in ESL with scite, compiling it to LSL and then testing it in LSLEditor). I'm writing code these days that is execution order safe code so must stuff works without need of modification or just needs a few extra parentheses.
_____________________
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
|
Highlighting Problems
11-26-2007 16:27
I have trouble highlighting text in my scripts. For some reason I can't highlight individual characters but instead the whole function.
Also it would be nice if you add word wrap as a feature.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-26-2007 16:42
A word wrap option would be nice. A little test script for illustrating how llBase64ToInteger works string byte2hex(integer x)//Mono Safe, LSO Safe {//Helper function for use with unicode characters. integer y = (x >> 4) & 0xF; return llGetSubString(hexc, y, y) + llGetSubString(hexc, x & 0xF, x & 0xF); }//This function would benefit greatly from the DUP opcode, it would remove 19 bytes.
string hexc="0123456789ABCDEF";
test(string a) { integer b = llStringLength(a); do { string d = llDeleteSubString(a,b--,0xFFFF); integer c = llBase64ToInteger(d); llOwnerSay(llList2CSV([byte2hex(c>>24) + byte2hex(c>>16) + byte2hex(c>>8) + byte2hex(c), d])); }while(b); }
default { state_entry() { test("AAAAAAAAAA"); test("//////////"); } } //Results from SL, X represents a random hex character //00000000, AAAAAAAAAA //00000000, AAAAAAAAA //00000000, AAAAAAAA //00000000, AAAAAAA //00000000, AAAAAA //00000000, AAAAA //00000000, AAAA //000000XX, AAA //0000XXXX, AA //00XXXXXX, A //00000000, ////////// //00000000, ///////// //FFFFFFFF, //////// //FFFFFFFF, /////// //FFFFFFFF, ////// //FFFFFF00, ///// //FFFFFF00, //// //FFFF00XX, /// //FF00XXXX, // //00XXXXXX, /
I only really care about how it handles 8 or less characters. Those are the situations that interest me and which I use.
_____________________
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.26 of LSL-Editor
11-28-2007 10:55
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!
|