
MacRuby 0.5 beta 1 Released - sant0sk1
http://www.macruby.org/blog/2009/10/07/macruby05b1.html
======
tumult
MacRuby is extremely impressive, even if you aren't much of a Ruby guy (like
me.) It lets me do nearly everything I'd want to do in a Cocoa application,
but much more easily than with C/Objective-C. It really is fantastic, and a
lot of work has been put in to make it easy to integrate with other software
(both as a host and a guest – there's a direct object mapping, no bridges or
anything.)

I'm sure a lot of people think "yeah but what about performance?" and from
what I've seen, direct calls/messages on objects are _faster_ in MacRuby than
Objective-C. Writing with just C (and no Obj-C messaging) is still going to be
a lot faster, though.

But you rarely hear people complaining about messaging not being fast enough
in Objective-C. You probably wouldn't be using messaging in those situations
anyway.

Edit addendum: Since I know there are a lot of fellow functional programmers
here on HN, I'd like to add that MacRuby has added real tail-call
optimization, and (I was surprised to find this out recently) that Ruby has
continuations with callcc. It's very, very nice. It's not exactly Lisp, but
it's damn good and the platform integration blows anything existing away.

~~~
blasdel
_you rarely hear people complaining about messaging not being fast enough in
Objective-C_

There was a big spate of it ~4 years ago -- people had been using method
dispatch in tight loops, and boggled a bit at the numbers when they started
using Apple's fantastic Shark profiler. objc_msgsend is as cheap as dispatch
can be without static linking (way faster than Python or Ruby), but it's still
much more expensive than a C function call, and there's nothing keeping you
from trading your square brackets and colons for parens and commas.

------
nestlequ1k
Grand Central Dispatch is included! And with a super clean and simple api (see
the code snippet on the blog post).

Laurent (the lead developer of the project) is a friggin genious. 0.5 is
definitely the first step to MacRuby catching on in a big way.

If this doesnt come to the iphone in the next year or so, I'm going to be
extremely disappointed. All thats needed is the ObjC 2.0 garbage collector,
which Apple has on their roadmap. And yes, it'll be optional for non macruby
iphone apps (like it is for Mac desktop apps currently)

~~~
pieter
I don't see any reason to assume this will show up on the iPhone. Apple has a
very strict policy about interpreters running on their platform, why would
they suddenly change that?

(You might still be able to AOT your macruby program and ship the binary on
the iPhone)

~~~
tumult
You can run interpreters on iPhone. You just can't allow the user to load code
in externally to be interpreted.

And you can build binaries with MacRuby anyway.

------
cpr
Looks like Apple is really putting a lot of dynamic language hopes into this
project.

When I talked with Ted Goldstein, then head of Apple developer tools, at WWDC
a few years back (he happened to sit at my lunch table), he said their
eventual goal for Objective-C was a full, Smalltalk-like runtime IDE. (Ted was
at PARC for many years, working on Smalltalk.) And they're clearly getting
there, slowly but surely. (LLVM is key to those plans.)

But MacRuby promises a shorter path to a dynamic language completely
integrated with the Objective-C runtime environment.

Quite interesting to watch.

Another good point he made was that MS still isn't using C# for any of their
built-in or system applications, while Apple is using Objective-C/Cocoa for
all of their major apps. (Well, except for a few Carbon laggards like their
audio/video high-end apps.) That told him Apple was doing something right.

In that vein, he also noted that people looking in from the outside would
never "get" the power of Objective-C/Cocoa (which is just "Smalltalk in C"
with a fantastic runtime library)--the language is just off-putting enough at
first glance that people don't understand--, and that made it a good secret
weapon.

------
papersmith
I am not very familiar with MacRuby, anyone know if it plays well with Rails
and its libraries?

It's really cool that 0.5 uses LLVM. Does anyone know how this it stacks up
against the other Ruby implementations?

~~~
cubicle67
How many Rails apps run on an OSX server?

~~~
cschneid
More if macruby worked and was significantly faster.

