RubyConf 2005: Part Two
The first day's panels are over. It was very cosy. The wireless network had some problems dealing with the 200 people trying to connect with laptops. There was a dangerous number of gang plugs daisy chained to power them all too.
Top-to-bottom Testing in Ruby
Francis Hwang presented Top-to-bottom Testing in Ruby to replace Lucas Carlson's talk. The talk centered around mocking. For example, databases or mail services. This allows you to run tests against mock systems all running in memory. The benefits are speed, no side effects, and no cleanup. The downsides are possible bugs in the mock objects, time spent building mocks, and indirection (eg. not using SQL where it may be obvious to).
DHH suggested changing the LOAD_PATH to load the mock objects first. Someone else suggested that perhaps the Library writers are best placed to also write mock objects.
- Lafcadio is used to simulate a MySQL DB.
- MockFS allows you to simulate a file system. Although there are systems which allow you to run applications sandboxed, there are things like what happens when you run out of inodes which MockFS may be more suited for.
- Examples from the talk
open-uri
Akira Tanaka presented his library, comparing it Net::HTTP. open-uri certainly compared favourably to Net::HTTP, especially in it's simplicity. Akira went on to explain what he saw as key features of good APIs. Huffman coding applied to method names was quite interesting: The more frequently used methods should have shorter names, and rarer methods should have longer names.
JRuby
After lunch, Charles Nutter told us about JRuby - a Ruby VM written in Java. It allows you access to all the Java libraries, whilst still writing Ruby. The new JRuby is aiming at being stackless, by using continuation passing style. Also an iterative, as opposed to recursive, interpreter.
YARV
Yet Another RubyVM was presented by Koichi Sasada. YARV is hoping to be the VM in Ruby 2.0, but that's up to Matz to decide. Why do we need a VM? The Ruby interpreter does not currently use VM techniques, so is slower. We were shown performances against various algorithms. Particularly impressive was the performance gain when running the Ackermann function.
MetaRuby
Eric Hodel presented MetaRuby. That's Ruby written in Ruby. Or at least as much as possible that can be written in Ruby. Everything else that's left is called a primitive and may have to be implemented in C. The aim of the project is to eliminate as much C as possible.
All the projects showed interest in each other. Each project building on one another. This is certainly a good sign for the community.
Tonight is the roundtable with Matz. I'm going to have a nap now as I'd like to be a little fresher for that.

Add a comment