OpenSim compatibility: A place to develop for SecondLife, or not? - SLUniverse Forums
 
Navigation » SLUniverse Forums > Community Discussion > Other Grids / Virtual Worlds > OpenSim Discussion » OpenSim compatibility: A place to develop for SecondLife, or not?


OpenSim Discussion Discuss development, use, and support issues related to the OpenSim project.

Reply
 
LinkBack Thread Tools Display Modes
Old 03-06-2009, 07:59 PM   #1 (permalink)
Senior Member

SLU Supporter
 
Psyke Phaeton's Avatar
Running 'round in Circle's
 
Join Date: Sep 2007
Location: Australia
Posts: 6,949
My Mood:
SLShopper Ads: 1
SL Join Date: 12-Oct-2003
Blog Entries: 3
Question OpenSim compatibility: A place to develop for SecondLife, or not?

I have noticed a divergence with OpenSim LSL and SecondLife LSL.

Code:
default
{
    state_entry()
    {
        list llist = ["a","b"];
        llist = (llist=[]) + llist + ["c"];
        llSay(0, llDumpList2String(llist,"|"));
    }
}
was one way to conserve memory in SL when adding more data to something large.

In SL llist will become ["a","b","c"];

However is OpenSim XEngine (at least) llist will become ["c"]

Is this a bug, or should we stop using OpenSim for SL development due to divergence in how things work?

However..

Code:
default
{
    state_entry()
    {
        list llist = ["a","b"];
        llist += (llist=[]) + ["c"];
        llSay(0, llDumpList2String(llist,"|"));
    }
}
..works the same in both SL and OpenSim.

OpenSim warning:
"Warning: Multiple assignments to 'list' at line 5 column 19; results may differ between LSL and OSSL."
Psyke Phaeton is offline   Reply With Quote
Old 03-06-2009, 08:48 PM   #2 (permalink)
stored in the cloud

SLU Supporter
 
Kristian's Avatar
PHIL LINDEN SKULLF*CKED ME RIGHT HERE
 
Join Date: Jun 2007
Posts: 4,866
My Mood:
SL Join Date: 2/26/2005
Any divergence in the scripting lanuage should be considered a bug, I would think.
Kristian is offline   Reply With Quote
1 User Agreed:
Old 03-06-2009, 10:01 PM   #3 (permalink)
Senior Member
 
Beezle Warburton's Avatar
Beeble Bubble Bimbo
 
Join Date: Aug 2007
Location: Darkmere
Posts: 3,885
My Mood:
SLShopper Ads: 22
SL Join Date: October 24, 2006
Quote:
Originally Posted by Psyke Phaeton View Post
I have noticed a divergence with OpenSim LSL and SecondLife LSL.

Code:
default
{
    state_entry()
    {
        list llist = ["a","b"];
        llist = (llist=[]) + llist + ["c"];
        llSay(0, llDumpList2String(llist,"|"));
    }
}
was one way to conserve memory in SL when adding more data to something large.

In SL llist will become ["a","b","c"];

However is OpenSim XEngine (at least) llist will become ["c"]

Is this a bug, or should we stop using OpenSim for SL development due to divergence in how things work?

However..

Code:
default
{
    state_entry()
    {
        list llist = ["a","b"];
        llist += (llist=[]) + ["c"];
        llSay(0, llDumpList2String(llist,"|"));
    }
}
..works the same in both SL and OpenSim.

OpenSim warning:
"Warning: Multiple assignments to 'list' at line 5 column 19; results may differ between LSL and OSSL."
Many moons ago, this would've been the sort of thing I would've avoided in programming because of uncertain order-of-operation.

llist = (llist=[]) + llist + ["c"];

Besides that some languages any "assignment" value would return TRUE

(a=1) = TRUE

So you could possibly get a 'type mismatch' as you are trying to add a logical value to a list without typecasting it first.

At best you would assume that it would do correct order-of-operation:

The problem being you don't know whether it'll get the value of llist rewritten to [] before it adds it in a second time.

Mutters about memory recall/write vs. processing cyles and timings and stuff I used to know a lot more about.

LSL is goofy.

It's not so much a divergence in processing as to how a different platform copes with a logically 'questionable' script line.
__________________
Beezle Warburton is online now   Reply With Quote
1 User Said Thanks:
Old 03-06-2009, 10:21 PM   #4 (permalink)
Senior Member

SLU Supporter
 
Psyke Phaeton's Avatar
Running 'round in Circle's
 
Join Date: Sep 2007
Location: Australia
Posts: 6,949
My Mood:
SLShopper Ads: 1
SL Join Date: 12-Oct-2003
Blog Entries: 3
Even so it begs the bigger question. Can OpenSim in the future be used to develop for SecondLife? Or will the differences become too much.

Whilst I agree that having to do the above to save memory is stupid, it is extremely useful when limited to 64kb. It would become tedious if, to develop code on OpenSim, we had to edit it after transfering to SL.

I hope they keep 100% "goofy" LSL compatibility whilst also developing all the other compatibilities.
Psyke Phaeton is offline   Reply With Quote
1 User Agreed:
Old 03-06-2009, 10:34 PM   #5 (permalink)
Senior Member
 
Beezle Warburton's Avatar
Beeble Bubble Bimbo
 
Join Date: Aug 2007
Location: Darkmere
Posts: 3,885
My Mood:
SLShopper Ads: 22
SL Join Date: October 24, 2006
It's tricky to ensure compatibility for things that are basically hacks that work on sluggish processors.
Beezle Warburton is online now   Reply With Quote
Old 03-07-2009, 12:19 AM   #6 (permalink)
Senior Member

SLU Supporter
 
Adam Zaius's Avatar
Better than Joshua at worms armageddon.
 
Join Date: Sep 2007
Location: Perth, Orstraya.
Posts: 3,210
My Mood:
SL Join Date: 9-Jan-04
Business: Azure Islands
Send a message via Skype™ to Adam Zaius
I know the list hack has been a point of contention - since to support the SL order of operations there requires rewriting parts of the LSL Lexer/Parser we use. There's a bug on the mantis about it.

0003187: popular list memory saving hack does not work in LSL - Mantis
Adam Zaius is offline   Reply With Quote
1 User Said Yay!:
3 Users Said Thanks :
Old 03-07-2009, 12:58 AM   #7 (permalink)
Senior Member

SLU Supporter
 
Psyke Phaeton's Avatar
Running 'round in Circle's
 
Join Date: Sep 2007
Location: Australia
Posts: 6,949
My Mood:
SLShopper Ads: 1
SL Join Date: 12-Oct-2003
Blog Entries: 3
I guess I had better update my OpenSim
Psyke Phaeton is offline   Reply With Quote
Old 03-07-2009, 04:55 AM   #8 (permalink)
Senior Member
 
ZATZAi's Avatar
 
Join Date: Jun 2007
Location: California
Posts: 2,525
That's a rather lively mantis report...
__________________
- ZATZAi
ZATZAi is offline   Reply With Quote
1 User Agreed:
Reply

Tags
divergence, lsl, opensim, ossl, secondlife

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On