SlideShare a Scribd company logo
1 of 135
Download to read offline
Rubinius
Rubini us
Rubini.us
rubini.us
http://rubini.us
Rubinius
http://godfat.org/slide/2008-12-21-rubinius.pdf
History and Design Goals


Architecture and Object Model
History and Design Goals


Architecture and Object Model
Evan Phoenix
February of
   2006
RubySpec
MSpec
Engine Yard
C VM Shotgun
C VM Shotgun
C++ VM
CxxTest
LLVM
History and Design Goals


Architecture and Object Model
Reliable, Rock Solid Code
Reliable, Rock Solid Code
      Full Test Coverage
Clean, Readable Code
Clean, Readable Code
 Little Lines in Each File
Clean, Readable Code
Macro, Code Generator, Rake Task
Clean, Readable Code
        CMake
Clean, Readable Code
        CMake
Clean, Readable Code
C++ Object to Ruby Object 1 to 1 Mapping
Modern Techniques
Modern Techniques
Pluggable Garbage Collectors
Modern Techniques
Pluggable Garbage Collectors
       • Stop-and-Copy
Modern Techniques
Pluggable Garbage Collectors
       • Stop-and-Copy
       • Mark-and-Sweep
Modern Techniques
     Optimizers
Modern Techniques
   Git, Rake, LLVM
Squeak
the Smalltalk-80 Implementation
Squeak
 Slang
Squeak
• Alan Kay
• Dan Ingalls
• Adele Goldberg
Smalltalk
 Xerox PARC
Smalltalk
      Object-Oriented
(differ from Simula and C++)
Smalltalk
   GUI
Smalltalk
   MVC
History and Design Goals


Architecture and Object Model
Real Machine
C++ Virtual Machine

   Real Machine
kernel/bootstrap

C++ Virtual Machine

   Real Machine
kernel/platform

 kernel/bootstrap

C++ Virtual Machine

   Real Machine
kernel/common

 kernel/platform

 kernel/bootstrap

C++ Virtual Machine

   Real Machine
kernel/delta

  kernel/common

 kernel/platform

 kernel/bootstrap

C++ Virtual Machine

   Real Machine
kernel/delta

  Ruby       kernel/common
Runtime
(kernel)    kernel/platform

            kernel/bootstrap

           C++ Virtual Machine

              Real Machine
lib/compiler

                             kernel/delta

  Ruby                      kernel/common
Runtime
(kernel)                   kernel/platform

                           kernel/bootstrap

                          C++ Virtual Machine

                             Real Machine
