Last week Neil ventured to Boston for the inaugural Wicked Good Ruby Conf, an event drawing technologists from many disciplines who share a common trait: it was for those who love Ruby and use it to get work done. The two-day, two-track event provided a rich array of talks, from the pragmatic and studied, to the irreverent, theoretical and forward-looking. It speaks to the ambition of the conference that within its span, one could learn how to fine-tune a Rails backend, learn the innards of a linotype machine, use one language to bridge the chasm between desktop and mobile, predict capital market behaviors, and see how JRuby might come to eat the world. Here are his favorite three.
MRI Magic Tricks by Charlie Somerville
A hacker's hacker, Charlie used his time to decimate the Ruby language, peeling off the layers of the MRI implementation and revealing what it takes to build a dynamic language with the flexibility and power of Ruby. His initial caveat of "Don't try this at home" set the tone, as he proceeds to exhume the secret core classes of MRI, and use his findings (with some clever dynamic programming) to redefine some of the language's most basic behaviors, such as hash construction and method aliasing. He concludes by rewriting class hierarchies at runtime and patching the language to rescue itself from pesky segmentation faults.
RubyMotion: Under the Hood by Joshua Ballanco
Joshua's talk was the kind that adds to the depth and breadth of your knowledge. He uses RubyMotion, the increasingly popular iOS development platform, to convey some of the core abilities and limitations of code execution on desktop and mobile devices. He details the work that went into MacRuby on the OSX platform, highlighting the balance achieved through direct source compilation and the OSX Ruby VM. He then notes why RubyMotion relies on direct compilation alone: the memory isolation inherent in iOS. Meanwhile, we learn some of the nuances of garbage collection and reference counting on those platforms, and when one would need to be explicit in writing mobile Ruby code that interacts pleasantly with ARC. The power of these parallel platforms becomes more clear as he hits the REPL to express the same objects in both Objective-C and Ruby.
Understanding Ruby's Method Cache by Rachel Myers and Sheena McCoy
As as web developer, you typically would spend your time optimizing for reduced network and backend invocations, and so it was a nice break to get an introduction to language-level caching with Ruby. Rachel and Sheena led us down this path with a sense of humor and copious Jurassic Park references. We start with method-caching (or lackthereof) in Ruby 1.8, how everything changes in 1.9 with the merge of of the YARV implementation, and what lies ahead for more advanced, context-sensitive caching. Tips to avoid invalidating your cache are presented (hint: don't go crazy with define_method, alias_method, openstruct, refinements, etc), and we get a clear picture of how Ruby is evolving alongside its big-brother languages.