The Artima Developer Community
Sponsored Link

Ruby Community News Forum
Microsoft Releases IronRuby Preview

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Microsoft Releases IronRuby Preview Posted: Jul 30, 2007 4:40 PM
Reply to this message Reply
Summary
IronRuby is Microsoft's new implementation of the Ruby language on the .NET Dynamic Language Runtime (DLR). Ruby code executed via IronRuby can invoke code written in any other .NET language, such as C#, Python and VB. Microsoft's Scott Guthrie introduces IronRuby in his blog.
Advertisement

While Ruby.NET already made it possible to execute Ruby code on the .NET runtime, Microsoft recently released a preview of a new Ruby implementation, IronRuby. Microsoft's Scott Guthrie provides some context for IronRuby in his blog post, First Look at IronRuby:

This spring we shipped the first preview release of a new .NET library that we call the "Dynamic Language Runtime" (or DLR for short). It provides a set of features on top of the CLR designed explicitly for dynamic language scenarios. These include a shared dynamic type system, language hosting model, and support to make it possible to generate fast dynamic code. These features make it much easier to build high-quality dynamic language implementations on .NET.

These implementations can access and use any of the APIs in the .NET Framework, as well as easily interoperate with code written in any other .NET language (for example: you could write a Ruby class that invokes and uses a C# class, which in turn invokes a Python class).

Guthrie points out that IronRuby is still at a pre-alpha stage, with several libraries missing. However, the core language support is complete, as is the ability to use standard .NET types form IronRuby.

Guthrie points to several performance-boosting features of IronRuby:

IronRuby has been architected to take advantage of a new DLR feature we call "Dynamic Sites"—which delivers a fast adaptive call-site method caching implementation. It also uses the lightweight-code generation features of the CLR. Lightweight code generation enables dynamic language implementations to create in-memory IL that is then JIT'd into native code at runtime (without ever having to save anything to disk)... The end result will be a compatible, fast, and flexible Ruby implementation on top of .NET that anyone can use for free.

In addition to performance, IronRuby can make use of all the features of the .NET framework, such as using WindowsForms for user interfaces:

One of the benefits of implementing a language on top of .NET is that it enables developers using that language to get full access to the rich framework libraries provided with the .NET Framework...

To use Windows Forms functionality in IronRuby, we could type a require statement that references the System.Windows.Forms assembly, and then use the MessageBox.Show method to display a message in a modal dialog:

System::Windows::Forms::MessageBox.show 'Hello, World!'

What is your experience running Ruby applications on Windows?

Topic: Threading in the New Ruby VM Previous Topic   Next Topic Topic: Antonio Cangiano Benchmarks Seven Ruby Implementations

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use