13. class Rubinius < Smalltalk
# form
include Ruby::Syntax
# function
include Ruby::Behavior
# elbow grease
include Google.search(“crazy cs papers”)
end
Evan Phoenix - RubyConf 2007
24. kernel
noun
a 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
56. “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
70. Backtraces!
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
Evan Phoenix - RubyConf 2007
72. 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!
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
Evan Phoenix - RubyConf 2007
73. Time lost to segfaults
1.8 rubinius
200
200
150
100
70
50 30
10
6
2
1 3 5
Evan Phoenix - RubyConf 2007
75. • 1.8 garbage collector is
simple, but too simple.
• Rubinius uses modern
techniques to decrease
memory usage and increase
throughput
Evan Phoenix - RubyConf 2007
77. In 1.8...
• Start up a program.
• Require all your code.
• fork() the process.
• Watch your memory double.
Evan Phoenix - RubyConf 2007
78. In Rubinius...
• Start up a program.
• Require all your code.
• fork() the process.
• Watch (virtually) NO change in the memory
footprint!
Evan Phoenix - RubyConf 2007