MacRuby Screencast, and an iPhone Studio
(Wed May 06, 2009) [/Ruby] #
If you're a faithful Rubyist with a Mac, you owe it to yourself to check out MacRuby. It's an implementation of Ruby 1.9 that runs on the Objective-C 2.0 runtime (the two languages share a common ancestor in Smalltalk). That means you have the full power of Ruby and all the Objective-C and Cocoa frameworks at your fingertips. And unlike RubyCocoa, with MacRuby there's no bridge to cross. So there's a lot of potential upside when it comes to performance. And I prefer the MacRuby messaging-sending syntax over the style used in RubyCocoa.
So, in hopes of helping spread the good word, I've put together a free, 20-minute MacRuby screencast.
Now, MacRuby is still a work in progress. I've found the current version (0.4) to be quite stable for Cocoa development, though I've run into problems using RubyGems that have C extensions. Nevertheless, I continue to be impressed with MacRuby. And there are some exciting developments on the horizon, including a new virtual machine based on the LLVM compiler. Does that mean you'll be able to use Ruby to write iPhone apps some day? Only Apple knows. But given that MacRuby relies on the Objective-C garbage collector (which isn't on the phone), I'm not holding my breath. In the meantime, I think MacRuby is going to become increasingly popular, especially among Rubyists interested in building Cocoa apps.
On a related note, we've opened registration for the next iPhone Development Studio in Reston, VA on August 4-7. We're hoping that by delaying it until a while after WWDC that iPhone OS 3.0 will be released. This is a fun class, and a great way to quickly come up to speed on iPhone development. Plus you'll learn Cocoa patterns and techniques you can apply to your MacRuby application. Come for the phone, stay for the Cocoa!
