Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Apple

October 23rd, 2008, 11:00 GMT · By

Apple Posts Tutorial on Using MacRuby

SHARE:

Adjust text size:


Developer tools logo
Enlarge picture
Apple has posted a tutorial explaining how one can develop Mac OS X applications using MacRuby. The tutorial includes information ranging from installing MacRuby to creating complex applications in Xcode, Apple’s IDE.

“While Objective-C is the de-facto programming language for writing applications on Mac OS X Leopard, Ruby is also supported as a Cocoa development language via the RubyCocoa bridge,” Apple says. “In fact, Ruby and Objective-C share a common ancestor in Smalltalk, making them ideally suited for integration. This is evident in the popularity of RubyCocoa, which has served as the basis for several significant projects including the open source LimeChat IRC client, the commercial blogging application Blogo, and even Apple’s own Podcast Producer technology.”

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. It is the goal of MacRuby to enable the creation of full-fledged Mac OS X applications that do not sacrifice performance in order to enjoy the benefits of using Ruby. MacRuby's boldest aims are still a work in progress, Apple reveals.

According to Apple, the easiest way to install MacRuby is to download one of the binary installers. You can also retrieve the sources from the source repository and build them manually. A page dedicated to Installing MacRuby will guide you through the process of getting MacRuby up and running on your Mac. MacRuby installs itself as a framework in /Library/Frameworks/MacRuby.framework. The whole project is self-contained there, making it very easy to bundle MacRuby with your application, Apple says.

Xcode and Interface Builder support are built right in MacRuby, as are several code examples in /Developer/Examples/Ruby/MacRuby. Executables are exported (in /usr/local/bin) as symbolic links, and they all start with the “mac” prefix. The only exception is hotcocoa.

“Given that MacRuby is an implementation of the Ruby language, everything that works in 'standard Ruby' should also work with MacRuby," Apple says. “Basic tasks like array manipulation and string processing or even advanced tasks like regular expressions and adding singleton methods to an object should 'just work',” the company adds. Full-fledged Cocoa applications (with all the specific advantages) can be written with MacRuby.

Via TUAW

FILED UNDER:
Ruby
MacRuby
Cocoa
Xcode
guide

TELL US WHAT YOU THINK:

1,645 hits · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


The New MacBook Is Also a Quantum Leap - Graphics

Intel Says iPhone Can't Do Full Internet

Mac Takes a $10 Million Bite of Vista's Problems

Statement: It's Legal to Run OS X on PCs with EFI-X Dongle

Surgical Navigation Evolves Thanks to Macs

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM