3 ms·
For iOS, MacRuby is unfortunately not an option, as it would require garbage collection. However, for writing OS X software, MacRuby works great (we just shippe
by ddagradi 15y ago
For iOS, MacRuby is unfortunately not an option, as it would require garbage collection. However, for writing OS X software, MacRuby works great (we just shipped an app with it in the App Store - http://briquetteapp.com http://briquetteapp.com - and it has definitely been a joy to work with).
Unfortunately, it doesn't really make the learning curve any less intense. While Objective-C's syntax and style are somewhat difficult, the real challenge to Mac/iOS programming is having a working knowledge of the Cocoa API. MacRuby simply acts as a bridge between Ruby and Cocoa, meaning you need to know exactly the same amount about API methods no matter the programming language you choose.
Reading the currently available MacRuby book is a great idea - http://ofps.oreilly.com/titles/9781449380373/ http://ofps.oreilly.com/titles/9781449380373/. If you find yourself confused by the concepts, you should try learning Objective-C and Cocoa first (I learned with http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=sr_1_1?ie=UTF8&qid=1306096811&sr=8-1 http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/032150...). It is certainly possible to dive in with MacRuby! Just remember that it's not 1.0 yet, and could present technical difficulties in unexpected ways. Otherwise, it's super fun!
- jmonegro 15y agoThanks for your response! Briquette looks great :) All things considered, it seems like MacRuby might make it's way onto iOS in the future (http://iflipbits.com/post/1101983568/macruby-soon-on-ios http://iflipbits.com/post/1101983568/macruby-soon-on-ios, although that's 8 months old, so I'm not really counting on it for now). Yes, I figured that out after researching enough about obj-c, cocoa, and macruby. That's why I wondered if learning MacRuby first would ease me into the process by taking away a layer of difficulty (obj-c). Then after I get the hang of it, I could transition to objective-c, maybe through one of PeepCode's screencasts, "Objective-C for Rubyists".
- ddagradi 15y agoIt's definitely possible to start with MacRuby. It just requires a little more overhead to translate Cocoa documentation into methods that work with MacRuby (not to mention the occasional one that doesn't work right...). As a Rubyist, there's definitely some differences (named parameters, for instance), but you get the hang of it pretty quick. As a Cocoa developer, debugging with MacRuby has issues, as Xcode doesn't always know about the right symbols since it's not compiled (but this is getting better!). Use the MacRuby book, and learn to love Xcode's documentation, and you should be good to go. If you do have issues, email the macruby-devel mailing list or visit #macruby - the community is super friendly and happy to help! re iOS: I'm really hoping. With MacRuby shipping by default with Lion, iOS 5 will hopefully follow suit this summer.