Nu vs MacRuby (not RubyCocoa)

46 views
Skip to first unread message

Jaroslaw Zabiello

unread,
Dec 12, 2009, 8:54:10 AM12/12/09
to Programming Nu
It is not difficult to find and critique old RubyCocoa bride (as I
found at http://programming.nu/rubycocoa-and-rubyobjc). It looks like
MacRuby solves most problems with RubyCocoa. It is faster, have
improved syntax and uses native Objective-C classes. E.g. MacRuby
String = Objective-C NSString. I like power of Lisp (and its dialects
like Clojure or Nu) but I curious how Nu compares to new MacRuby 0.5
rather than to old RubyCocoa.

--
JZ

Philip White

unread,
Dec 12, 2009, 3:05:49 PM12/12/09
to program...@googlegroups.com
On Dec 12, 2009, at 7:54 AM, Jaroslaw Zabiello wrote:
> curious how Nu compares to new MacRuby 0.5
> rather than to old RubyCocoa.


I've been curious about this myself. I haven't had time to really
explore it yet though. I've hear that it is compilable, is this true?
Probably it's "bakeable", along the lines of Nu. Anyway, I think one
of the real strengths of Nu is that its code (the source for Nu
itself) is so easy to get into and understand. Making personal tweaks
to the language is a breeze. I'm curious if the source to MacRuby is
so approachable.
And besides, parentheses are awesome! (like when you get those
lines that end in about 15 close parentheses :-).

Happy Holidays Everyone!

-Philip White

stephen white

unread,
Dec 13, 2009, 1:04:39 AM12/13/09
to program...@googlegroups.com
On 13/12/2009, at 12:24 AM, Jaroslaw Zabiello wrote:
> improved syntax and uses native Objective-C classes. E.g. MacRuby
> String = Objective-C NSString. I like power of Lisp (and its dialects
> like Clojure or Nu) but I curious how Nu compares to new MacRuby 0.5


It looks very good to me, and people using MacRuby would be happy with
what they're doing. I say this as an ex-Ruby programmer.

I find that Nu has the same level of conciseness and readability
without the need for complex grammar and multiple ways of expressing
the code. I also note that Ruby and Objective-C have different ideas
for objects (despite both being based on Smalltalk), and that MacRuby
doesn't have entirely native syntax for Objective-C calls. I also like
the way that Nu is not really a language in its own right, and
automatically benefits from any improvements in Objective-C or Lisp
without needing to port the improvement across to Nu itself. Nu code
is directly implemented as Objective-C objects, so it handles being
threaded in GCD or distributed objects with no issues.

The specific and killer advantage for Nu is that it has a one-to-one
mapping with Objective-C, so that the initial code can be rapidly
developed and then ported down such that Nu isn't needed anymore.
Unfortunately, I can't find the large collection of articles that Tim
used to have on his blog... :( If you write code in MacRuby then you
will need to switch between Ruby and Objective-C to get proper
coverage (eg, extensions, plugins, bits that don't work in Ruby). With
Nu, you're programming in Objective-C even when you're writing code in
Lisp. It is a syntax difference rather than a language difference,
which reduces the amount of stuff to remember.

Having said that, I would have been very happy with MacRuby if I
hadn't found and understood Nu first. I would wrap up by noting that
MacRuby is being developed and will always need to be developed to
keep up. Nu is entirely up to date without having been developed for
over a year now as it simply connects bits of other people's stuff
together in a very clever and not initially obvious way.

--
st...@adam.com.au

sasha

unread,
Dec 13, 2009, 4:21:19 AM12/13/09
to Programming Nu
Hi,

MacRuby is for Ruby programmers who want develop Cocoa applications.
Nu is for Cocoa, GnuStep and potentially for any other Cocoa ports
programmers who want handy tool for quick prototyping, extending
application functionality, testing, and scripting tasks.

Nu's syntax is simpler and cleaner, as it is just handy language atop
of Cocoa. MacRuby tries to implement full-fledged Ruby with its
overloaded syntax. So it is not a surprise that Nu weights much less
than MacRuby (binary installer for Nu is 1 MB vs MacRuby's 40MB).

IMHO,
Aleksandr
Reply all
Reply to author
Forward
0 new messages