SlideShare a Scribd company logo
1 of 20
IRONRUBY
   Alex Moore
Consultant, HMB Inc.
ABOUT ME



HMB

.NET developer, some Java.

On-again off-again relationship with Ruby since OSU
KON’NICHI WA, IRONRUBY


IronRuby v1.0

  Released April 12th, 2010

  Compatible with 1.8.6

  Runs on the DLR, which runs on the CLR

  .Net 4.0 / 2.0
INTEROP HOP



Allows you to access compiled .NET code in Ruby

It will even mangle the names to be more Ruby-esque

  WriteLine ==> write_line
INTEROP HOP

load_assembly 'System'
include System

5.times { puts "Odelay!" }

Console.background_color = ConsoleColor.red
Console.foreground_color = ConsoleColor.white

Console.write_line "DANGER, PONIES AHEAD!"
Console.reset_color
EXECUTABLES



ruby => ir

irb => iirb

gem => igem
TYPES


.NET => Ruby

Int32 => FixNum

Double => Float

Boolean => TrueClass, FalseClass

DateTime => Time
.NET => RUBY


Namespaces, Interfaces => Module

Classes, Structs, Delegates, Enums => Class

Constants, Static Methods => Class methods

Methods => Instance Methods

Fields, Properties => Getter/Setter methods
OTHER STUFF


Abstract classes => Regular ruby classes w/o
initializer

Abstract methods => Override in subclass

Virtual methods => Override in subclass

Static methods => CAN override.
OTHER OTHER STUFF


Private Binding Mode

  Makes all private and protected methods public

  ir -X:PrivateBinding ...

to_clr_type()

clr_member()
OK, SO WHAT ABOUT MY GEMS?




Some work, some don’t.

Ones that have native win32 code - no.

Ruby only, some.

New native pieces can be written in .NET languages.
WHAT ABOUT BOB RAILS?


We has thems, 2.3.8 to be specific.

Sql Server/ActiveRecord support too!

Even an IIS module for Rack/Rails.

Sinatra, HAML, SASS supported.
THIS IS DUMB, WHY WOULD I EVER USE THIS?



 You can use pretty much all the .NET libraries

   WPF / Forms for pretty UI

   Excel API - Because you know corporations are run
   on it

   Testing. Use cucumber/rspec to test .Net code.

 Get around the MS-only rules
CAVEAT _______



Can’t use win32 native gems

Not 100% RubySpec - Currently ~86%

  Big Holes - RSS, Finalize, Shell, WeakRef, OpenSSL
1.8.6?
1.8.6?




Next version will be either 1.8.7 or 1.9.x compatible
LICENSING


Currently MS-PL

  OSI Certimafied

  Close to BSD



Probably moving to Apache or MIT license soon.
RESOURCES



IronRuby.net

IronRuby Unleashed - Shay Friedman

IronRuby in Action - Ivan Porto Carrero and Adam
Burmister
DOMO ARIGATO



moore.alex@gmail.com

@alexmoore

www.enginerding.com

More Related Content

Similar to IronRuby

Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02
sagaroceanic11
 
Top 10+ Things .NET Developers Should Know About Ruby
Top 10+ Things .NET Developers Should Know About RubyTop 10+ Things .NET Developers Should Know About Ruby
Top 10+ Things .NET Developers Should Know About Ruby
Jeff Cohen
 

Similar to IronRuby (20)

Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 
Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02Rubyonrails 120409061835-phpapp02
Rubyonrails 120409061835-phpapp02
 
Ruby Presentation
Ruby Presentation Ruby Presentation
Ruby Presentation
 
Fun with Ruby and Redis
Fun with Ruby and RedisFun with Ruby and Redis
Fun with Ruby and Redis
 
Top 10+ Things .NET Developers Should Know About Ruby
Top 10+ Things .NET Developers Should Know About RubyTop 10+ Things .NET Developers Should Know About Ruby
Top 10+ Things .NET Developers Should Know About Ruby
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the Rubyist
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Ruby openfest
Ruby openfestRuby openfest
Ruby openfest
 
Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deployment
 
First Day With J Ruby
First Day With J RubyFirst Day With J Ruby
First Day With J Ruby
 
Alive and Well with Java 8
Alive and Well with Java 8Alive and Well with Java 8
Alive and Well with Java 8
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
An introduction to Rails 3
An introduction to Rails 3An introduction to Rails 3
An introduction to Rails 3
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

IronRuby

Editor's Notes

  1. IronRuby was originally started as a open source project in 2007, and was just released as v1.0 back on April 12th. DLR provides: Dynamic type system Dynamic Method Dispatch Dynamic Code Generation Hosting API
  2. So the biggest thing about IronRuby is the interop between .Net Libraries and Ruby code. IronRuby alows you to access compiled .NET code in Ruby. It will even mangle method names to be more like Ruby’s naming idioms
  3. So let’s jump into some code: example 1 load_assembly is a new method that IronRuby is similar to require, but also adds the Global Assembly Cache to the list of locations it searches for. It will also look for the assembly by short name i.e. “System” instead of mscorlib.dll