rubyconf 2007 - rubinius 1.0
DESCRIPTION
The Rubinius 1.0 presented at RubyConf 2007TRANSCRIPT
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
Last things first,first things last.
What is the endgame?
In a word..
Evan Phoenix - RubyConf 2007
Total
Evan Phoenix - RubyConf 2007
Total world
Evan Phoenix - RubyConf 2007
Total world domination
Evan Phoenix - RubyConf 2007
For Ruby!
Evan Phoenix - RubyConf 2007
375 days ago...In a galaxy far far away...
(aka Denver)
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
The end of Sydney
The beginning of Rubinius
Evan Phoenix - RubyConf 2007
Enormous progress
Evan Phoenix - RubyConf 2007
class Rubinius < Smalltalk# forminclude Ruby::Syntax# functioninclude Ruby::Behavior# elbow greaseinclude Google.search(“crazy cs papers”)
end
Evan Phoenix - RubyConf 2007
CS Nerd Attack Mode!(blitznerdo)
Evan Phoenix - RubyConf 2007
GenerationalGarbage Collection!
(with heap compaction)
Evan Phoenix - RubyConf 2007
Bytecode execution!
Evan Phoenix - RubyConf 2007
Stackless!(uses no C stack)
Evan Phoenix - RubyConf 2007
Self-hostedkernel and compiler!
Evan Phoenix - RubyConf 2007
Pre-compiled files! (.rbc)
Evan Phoenix - RubyConf 2007
Builtin packaging!(.rba == .jar)
Evan Phoenix - RubyConf 2007
Oh my!
Evan Phoenix - RubyConf 2007
AudienceParticipation
Evan Phoenix - RubyConf 2007
Runtime and Kernel
Evan Phoenix - RubyConf 2007
kernel |ˈkərnl|nouna softer, usually edible part of a nut, seed, or fruit stone contained within its hard shell.• the seed and hard husk of a cereal, esp. wheat.• [in sing. ] the central or most important part of something : this is the kernel of the argument.• the most basic level or core of an operating system of a computer, responsible for resource allocation, file management, and security.• [as adj. ] Linguistics denoting a basic unmarked linguistic string.
Evan Phoenix - RubyConf 2007
1.8
Evan Phoenix - RubyConf 2007
84,516 lines of C 0 lines of Ruby
Evan Phoenix - RubyConf 2007
1.9
Evan Phoenix - RubyConf 2007
128,786 lines of C0 lines of Ruby
Evan Phoenix - RubyConf 2007
IronRuby(pre-alpha1)
Evan Phoenix - RubyConf 2007
48,282 lines of .cs 0 lines of Ruby
Evan Phoenix - RubyConf 2007
JRuby 1.0.2
Evan Phoenix - RubyConf 2007
114,507 lines of .java 0 lines of Ruby
Evan Phoenix - RubyConf 2007
Rubinius
Evan Phoenix - RubyConf 2007
25,398 lines of C13,946 lines of Ruby
Evan Phoenix - RubyConf 2007
0
25,000
50,000
75,000
100,000
125,000
150,000
1.8 1.9 ironruby jruby rubinius
NOT Ruby Ruby
Evan Phoenix - RubyConf 2007
Junior HighAnalysis
Evan Phoenix - RubyConf 2007
1.8 and 1.9
Ruby for C programmers
Evan Phoenix - RubyConf 2007
JRuby
Ruby for Java programmers
Evan Phoenix - RubyConf 2007
IronRuby
Ruby for C# programmers
Evan Phoenix - RubyConf 2007
Rubinius
Ruby for Ruby programmers
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
Eating your own dog food ==
Feedback loop
Evan Phoenix - RubyConf 2007
Optimized Rubinius kernel / VM
==Optimization for all
Ruby code
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
You’re a Ruby developer,I’m a Ruby developer
Evan Phoenix - RubyConf 2007
Of the rubists,by the rubists,for the rubists
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
Road, rubber, all that jazz.
Evan Phoenix - RubyConf 2007
Faster in 24 of 31 tests (yarv micro benchmarks against 1.8)
Evan Phoenix - RubyConf 2007
Moving quickly
Evan Phoenix - RubyConf 2007
so why isn’t it done?
Evan Phoenix - RubyConf 2007
Architecture/design is quite important
Evan Phoenix - RubyConf 2007
but hard to create in a vacuum
Evan Phoenix - RubyConf 2007
Mistakes were made.
Evan Phoenix - RubyConf 2007
“Practice makes perfect”-- Ryan Davis (RubyConf 2007)
Evan Phoenix - RubyConf 2007
“A person who never made a mistake never tried anything new”
-- Albert Einstein
“You will do foolish things,but do this with enthusiasm”
-- Collete
Evan Phoenix - RubyConf 2007
-Ofun
Evan Phoenix - RubyConf 2007
Rarely a burden,always a treat.
Evan Phoenix - RubyConf 2007
Community
Evan Phoenix - RubyConf 2007
57 committers
17 with 20 or more commits
36 with 100+ lines changed
Evan Phoenix - RubyConf 2007
Weekend patchers&
Code junkies alike
Evan Phoenix - RubyConf 2007
Free flowing commit bit
Evan Phoenix - RubyConf 2007
Pat Eyler
Marcus Crafter
David WaiteShane Becker
Evan Phoenix - RubyConf 2007
Eric Hodel
Kevin ClarkBrian Ford
Adam Gardiner
Evan Phoenix - RubyConf 2007
Ryan Davis
Wilson Bilkovich
Yehuda Katz
Evan Phoenix - RubyConf 2007
Abigail PhoenixJohn Hornbeck
Eero Saynatkari
(official wife)
Fog(official mascot)
Evan Phoenix - RubyConf 2007
Thanks EY!
Evan Phoenix - RubyConf 2007
Evan Phoenix<[email protected]>
Evan Phoenix - RubyConf 2007
Evan Phoenix - RubyConf 2007
An exception has occurred: User requested termination with Control-C (Interrupt)
Backtrace: Readline.readline at kernel/core/readline.rb:52 main.__script__ at lib/bin/sirb.rb:78 main.load at kernel/core/compile.rb:78 main.require at kernel/core/compile.rb:129 Array#each at kernel/core/array.rb:526 Integer(Fixnum)#times at kernel/core/integer.rb:19 Array#each at kernel/core/array.rb:526 main.require at kernel/core/compile.rb:112 Array#each at kernel/core/array.rb:526 Integer(Fixnum)#times at kernel/core/integer.rb:19 Array#each at kernel/core/array.rb:526 main.require at kernel/core/compile.rb:111 main.__script__ at kernel/loader.rb:159
Backtraces!
Evan Phoenix - RubyConf 2007
C extensions can misbehave
Evan Phoenix - RubyConf 2007
Segfault detected in function 0x90a00 (accessing 0x4) (MemorySegmentionError)
SomeExtension#test_segfault at extensions/test/test.c main.__script__ at extensions/test/test.rb:38 main.load at kernel/core/compile.rb:95 main.__script__ at kernel/loader.rb:122
VALUE test_segfault(VALUE self) { // Get a pointer to address 4. char *i = (char*)4; // Attempt to read from address 4 // which is definitely not allowed. x = *i; // Never get this far. return Qnil;}
Raises an exception!
Evan Phoenix - RubyConf 2007
Time lost to segfaults
50
100
150
200
1 3 5
2 6 10
30
70
200
1.8 rubinius
Evan Phoenix - RubyConf 2007
Memory usage
Evan Phoenix - RubyConf 2007
•1.8 garbage collector is simple, but too simple.
•Rubinius uses modern techniques to decrease memory usage and increase throughput
Evan Phoenix - RubyConf 2007
Fork you!
Evan Phoenix - RubyConf 2007
•Start up a program.
•Require all your code.
•fork() the process.
•Watch your memory double.
In 1.8...
Evan Phoenix - RubyConf 2007
• Start up a program.
• Require all your code.
• fork() the process.
• Watch (virtually) NO change in the memory footprint!
In Rubinius...
Evan Phoenix - RubyConf 2007
1 2 3 4
1.8 rubinius
Memory change peradditional instance
Evan Phoenix - RubyConf 2007
Thank You!