Live data from Hacker News

RubyMotion - Ruby for iOS

rubymotion.com

31–40 of 250 posts

Re: RubyMotion - Ruby for iOS

#31
post #11

nice, but where is the advantage over just using objc? the hard part of coding for iOS isn't objc, it's learning how to use all the API's.

I agree, but many young developers have C phobia and somehow seem not to be able to grasp C based languages.

I like C but have Obj-C-aversion because "high level" languages that still need header files all over the place just ain't right.

Re: RubyMotion - Ruby for iOS

#32
I don't see the point of this. Objective-C is not hard to learn, and with ARC, blocks, the new literals for NSArray and NSDictionary, etc, Objective-C has actually become pleasant to write IMO. The example RubyMotion code also doesn't look very nice either.

The problem with Rubyists (being one for the past 6 years I feel qualified to say this) is in general they want to use Ruby for everything. It's not always the best tool for the job.

Re: RubyMotion - Ruby for iOS

#33

I've played around with what seems like ever alternative framework under the sun (Titanium, Rhodes, PhoneGap, MonoTouch, Corona) and have been pretty frustrated with how clunky they usually feel. However with everything its claiming and the decent price point I'm toying with purchasing site unseen...just wish I could try it for a few hours first.

Two suggestions:

1) http://arstechnica.com/business/news/2012/05/exclusive-build... (Review with code)

2) http://pragmaticstudio.com/screencasts/rubymotion (Screencast)

Re: RubyMotion - Ruby for iOS

#34
post #25
post #11

Earlier quoted context omitted.

I agree, but many young developers have C phobia and somehow seem not to be able to grasp C based languages.

Or they've been spoiled by certain language features and it seems unbearable to go backwards.

Personally I find great that we have a native Ruby compiler, even if it means a static language with Ruby like syntax in the end.

I hope for the day when we have better and more type safe languages for system programming.

Most attempts so far, Modula-* family, Ada, Oberon and so on, failed to catch on, to my dismay.

Still it does not hurt to know some C.

Re: RubyMotion - Ruby for iOS

#35

I could see this really taking off. My worry is that it would take off so well that the ruby gem community could get fragmented into libraries for RubyMotion and libraries for regular ruby projects.

I'm supposing that they will probably implement it as another platform option like you can do right now for JRuby/Windows/etc. It shouldn't affect much. I haven't looked at the documentation, though, so I can't say for sure.

As mentioned above, CocoaPods will probably be used for this purpose as it is already the de-facto repository for MacRuby.

Re: RubyMotion - Ruby for iOS

#37

Will apps created using this have any problems getting approved with App Store?

No. From the FAQ ( http://www.rubymotion.com/support/#faq ): "Applications submitted to the App Store must conform to the Review Guidelines dictated by Apple. RubyMotion implements a dialect of Ruby that conforms to those rules. RubyMotion apps are fully compiled, do not download or interpret code and are using public iOS APIs through the exact same machinery as regular Objective-C apps."

Yay!!

Re: RubyMotion - Ruby for iOS

#38
post #31
post #11

Earlier quoted context omitted.

I agree, but many young developers have C phobia and somehow seem not to be able to grasp C based languages.

I like C but have Obj-C-aversion because "high level" languages that still need header files all over the place just ain't right.

There I agree with you.

Header files are so 70's.

Re: RubyMotion - Ruby for iOS

#39

Earlier quoted context omitted.

The call syntax is still painful compared to straight Objective-C as it actually uses more characters and is not as clean. I really wish he had come up with something that resembled Objective-C better.

I may have missed something but API calls looks like a regular Ruby call with a hash and since all [] are dropped it's systematically shorter (not even counting the fact that you don't have .h/.m, declaration/implementation, it's not just a matter of API calls). i.e. [obj method: param second: param2]; vs obj.method(param, second: param2) which is exactly two characters shorter in ruby. And what would be the point of…

I was looking at the example and their are a fair number of commas. If you pass 3 selectors it is longer.

  UIColor.colorWithRed(red/100.0, green:green/100.0, blue:blue/100.0, alpha:1.0)
vs

  [UIColor colorWithRed:red/100.0 green:green/100.0 blue:blue/100.0 alpha:1.0];
>And what would be the point of having something that looks like Objective-C?

Because the name of the function is not colorWithRed(), it is colorWithRed:blue:green:alpha:.

Re: RubyMotion - Ruby for iOS

#40
Part of me is happy. Apple pushed MacRuby before Lion and effectively killed it internally going forward after the ARC announcement. MacRuby relies on the GC capability of Objective-C which is incompatible with their new ARC baby. Just a few days ago I wanted to take a backend framework we wrote and build a command line tool to call some of it's methods in MacRuby (lots of command line parsing and Ruby has good facilities for that) but forgot we converted that framework to ARC. No dice.

This looks promising but at the same time I really wish the backend compiler was open sourced and worked on Mac and not just iOS.

Post reply on HN