Sunday, April 05, 2009

I'm late with the news, but there is a new release of IronRuby. There has also been a fresh release of the Silverlight dynamic languages to work with the beta version of Silverlight 3. Jimmy has an unhealthy preference for IronRuby over IronPython, but he's posted a few blog entries on both subjects.

Staying true to our “Conference-driven development schedule,” this release is in conjunction with MIX ‘09, where Silverlight 3 Beta and ASP.NET MVC 1.0 were announced, to name a few. John Lam spoke at MIX today at 12:30pm in Las Vegas about using dynamic languages in Silverlight for testing, scripting, and application building. And some ASP.NET MVC with IronRuby is thrown in there too.

IronRuby passes approximately 80% of RubySpec, the best test suite Ruby has today. IronRuby is best at language compatibility, passing 95% of those tests, but worse on the standard libraries with a pass-rate of 77%. Overall the pass-rate as gone up approximately 10% since the last release, and there hasn’t been a major library push since getting Rails running. For IronRuby 1.0, that number is going to be as high as possible, and we’ll ensure that by continuing to work with the RubySpec project to improve the test suite.

Since this release is around MIX, and John’s talk is going to be focused around Silverlight and ASP.NET MVC, it seems like a great time to polish IronRuby’s .NET interop. For example, the release enables calling generic methods, implementing interfaces with IronRuby, and better conversions between .NET and Ruby types. We’ve also started to build a .NET interop test suite, using the same infrastructure RubySpec uses (MSpec), to provide a executable specification of how IronRuby and .NET play together. There will also be a written specification showing what these .NET interop features are good for, but not for this release.

The Silverlight Dynamic Languages SDK (the snappily named SDLSDK) is the home for the tools to build Silverlight applications with DLR based languages. This release includes support for Silverlight 3, console (REPL) in Silverlight applications and testing support.

While many developers love to program in dynamic languages like Python or Ruby, they may not have that freedom in their day-to-day jobs, for a variety of tecnical and business reasons. However, dynamic languages are as useful when embedded in existing software, possibly making the design better than a non-scripting-enabled version. Languages based on the dynamic language runtime are really easy to embed in .NET applications, so hopefully this post inspires you to add scripting support to your applications.

Testing is a great use for dynamic languages, especially if the application being tested is written in a compiled language like C# or VB. Ruby is an especially interesting language for writing tests in due to the popularity of RSpec, a behavior-driven-development testing framework. IronRuby makes it really easy to test .NET applications because of it's .NET integration and ability to run real Ruby programs, like RSpec. However, this becomes much more difficult to do in Silverlight for a variety of reasons. And Silverlight doesn't have good options for testing to begin with, except for the Silverlight Unit Test Framework, but I yearn for something simpler. This post will show you how to test a C# Silverlight application with IronRuby, using a testing framework called Bacon, a lightweight RSpec clone.

So next someone should adapt the testing work to use unittest and IronPython...