Another Age Must Be The Judge

Wed 29 September 2010 by Jim Purbrick

Babbage Linden

Almost exactly 6 years ago, the incredible Cory Ondrejka and I met for the first time in real life (having previously blogged together on Terra Nova) at the Austin Game Conference 2004, where we got on like a house on fire. Several months later I joined Linden Lab and (as James and Jim Linden were already taken) Babbage Linden was born. The first task Cory asked me to do was embed the Mono virtual machine in to Second Life as a next generation scripting engine. It was a wonderful project to work on, involving authoring a new LSL compiler back end to generate CIL bytecode, a scavaging garbage collector to allow assembly unloading and a microthread injector to allow 10s of 1000s of scripts to run concurrently on Mono in a single process (work that has been described in detail in talks at ooPSLA, Lang.NET and FOSDEM ). As a long term R&D project it was put on hold a number of times to make way for more important projects like HTTP-Out, Message Liberation and Het-Grid, but eventually we shipped a Second Life simulator that embedded Mono in 2008.

Running LSL on Mono in Second Life was a huge win, allowing scripts to run 100s of times faster in some cases and reducing the average memory footprint of scripts in Second Life by a third, but the big hairy audatious goal for Mono in Second Life was always to enable other languages that targeted the Common Language Infrastructure to run in Second Life. After waiting until the end of last year for Mono 2.6 to implement the bytecode verifier and CoreCLR security sandbox which allowed us to safely run other languages on Mono inside the simulator we started work on adding support for C# in Second Life at the beginning of this year. A team of Linden engineers in Brighton and California did an amazing job overcoming an array of challenges and got to the point where we had Silverlight chess demos, run time configurable script profilers and scripts that used .NET reflection APIs to visualize other C# scripts running in our development simulators earlier this summer.

Alas, tomorrow is my last day at Linden Lab and Babbage Linden will never get to see C# scripts running in the wild in Second Life, but I very much hope that I do. I hope that C# support is eventually added to Second Life and that I don’t have to wait 170 years to turn the handle. As another Babbage said when he failed to build the Difference Engine: “Another age must be the judge”.