Nothing close to a complete review of all the quality talks I heard at RubyNation, the following is just a summary of cool things I learned about while attending.
For other resources, and some of my own snarky comments, take a look at the Twitter Channel for the event: #rubynation
TupleSpaces and Rinda
Luc Castera gave an excellent presentation about concurrency and distributed programming in Ruby. After basically saying that using Ruby’s built-in facilities for concurrency was a myth, he laid out several alternative approaches and applications. The most interesting was using Rinda to implement TupleSpaces in Ruby. Rinda can run as a service listening on a port, and it can manage a queue of messages to be processed by a TupleSpace, which is basically an associative value store, or a mini-environment. Other processes can monitor the contents of the spaces and pull data from them to run operations. This is the actor model: the spaces share nothing and communicate asynchronously with messages.
Take a look at Luc’s slides for all the info. Great talk. I’m going to look into Rinda as soon as I can.
Reek: A code complexity metric tool
Mentioned during Mark Cornick’s excellent talk on refactoring, reek is a tool to measure the perceived complexity of your Ruby code. Reek doesn’t like repetition, and it really hates long methods. It certainly doesn’t like my code: reek returned 41 warnings about my latest controller. More about reek on github.
Micronaut
From Relevance Labs comes a homegrown BDD framework that ended up embracing RSpec while promising to make your tests run faster. Use metadata to group and target your tests, and you may never have to wait for an hour for all your specs to run. According to Aaron Bedra, it’s also beautiful code to look at: a good example of metaprogramming in only 2 KLOC. And someday soon its tiny heart will beat inside RSpec proper. More on micronaut at Relevance’s blog.
Enumerators
How did I miss this? Already in Ruby 1.8, these constructs will be even more important in 1.9. They’re essentially lazy data implementations. Roughly:
>> r = [1,2,3,4].cycle
=> #<Enumerator #f00ba2>
>> r.take(5)
=> [1,2,3,4,1]
Directed Graph Data Stores
Holy Cow! I’ve only just learned the difference between Tokyo Cabinet (it’s a key-value store) and CouchDB (document-based data store). Ben Scofield, in his talk on categorizing comic books, explained these both but also brought up Directed Graphs, which I haven’t thought about since SICP. There don’t seem to be any highly-visible implementations of this storage method, although I believe that RDF models data as directed graphs. This is going on the top of my research list. Cool stuff.
A Wildcard: Reia
There was a lot of buzz about the new Reia programming language, but little concrete information. The estimable Hal Fulton gave a talk on the Ruby-like language for the Erlang VM, but even he didn’t seem to know much about it. Its creator user to run revactor, a Ruby framework that implemented the Actor model, and a language with Erlang’s spooky power and Ruby’s “curb appeal”, as Russ Olsen has it, would be superb. But it seems we’re a long way from being able to evaluate whether Reia will make a mark.
Lingo and Memes
Did anyone else hear the phrase “bikeshop it” several times during different talks? And how about the rainbows and puppies in Ben Scofield’s talk? I didn’t make it to Danny Blitz’s talk on Tiger Teams (Raarrr!), so I’d warrant I missed out on some great terms.
My Clojure Lightning Talk
I put together a 6-minute talk on Clojure, with Paul Barry’s help. The slides are here. I wish I’d also been able to mention type hints, for when you want to speed things up with static types; metaprogramming with macros and first-class functions; and Clojure’s robust metadata system. Maybe I’ll get to give another version of it again.