We've been working very hard over the past couple of months to get our first
source code release ready. I'm happy to announce today the first drop of the IronRuby source
code. IronRuby is licensed under very liberal terms as set out by the Microsoft
Permissive License.
We're also happy to announce that we will be accepting source code
contributions into the IronRuby libraries. Right now we have a lot of
logistical work that we still need to do, but we fully intend on getting
IronRuby onto Rubyforge by the end of
August.
Some of you may be wondering why we are only accepting contributions into the
libraries and not the entire compiler. It's because IronRuby is built on top of
the Dynamic Language Runtime (DLR), and the public interfaces to the DLR are not
complete at this time. Since the DLR will ship as part of the CLR in the future,
we cannot accept contributions into the IronRuby compiler, at least initially.
However, once the DLR matures and reaches 1.0 status with fully supported public
interfaces, we will fully open up all parts of the IronRuby project for
external contributions.
To start playing with this release, you'll need to build IronRuby. This
release of IronRuby requires the .NET
Framework 2.0 Redistributable. Just unzip the source code file, and run the
build.cmd batch file to create a release-mode build of IronRuby.
You can kick the tires by typing some code interactively using our simple
REPL console application. You'll find it at \bin\release\rbx.exe. You should add
\bin\release to your path to make your life easier.
Next you should look at the unit tests under \tests\ruby\builtins. This will
give you an idea of what works and what doesn't work in IronRuby. We've put most
of our effort into Array and String; any other support that's in the libraries
was put in there to support building Array and String features.
We have .NET interop working out of the box; you can import .NET libraries
into your Ruby programs via require:
require 'mscorlib'
require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Notice how you need to use the fully-qualified assembly name in require.
We don't have include working yet at top-level scope, so you'll
need to either use fully-qualified type names or assign them to constants:
Window = System::Windows::Forms::Window
We also have pretty good performance in this release. We use a DLR feature
called Dynamic Sites, which is our implementation of adaptive call-site method
caching. Other than using Dynamic Sites, we have not done any other specific
performance tuning for this release.
In micro-benchmarks which measure method call performance, we are
significantly faster than Ruby 1.8.6. In micro-benchmarks which measure library
performance, we are on par with Ruby 1.8.6; we expect to see performance
improvements in these benchmarks in the future. In micro-benchmarks that involve
raising exceptions, we are slower than Ruby 1.8.6; but if control flow on your
program's critical path involves raising exceptions you may want to rethink your
design :)
We're really interested in hearing what you have to say about this release.
I'm at OSCON all week,
so feel free to come up and say hello if you're attending. My IronRuby talk is
this Thursday at 5:20pm, and I'll be busy cooking up a fun demo for that talk
between now and then. If you're not at OSCON, feel free to send mail to jflam at
the big software company in Redmond.
Last but most important, I'd like to thank the members of the IronRuby team:
Tomas Matousek, and Haibo Luo for their hard work in
getting this release out the door. Great job, guys!
Update
Some additional posts worth reading:
Scott Guthrie, who has a nice
sample on using IronRuby with WPF
Jason Zander, on working
with the open source community
Miguel de Icaza, for an outside perspective of our changes as a
company