lib/compiler         lib/*

                             kernel/delta

  Ruby                      kernel/common
Runtime
(kernel)                   kernel/platform

                           kernel/bootstrap

                          C++ Virtual Machine

                             Real Machine
Your App

           lib/compiler         lib/*           Your App

                             kernel/delta

  Ruby                      kernel/common
Runtime
(kernel)                   kernel/platform

                           kernel/bootstrap

                          C++ Virtual Machine

                             Real Machine
Your App

           lib/compiler            lib/*              Your App

                                kernel/delta

  Ruby                         kernel/common
Runtime
(kernel)                      kernel/platform

                              kernel/bootstrap

                             C++ Virtual Machine
                          Low Level Virtual Machine
                                Real Machine
Outside the Ruby World
Outside the Ruby World
      C++ Primitives
Outside the Ruby World
Foreign Function Interface - FFI
Outside the Ruby World
        Subtend
History and Design Goals


Architecture and Object Model
Hello
World!
def       method_missing m; puts m;         end
def Object.const_missing c; print "#{c}, "; end




                 Hello.World!
puts ‘Hello, World!’
puts ‘Hello, World!’
self.send :puts, ‘Hello, World!’
(TOPLEVEL_BINDING.context.receiver ||
TOPLEVEL      MethodContext.current.receiver   )




      puts ‘Hello, World!’
   self.send :puts, ‘Hello, World!’
(TOPLEVEL_BINDING.context.receiver ||
TOPLEVEL      MethodContext.current.receiver   )



 def __script__


       puts ‘Hello, World!’
   self.send :puts, ‘Hello, World!’



 end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__


        puts ‘Hello, World!’



  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__


        puts ‘Hello, World!’
        #<SendSite:0x26 name=puts
                 hits=0 misses=0>

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘


          print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=0 misses=0>

           print ‘World!‘
        #<SendSite:0x28 name=print
                  hits=0 misses=0>
  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘


          print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=0 misses=0>

           print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=0 misses=0>

           print ‘World!‘
        #<SendSite:0x28 name=print
                  hits=0 misses=0>
  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘


          print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=1 misses=0>

           print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=1 misses=0>

           print ‘World!‘
        #<SendSite:0x28 name=print
                  hits=1 misses=0>
  end
class C
  def print
  end
end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘


          print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=0 misses=0>

           print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=0 misses=0>

           print ‘World!‘
        #<SendSite:0x28 name=print
                  hits=0 misses=0>
  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘


          print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=1 misses=0>

           print ‘World!‘

  end
CompiledMethod   (method(:__script__).compiled_method)




  def __script__
         print ‘Hello,‘
        #<SendSite:0x26 name=print
                  hits=1 misses=0>

           print ‘World!‘
        #<SendSite:0x28 name=print
                  hits=1 misses=0>
  end
• CompiledMethod   • SendSite
• MethodContext    • MethodTable
• StaticScope      • LookupTable
Method
Dispatch
D   C   Obj
D     C   Obj




Meta
 D
D      C     Obj




Meta   Meta
 D      C
D      C     Obj




Meta   Meta   Meta
 D      C     Obj
D      C     Obj




Meta   Meta   Meta
 D      C     Obj
D      C     Obj




Meta   Meta   Meta
 D      C     Obj
D      C     Obj




Meta   Meta   Meta
                     Class
 D      C     Obj
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM
 D
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM
 D      C
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM
 D      C     Obj
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta
 D      C     Obj    Class
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta
 D      C     Obj    Class
Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta
 D      C     Obj    Class
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta
 D      C     Obj    Class
Obj




Meta
       Class   Mod
Obj




MM     Meta
Obj    Class
Obj




Meta
       Class   Mod
Obj




MM     Meta
Obj    Class




       Meta
        MC
Obj




Meta
       Class   Mod
Obj




MM     Meta    Meta
Obj    Class   Class




       Meta
        MC
Obj




Meta
       Class   Mod
Obj




MM     Meta    Meta    Meta
Obj    Class   Class   Mod




       Meta
        MC
Obj




Meta
       Class   Mod
Obj




MM     Meta    Meta    Meta
Obj    Class   Class   Mod




       Meta
        MC
Class   Mod




Meta    Meta    Meta
Class   Class   Mod




Meta
 MC
Meta
Class

        Class   Mod




                Meta    Meta
                Class   Mod




        Meta
         MC
Meta
        Class
Class

                       Mod




                       Meta    Meta
                       Class   Mod




                Meta
                 MC
Meta
        Class          Mod
Class




                             Meta    Meta
                             Class   Mod




                Meta
                 MC
Meta
        Class          Mod
Class




                             Meta    Meta
                             Class   Mod




                Meta
                 MC
Meta
        Class          Mod
Class




                             Meta    Meta
                             Class   Mod




                Meta
                 MC
Meta
        Class   Mod
Class




Meta
 MC                   Meta    Meta
                      Class   Mod
Meta
        Class   Mod
Class




Meta    Meta
 MC     Class         Meta
                      Mod
Meta
        Class   Mod
Class




Meta    Meta    Meta
 MC     Class   Mod
Meta
        Class   Mod
Class




Meta    Meta    Meta
 MC     Class   Mod
Meta
        Class   Mod
Class




Meta    Meta    Meta
 MC     Class   Mod
Meta
        Class   Mod
Class




Meta    Meta    Meta
 MC     Class   Mod
Meta
        Class   Mod
Class




Meta    Meta    Meta
 MC     Class   Mod
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
D      C     Obj




Meta   Meta   Meta
                     Class   Mod
 D      C     Obj




 MM     MM    MM     Meta    Meta    Meta
 D      C     Obj    Class   Class   Mod




                     Meta
                      MC
• BlockEnvironment      • Rubinius::Task
• InstructionSequence   • Channel
• Compiler              • Actor
• Breakpoint            • Rubinius::VM
Reference: Rubinius

•   http://rubini.us/

•   http://github.com/evanphx/rubinius/

•   http://rubinius.lighthouseapp.com/

•   http://groups.google.com/group/rubinius-dev/
Reference: Articles
•   http://blog.fallingsnow.net/category/rubinius/

•   http://betterruby.wordpress.com/

•   http://www.infoq.com/news/2007/07/rubinius-interview-part-one

•   http://blog.nicksieger.com/articles/2006/10/20/rubyconf-sydney-and-rubinius

•   http://www.klankboomklang.com/2007/10/05/the-metaclass/

•   http://www.hawthorne-press.com/WebPage_RHG.html
Reference: Others


•   http://rubyspec.org/

•   http://llvm.org/

•   http://users.ipa.net/~dwighth/squeak/oopsla_squeak.html
Reference: Wikipedia
                                             •   http://en.wikipedia.org/wiki/Alan_Kay

•   http://en.wikipedia.org/wiki/Rubinius    •   http://en.wikipedia.org/wiki/PARC_(company)

•   http://en.wikipedia.org/wiki/Squeak      •   http://en.wikipedia.org/wiki/Bootstrapping_(compilers)

•   http://en.wikipedia.org/wiki/Smalltalk   •   http://en.wikipedia.org/wiki/Self-hosting

•   http://en.wikipedia.org/wiki/Simula      •   http://en.wikipedia.org/wiki/PyPy

•   http://en.wikipedia.org/wiki/Model-view-controller
git clone 
git://github.com/evanphx/rubinius.git

cd rubinius; rake build
?

More Related Content

What's hot

Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in osGenchiLu1
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web DevelopmentKoichi ITO
 
Git hooks for front end developers
Git hooks for front end developersGit hooks for front end developers
Git hooks for front end developersBradley Gore
 
Taking containers from development to production
Taking containers from development to productionTaking containers from development to production
Taking containers from development to productionSuraj Deshmukh
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Annie Huang
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02Hiroshi SHIBATA
 
GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28Jorge Hidalgo
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for RubyHiroshi SHIBATA
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalkHiroshi SHIBATA
 
Functional MCU programming
Functional MCU programmingFunctional MCU programming
Functional MCU programmingKiwamu Okabe
 
Deployment made easy with Git
Deployment made easy with GitDeployment made easy with Git
Deployment made easy with GitIgor Santos
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationMd.Zahidur Rahman
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18Jorge Hidalgo
 

What's hot (20)

Rest, sockets em golang
Rest, sockets em golangRest, sockets em golang
Rest, sockets em golang
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web Development
 
Git hooks
Git hooksGit hooks
Git hooks
 
Git hooks for front end developers
Git hooks for front end developersGit hooks for front end developers
Git hooks for front end developers
 
Git hooks
Git hooksGit hooks
Git hooks
 
Taking containers from development to production
Taking containers from development to productionTaking containers from development to production
Taking containers from development to production
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
 
PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02
 
GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28GraalVM - JBCNConf 2019-05-28
GraalVM - JBCNConf 2019-05-28
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalk
 
Functional MCU programming
Functional MCU programmingFunctional MCU programming
Functional MCU programming
 
Deployment made easy with Git
Deployment made easy with GitDeployment made easy with Git
Deployment made easy with Git
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
20140918 ruby kaigi2014
20140918 ruby kaigi201420140918 ruby kaigi2014
20140918 ruby kaigi2014
 

Viewers also liked

Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application ServersLin Jen-Shin
 
2007-06-24 The Lost Piece
2007-06-24 The Lost Piece2007-06-24 The Lost Piece
2007-06-24 The Lost PieceLin Jen-Shin
 
2012 05-08-lambda-draft
2012 05-08-lambda-draft2012 05-08-lambda-draft
2012 05-08-lambda-draftLin Jen-Shin
 
2010 04-24-cerealize
2010 04-24-cerealize2010 04-24-cerealize
2010 04-24-cerealizeLin Jen-Shin
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2Lin Jen-Shin
 
2008-01-25 Tangible Value
2008-01-25 Tangible Value2008-01-25 Tangible Value
2008-01-25 Tangible ValueLin Jen-Shin
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven ProgrammingLin Jen-Shin
 

Viewers also liked (7)

Concurrent Ruby Application Servers
Concurrent Ruby Application ServersConcurrent Ruby Application Servers
Concurrent Ruby Application Servers
 
2007-06-24 The Lost Piece
2007-06-24 The Lost Piece2007-06-24 The Lost Piece
2007-06-24 The Lost Piece
 
2012 05-08-lambda-draft
2012 05-08-lambda-draft2012 05-08-lambda-draft
2012 05-08-lambda-draft
 
2010 04-24-cerealize
2010 04-24-cerealize2010 04-24-cerealize
2010 04-24-cerealize
 
2010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 22010-04-13 Reactor Pattern & Event Driven Programming 2
2010-04-13 Reactor Pattern & Event Driven Programming 2
 
2008-01-25 Tangible Value
2008-01-25 Tangible Value2008-01-25 Tangible Value
2008-01-25 Tangible Value
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming
 

Similar to Rubinius Architecture and Object Model

Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 
From V8 to Modern Compilers
From V8 to Modern CompilersFrom V8 to Modern Compilers
From V8 to Modern CompilersMin-Yih Hsu
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manormartinbtt
 
DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)Oleg Zinchenko
 
Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018Kouji Matsui
 
Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Fwdays
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоGeeksLab Odessa
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developersMax Titov
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)Igalia
 
Know your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmKnow your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmPawel Szulc
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...Sang Don Kim
 
Damage Control
Damage ControlDamage Control
Damage Controlsintaxi
 

Similar to Rubinius Architecture and Object Model (20)

Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 
From V8 to Modern Compilers
From V8 to Modern CompilersFrom V8 to Modern Compilers
From V8 to Modern Compilers
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)DDD on example of Symfony (SfCampUA14)
DDD on example of Symfony (SfCampUA14)
 
Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018Making archive IL2C #6-55 dotnet600 2018
Making archive IL2C #6-55 dotnet600 2018
 
Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
Ruby Under The Hood
Ruby Under The HoodRuby Under The Hood
Ruby Under The Hood
 
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег ЗинченкоWebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
WebCamp: Developer Day: DDD in PHP on example of Symfony - Олег Зинченко
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developers
 
There and Back Again
There and Back AgainThere and Back Again
There and Back Again
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
 
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Know your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvmKnow your platform. 7 things every scala developer should know about jvm
Know your platform. 7 things every scala developer should know about jvm
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
 
Damage Control
Damage ControlDamage Control
Damage Control
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 

Rubinius Architecture and Object Model

  • 7. History and Design Goals Architecture and Object Model
  • 8. History and Design Goals Architecture and Object Model
  • 10. February of 2006
  • 12. MSpec
  • 18. LLVM
  • 19. History and Design Goals Architecture and Object Model
  • 21. Reliable, Rock Solid Code Full Test Coverage
  • 22.
  • 24. Clean, Readable Code Little Lines in Each File
  • 25. Clean, Readable Code Macro, Code Generator, Rake Task
  • 28. Clean, Readable Code C++ Object to Ruby Object 1 to 1 Mapping
  • 29.
  • 30.
  • 33. Modern Techniques Pluggable Garbage Collectors • Stop-and-Copy
  • 34. Modern Techniques Pluggable Garbage Collectors • Stop-and-Copy • Mark-and-Sweep
  • 35. Modern Techniques Optimizers
  • 36. Modern Techniques Git, Rake, LLVM
  • 39. Squeak • Alan Kay • Dan Ingalls • Adele Goldberg
  • 41. Smalltalk Object-Oriented (differ from Simula and C++)
  • 42. Smalltalk GUI
  • 43. Smalltalk MVC
  • 44. History and Design Goals Architecture and Object Model
  • 46. C++ Virtual Machine Real Machine
  • 50. kernel/delta kernel/common kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine
  • 51. kernel/delta Ruby kernel/common Runtime (kernel) kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine
  • 52. lib/compiler kernel/delta Ruby kernel/common Runtime (kernel) kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine
  • 53. lib/compiler lib/* kernel/delta Ruby kernel/common Runtime (kernel) kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine
  • 54. Your App lib/compiler lib/* Your App kernel/delta Ruby kernel/common Runtime (kernel) kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine
  • 55. Your App lib/compiler lib/* Your App kernel/delta Ruby kernel/common Runtime (kernel) kernel/platform kernel/bootstrap C++ Virtual Machine Low Level Virtual Machine Real Machine
  • 57. Outside the Ruby World C++ Primitives
  • 58. Outside the Ruby World Foreign Function Interface - FFI
  • 59. Outside the Ruby World Subtend
  • 60. History and Design Goals Architecture and Object Model
  • 62. def method_missing m; puts m; end def Object.const_missing c; print "#{c}, "; end Hello.World!
  • 64. puts ‘Hello, World!’ self.send :puts, ‘Hello, World!’
  • 65. (TOPLEVEL_BINDING.context.receiver || TOPLEVEL MethodContext.current.receiver ) puts ‘Hello, World!’ self.send :puts, ‘Hello, World!’
  • 66. (TOPLEVEL_BINDING.context.receiver || TOPLEVEL MethodContext.current.receiver ) def __script__ puts ‘Hello, World!’ self.send :puts, ‘Hello, World!’ end
  • 67. CompiledMethod (method(:__script__).compiled_method) def __script__ puts ‘Hello, World!’ end
  • 68. CompiledMethod (method(:__script__).compiled_method) def __script__ puts ‘Hello, World!’ #<SendSite:0x26 name=puts hits=0 misses=0> end
  • 69. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ print ‘World!‘ end
  • 70. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=0 misses=0> print ‘World!‘ #<SendSite:0x28 name=print hits=0 misses=0> end
  • 71. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ print ‘World!‘ end
  • 72. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=0 misses=0> print ‘World!‘ end
  • 73. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=0 misses=0> print ‘World!‘ #<SendSite:0x28 name=print hits=0 misses=0> end
  • 74. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ print ‘World!‘ end
  • 75. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=1 misses=0> print ‘World!‘ end
  • 76. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=1 misses=0> print ‘World!‘ #<SendSite:0x28 name=print hits=1 misses=0> end
  • 77. class C def print end end
  • 78. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ print ‘World!‘ end
  • 79. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=0 misses=0> print ‘World!‘ end
  • 80. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=0 misses=0> print ‘World!‘ #<SendSite:0x28 name=print hits=0 misses=0> end
  • 81. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ print ‘World!‘ end
  • 82. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=1 misses=0> print ‘World!‘ end
  • 83. CompiledMethod (method(:__script__).compiled_method) def __script__ print ‘Hello,‘ #<SendSite:0x26 name=print hits=1 misses=0> print ‘World!‘ #<SendSite:0x28 name=print hits=1 misses=0> end
  • 84.
  • 85. • CompiledMethod • SendSite • MethodContext • MethodTable • StaticScope • LookupTable
  • 87. D C Obj
  • 88. D C Obj Meta D
  • 89. D C Obj Meta Meta D C
  • 90. D C Obj Meta Meta Meta D C Obj
  • 91. D C Obj Meta Meta Meta D C Obj
  • 92. D C Obj Meta Meta Meta D C Obj
  • 93. D C Obj Meta Meta Meta Class D C Obj
  • 94. D C Obj Meta Meta Meta Class Mod D C Obj
  • 95. D C Obj Meta Meta Meta Class Mod D C Obj
  • 96. Meta Meta Meta Class Mod D C Obj
  • 97. Meta Meta Meta Class Mod D C Obj MM D
  • 98. Meta Meta Meta Class Mod D C Obj MM MM D C
  • 99. Meta Meta Meta Class Mod D C Obj MM MM MM D C Obj
  • 100. Meta Meta Meta Class Mod D C Obj MM MM MM Meta D C Obj Class
  • 101. Meta Meta Meta Class Mod D C Obj MM MM MM Meta D C Obj Class
  • 102. Meta Meta Meta Class Mod D C Obj MM MM MM Meta D C Obj Class
  • 103. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta D C Obj Class
  • 104. Obj Meta Class Mod Obj MM Meta Obj Class
  • 105. Obj Meta Class Mod Obj MM Meta Obj Class Meta MC
  • 106. Obj Meta Class Mod Obj MM Meta Meta Obj Class Class Meta MC
  • 107. Obj Meta Class Mod Obj MM Meta Meta Meta Obj Class Class Mod Meta MC
  • 108. Obj Meta Class Mod Obj MM Meta Meta Meta Obj Class Class Mod Meta MC
  • 109. Class Mod Meta Meta Meta Class Class Mod Meta MC
  • 110. Meta Class Class Mod Meta Meta Class Mod Meta MC
  • 111. Meta Class Class Mod Meta Meta Class Mod Meta MC
  • 112. Meta Class Mod Class Meta Meta Class Mod Meta MC
  • 113. Meta Class Mod Class Meta Meta Class Mod Meta MC
  • 114. Meta Class Mod Class Meta Meta Class Mod Meta MC
  • 115. Meta Class Mod Class Meta MC Meta Meta Class Mod
  • 116. Meta Class Mod Class Meta Meta MC Class Meta Mod
  • 117. Meta Class Mod Class Meta Meta Meta MC Class Mod
  • 118. Meta Class Mod Class Meta Meta Meta MC Class Mod
  • 119. Meta Class Mod Class Meta Meta Meta MC Class Mod
  • 120. Meta Class Mod Class Meta Meta Meta MC Class Mod
  • 121. Meta Class Mod Class Meta Meta Meta MC Class Mod
  • 122. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 123. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 124. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 125. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 126. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 127. D C Obj Meta Meta Meta Class Mod D C Obj MM MM MM Meta Meta Meta D C Obj Class Class Mod Meta MC
  • 128.
  • 129. • BlockEnvironment • Rubinius::Task • InstructionSequence • Channel • Compiler • Actor • Breakpoint • Rubinius::VM
  • 130. Reference: Rubinius • http://rubini.us/ • http://github.com/evanphx/rubinius/ • http://rubinius.lighthouseapp.com/ • http://groups.google.com/group/rubinius-dev/
  • 131. Reference: Articles • http://blog.fallingsnow.net/category/rubinius/ • http://betterruby.wordpress.com/ • http://www.infoq.com/news/2007/07/rubinius-interview-part-one • http://blog.nicksieger.com/articles/2006/10/20/rubyconf-sydney-and-rubinius • http://www.klankboomklang.com/2007/10/05/the-metaclass/ • http://www.hawthorne-press.com/WebPage_RHG.html
  • 132. Reference: Others • http://rubyspec.org/ • http://llvm.org/ • http://users.ipa.net/~dwighth/squeak/oopsla_squeak.html
  • 133. Reference: Wikipedia • http://en.wikipedia.org/wiki/Alan_Kay • http://en.wikipedia.org/wiki/Rubinius • http://en.wikipedia.org/wiki/PARC_(company) • http://en.wikipedia.org/wiki/Squeak • http://en.wikipedia.org/wiki/Bootstrapping_(compilers) • http://en.wikipedia.org/wiki/Smalltalk • http://en.wikipedia.org/wiki/Self-hosting • http://en.wikipedia.org/wiki/Simula • http://en.wikipedia.org/wiki/PyPy • http://en.wikipedia.org/wiki/Model-view-controller
  • 135. ?