Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin
MacRuby 0.8 Released (macosforge.org)
67 points by ddagradi on Dec 14, 2010 | hide | past | favorite | 14 comments


Notable fixes - for my current project at least - include:

- no longer crashing when calling the main thread from a background thread

- supporting formal protocols (or at least pretending to enough to work right)

- properly changing the path of the library when you embed it in the executable, for distributing via an App Store

MacRuby has been a fantastic tool in developing for the Mac App Store with a team of programmers with a mixed knowledge of Cocoa and Objective-C. Super exciting to see it progressing so quickly!


Naturally, Laurent is more authoritative but I wrote this up for Ruby Inside earlier - it might be more accessible to ppl not familiar with MacRuby and includes notes on two MacRuby books that are in the works: http://www.rubyinside.com/macruby-0-8-released-and-2-macruby...


It's great to see multiple books on the horizon. Matt's book was really a great reference when getting started.

I didn't notice that Hubcap was a MacRuby project! I'm looking forward to hearing about the challenges they faced in development. It seems like in the near future there will be a pretty great library of Mac software written in MacRuby...


I wonder if this will ever be used as an alternative to Objective-C for iOS.


There has been some research to that end. The main hurdle there is that MacRuby depends on the Cocoa garbage collector, which is intentionally not supported on iOS. For iOS, they would need to either find another garbage collector that works well with MacRuby and somehow magically Does The Right Thing with all the SDK classes, or else teach the MacRuby compiler to insert retains and autoreleases where needed.


Plausible Labs have released PLBlocks - a version of GCC + a runtime library that allow you to use garbage collection in your iOS apps. Presumably MacRuby could just use the runtime library to provide the GC support it needs.

The BridgeSupport issue (mentioned by another commenter) is more troublesome.


The garbage collector isn't the only issue. Compiled Obj-C code does not retain sufficient metadata (i.e. variadic methods, enums, and such) to do certain "ruby"-ish things. Currently, this is resolved using BridgeSupport, which is also not currently available on iOS...


MacRuby's Clang-based version of BridgeSupport should already be most of the way to solving this problem. (I haven't tested, but I can't see why that would not be the case.)


The Clang-based BridgeSupport preview only improves the metadata generation. There's still no way to package the metadata that is iPhone friendly. Ultimately, a likely solution will be to add the metadata to an extra __TEXT segment and use dlopen/dlsym to fetch it from the MacRuby runtime...


Ah, that hadn't crossed my mind. But I'm guessing that new modern compiler-environment of theirs sure could be useful surmounting such a hurdle.


i believe it may be a possibility in the future. see here:

https://hackernews.hn/item?id=1684403



Does anyone know of any apps written in this?


A quick Github search turned up these: http://isaac.kearse.co.nz/2010/01/01/birdwatch/ http://isaac.kearse.co.nz/2010/01/31/stopwatch/ https://github.com/sstephenson/37signalsMenu https://github.com/ashchan/gmail-notifr

Hubcap will be when it's released (http://www.kickstarter.com/projects/1487030260/hubcap-a-gith...)

Hackety Hack (http://hacketyhack.heroku.com/) was talking about a version for the Mac App Store using MacRuby

Our current app will be open-sourced on Github soon...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: