SlideShare a Scribd company logo
1 of 69
+                   +

   =

        IronRuby for the
         .NET Developer
Cory Foy - Cory Foy, LLC
foyc@coryfoy.com - @cory_foy
Hello, IronRuby!
History

Ruby and .NET

  Ruby to .NET

  Ruby CLR Project

  RubyCLR

All attempted to run Ruby on top of the CLR
History

 CLR 2.0

  (.NET 3.0 and 3.5 were still CLR 2.0)

  No dynamic dispatch

  Everything had to be compiled

  Lots of magic, and shims
History

 CLR 2.0

  (.NET 3.0 and 3.5 were still CLR 2.0)

  No dynamic dispatch

  Everything had to be compiled

  Lots of magic, and shims

    CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/37341680@N04/4278580062
History
alias alias_method_missing method_missing

def method_missing(name, *params)
   alias_method_missing(name, *params)
      unless name == :Count
   create_ruby_instance_method(self.class, 'Count') do
      include 'System.Collections'
      ldarg_2
      call     'static Marshal::ToClrObject(VALUE)'
      call     'ArrayList::get_Count()'
      call     'static Marshal::ToRubyNumber(Int32)'
      ret
   end
   self.Count
end
History
 CLR 4.0

  Dynamic keyword (C#)
History
 CLR 4.0

  Dynamic keyword (C#)

Calculator calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 CLR 4.0

  Dynamic keyword (C#)

var calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 CLR 4.0

  Dynamic keyword (C#)
object calc = GetCalculator();
Type calcType = calc.GetType();
object res =
calcType.InvokeMember("Add",
    BindingFlags.InvokeMethod, null,
    new object[] { 10, 20 });
int sum = Convert.ToInt32(res);
History
 CLR 4.0

  Dynamic keyword (C#)

dynamic calc = GetCalculator();
int sum = calc.Add(1, 3);
History
 DLR

  Introduced in 2007

  Set of libraries to assist language developers

  Still runs on the CLI, and can access the CLR

  Standardizes the implementation of dynamic
  languages on the CLI/CLR
History
IronRuby

 John Lam hired by Microsoft in 2006

 Announced in 2007 at MIX7

 Goal to make Ruby a first-class citizen

 Completely rewritten to take advantage of the
 DLR
History
 DLR

       Dynamic Language Runtime (DLR)




       Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common
 Hosting Model




         Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common
                     Runtime
 Hosting Model




         Common Language Runtime (CLR)
History
 DLR

          Dynamic Language Runtime (DLR)

   Common                            Language
                     Runtime
 Hosting Model                     Implementation




         Common Language Runtime (CLR)
History

                                Ruby




              Dynamic Language Runtime




      Common Language Runtime
History

                                Ruby




              Dynamic Language Runtime




      Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
History

                                    Ruby


     VB
C#                Dynamic Language Runtime




          Common Language Runtime
WHY RUBY?
RUBY IS LOVE!
CREDIT: HTTP://WWW.FLICKR.COM/
                                                  PHOTOS/19684903@N00/317182464




CREDIT: HTTP://WWW.FLICKR.COM/
 PHOTOS/WWWORKS/3800306463
                                 RUBY IS LOVE!


                                                        CREDIT: HTTP://WWW.FLICKR.COM/
                                                      PHOTOS/STUCKINCUSTOMS/2366980580


                CREDIT: HTTP://WWW.FLICKR.COM/
              PHOTOS/EXPRESSMONORAIL/2631659122
CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/BILLBURRIS/2822607830
TYPE SAFETY
                                    CODE SAFETY


                  OBJECT GRAPHS

    DEBUGGING
                        STATIC CODE ANALYSIS


                SEALED TYPES
INTELLISENSE
                             COMPILER CATCHES ERRORS
TYPE SAFETY
                                    CODE SAFETY


                  OBJECT GRAPHS

    DEBUGGING
                        STATIC CODE ANALYSIS


                SEALED TYPES
INTELLISENSE
                             COMPILER CATCHES ERRORS
TEST
ALL
THE
FRICKIN’
TIME
CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/FATBOYKE/2668411239
Metaprogramming
                                   CREDIT: HTTP://WWW.FLICKR.COM/
                                   PHOTOS/CHOCONANCY/2470073711




All Classes Are Open

Definitions are active

All method calls have a receiver

Classes are objects
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
WHAT IS THIS?
AND WHY IS IT HERE?
Duck Typing
Open Classes

               CREDIT: HTTP://COMMONS.WIKIMEDIA.ORG/WIKI/
                         FILE:NEON_OPEN_SIGN.JPG
Monkey Patching
method_missing

                 CREDIT: HTTP://WWW.FLICKR.COM/
                   PHOTOS/TAITOH/3029653729/
Dynamism
           CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/
                    LABGUEST/3510995344/
RubyGems

Standardized Packaging System

Central Repository for hosting packages

Allows for installation and management of
multiple installed versions
RubyGems
RubyGems


    THAT’S IT!
IronRuby Basics
IronRuby Basics

Installing
IronRuby Basics

Installing

  http://ironruby.net/Download
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer

  ???
IronRuby Basics

Installing

  http://ironruby.net/Download

  Download Windows Installer

  ???

  Profit!!!
IronRuby Basics
IronRuby Basics
..and what did we just install?
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks

  samples - Contains the Tutorial app and others
IronRuby Basics
..and what did we just install?

  bin - IronRuby executables (ir.exe, etc)

  lib - Helpers for including assemblies and other
  common tasks

  samples - Contains the Tutorial app and others

  silverlight - Contains the Silverlight Dynamic
  Languages SDK
IronRuby Basics
..and, how the heck did it just do that?

            Dynamic Language Runtime (DLR)

     Common                            Language
                       Runtime
   Hosting Model                     Implementation




           Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                       Runtime

     Call sites        Binders             Rules




            Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                 Language Implementation

                        Language
       ASTs                                Compiler
                         Context




              Common Language Runtime (CLR)
IronRuby Basics
..and, how the heck did it just do that?

                Common Hosting Model

 ScriptRuntime ScriptEngine ScriptScope    ScriptSource




           Common Language Runtime (CLR)
Integration

Calling .NET from IronRuby

Calling IronRuby from .NET

WinForms / WPF / Silverlight

Cucumber / RSpec
Get Involved!
Website - http://ironruby.net

  http://ironruby.codeplex.com/

  http://github.com/ironruby

Mailing List - http://rubyforge.org/mailman/listinfo/
ironruby-core

foyc@coryfoy.com | @cory_foy
Slides @ http://blog.coryfoy.com
IronRuby for the .NET Developer

More Related Content

What's hot

Ruby Presentation
Ruby Presentation Ruby Presentation
Ruby Presentation platico_dev
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)lennartkats
 
Extending Ruby using C++
Extending Ruby using C++Extending Ruby using C++
Extending Ruby using C++Tristan Penman
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by GoogleUttam Gandhi
 
Pharo Arm Status
Pharo Arm StatusPharo Arm Status
Pharo Arm StatusESUG
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...DaeHyun Sung
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Lintermoznion
 
Semana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubySemana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubyAlessandro Binhara
 
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...DaeHyun Sung
 
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupGo for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupKirill Zonov
 
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...Fasten Project
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For ManagersAtul Shridhar
 

What's hot (18)

ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Intro for RoR
Intro for RoRIntro for RoR
Intro for RoR
 
Ruby Presentation
Ruby Presentation Ruby Presentation
Ruby Presentation
 
Ruby Introduction
Ruby IntroductionRuby Introduction
Ruby Introduction
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
Por que Rails?
Por que Rails? Por que Rails?
Por que Rails?
 
Extending Ruby using C++
Extending Ruby using C++Extending Ruby using C++
Extending Ruby using C++
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Pharo Arm Status
Pharo Arm StatusPharo Arm Status
Pharo Arm Status
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Linter
 
Jython
JythonJython
Jython
 
Semana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com IronrubySemana Interop: Trabalhando com IronPython e com Ironruby
Semana Interop: Trabalhando com IronPython e com Ironruby
 
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
[LibreOffice Korea-Japan online Seminar] Introduce to LibreOffice & Korean Is...
 
Go for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B MeetupGo for Rubyists. August 2018. RUG-B Meetup
Go for Rubyists. August 2018. RUG-B Meetup
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratch
 
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
FOSDEM 2020 Presentation : Precise, cross-project code navigation at GitHub s...
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For Managers
 

Similar to IronRuby for the .NET Developer

IronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformIronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformAndre John Cruz
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS developmenttoamitkumar
 
Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First MileGourab Mitra
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overviewjonkinney
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Wen-Tien Chang
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHiroshi SHIBATA
 
Introduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceIntroduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceOleksii Sukhovii
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing3S Labs
 
A rough guide to JavaScript Performance
A rough guide to JavaScript PerformanceA rough guide to JavaScript Performance
A rough guide to JavaScript Performanceallmarkedup
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoaThilo Utke
 
An introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsvinicorp
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506Vu Hung Nguyen
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion IntroductionLori Olson
 

Similar to IronRuby for the .NET Developer (20)

IronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET PlatformIronRuby: Ruby on the .NET Platform
IronRuby: Ruby on the .NET Platform
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
 
Ruby on Rails : First Mile
Ruby on Rails : First MileRuby on Rails : First Mile
Ruby on Rails : First Mile
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overview
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
Ruby on Rails 3 Day BC
Ruby on Rails 3 Day BCRuby on Rails 3 Day BC
Ruby on Rails 3 Day BC
 
MacRuby
MacRubyMacRuby
MacRuby
 
ruby pentest
ruby pentestruby pentest
ruby pentest
 
Introduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function InterfaceIntroduction to Ruby Native Extensions and Foreign Function Interface
Introduction to Ruby Native Extensions and Foreign Function Interface
 
Ruby on Rails Penetration Testing
Ruby on Rails Penetration TestingRuby on Rails Penetration Testing
Ruby on Rails Penetration Testing
 
A rough guide to JavaScript Performance
A rough guide to JavaScript PerformanceA rough guide to JavaScript Performance
A rough guide to JavaScript Performance
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
 
An introduction-to-ruby-on-rails
An introduction-to-ruby-on-railsAn introduction-to-ruby-on-rails
An introduction-to-ruby-on-rails
 
An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506An Introduction to Ruby on Rails 20100506
An Introduction to Ruby on Rails 20100506
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 

More from Cory Foy

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Cory Foy
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeCory Foy
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Cory Foy
 
Code Katas
Code KatasCode Katas
Code KatasCory Foy
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed AgilityCory Foy
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling AgilityCory Foy
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOpsCory Foy
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for BeginnersCory Foy
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationCory Foy
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Cory Foy
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleCory Foy
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code CriesCory Foy
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesCory Foy
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern LanguageCory Foy
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in RailsCory Foy
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile DemystifiedCory Foy
 
When Code Cries
When Code CriesWhen Code Cries
When Code CriesCory Foy
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# DevelopersCory Foy
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 

More from Cory Foy (20)

Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
Defending Commoditization: Mapping Gameplays and Strategies to Stay Ahead in ...
 
Stratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right TimeStratgic Play - Doing the Right Thing at the Right Time
Stratgic Play - Doing the Right Thing at the Right Time
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015Choosing Between Scrum and Kanban - TriAgile 2015
Choosing Between Scrum and Kanban - TriAgile 2015
 
Code Katas
Code KatasCode Katas
Code Katas
 
Distributed Agility
Distributed AgilityDistributed Agility
Distributed Agility
 
Scaling Agility
Scaling AgilityScaling Agility
Scaling Agility
 
Kanban for DevOps
Kanban for DevOpsKanban for DevOps
Kanban for DevOps
 
Ruby and OO for Beginners
Ruby and OO for BeginnersRuby and OO for Beginners
Ruby and OO for Beginners
 
Agile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the OrganizationAgile Roots: The Agile Mindset - Agility Across the Organization
Agile Roots: The Agile Mindset - Agility Across the Organization
 
Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?Triangle.rb - How Secure is Your Rails Site, Anyway?
Triangle.rb - How Secure is Your Rails Site, Anyway?
 
Scrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at ScaleScrum vs Kanban - Implementing Agility at Scale
Scrum vs Kanban - Implementing Agility at Scale
 
SQE Boston - When Code Cries
SQE Boston - When Code CriesSQE Boston - When Code Cries
SQE Boston - When Code Cries
 
GOTO Berlin - When Code Cries
GOTO Berlin - When Code CriesGOTO Berlin - When Code Cries
GOTO Berlin - When Code Cries
 
Rails as a Pattern Language
Rails as a Pattern LanguageRails as a Pattern Language
Rails as a Pattern Language
 
Patterns in Rails
Patterns in RailsPatterns in Rails
Patterns in Rails
 
Agile Demystified
Agile DemystifiedAgile Demystified
Agile Demystified
 
When Code Cries
When Code CriesWhen Code Cries
When Code Cries
 
Ruby for C# Developers
Ruby for C# DevelopersRuby for C# Developers
Ruby for C# Developers
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

IronRuby for the .NET Developer

  • 1. + + = IronRuby for the .NET Developer Cory Foy - Cory Foy, LLC foyc@coryfoy.com - @cory_foy
  • 3. History Ruby and .NET Ruby to .NET Ruby CLR Project RubyCLR All attempted to run Ruby on top of the CLR
  • 4. History CLR 2.0 (.NET 3.0 and 3.5 were still CLR 2.0) No dynamic dispatch Everything had to be compiled Lots of magic, and shims
  • 5. History CLR 2.0 (.NET 3.0 and 3.5 were still CLR 2.0) No dynamic dispatch Everything had to be compiled Lots of magic, and shims CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/37341680@N04/4278580062
  • 6. History alias alias_method_missing method_missing def method_missing(name, *params) alias_method_missing(name, *params) unless name == :Count create_ruby_instance_method(self.class, 'Count') do include 'System.Collections' ldarg_2 call 'static Marshal::ToClrObject(VALUE)' call 'ArrayList::get_Count()' call 'static Marshal::ToRubyNumber(Int32)' ret end self.Count end
  • 7. History CLR 4.0 Dynamic keyword (C#)
  • 8. History CLR 4.0 Dynamic keyword (C#) Calculator calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 9. History CLR 4.0 Dynamic keyword (C#) var calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 10. History CLR 4.0 Dynamic keyword (C#) object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 }); int sum = Convert.ToInt32(res);
  • 11. History CLR 4.0 Dynamic keyword (C#) dynamic calc = GetCalculator(); int sum = calc.Add(1, 3);
  • 12. History DLR Introduced in 2007 Set of libraries to assist language developers Still runs on the CLI, and can access the CLR Standardizes the implementation of dynamic languages on the CLI/CLR
  • 13. History IronRuby John Lam hired by Microsoft in 2006 Announced in 2007 at MIX7 Goal to make Ruby a first-class citizen Completely rewritten to take advantage of the DLR
  • 14. History DLR Dynamic Language Runtime (DLR) Common Language Runtime (CLR)
  • 15. History DLR Dynamic Language Runtime (DLR) Common Hosting Model Common Language Runtime (CLR)
  • 16. History DLR Dynamic Language Runtime (DLR) Common Runtime Hosting Model Common Language Runtime (CLR)
  • 17. History DLR Dynamic Language Runtime (DLR) Common Language Runtime Hosting Model Implementation Common Language Runtime (CLR)
  • 18. History Ruby Dynamic Language Runtime Common Language Runtime
  • 19. History Ruby Dynamic Language Runtime Common Language Runtime
  • 20. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 21. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 22. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 23. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 24. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 25. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 26. History Ruby VB C# Dynamic Language Runtime Common Language Runtime
  • 27.
  • 30. CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/19684903@N00/317182464 CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/WWWORKS/3800306463 RUBY IS LOVE! CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/STUCKINCUSTOMS/2366980580 CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/EXPRESSMONORAIL/2631659122
  • 32.
  • 33. TYPE SAFETY CODE SAFETY OBJECT GRAPHS DEBUGGING STATIC CODE ANALYSIS SEALED TYPES INTELLISENSE COMPILER CATCHES ERRORS
  • 34. TYPE SAFETY CODE SAFETY OBJECT GRAPHS DEBUGGING STATIC CODE ANALYSIS SEALED TYPES INTELLISENSE COMPILER CATCHES ERRORS
  • 35.
  • 38. Metaprogramming CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/CHOCONANCY/2470073711 All Classes Are Open Definitions are active All method calls have a receiver Classes are objects
  • 39. WHAT IS THIS? AND WHY IS IT HERE?
  • 40. WHAT IS THIS? AND WHY IS IT HERE?
  • 41. WHAT IS THIS? AND WHY IS IT HERE?
  • 42. WHAT IS THIS? AND WHY IS IT HERE?
  • 44. Open Classes CREDIT: HTTP://COMMONS.WIKIMEDIA.ORG/WIKI/ FILE:NEON_OPEN_SIGN.JPG
  • 46. method_missing CREDIT: HTTP://WWW.FLICKR.COM/ PHOTOS/TAITOH/3029653729/
  • 47. Dynamism CREDIT: HTTP://WWW.FLICKR.COM/PHOTOS/ LABGUEST/3510995344/
  • 48. RubyGems Standardized Packaging System Central Repository for hosting packages Allows for installation and management of multiple installed versions
  • 50. RubyGems THAT’S IT!
  • 53. IronRuby Basics Installing http://ironruby.net/Download
  • 54. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer
  • 55. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer ???
  • 56. IronRuby Basics Installing http://ironruby.net/Download Download Windows Installer ??? Profit!!!
  • 58. IronRuby Basics ..and what did we just install?
  • 59. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc)
  • 60. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks
  • 61. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks samples - Contains the Tutorial app and others
  • 62. IronRuby Basics ..and what did we just install? bin - IronRuby executables (ir.exe, etc) lib - Helpers for including assemblies and other common tasks samples - Contains the Tutorial app and others silverlight - Contains the Silverlight Dynamic Languages SDK
  • 63. IronRuby Basics ..and, how the heck did it just do that? Dynamic Language Runtime (DLR) Common Language Runtime Hosting Model Implementation Common Language Runtime (CLR)
  • 64. IronRuby Basics ..and, how the heck did it just do that? Runtime Call sites Binders Rules Common Language Runtime (CLR)
  • 65. IronRuby Basics ..and, how the heck did it just do that? Language Implementation Language ASTs Compiler Context Common Language Runtime (CLR)
  • 66. IronRuby Basics ..and, how the heck did it just do that? Common Hosting Model ScriptRuntime ScriptEngine ScriptScope ScriptSource Common Language Runtime (CLR)
  • 67. Integration Calling .NET from IronRuby Calling IronRuby from .NET WinForms / WPF / Silverlight Cucumber / RSpec
  • 68. Get Involved! Website - http://ironruby.net http://ironruby.codeplex.com/ http://github.com/ironruby Mailing List - http://rubyforge.org/mailman/listinfo/ ironruby-core foyc@coryfoy.com | @cory_foy Slides @ http://blog.coryfoy.com

Editor's Notes

  1. Sample Ruby App, Extend Access to .NET Object, Extend to pop up a WinForms MessageBox, Extend to do a 3D WPF “Hello MIX10!”
  2. Ruby to .NET - Thomas Sondergaard - 2003 Ruby CLR Project - Funded by Microsoft / Queensland Univ of Tech RubyCLR - John Lam’s first attempt
  3. Yep, it’s all about the magic. What kind of magic?
  4. Yep, it’s all about the magic. What kind of magic?
  5. This kind of magic
  6. So, Why Ruby? What’s so great about Ruby?
  7. So, Why Ruby? What’s so great about Ruby?
  8. So, Why Ruby? What’s so great about Ruby?
  9. So, Why Ruby? What’s so great about Ruby?
  10. So, Why Ruby? What’s so great about Ruby?
  11. So, Why Ruby? What’s so great about Ruby?
  12. So, Why Ruby? What’s so great about Ruby?
  13. So, Why Ruby? What’s so great about Ruby?
  14. So, Why Ruby? What’s so great about Ruby?
  15. But I hear many of you are quite skeptical.
  16. But I’m going to sidestep all of these with one statement
  17. But I’m going to sidestep all of these with one statement
  18. But I’m going to sidestep all of these with one statement
  19. But I’m going to sidestep all of these with one statement
  20. But I’m going to sidestep all of these with one statement
  21. But I’m going to sidestep all of these with one statement
  22. But I’m going to sidestep all of these with one statement
  23. But I’m going to sidestep all of these with one statement
  24. But I’m going to sidestep all of these with one statement
  25. Performance Implications next
  26. Nor am I going to dive into performance implications. Compiled code is going to be faster. But I am going to talk about something very cool in Ruby
  27. This allows us to build DSLs. If we think about what we use on a daily basis, it equates to lots of DSLs - MSBuild scripts, proj files, SQL Queries.
  28. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  29. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  30. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  31. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  32. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  33. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  34. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  35. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  36. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.
  37. Discuss installing, and the layout of the project, then show a simple IronRuby form and talk about how the request was processed through the system.