Live data from Hacker News

RubyMotion - Ruby for iOS

rubymotion.com

91–100 of 250 posts

Re: RubyMotion - Ruby for iOS

#91

Earlier quoted context omitted.

What language features does Ruby have that Objective-C lacks? It's a bit more succinct, perhaps, but when you're calling out to Cocoa all the time, that succinctness is going to get thrown out the window.

Ruby has "yield" which, while possible to replicate in Obj-C, it's not nearly as nice. Also, Ruby can yield arguments, and the block being yielded to is free to ignore those arguments. That's the sort of flexibility that can make Ruby so much more enjoyable to work with in high-level code.

That's a great example, thanks!

I did some looking, and I found a few[1] examples[2] of coroutines in Objective-C, though none of them seemed fully fleshed-out. Even if they were, none were, as you say, nearly as nice as "yield".

[1]: http://cocoadev.com/wiki/CSCoroutineTest

[2]: https://gist.github.com/1033477

Re: RubyMotion - Ruby for iOS

#92
Be sure not to miss all the sample code: https://github.com/HipByte/RubyMotionSamples

In particular, for those looking for a side-by-side comparison of what it means to use Ruby instead of Obj-C, be sure to check out the GestureTable sample: https://github.com/HipByte/RubyMotionSamples/tree/master/Ges... which was based on the JTGestureBasdeTableView: https://github.com/mystcolor/JTGestureBasedTableViewDemo

Re: RubyMotion - Ruby for iOS

#93
post #25

Earlier quoted context omitted.

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

What language features does Ruby have that Objective-C lacks? It's a bit more succinct, perhaps, but when you're calling out to Cocoa all the time, that succinctness is going to get thrown out the window.

[deleted]

Re: RubyMotion - Ruby for iOS

#94
What's with the price difference between Canada and US orders? It's CAD$152.82 versus US$149.99.

With the Canadian dollar currently worth about 1 cent more than the US, I'm surprised to see that there is a price difference at all.

Re: RubyMotion - Ruby for iOS

#96
post #77

Earlier quoted context omitted.

I've never understood this logic: The existence of this project is not an attack on Objective-C. Objective-C is not hard to learn and awesome, I agree. But what does that have to do with providing an alternative? There can exist multiple good solutions to one problem. You said it yourself: Ruby is not always the best tool for the job, perhaps Objective-C is also not always the best tool for the job. Perhaps the use o…

I am personally concerned that the Rubyists will flood the iOS development space, bringing their culture and introducing a dogmatic and insular environment. We already have -- and without great fanfare -- Lua, JavaScript, C# (MonoTouch), et al. This seems somehow different.

Don't be scurrrreed

Re: RubyMotion - Ruby for iOS

#97
post #53

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 be…

> Rubyists in general want to use Ruby for everything. Well… why not? This is a relatively objective statement; the problem with ruby tends to be the crappy interpreter we're forced to suffer through - not the language itself. The Ruby language, in my biased opinion, as far as OO-functional languages go is pure awesome. My initial reaction was: "A Ruby to Obj-C ABI compiler? Fuck no, what is wrong with you." Upon lea…

> Upon learning it was the MacRuby dude: "Holy shit fuck yes".

Couldn't have said it better myself.

Re: RubyMotion - Ruby for iOS

#98
post #90
post #77

Earlier quoted context omitted.

I am personally concerned that the Rubyists will flood the iOS development space, bringing their culture and introducing a dogmatic and insular environment. We already have -- and without great fanfare -- Lua, JavaScript, C# (MonoTouch), et al. This seems somehow different.

Goodness - what a hateful, stereotyping, and narrow-minded comment. I'm enjoy ruby and spend a lot of time writing it, but would never pass judgement like this on anyone who uses another language. I've never interacted with anyone writing in any language that has an attitude like this - let's hope that you are an edge case...

Honestly, I'm part of the mostly-silent majority of polyglot programmers that choose the best language for the job and have grown increasingly weary of Rubyists wheel invention and focus on rock star programming and rock star rants. It's the only community that I find socially insufferable, and while an unpopular opinion here, I don't relish the notion of Rubyist culture.

Culture aside, simply technologically, Ruby has nothing significant to offer as compared to the many existing languages and technology stacks, especially those pushing forward language and runtime research. The only argument for Ruby here seems to be opening the market to developers unwilling to move beyond it.

Re: RubyMotion - Ruby for iOS

#99

Earlier quoted context omitted.

I think you'll find the difference between working with Cocoa APIs in Obj-C vs Ruby is that it's much easier in Ruby to turn what you've learned into a simple, boiled-down, easier to digest set of helper methods/objects/modules. For example, in using the RubyMotion beta, after I understood the UIView animation flow, I created a helper method using "yield" to do the actual animation. If I were working in Obj-C, it wou…

Isn't that really the difference between something like: def animate UIView.begin_animation yield UIView.commit_animation end animate do # Do something end and: void animate(void (^block)(void)) { [UIView beginAnimation]; block(); [UIView commitAnimation]; } animate(^ { // Do something }); Which to my eye are pretty much exactly the same. In fact, UIView already provides a similar method built into the API. Anyway, I…

> UIView already provides a similar method built into the API.

Yeah, it's actually much, much simpler to do it in Objective-C in this case.

    [UIView animateWithDuration:0.5f animations:^{
        // Do something
    }];

Re: RubyMotion - Ruby for iOS

#100

What's with the price difference between Canada and US orders? It's CAD$152.82 versus US$149.99. With the Canadian dollar currently worth about 1 cent more than the US, I'm surprised to see that there is a price difference at all.

The nominal exchange rate you see has only a passing resemblance to exchange rates charged by CC processors.
Post reply on HN