May 12, 2008

Hacking IronRuby

IronRuby is coming! Expected to be released this year Microsoft's IronRuby is quite a unique project. Fully open sourced, OSI-approved/GPL-inspired  license, hosted at Rubyforge, accepting external contributions. Yes, Microsoft's IronRuby. Cool.

Anyway, I decided why don't I build IronRuby version of the famous "Try Ruby in your browser" by _why? So anybody with 15 free minutes at hands could play with IronRuby. That sounds like cool way to learn IronRuby internals.

IronRuby includes ir.exe - nice interactive IronRuby shell. Thanks to open sources I managed to hack up simple AJAXish Web version in just one night. ASP.NET 3.5 application hosting IronRuby runtime + simple Web console emulating ir.exe.

It's hosted at http://www.ironruby.info/ir, currently at version "0.first.hack". Go play with it, but please don't crash it often. Here is a screenshot for those lazy ones:

Hosting a programming language shell on Web poses additional interesting problems. Ruby is a powerful language and IronRuby additionally provides access to the whole .NET framework. Letting anybody writing and executing any programs on my shared hosting??? Well, I managed to make it running under Minimal Trust level, which means execute permissions only. No file system, no network or Web access, nothing. That should be safe enough, but please don't hack me. Learn IronRuby instead!

Go Try IronRuby in your browser.

Any comments are welcome!

...