Come On, Come On, Hurry Up Array, Come On!

We’re going down the pub! Warning, this post may containt geekiness and nuts.

One of the things that has always puzzled me in Second Life has been the lack of arrays in LSL. I mean arrays, they are sexy, they are useful, they store data, they beat lists, strided lists and any other sort of list by a country mile. Basically arrays are too sexy to be bodged as lists.

I didn’t do much scripting in Second Life because scripting consumes much time in my day job, so I felt it would be like a busman’s holiday, but arrays, how can you not have arrays? That was one of my first questions to myself back in 2007 when I joined Second Life and it remains a questions that puzzles me as we come close to 2014.

I was so scarred by Second Life not having arrays that when I took a look at Cloud Party and saw that they supported arrays, I cheered!

The power of arrays should not be underestimated, indexof, finding matches of, adding, removing, substrings, two dimnensional! Arrays are bloody sexy and more importantly, they are bloody useful.

Today, whilst at work and using Windows Powershell to build an array, sort it, use it, seduce it, kiss it, thank it, I found myself thinking of Second Life and its lack of arrays. I actually felt sorry for Second Life!

Really, arrays are so damn powerful, they may even be able to end poverty and bring world peace, that’s how awesome arrays are, and LSL doesn’t support them! If you use Second Life and you script, then you should want arrays. On the other hand if you’re an end user who thinks scripting is for geeks who wear awful jumpers and glasses, you should still want arrays, because they are bloody awesome for making the tools you want.

LSLArrays.Add(“We Want Them”)

Second Life needs to kiss and make up with arrays!


4 Replies to “Come On, Come On, Hurry Up Array, Come On!”

  1. Yep, so true! There is only one thing I’d want more than arrays, and that is LL resuscitating the almost completed project developed by Babbage Linden to support the use of C# as a scripting language.

  2. i disagree (:

    lists in LSL are crippled. to make lists work well then we need a way to create class objects. or structs

    when have these then arrays get used way less at the higher language levels. of which LSL is one

  3. i just add more about this. even if they were really simple. say just variables allowed. so no private properties, or methods or inheritance. example:

    object avatar
    {
    key id;
    string name;
    integer rank;
    }

    list avatars;

    integer i;

    for(i==0;i=0;i++)
    {
    object a = llList2Object(avatars, i);
    llSay(0, (string)a.id, a.name, (string)a.rank);
    }

    avatars = []; // free all objects and clear list

    // solo objects
    object a = llObjectNew(avatar);
    llObjectFree(a);

  4. hmm! it ate my codes. bc i had angle brackets in it. so i change to a dot (.)

    object avatar
    {
    key id;
    string name;
    integer rank;
    }

    list avatars;

    integer i;

    for(i==0; i.=9; i++)
    {
    object a = llObjectNew(avatar);
    a.id = llDetectedKey(i);
    a.name = llKey2Name(a.id);
    a.rank = i;
    avatars += [a];
    }

    for(i==9; i.=0; i++)
    {
    a object = llList2Object(avatars, i);
    llSay(0, (string)a.id, a.name, (string)a.rank);
    }

    avatars = []; // free all objects and clear list

    // solo objects
    object a = llObjectNew(avatar);
    llObjectFree(a);

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow

Get the latest posts delivered to your mailbox: