IronRuby for the Rubyist
Upcoming SlideShare
Loading in...5

IronRuby for the Rubyist



Presentation on IronRuby geared towards Rubyists

Presentation on IronRuby geared towards Rubyists



Total Views
Views on SlideShare
Embed Views



3 Embeds 133 95 37
http://localhost 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

IronRuby for the Rubyist IronRuby for the Rubyist Presentation Transcript

  • Will Green @hotgazpacho
  •  History  The DLR  Why IronRuby?  The Million Dollar Question  Rusty Washers  Getting IronRuby  Additional Resources
  • Or, how Microsoft learned to stop worrying and love dynamic languages + = Sources:
  •  Compiler that translates Ruby source code into .NET IL (Intermediate Langauage)  Ran Ruby code on the .NET CLR (Common Language Runtime)  Started by Dr. Wayne Kelly and Prof. John Gough of the Queensland University of Technology  Lost relevance around the beginning of 2008
  •  “A high-performance Ruby to .NET bridge that allows seamless integration of CLR and Ruby objects in the same Win32 process.”  Developed by John Lam and Ceasar Larry  Runs Ruby code on the .NET Common Language Runtime  Abandoned when John Lam was hired by Microsoft
  •  “IronRuby is a Open Source implementation of the Ruby programming language for .NET, heavily relying on Microsoft's Dynamic Language Runtime”  Microsoft’s implementation of Ruby  John Lam hired as Program Manager  Current Program Manager (also for IronPython) is Jimmy Schementi  First previewed at MIX 2007  Version 1.0 released at MIX 2010  Targets Ruby 1.8.6
  • You got your dynamic in my static! You got your static in my dynamic! Source:
  •  A common runtime for dynamic languages on the .NET platform  Provides interop among various dynamic languages  Use libraries from multiple languages simultaneously  Allows hosting dynamic languages in static .NET assemblies  New .NET static type: dynamic
  •  IronRuby  IronPython  IronScheme  ClojureCLR  IronJS (JavaScript)  Nua (Lua) JS
  • What is it good for?
  •  Sometimes, you just ‘gotta interop with “Enterprise” systems written in .NET  SOAP and COM  WCF (Windows Communication Foundation) services  Access to the BCL == Base Class Library  Very extensive, rich set of standard libraries  IronRuby eases the pain
  •  Standardized Packaging System  Central Repository for hosting packages  Allows installation and management of multiple versions of a package  Allows distribution of binary packages targeting a specific platform  Ruby Gems 1.3.7 includes my patch to recognize universal-dotnet, universal-dotnet-2.0, and universal-dotnet-4.0 as platforms
  •  Acceptance Testing  Cucumber  Unit Testing, BDD style  RSpec / Shoulda  Factories instead of Fixtures  Factory Girl  Machinist  Mocking  RSpec Mocks  Caricature ▪ Mock .NET types (death to sealed and internal!) ▪
  •  Believe in Magic!   DSL for creating UIs  Windows Presentation Foundation ▪ Current hotness for client UI development on Windows  Silverlight ▪ WPF for the Web  Windows Forms ▪ Traditional battleship-grey Windows apps  Think Builder for Windows UIs
  • DEMO
  •  <script type=“text/ruby”></script>  Requires Silverlight, but you get to do this:
  • DEMO
  • Source: find-out/
  • YES!
  •  YES!  IronRuby.Rack  Rack adapter for IIS (HttpHandler)  Included in IronRuby source on GitHub  Needs some tweaks*  ActiveRecord Adapters  sqlite3-ironruby  Ironruby-sqlserver
  • DEMO
  • Where does IronRuby fall short? Source:
  •  85.94% pass rate  vs 97.53% for MRI  Latest statistics at  Need RubySpec contributions!  RubySepc helps ALL Ruby implementations! 
  •  OpenSSL  Needs .NET implementation  Should not be an issue with .NET crypto APIs  Putting my money where my mouth is  If someone will write the RubySpec specs for OpenSSL, I will implement it for IronRuby
  •  IronRuby doesn’t implement the C API  However, equivalent libraries with .NET code can be created (and packaged as Gems!)  eg. iron-term-ansicolor ▪ My lib for color console output on Windows
  •  Cucumber’s parser, Gherkin, is now Ragel based  Ragel does not target C# or .NET  Work-around:  Ragel does target Java  IKVM is Java (the langauge) for .NET  Use IKVM to create a .NET assembly  Still has some issues
  •  IronRuby does not support FFI  FFI = Foreign Function Interface ▪  Perhaps could be implemented via p/Invoke?  Crazy thought, or craziest thought?
  •  Mono == An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET  Most active contributors to IronRuby are ‘Softies, so running on Mono is not a priority  However, running on Mono is something the team would like
  • Give it to me! Source:
  •  Binary Releases on CodePlex   Source is synched from MS internal TFS to Github   Community contributions accepted, in some areas of the code, via pulls from forks
  • Get Involved in the Dynamic Revolution! Source:
  •  Mailing List:  How to Contribute:  IronRuby web site:  Jimmy Schementi’s blog  IronRuby in the Browser: ruby-in-browser-3192.html
  •  “IronRuby Unleashed” by Shay Friedman (Sams)  “IronRuby In Action” by Ivan Porto Carrero (Manning)
  •  Jimmy Schementi (MS) - @jschementi  James Deville (MS) - @jredville  Ivan Porto Carrero (MVP) - @casualjim  Shay Friedman (MVP) - @ironshay  Michael Letterle (MVP) - @mletterle  Ben Hall (MVP) - @Ben_Hall  Thibaut Barrère - @thibaut_barrere  Mike Moore - @blowmage