IronRuby for the Rubyist

  • 2,059 views
Uploaded on

Presentation on IronRuby geared towards Rubyists

Presentation on IronRuby geared towards Rubyists

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,059
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
18
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Will Green will@hotgazpacho.org @hotgazpacho
  • 2.  History  The DLR  Why IronRuby?  The Million Dollar Question  Rusty Washers  Getting IronRuby  Additional Resources
  • 3. Or, how Microsoft learned to stop worrying and love dynamic languages + = Sources: http://commons.wikimedia.org/wiki/File:Ruby_logo.png http://dlr.codeplex.com/ http://www.myfreewallpapers.net/cartoons/pages/phineas-and-ferb.shtml
  • 4.  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
  • 5.  “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
  • 6.  “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
  • 7. You got your dynamic in my static! You got your static in my dynamic! Source: http://www.flickr.com/photos/25517107@N00/2950954830/
  • 8.  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
  • 9.  IronRuby  IronPython  IronScheme  ClojureCLR  IronJS (JavaScript)  Nua (Lua) JS
  • 10. What is it good for?
  • 11.  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
  • 12.  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
  • 13.  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!) ▪ http://github.com/casualjim/caricature
  • 14.  Believe in Magic!  http://github.com/thbar/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
  • 15. DEMO
  • 16.  <script type=“text/ruby”></script>  Requires Silverlight, but you get to do this:
  • 17. DEMO
  • 18. Source: http://777denny.wordpress.com/2009/07/04/what-does-the-bible-say-about-money-take-this-quick-quiz-to- find-out/
  • 19. YES!
  • 20.  YES!  IronRuby.Rack  Rack adapter for IIS (HttpHandler)  Included in IronRuby source on GitHub  Needs some tweaks*  ActiveRecord Adapters  sqlite3-ironruby  Ironruby-sqlserver
  • 21. DEMO
  • 22. Where does IronRuby fall short? Source: http://www.flickr.com/photos/92709190@N00/230032831
  • 23.  85.94% pass rate  vs 97.53% for MRI  Latest statistics at http://ironruby.info/  Need RubySpec contributions!  RubySepc helps ALL Ruby implementations!  http://rubyspec.org/
  • 24.  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
  • 25.  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
  • 26.  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
  • 27.  IronRuby does not support FFI  FFI = Foreign Function Interface ▪ http://wiki.github.com/ffi/ffi/why-use-ffi  Perhaps could be implemented via p/Invoke?  Crazy thought, or craziest thought?
  • 28.  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
  • 29. Give it to me! Source: http://new.music.yahoo.com/timbaland/albums/give-it-to-me-4-track-single--193920848
  • 30.  Binary Releases on CodePlex  http://ironruby.codeplex.com/  Source is synched from MS internal TFS to Github  http://github.com/ironruby/ironruby  Community contributions accepted, in some areas of the code, via pulls from forks
  • 31. Get Involved in the Dynamic Revolution! Source: http://www.macwallpapers.eu/wallpaper/1280x960-Freedom-Ernesto-Che-Guevara/
  • 32.  Mailing List: http://rubyforge.org/mailman/listinfo/ironruby-core  How to Contribute: http://wiki.github.com/ironruby/ironruby/  IronRuby web site: http://ironruby.net/  Jimmy Schementi’s blog http://blog.jimmy.schementi.com/  IronRuby in the Browser: http://www.rubyinside.com/ironruby-silverlight- ruby-in-browser-3192.html
  • 33.  “IronRuby Unleashed” by Shay Friedman (Sams)  “IronRuby In Action” by Ivan Porto Carrero (Manning)
  • 34.  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 http://twitter.com/casualjim/ironruby-community