Current OPCODE implementation status
A raw status table over the LSO opcodes: which ones the IL processor understands and which ones are implemented so far in the LSL-to-.NET translation.
The journal
149 articles on building software and understanding how it works.
A raw status table over the LSO opcodes: which ones the IL processor understands and which ones are implemented so far in the LSL-to-.NET translation.
The book everyone calls the bible of the CLR arrived a week early. 648 pages between me and a much deeper understanding of what .NET actually does with my code — fuel for the LSO project.
I have a second blog for the Second Life side of things. Meanwhile: I'm writing a program that reads a program and creates a program that runs inside a program. Close to lucid programming.
A fresh start for the blog — everything before this post was copied over from my previous blog.
Running thousands of scripts on a grid cannot mean one OS thread per script. Old ideas come to the rescue: cooperative multitasking à la Windows 3.11 and NT fibres, i.e. user space threading where each script carries its own execution state.
LSL bytecode is full of pointers — static frames, heap, jump targets — all referring to positions inside a 16k LSO file. Here is my plan for mapping them onto dictionaries and two-pass MSIL label generation.
Direct translation from the LSO stack to the .NET stack falls apart: LSO doesn't always tell you the datatype, and .NET wants its stack served in a very particular order. The fix: my own stack in a base class the compiled scripts inherit from.
The converter can now take LSL bytecode all the way to a compiled .NET .dll on disk, with events visible in Visual Studio and llSay mapped to Console.WriteLine. Messy code, but the goal is simply "Version 1: Functional".
Found the "final bug" in the LSL bytecode parser and compiled my first small function to a working .dll. One opcode and one builtin command supported — it's a start, and it works!
Can LSL bytecode map onto .NET CLR? Yes — and here is the biggest Hello World I have ever written, generated at run-time with ILGenerator and OpCodes.
The plan for OpenSim script support: read compiled LSL bytecode, convert it to .NET bytecode and let the JIT produce native code, with AppDomains providing the sandbox. Blazing fast execution inside the .NET VM.
Second Life is Web 2.0 as a world — and something I dreamt of building myself back in the QBasic days. I like it, but the limits show: I want AI animals and full ecosystems, and that needs more freedom than LSL and Linden's servers can offer.
The obligatory first post.
A pointer to a longer article I posted in the Artificial Emotion group, on the idea of simulating emotions in software.