MacRuby has hit a significant milestone in its development today: version 0.5! The key features include improved HotCocoa support (though this is now maintained separately from core on GitHub), better Ahead-Of-Time (AOT) compilation, and support for OS X 10.6’s Grand Central Dispatch.
Give It A Go!
If you’ve got a Mac and haven’t yet tried out MacRuby, give it a go – its speed and general level of support for Ruby is very impressive. You can download MacRuby as a standalone package with installer (for OS X 10.6 and higher) or if you’re using RVM, do an update and then rvm install macruby to get the latest nightly build. Matt Aimonetti, of the MacRuby project, reassures us that “MacRuby is namespaced and won’t affect your current Ruby installations” – but RVM is still an option, nonetheless.
Once you give MacRuby a try, check out HotCocoa too (installed with macgem install hotcocoa). It’s a library that acts as a “Ruby layer” between Cocoa and MacRuby. Instead of wrestling with Cocoa’s classes and verbose method names, HotCocoa wraps up Cocoa in a big, warm blanket of familiar Ruby. Take this very simple “throw a window with a button on the screen” app, for example:
require 'rubygems' require 'hotcocoa' include HotCocoa application do |app| win = window :size => [100,50] b = button :title => 'Hello' b.on_action { puts 'World!' } win << b end
Will the iPad support MacRuby?
Matt says “No.” The problem isn’t a lack of desire or interest, but that the iPhone OS (also used on the iPad) doesn’t do automatic garbage collection or have BridgeSupport support – both of which are needed for MacRuby. Supposedly, though, contributors are looking into ways to circumvent these issues, but I’m more hopeful of GC support in iPhone OS 4.0..
[ruby inside news] Peter here! My next “big thing” is a new site called coder.io. If you’re into technologies like Ruby, Git, Python, the iPhone, MySQL, JavaScript, Clojure, etc, you might want to get on the coming sooon list
There should hopefully be some freebies/bonuses along with exclusive early access. Thanks!
Похожие записи
Нет комментариев
Оставить комментарий или два