OVERVIEW
Adams Morgan Mainstreet Office, Sunday, 17 December 2006Chris S., Lou, Andrew, Vince, Matthew, Ken
Lou takes five members through the details of Rubinius. Vince mentions the importance of a knowledgeable GUI expert on a project team.
SUMMARY
Rubinius is a next-generation virtual machine and compiler for Ruby.DETAILS
- A Virtual Machine is an interpreter built in software, rather than constructed of hardware.
- Hardware is run by machine language. Simple Machine Language is often called bytecode because instructions are often just one byte long.
- Rubinius is based loosely on the Smalltalk-80 'Blue Book' design. The compiler, assembler, and bytecode generators are all written in Ruby, Rubinius currently uses C to bootstrap the system.
- Rubinius may supercede YARV.
- YARV is Yet Another Ruby Virtualmachine. SASADA Koichi is developing YARV with Matz making substantial contributions. YARV reportedly contains similar problems as the current Ruby interpreter. YARV and the current Ruby interpreter contain complicated, undocumented structures, making work on the YARV project onerous. Rubinius' mission is to create a VM that is simpler, documented, and accessible for future major work on a Ruby interpreter.
- It is also alleged about YARV that it may not reach a stable version for another two years.
- However, Koichi's progress on YARV allowed him to run Rails during a demonstration. This is regarded as a major step forward with YARV. This implementation of YARV was a simple scaffolded application, and much of Ruby's internals are still the same code under YARV.
- It is reported online that Koichi recently announced that he has a fulltime job that tasks him to work on YARV. He hopes to implement a YARV machine in JRuby.
- Last two big critiques of current Ruby interpreters are that there are inherent memory leaks that are too difficult to plug, and that the interpreter is too slow.
- Matz has asked for what application is the current interpreter too slow. The implication here may be that the need for speed is not warranted at this time.
- Rubinius is a NON Ruby/C-language VM. Other similar VMs are JRuby and Ruby.NET.
- Rubinius is under the direction of Evan Phoenix, who recently received a $1000 bounty from Geoffrey Grosenbach (Mr. TopFunky) to push forward on the project. Evan was between jobs and Geoffrey, having substantional success selling Peepcode shows, decided to award a bounty to the Rubinius project.
- Evan, having done substantial work on the project is eager to have volunteer helpers. From the Rubinius repository: The Rubinius team welcomes contributions, bug reports, test cases, and monetary support. One possible way to help is: 1. Add a test for a Ruby core method; 2. Go to the appropriately-named file in the 'kernel' directory; 3. Implement that method in Ruby; 4. Type 'rake build:kernel' to make your change take effect; 5. Run the tests until they pass. :) ; 6. Create a patch with 'svn diff' and send it to the mailing list; The 'ri' command is a rich source of examples and test cases.
- Rubinius uses a microkernel that provides memory management and Input/Output control. All of the code is implemented in a customized subset of Ruby. The VM can then load-in full-featured Ruby code, and execute it like the existing interpreters do today.
- Recent additions include "continuations". Other added components are regular expressions, Miniunit, Bignums, and numerous control structures like ‘retry’, ‘redo’, ‘break’.
- Matz plans to remove continuations from Ruby 2.0.
- Besides speed, another point of contention between the current Ruby interpretr and Rubinius are memory leaks. Rubinius uses Valgrind to reduce, identify and remove potential memory leaks, while there are complaints that Ruby 1.8 has a few leaks that will not be plugged because there are no tools to easily plug those leaks.
- A major hurdle for YARV and goal for Rubinius is to be thread safe. Rubinius intends to be thread-safe and embeddable. Evan states that it does not currently meet this goal due to some components borrowed from the mainline Ruby interpreter.
RESOURCES
- YARV, fastest Ruby VM on earth.
- Mr. TopFunky's $1K Bounty for Rubinius Development
- Pat Eyeler's Continuing Interviews with Evan Phoenix regarding Rubinius
- Geoffrey Grosenbach's Instructive and Popular Peepcode Screencasts
- Very readable Rubinius in its repository
- These four talks cover (a) how Valgrind works, (b) three example profiling tools (Cachegrind, Callgrind, Massif), (c) how to build a new tool, using a simple example, (d) ideas for more advanced tools, and general tool-building advice.
- Ruby written in pure Java.
- Queensland University in Australia--Ruby.NET



