Ruby 1.9 ported to run directly on top of Mac OS X core technologies

Mar 10, 2009 13:28 GMT  ·  By

MacRuby has the main goal to enable the creation of full-fledged Mac OS X applications using Ruby while not sacrificing performance. Apple has updated the development software to version 0.4, adding a truckload of improvements. MacRuby 0.4 is free to download and install.

“This is quite an important release that brings new features and fixes several problems,” Apple says. “The changes are too numerous to be all mentioned, so here is a selection of the most interesting ones.”

Apple's “selection” is quite hefty itself, so we'll be trimming down the list as well. You can have a look at the full changelog here.

Threaded GC According to Apple, “the MacRuby garbage collector is now running in multi-threaded mode by default. That means that MacRuby will always do garbage collections on a separate thread and therefore not interrupt the program's flow,” says the company.

MacRuby 0.4 also offers full 64-bit Support, which means the software is fully supported in both Intel 32-bit and 64-bit modes.

“If you are running a recent Mac chances are that it is 64-bit and MacRuby will run faster on it. This is mainly due to the fact that the underlying infrastructure has been significantly improved for 64-bit processors,” Apple explains.

The company behind the Mac operating system also added new Xcode Templates, of which Apple mentions a MacRuby Core Data Application template and an Embed MacRuby target. The Mac maker says that “the latter can be used to embed MacRuby.framework inside your application bundle. Embedding the framework allows you to distribute your application to users and not require them to install MacRuby.”

Apple further notes that HotCocoa has seen some improvements as well. As some of you may know, HotCocoa is a thin, idiomatic Ruby layer that sits above Cocoa and other frameworks. It was introduced in MacRuby 0.3 and it has been significantly improved in 0.4. HotCocoa now adds new mappings for XML parser, KVO array/set accessors, property lists and more AppKit components, plus as lots of bug fixes and improvements, according to Apple. Several other improvements are also mentioned in the release notes.

Last year, Apple posted a tutorial explaining how one could develop Mac OS X applications using MacRuby. The tutorial includes information ranging from installing MacRuby to creating complex applications in Xcode, Apple’s IDE.

MacRuby is a version of Ruby 1.9, ported to run directly on top of Mac OS X core technologies, such as the Objective-C common runtime and garbage collector, and the CoreFoundation framework. According to Apple, MacRuby's boldest aims are still a work in progress.

Download MacRuby (Free)