Mono on the beta grid
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
01-23-2008 09:53
From: Meade Paravane I thought the script compiler was going to be different and that an old script would pretty much behave as (slowly as) it used to, even if run on a MONO-enabled sim. If that's true, I'm not sure the het grid stuff will help on this, unless they had both compilers in the viewer.
Do we have details on how all this stuff will be organised? Thought I also heard something about distributed compiling, too.. I was under the impression that after everything is ready for full production, all LSL2 scripts would be recompiled by the system and still keep their running states. Is this true?
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-23-2008 09:57
From: Meade Paravane I thought the script compiler was going to be different and that an old script would pretty much behave as (slowly as) it used to, even if run on a MONO-enabled sim. If that's true, I'm not sure the het grid stuff will help on this, unless they had both compilers in the viewer.
Do we have details on how all this stuff will be organised? Thought I also heard something about distributed compiling, too.. According to the wiki; when we are in the MONO enabled sims in Beta grid, we will have to use a mono enabled viewer and there will be a check box to compile it to MONO. If the box isn't checked it will compile like normal.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
01-23-2008 09:59
I don't think so, Tyken, but I could be wrong. I think if you want the benefits, you'll have to recompile your scripts or stalk product designers until they send you a new version. From: Jesse Barnett According to the wiki; when we are in the MONO enabled sims in Beta grid, we will have to use a mono enabled viewer and there will be a check box to compile it to MONO. If the box isn't checked it will compile like normal. So the beta grid viewer will have both compilers.. TY!
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-23-2008 11:42
From: Tyken Hightower I was under the impression that after everything is ready for full production, all LSL2 scripts would be recompiled by the system and still keep their running states. Is this true? That was my understanding too, but the last I heard anything about it was at least six months ago (if not more), so I don't know how much has changed. I doubt they'll migrate script states just for the beta testing though. We'll see.
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
01-23-2008 11:51
From http://blog.secondlife.com/2006/12/20/town-hall-with-cory-introductory-transcript/From: Cory [14:40] Cory Linden: As long as we’re on libSL, one of our devs has used it pretty extensively in testing Mono. We’ve had several full up tests of Mono running on grids and things are looking very good.
Because the Mono project is still dealing with some security issues and we’re finding memory leaks both in our changes to Mono and their code, we’re moving slowly and carefully. Novell/Ximian have been really helpful, so we’re making decent progress.
There are some technical changes we still need to make in particular, we’ll need to compile Mono on the server side which requires a distributed compilation service to be running on the grid (yay, backbone!) but I expect that we will begin testing Mono on the main grid in Q1/Q2 2007. The process there will be to have places on the grid where you can bring scripts and recompile them into Mono for testing. That will let you report broken scripts to us.
Since Mono tends to execute LSL about 600 timesfaster, I expect that there will be some interesting borkage around carefully timed scripts. Babbage has talked about the implications of Mono extensively, but it’s important to remember that the sequence will be: 1) Start allowing compilation of LSL to Mono/CLI. Test existing scripts like crazy. (Q1/Q2) 2) Think about ways to include other languages (Q more than 2)
edit: so, assuming nothing but the dates have changed: server-side compiler; scripts must be recompiled to use MONO; it's butt-whoopin' fast.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
01-23-2008 12:40
From: Periapse Linden ... our plan is to begin a Mono beta program next week. Can't wait to try it. 
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-23-2008 12:42
*cracks knuckles* I can't wait to inflict my code on them.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
01-23-2008 13:01
From: Strife Onizuka *cracks knuckles* I can't wait to inflict my code on them. /me hands Periapse some valium. edit: good to see you're still around, Strife.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Lafiel Takaaki
Registered User
Join date: 2 Oct 2007
Posts: 29
|
01-24-2008 12:04
I hope it will be possible (in near future) to write scripts in C#. Maybe it will be possible to run both the old LSL and the new one, operating in C# or so (please no Basic or Java  ) where the old functions are just wrapped from LSL to Mono (so old scripts and people who used only know how to programm in lsl) can use the old syntax and the others can use C# for example.
|
|
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
|
01-24-2008 18:43
From: Strife Onizuka *cracks knuckles* I can't wait to inflict my code on them. If anyone can break it, Strife can!  One thing that's still not clear to me is what happens with existing LSL-VM bytecode. Willl it be re-compiled to Mono VM bytecode transparently? Will the Mono VM have an LSL VM emulation mode? Will sims run both VMs (gak!)?
_____________________
Help find a missing child. 
|
|
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
|
01-24-2008 18:52
From: Lafiel Takaaki I hope it will be possible (in near future) to write scripts in C#. Maybe it will be possible to run both the old LSL and the new one, operating in C# or so (please no Basic or Java  ) where the old functions are just wrapped from LSL to Mono (so old scripts and people who used only know how to programm in lsl) can use the old syntax and the others can use C# for example. I think perhaps you are not clear on the difference between the LSL language and the LSL virtual machine (VM). It just so happens that they have the same name, but they are different things. Mono is not a language, it is a VM that runs bytecode. When it is implemented, LSL the language will still be in use, it will simply compile to Mono bytecode instead of LSL VM bytecode. Because there are other languages (such as C#) which also have Mono compilers, running the Mono VM opens the door to SL scripting in those languages.
_____________________
Help find a missing child. 
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-24-2008 20:17
I believe that both VMs will be run side by side but it won't allow new LSO scripts after some point in time.
I've only disappered into my code. I'm working on an LSO VM at the moment. Currently the VM code can only decompile scripts to LSO assembly. It does a pretty good job at that.
This has revealed to me some rather disturbing aspects of LSO which pretty much explains why LL isn't doing LSO to CIL translation directly. What they have said they are going to do is recompile the script from LSL to CIL and transfer the script state. This is very interesting because translating the script state from one engine to the other is no small feat. The LSO stack is untyped, you can't tell pointers from floats or integers. It means that you have to read the script bytecode and assign types to data that is found in the stack. The trouble is that there are ways of combining LSO bytecodes so that you cannot easily determine how a value got on the stack and consequently you cannot determine it's type. Fortunately the LSL compiler does such a bad job of optimizing code (it doesn't do any optimization) that it can fill in the missing details. You could do LSO to CIL but you would have no way of ensuring that the result was valid.
Currently I'm still working on refactoring the core of my VM. I have it reading the function and event information from an XML file. Next task is to write the actual functions. And if I'm truly feeling brave work out how to store the stack and heap in the memory space properly (not to keen on doing this). Who knows when I'll release it to the public.
Edit: Come to think of it, I don't think LL has changed the VM in a significant manor since LSL1... only added a few new bytecodes. Which explains a lot.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Lafiel Takaaki
Registered User
Join date: 2 Oct 2007
Posts: 29
|
01-25-2008 02:00
From: Siann Beck I think perhaps you are not clear on the difference between the LSL language and the LSL virtual machine (VM). It just so happens that they have the same name, but they are different things. Mono is not a language, it is a VM that runs bytecode. When it is implemented, LSL the language will still be in use, it will simply compile to Mono bytecode instead of LSL VM bytecode. Because there are other languages (such as C#) which also have Mono compilers, running the Mono VM opens the door to SL scripting in those languages. What i mean is having both the lsl sytax and the C# syntax in use. I don't really like the current lsl syntax for some reasons, for example lists and some of the stuff. If i read the LL statement correctly, they said that when mono is introduced into beta/live grid, the old syntax will remain so from user side nothing will change on the lsl scripting language. The changes will remain only server sided (other bytecode which is executed more efficiently). Since it's impossible to switch from lsl to another scripting language, there would be need to support both for a while (and i'm not talking about the VM). Even after Mono release, we will still have to write scripts in LSL, since LSL won't change, it just compiles to another code (may it be C# or whatever). So, when you compile your current LSL scripts with Mono, the LSL language is interpreted to something else (i.e. C#) and then compiled (at least i assume that it does). I would like to see an option to choose to write scripts in C# or LSL (in the end both will compile to the same bytecode), but programming in C# would allow the advanced users to do more stuff and do it more efficiently as it would be possible to do with the current LSL implementation/syntax (i.e. arrays, List, ListDictionary, SortedList etc.). So the old syntax could be keep for backward compatibility (so old scripts can recompile in a bytecode readable by Mono VM) and for easy-to-script language for new scripters. C# on other side could be used by the advanced programmers to write the scripts. So instead lf a list myList = [0, 5, 3]; ... integer i = llList2Integer(myList, 1); one could use int[] myList = {0, 5, 3} ... int i = myList[1]; or List<int> myList = new List<int>  new int[] {0, 5, 3}); int i = myList[1]; So it would be much easier to handle such lists or perform operations on them (removing, inserting, searching or looping). So scripter would have the choicse to deceide if he will use the old LSL syntax or the more powerfull C# one
|
|
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
|
01-25-2008 06:59
No, LSL code won't be translated to C# or any other language -- it will be compiled directly to Mono bytecode. That's one thing LL has been working on as part of this project, a LSL -> Mono compiler.
I'm sure the LSL language will be around for a long time to come. What other language(s) LL will decide to support in the standard viewer (if any) is still unknown, but I wouldn't be surprised to see some of the third-party viewers supporting other languages, and perhaps even standalone compilers.
_____________________
Help find a missing child. 
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-25-2008 10:04
From: Siann Beck I'm sure the LSL language will be around for a long time to come. What other language(s) LL will decide to support in the standard viewer (if any) is still unknown, but I wouldn't be surprised to see some of the third-party viewers supporting other languages, and perhaps even standalone compilers. Didn't we just hear something about server-side compilation though? That might make this impossible. In fact, changing to server-side compilation miight be in ORDER to make this impossible, until LL can come to grips with the possibility of non-LSL source code (which will admittedly be harder to support). Or am I being too cynical? Heh. Or was that just in reference to converting existing LSL scripts/bytecode?
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
01-25-2008 10:16
Technically, couldn't we have made a compiler for C# to LSL bytecode regardless of mono/CIL?  Somewhat of one, at least?
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
01-25-2008 11:00
From: Day Oh Technically, couldn't we have made a compiler for C# to LSL bytecode regardless of mono/CIL?  Somewhat of one, at least? That is effectively what LSLEditor is doing, I reads the LSL code and translates to C# which it compiles to .NET (the M$ version of MONO). Aphones’ is the only person that can say for sure, but that is my guess as a devoted LSLEdior user.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-25-2008 11:12
Last time I decompiled LSLEditor, they were using RegExp to translate LSL into C# (which is the WRONG solution) then using the C# compiler class to convert the text into an assembly. I have no expectation that this has changed.
No you could not translate you source into LSO and then use LL's compiler to convert it because that is not how the new system works. LL's compiler converts LSL to CIL, not LSO. The conversion tool does parse the LSO but only to get the stack information.
LL will not support LSO to CIL because they cannot ensure the validity of the output. They cannot ensure that it will run as it did before the translation. There are some bytecodes that if used cannot be converted in a meaningful way.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
01-25-2008 11:53
From: Strife Onizuka convert the text into an assembly. Interesting observation. Is there any way that that assembly code is exposed or can be created directly? I guess its a mute point if MONO is so close, but as a hardware person I still prefer to avoid any abstraction layers.
|
|
Lafiel Takaaki
Registered User
Join date: 2 Oct 2007
Posts: 29
|
01-25-2008 12:31
From: Very Keynes That is effectively what LSLEditor is doing, I reads the LSL code and translates to C# which it compiles to .NET (the M$ version of MONO). Aphones’ is the only person that can say for sure, but that is my guess as a devoted LSLEdior user. Actually, its the opposite. Mono is the Open-Source attempt to make .NET availabale on Plattforms/OS's other than Microsofts Windows ^^ But in addition to .NET languages, Mono can also run Java, Pyton, etc. The reason why they choosed Mono is cause it's plattform independend (which is important since SL Client runs on linux too and the servers too i guess).
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-26-2008 03:39
I believe the big reason they chose Mono over JS, Java, Lua, and Python was that it gave them choices. CIL has many languages that compile into it; it doesn't lock them into a single language. Efficiency, versatility and licensing cost were far more important then it being open source, anyway how many main stream linux scripting engines aren't open source?
Every now and then the discussion has come up on the forums as to what should replace LSL, a sizable contingent of big names lobbied for VM's that supported C style languages (and lobbied against non-C style languages).
I won't go into further details about the past but to put it simply, Mono being open source was a minor issue.
----
You could decompile LSLEditor and then add in code so you could save the compiled script. It wouldn't be a big change. LSLEditor is written in C# and last I checked didn't have any CIL obfuscation applied to it so it should still be easy to decompile with the .Net Reflector
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
How about some pre-processors
01-26-2008 09:04
Something that converts <insert language here> to LSL, which then gets compiled. One recalls that C++ was originally a pre-processor that spit out C.
I can imagine a language almost identical to LSL, except that it has better arrays and lists of lists, and whatever. If it can be compiled directly to the Mono VM, great. If not, use offical LSL as an intermediate format.
_____________________
So many monkeys, so little Shakespeare.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-26-2008 11:14
Using LSL as an intermediate language is a fun idea in concept, but it is never, EVER going to work. This worked in C because it is a relatively low-level language, and is structured well enough to handle higher-level language constructs in a pretty straightforward manner (e.g. function pointer struct members for virtual methods). There is no WAY you'd be able to translate 95% of C, C++, Java, C#, Perl, or Python to LSL and be able to actually run in the 16kB memory limit.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
01-26-2008 17:12
Lee, I've been using a C preprocessor on LSL for years. We've been calling it ESL. I do all my coding in it. I have three libraries, a function library consisting of about 60 functions, a header library that makes nice headers, and an encryption library that probably needs updating again as it depends on the function library (and the function library is always in flux). I don't provide much in the way of documentation and the code contains a lot of undocumented macro's and places where you can change the behavior of the code generation with defines. /54/c4/18335/1.html - Talks about ESL & SciTe http://sl.sdfjkl.org/secondlife/scite/index.html - SciTe-ez https://wiki.secondlife.com/wiki/User:Strife_Onizuka - My userpage on the wiki with my SciTe config files for LSL/ESL. Incorporating lslint for syntax checking and LSLEditor for testing. http://mailerdaemon.home.comcast.net/CombinedLibrary.zip - My function library.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-26-2008 17:23
From: Strife Onizuka Lee, I've been using a C preprocessor on LSL for years. We've been calling it ESL. I do all my coding in it. I have three libraries, a function library consisting of about 60 functions, a header library that makes nice headers, and an encryption library that probably needs updating again as it depends on the function library (and the function library is always in flux). I don't provide much in the way of documentation and the code contains a lot of undocumented macro's and places where you can change the behavior of the code generation with defines. /54/c4/18335/1.html - Talks about ESL & SciTe http://sl.sdfjkl.org/secondlife/scite/index.html - SciTe-ez https://wiki.secondlife.com/wiki/User:Strife_Onizuka - My userpage on the wiki with my SciTe config files for LSL/ESL. Incorporating lslint for syntax checking and LSLEditor for testing. http://mailerdaemon.home.comcast.net/CombinedLibrary.zip - My function library. I would recommend bypassing Scite-EZ which is seriously out of date and skipping straight to the latest version of Scite which will work fine with Strife's config files. Then you have the latest updates for other languages. And if anyone is interested in it then don't pass up Indent which is there in his User page. Takes a while to get your head around it but then you can completely customize every facet of auto indent.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|