[Opensim-dev] Should the core OpenSim distribution carry many scripting languages?

Toni Alatalo antont at kyperjokki.fi
Mon Jun 2 07:49:55 UTC 2008


Justin Clark-Casey wrote:
> Last week, Kinoc was kind enough to write an implementation of Yield 
> Prolog where YP is translated into underlying C# for compilation (in the 
>   

yah, that has seemed really cool in itself. i'm also not very 
experienced with Prolog at all, have only used a gui multi agent system 
dev tool that generated prolog (when studying at cs.vu.nl, that was fun 
:) but have now learned it a bit again. but to the actual point:

> that by including many scripting languages in the OpenSim core 
> distribution (if Prolog, why not Javascript, Ruby, Python, etc, etc.) we 
>   

(...)

> core distribution support for a few scripting languages.  In my opinion 
> these would be LSL, maybe C# and possibly one other (maybe Python). 
>   

One thing to note here is that as OpenSim is a .NET app running on the 
*common language* runtime, there is in a way no difference in the APIs 
no matter whether you are using C#, (Iron)Python, (Iron)Ruby, J(ava)# 
etc. Even though the code is now written in C#, it is not in any way C# 
specific, but can be used similarily from any .NET lang. Last autumn 
when working on Rex I tested this by writing OpenSim region modules in 
IronPython, was fun enough :) . So in /that part/ no extra work is 
required for supporting other languages, the c#-written classes are the 
api already, so there is no worries about decay in some language 
specific binding.

So AFAIK things are good for all languages for region modules and the 
like, but the scripting engine is a different beast and supporting LSL 
and the commands there is a different issue. Certainly the hacks (pardon 
if that sounds harsh, is not meant to :) to compile to C# are 
interesting cause running e.g behaviour logic can get heavy so that you 
don't want too much extra dynamic dispatching etc. going on (they are 
improving the JITs for dynamic langs though but it's very early still). 
I don't know how much the fact that it's still all running on the CLR in 
the end can help there - at least all languages just share the same 
implementations of the actual commands.

I could not reach a conclusion here, was a bit lost in thinking what is 
actually needed for diff. languages (like now the //YP syntax trick), 
but at least have this opinion:

> either directly from the author or from some satellite repository 
> (perhaps similar to Perl's CPAN or PHP's PEAR).  I would personally 
> prefer to see the core OpenSim distribution kept relatively lean and mean.
>   

+1

> If necessary, I am happy to make any necessary infrastructure changes to 
> make language plugins possible/easier (which probably also means making 
> much needed enhancements to the plugin system).
>   

That sounds great in principle. I have no need for great multiplicity - 
C#, IronPython and YieldProlog cover everything I can imagine needing in 
(near) future, but already there I'd be using two plugins, and other 
people have diff. preferences :)

So if there are no technical obstacles that would make such a plugin 
infra too clumsy or slow in practice, so that e.g. the current YP 
support and some kind of Python support can be nicely made using it, I 
think it's a good plan.

~Toni




More information about the Opensim-dev mailing list