A first look at IronRuby
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

Congrats on this pre-release, John.
I've written a tutorial about hacking IronRuby ro modify it or extend it using the Visual C# IDE:
http://www.yashlabs.com/wp/?p=145
Best
Posted by: Josh Nursing | July 27, 2007 at 03:08 PM
@Josh:
Thanks so much for doing this! I'll make sure to call out your work in my IronRuby wrap-up post tomorrow!
Posted by: John Lam | July 29, 2007 at 08:07 AM
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software
Posted by: truthhurts | July 30, 2007 at 09:56 PM
@truthhurts:
This is a standard attribution clause that you will find in virtually any piece of open source software.
Posted by: John Lam | July 31, 2007 at 09:24 AM
Hi John,
I was looking over the source code of IronRuby and was wondering if there is an implementation of CodeDomProvider for IronRuby. As far as I could make out there is nothing like RubyCodeDomProvider. Do you intend to provide a CodeDomProvider for the next version? I've looked over the IronPython CodeDomProvider code and it seems that the implementations should be quite similar. If you could give me any input in this direction, it would be very much appreciated.
Posted by: Tudor | August 03, 2007 at 01:51 AM
@Tudor:
It's on the roadmap to implement a CodeDomProvider for IronRuby. But right now it's a ways off since there's a lot of core language features to implement before we get that far.
Posted by: John Lam | August 03, 2007 at 08:59 AM
John
I am getting a problem when running the build.cmd. The class 'Tokens' can't be found. I notice there is a NEW_PARSER conditional - should this be set?
Posted by: Adrian | August 07, 2007 at 04:39 AM
@Adrian - I haven't run across this before - I'm assuming that you don't have a corrupt ZIP?
Posted by: John Lam | August 08, 2007 at 09:51 AM
John
I don't think my .zip is corrupt.
When I load the solution into MS Visual Studio 2005, the Token.cs unit is in the Compiler sub directory of the Ruby project and the enum Tokens class is disabled by the '#if NEW_PARSER' statement?
Posted by: Adrian | August 09, 2007 at 03:32 AM
Outstanding. So happy to play with ruby. I was so happy to see wpf working in ruby. Quick question, right now the implementation is a interperter mode, is there any plan to make this as compiler to create exe?
Thanks a lot.
Posted by: dbcuser | August 09, 2007 at 02:45 PM
@dbcuser: The current implementation i not an interpreter - it's a just-in-time compiler. All of your Ruby code is compiled into IL before it is run. Right now we don't compile to a stand-alone EXE or DLL. But that may change in the future.
Posted by: John Lam | August 09, 2007 at 03:07 PM
Thanks and WPF part is facinating and I was able to build nicelooking GUIs in no time.
I am very much interested in using IronRuby (as I am a ruby fan) instead of some of my c# programs. When do you think 'future' will be? in 6 months or a year?
Posted by: dbcuser | August 09, 2007 at 03:11 PM
@dbcuser: 6 months to a year is about the right timeframe :)
Posted by: John Lam | August 09, 2007 at 04:41 PM
Hi John,
Giving few starterkits in Future for IronRuby that works with asp.net would be one of the greatest Idea.
Starterkits played a major role in the sucess of Asp.Net.
Converting few of the most popular Starterkits today to IronRuby will really become the most important topic for all Ruby Lovers.
You can assign this job today to few of your team members for future.
Hope you will apprecaite this
Posted by: SoftMind | August 09, 2007 at 11:11 PM
@ SoftMind,
Hi,
I just created a detailed blog for Starterkits.
Here it is:-
http://ironruby.blogspot.com/2007/08/starterkits-in-ironruby.html
Thanks SoftMind for your inspiration and innovative thinking.
Posted by: IronRuby | August 10, 2007 at 07:11 AM
John,
Thanks and 6 months not really bad at all.
Posted by: dbcuser | August 10, 2007 at 07:18 AM
Now, this is the most impressive announcement from Microsoft since long.
I am too happy and just put my hands on it.
i have just blogged about it at http://ashishwave.wordpress.com/2007/08/12/ironruby-ruby-running-on-net-microsoft-project
and it includes a link for those guys who are want to skip the ironruby source code compilation step, i have uploaded a pre-compiled binary distribution (of your source code ) at http://www.esnips.com/nsdoc/84afe4f5-68b9-45cf-940a-46fdf6c331cc
bye :-)
Ashish Ranjan
ashishwave@yahoo.com
Posted by: Ashish Ranjan | August 12, 2007 at 05:09 AM
It won't build on my machine. I get several of these:
Compiler\Parser\Tokenizer.cs(2269,17): error CS0246: The type or namespace name 'Tokens' could not be found (are you missing a using directive or an assembly reference?)
Posted by: Neil | August 14, 2007 at 08:45 AM
I've been study ROR for the past 8month (begineer) and now getting a starting with .Net especially ASP/Sharepoint. Do you have any advise for me on how I can incorporate ROR with .Net.
Thanks for you time.
Yunusa - 571-264-2776
Posted by: Yunusa Allotey | September 16, 2007 at 12:05 PM
I've been study ROR for the past 8month (begineer) and now getting a starting with .Net especially ASP/Sharepoint. Do you have any advise for me on how I can incorporate ROR with .Net.
Thanks for you time.
Yunusa - 571-264-2776
Posted by: Yunusa Allotey | September 16, 2007 at 12:08 PM
...this is really cool. Thanks for the awesome information.
Posted by: Mark Holton | November 06, 2007 at 05:50 PM
Hello!!! Thanks for your contribution! All our staff was waiting, and we are happy to play with rubby now.
http://alierra-software.com
Posted by: Sally, software developer | December 18, 2007 at 08:34 AM
Hi,
Any plans to introduce tutorials for IronRuby.
It would be a nice thing if some one starts few regular blogs explaining IronRuby with few codes that will work for .Net.
Ruby on rails tutorials with IronRuby will also be a nice example.
IronPython has Studio Python ( IDE ) to work with Ironpython on .Net.
Does IronRuby have something similar, to work and learn till IronRuby is matured.
One has to start learning before IronRuby actually arrives.
Posted by: SoftMind | December 18, 2007 at 11:59 PM
You would have to be an idiot to even think about using an MS implementation of another language. Remember MSJVM? Embrace, Extend, Extinguish?
Never again.
Posted by: Sho | December 25, 2007 at 05:37 PM