Live data from Hacker News

RubyMotion - Ruby for iOS

rubymotion.com

81–90 of 250 posts

Re: RubyMotion - Ruby for iOS

#81

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

Since Laurent Sansonetti is the author of MacRuby AND RubyMotion, he already said feature from RM will be backported (and hence open-sourced) to MacRuby

I'll simply point you at Laurent's email to the MacRuby-devel mailing list about a month ago. I think re-reading it in light of today's announcement could be...informative ;-)

http://lists.macosforge.org/pipermail/macruby-devel/2012-Apr...

Re: RubyMotion - Ruby for iOS

#82
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.

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.

Re: RubyMotion - Ruby for iOS

#83

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…

Speed is what you're missing.

Not to denigrate you or your statement, and yes Objective-C is not that hard to learn, but it comes down to speed.

If I've never programmed in Objective-C and if I'm experienced in Ruby my time from concept to live iPhone app can be FAR quicker by using the tools/language I'm already familiar with (regardless of which tools/language).

Remove the concept of learning a new language, a new IDE, and only require that I learn a new lib to work against and I'm FAR quicker.

Yes, there may be some limitations. But this is iterative development. Build something as solid and quick as possible, and give users the chance to play with it. If it works, and you need more flexibility, it's reasonable to spend the time on learning new tools/languages.

Re: RubyMotion - Ruby for iOS

#84
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.

How ridiculous. You do realize that every programming community has "dogmatic and insular" people, right? There are Cocoa people I've talked with who were, seriously, the rudest human beings I've ever had the displeasure of talking to.

Douchebags are everywhere and it's sort of silly to paint an entire community with a broad brush. We're doing lots of good things, too, despite our own share of jerks.

Re: RubyMotion - Ruby for iOS

#85

Earlier quoted context omitted.

Especially since I know Ruby (and C) but I don't know any Obj-C. Interestingly, from my point of view, Obj-C made perfect sense to me when I realized that it was basically Ruby with C syntax. Given the heritage of Ruby and Obj-C, they come out as very similar languages, so I found it a breeze to pick up the other. The hard part was learning the Cocoa (Touch) frameworks, but I'm not sure a Ruby API would have made tha…

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 don't want to diminish what you've accomplished. It's an awesome achievement regardless of the language you choose.

Re: RubyMotion - Ruby for iOS

#86
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.

Rest assured that your attitude is far more insufferable and real than the "culture invasion" you're concerned about.

Re: RubyMotion - Ruby for iOS

#87

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…

Forgive my ignorance of iOS, but do the current Objective-C based tools deliver "An interactive shell [...] for introspection, live coding and debugging" ? If RubyMotion can actually deliver a real first-class REPL that works, that would be a pretty huge deal. Lack of a REPL is the biggest reason why I dislike mobile (Android) development.

Re: RubyMotion - Ruby for iOS

#88
Now there is an alternative to Objective-C in iOS development(for Rubyists). This is similar to development of Coffescript. There is nothing wrong with Objective-C, it is just that folks who prefer the elegance and beauty of Ruby have an option. I think this will be great combination - beautiful & elegant language for creating apps on a beautiful platform.

Re: RubyMotion - Ruby for iOS

#89
post #83

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…

Speed is what you're missing. Not to denigrate you or your statement, and yes Objective-C is not that hard to learn, but it comes down to speed. If I've never programmed in Objective-C and if I'm experienced in Ruby my time from concept to live iPhone app can be FAR quicker by using the tools/language I'm already familiar with (regardless of which tools/language). Remove the concept of learning a new language, a new…

Compared to learning Cocoa (Touch), Objective-C is really nothing — especially since to use MacRuby you have to learn a bunch of kinda-awkward hacks they've stuck on top of Ruby to make it compatible with Objective-C (e.g. the "def foo(bar, baz:quux)" syntax and Pointers). It's a very simple language. Unless you are exceptionally bad at learning syntax, you're really not saving yourself a whole lot of time.

Re: RubyMotion - Ruby for iOS

#90
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.

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...
Post reply on HN