|
Hate Hastings
Two Track Mind
Join date: 17 Oct 2007
Posts: 340
|
10-23-2007 07:06
I'm really missing the availability of set and maps (or dictionaries if you like) in LSL. Are there any efficient open source implementations which properly use hashes or whatnot? Or have I just not stumbled upon something already built in?
Thanks!
_____________________
You are definitely slutty in the best possible definitions of the word. Dirty, hot, and a little scary, but in a good way. I'd like do awful things to you, but I'm pretty sure you'd snap me in two like a twig and leave me cross-eyed, dizzy and confused. I'm giving you a 9.8, tied for the top rating ever given. Almost off-the charts slutty. Shame on you and congratulations. -- Trout
|
|
Stephen Zenith
Registered User
Join date: 15 May 2006
Posts: 1,029
|
10-23-2007 07:11
From: Hate Hastings I'm really missing the availability of set and maps (or dictionaries if you like) in LSL. Are there any efficient open source implementations which properly use hashes or whatnot? Or have I just not stumbled upon something already built in?
Thanks! Sadly, there's not much built in to LSL for this - the closest is probably strided lists. Urgh. As for library implementations of them, we're kind of hampered by the lack of even an array - everything would have to be built on top of lists. What I generally do is maintain 2 or more lists, one containing the key and the others the rest of the data. You would need to write a few wrappers, to search for the key then lookup the returned index in the other lists. And more functions to insert and delete data from all lists simultaneously. Not great though.
|
|
Hate Hastings
Two Track Mind
Join date: 17 Oct 2007
Posts: 340
|
10-23-2007 09:59
OK, thanks. I suppose that's good enough for small datasets. Too bad the language wasn't just a bit more robust.
_____________________
You are definitely slutty in the best possible definitions of the word. Dirty, hot, and a little scary, but in a good way. I'd like do awful things to you, but I'm pretty sure you'd snap me in two like a twig and leave me cross-eyed, dizzy and confused. I'm giving you a 9.8, tied for the top rating ever given. Almost off-the charts slutty. Shame on you and congratulations. -- Trout
|
|
Ed Gobo
ed44's alt
Join date: 20 Jun 2006
Posts: 220
|
10-23-2007 19:53
Mono is just around the corner! Might not provide maps and set at first, but the speed will be there to make something similar work.
Right now lsl is just too slow to do much along these lines.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
10-23-2007 23:34
to clarify:
Mono will just be used to compile the LSL scripts so they run a lot faster. Other than that, any additions are unlikely to happen in the forseeable future.
|