[Opensim-dev] Place for osFoo functions that only work with certain languages

Rob Smart rob.s.smart at gmail.com
Wed Sep 10 12:59:59 UTC 2008


Hi Melanie,

I'd like to support the osParseJSON function in LSL as well as C#
script making it more available.

Unfortunately because JSON can contain a varying depth of nested
objects,arrays, integers and strings then it
wouldnt be possible to use a strided list of name/value pairs.

I'd certainly be interested in more dopwerful datatypes being
introduced to LSL, the two in particular I'd
need to implement would be System.Collections.Hashtable and
System.Collections.ListArray.

I agree that the scripting needs to be a bit more configurable to
allow certain functions to be disabled by region/grid administrators.

cheers,
Rob Smart  (Yossarian Seattle)

-------------------------------------------------------------------

Date: Tue, 09 Sep 2008 13:52:46 +0100
From: Melanie <melanie at t-data.com>
Subject: Re: [Opensim-dev] Place for osFoo functions that only work
	with certain languages
To: opensim-dev at lists.berlios.de
Message-ID: <48C6719E.7090403 at t-data.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi,

if you want to support it in LSL, you can make a function that
returns a LSL strided list of name/value pairs. That can then be
taken apart using LSLs atrocious list handling functions.

However, there will be no objection from me against enhancing LSL
with better list handling, or arrays, or hashtables, or anything,
really, as long as these functions don't make existing scripts
incompatible. I'm perfectly fine with adding anything useful.

This don't even need to be blockable, I am only interested in a
"disable" for functions that could be used to grief or DOS. So, by
all means, let's do an array member reference syntax in LSL and a
type for it, I know people will love it.

Melanie

Sean Dague wrote:
> I've got some script support for JSON request parsing from one of our
> folks, but it returns a hashtable, so is really only suitable for C# in
> it's current form.  As we all know, LSL doesn't do complex data
> structures in any real way.
>
> I occurs to me that we'll get more of these things over time, and am
> curious about how to integrate this properly.
>
> Some options seem to be:
>
> 1) have it only work on some languages (possibly a way to mark things as
> such).
>
> 2) Support some kind of opaque typing so we could do:
>
> obj foo = osFoo(...);
> string val = osFooGet(foo, "mykey");
>
> That would change LSL, but let us to support something like this.
>
> 3) Force the function to keep it's own global state so that:
>
> string token = osFoo();
> string val = osFooGet(token, "mykey");
> osFooReap(token);
>
>
> 3 seems to be the biggest pain, so I would vote against that.  1 is
> easy, but I'm not sure what others think about it.
>
> Opinions welcomed.  I'd love to get these bits in as I think they are
> useful to lots of people.
>
> 	-Sean
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080910/995f8596/attachment-0001.html>


More information about the Opensim-dev mailing list