Rubinius & RubyA Love Story
Shane Becker@veganstraightedge
Evan Phoenix@evanphx
http://rubini.us@rubinius
Why We CareWhy You (Should)CareDeveloping with ToolsQuestion & Answer Time
The Next 45 Minutesof your life
Why We CareA Bit of History
A Bit of History
Evan started using Ruby2002
A Bit of History
Evan started to figure out how to improve Ruby
2006
A Bit of History
Experimented with cleaning up and improvements
in MRI 1.8.2
2006
A Bit of History
Realize that Rubyneeded a fresh start
2006
A Bit of History
Started Rubinius2006
A Bit of History
Started Rubiniuson Honeymoon in Bali
2006
Why We CareThe Ruby Language
The RubyLanguageRubinius is a faithful implementation of
the Ruby Language
Rubinius is a drop-in replacement for MRI 1.8.7
The RubyLanguage
Why We CareDrop-in Replacement
Drop-in ReplacementFull method compatibility
via RubySpec
Drop-in ReplacementMajor C-API compatibility
Drop-in ReplacementMajor C-API compatibility
with some caveats
Why We CareImprove Ruby
Improve Ruby
Ruby should be goodenough to use as its own
underpinnings
Improve Ruby
MRI’s core (Array, Hash, etc) contains no Ruby
Improve Ruby
Strive for scalability and performance for
the Ruby language
Why We CarePerformance
Performance
MRI’s implementation ofRuby is slow
Performance
Prevalence of C extensions demonstrate MRI’s slowness
Performance
Strive to bring Rubyitself up to speed
Why We CareFast Ruby
Fast Ruby
Use established techniques to make Ruby itself fast
Fast Ruby
Compile Rubyto machine code
Established Techniques
Fast Ruby
Profit!Established Techniques
Why We CareFaster Ruby for All
Faster Ruby for All
Capable of running Ruby code
Faster Ruby for All
Capable of running Ruby codeup to 100x faster than MRI
Faster Ruby for All
Helps change Ruby’s standing in the programming world
Why We CareManage Memory Better
ManageMemory Better
Very fast object allocation
ManageMemory Better
All objects areextremely lightweight
ManageMemory Better
All objects areextremely lightweight56 bytes vs 500 bytes
Manage Memory Better
Compact and releasememory to OS
Why We CareBetter Memory Usage
BetterMemory Usage
MRI’s GC is broken
BetterMemory Usage
MRI’s GC is brokenConservative garbage
collection is flawed
BetterMemory UsageRubinius has a better way
Why We CareReal World Memory Usage
Real World Memory
Made for Ruby applications
Real World Memory
Made for Ruby applications Ruby is objects
Real World Memory
Made for Ruby applications Rubinius is made for objects
Real World Memory
Made for Ruby applications LOTS of objects
Why We CareReal World Memory Usage
An Experiment
An Experiment
10.million.times do create 101 objects save 1 of themend
An Experimenthttps://gist.github.com/1008305
0
500
1000
1500
2000
2500
3000MBs
MRI
An Experiment
10,000,000 timesCreate 101 objectsSave one of them
An Experiment
objects createdobjects saved
1,010,000,00010,000,000
MBs
MRI
0
500
1000
1500
2000
2500
3000
Rubinius
Real World Memory
Love your objects
Developingwith Tools
Better TechnologyFor Running Ruby
Better Technology
For Writing Ruby
DebuggingWe All Do It
PDDp-Driven Debugging
<screencast>p-Driven Debugging
StepsLocateInstrumentRepeat
Good ToolsGo With The Flow
Good ToolsSave Time & Effort
<screencast>Debugger Debugging
StepsLocateRunExplore
DebunkingExposing The Falseness
TestingA Cherished Tool
TestingDon’t Need No
Stinkin’ Debugger
Debugginggem install rbx-trepanning
ProfilingRefining Code
ProfilingGood Judgment
<screencast>Profiling
ProfilingMind The Gap
Jump IntoRubinius
Ruby Swaprvm install rbx-2.0.0pre
Ruby Swaprbx -S bundle install
Ruby Swaprbx -S rails s
DeployingOn AppCloud
<screencast>On AppCloud
http://ey.io/rbxdeploy
DeployingOn AppCloud
http://ey.io/rbxdeploy
Why You(should) Care
Why You CareYou love Ruby
Why You CareYou love Ruby
We love Ruby too!
Why You CareYou want Ruby used
in more placesfor more things
Why You CareYou want Ruby used more
We do too!
Rubinius & RubyA Love Story
Shane Becker@veganstraightedge
Evan Phoenix@evanphx
Brian Ford@brixen
http://rubini.us@rubinius
http://engineyard.com@engineyard
Questions &AnswersTime
NEXT TIME onEngine Yard webinars…
JRuby Jam SessionfeaturingNick Seiger
Thursday, September 15, 201111:00-11:50am PDT
Register: engineyard.com/developer/events