Skip to Content

Apple Tutorial: Developing with MacRuby

Apple has posted an interesting new tutorial on developing OS X applications with MacRuby. MacRuby is an implementation of the Ruby programming language "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."

What this means is that applications written with MacRuby can be a full-fledged Cocoa application with all the advantages that entails. The tutorial will take you through the process of installing MacRuby as well as building a sample application with Xcode. So if you've ever wanted to get started thinking about developing for the Mac, but have always been intimidated by Objective-C (which pretty much describes me), playing around with MacRuby might be just the ticket to get you started.

[via MacVolPlace]

Categories

How-tos Developer

Apple has posted an interesting new tutorial on developing OS X applications with MacRuby. MacRuby is an implementation of the Ruby...
 

Add a Comment

*0 / 3000 Character Maximum

9 Comments

Filter by:
lakiolen

I went through that tutorial last night. Definitely still need to know Cocoa APIs if you want to get stuff done. But you don't have to learn Objective-C.

October 22 2008 at 3:52 PM Report abuse rate up rate down Reply
Bleh...

What is the difference between this and RubyCocoa, the Objective-C Ruby port implemented in Leopard as of its release? As far as I know they do most of the same stuff, perhaps give or take a few differences? Could someone enlighten me?

October 22 2008 at 3:42 PM Report abuse rate up rate down Reply
1 reply to Bleh...'s comment
Marcos

From the article:

RubyCocoa is implemented as a bridge between the Objective-C runtime and the official Ruby interpreter. Because of this, the bridge must be crossed every time you talk to an Objective-C object from Ruby, and vice-versa. All objects must be converted from one typing system to another and messages must be forwarded, the cost for which can be prohibitive if done too often.

The goal of the MacRuby project is to address these and a number of other challenges by providing an implementation of the Ruby language on top of core Mac OS X technologies such as Objective-C runtime, the generational garbage collector, and CoreFoundation.

In MacRuby, all classes are Objective-C classes, all methods are Objective-C methods and all objects are Objective-C objects. In essence, the bridge disappears. Ruby is implemented directly on top of the Objective-C runtime.

October 22 2008 at 3:46 PM Report abuse rate up rate down Reply
Pascal Rules

This is still incredibly convoluted compared to RealBasic. I wish Embarcadero would port Delphi to Mac OS X.

October 22 2008 at 10:23 AM Report abuse rate up rate down Reply
1 reply to Pascal Rules's comment
Graham Cox

Delphi isn't a patch on actual Cocoa/Objective-C. I know Delphi programmers who swear by it, but Cocoa permits things Delphi programmers only dream about, thanks to its late binding.

What I can't understand is why people think Obj-C is hard; it isn't. The syntax takes a little getting used to (say, about five minutes) and the API is admittedly huge, but the power it has is well worth the effort. I don't think I could go back to any other language that is statically bound.

I'm not clear what the point of things like MacRuby is - good as Ruby is, why not just cut to the chase and learn Obj-C. It's really not hard!

October 23 2008 at 1:14 AM Report abuse rate up rate down Reply
koreyel


What the world really wants is MacRuby for the iphone....

October 22 2008 at 9:15 AM Report abuse rate up rate down Reply
1 reply to koreyel's comment
Nick

Yes, let's put the slowest interpreted language for the platform on a low power device. :P

October 22 2008 at 10:26 AM Report abuse rate up rate down Reply
NOGG3R5

Minor typo...
"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.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."

Someone hit Command V twice!

October 22 2008 at 7:33 AM Report abuse rate up rate down Reply
1 reply to NOGG3R5's comment
Mat Lu

Oops! Fixed.

October 22 2008 at 10:48 AM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.