Flickr's recent introduction of the LOLFeed format was highly amusing. Following Mark Christian's footsteps, I decided to write a Ruby version of the LOLFeed parser. At first it was merely a port, but I then found the state machine to be too cumbersome, so I went all out with regular expressions. Read on for the code.
Although Apple describes both Python and Ruby as "first-class citizens" under a Leopard development environment, I feel that Apple meant it more programmatically than documentationally. Sure, both PyObjC and RubyCocoa are mature bridges, but both lack documentation from Apple (you have to rely on the community for gotchas) and RubyCocoa seems to receive more attention than PyObjC when it comes to tutorials for starters.
Moreover, the starting templates for Cocoa-Python apps and Cocoa-Ruby apps are not created equal. For example, while Apple encourages the scripts to be put into Resources, only a Cocoa-Ruby bootstrap file generated by Xcode (called main.rb) would automatically
require them. A Cocoa-Python bootstrap file generated by Xcode (called main.py) would not
import them, and this problem would manifest itself when you first attempt to do bindings in Interface Builder.
First, observe a generated main.rb: