Live data from Hacker News

RubyMotion - Ruby for iOS

rubymotion.com

211–220 of 250 posts

Re: RubyMotion - Ruby for iOS

#211

Earlier quoted context omitted.

I thought this rhetorical style sounded familiar. http://news.ycombinator.com/item?id=3844851 I don't think many here are arguing that Ruby is particularly interesting technology-wise. Amongst languages, well, it isn't particularly. But the baseless FUD about the "culture" or the "community" is unnecessary.

A simple Google search would show that issues with unprofessional, sexist, and outright ridiculous behavior in the Ruby community is hardly baseless. Its driven from the top, largely because most mature programmers that would provide a counter to community immaturity have no reason or need to use Ruby.

Sure, things like that have occurred. They occur in many fields. The Linux kernel mailing lists could make your eyes water at times :-)

Things like "the [whatever] community is toxic-at-best" or "I don't relish the notion of [whatever] culture" are opinions that in Ruby's case are based on the behavior of a minority. It's like if people say all C developers are "fat bearded men." Quite a few are, but it's an unhelpful generalization.

If the Ruby community had a general atmosphere or a policy of encouraging sexist or unprofessional behavior, I'd let these remarks slide. But it doesn't. The articles and rants that make it to HN are usually the controversial parts because that's more likely to get votes on social voting sites like HN, alas.

Re: RubyMotion - Ruby for iOS

#212

I love writing Ruby code, but today I'm finally at a point where I also feel happy and productive with Objective-C. What made my eyes bulge is this: http://www.rubymotion.com/developer-center/guides/project-ma... No XCode. Instead of obscure and impenetrable project files, a convention over configuration Rakefile. Clean and Ruby-like workflows and repositories. While you can certainly configure an Xcode workspace to…

Which makes me wonder.. is it possible to rig up such an environment for standard Objective C iOS app development? It could be huge.

For writing iOS apps I tend to use the THEOS makefile framework by DHowett gives you fine grained control over everything :)

Re: RubyMotion - Ruby for iOS

#213

Earlier quoted context omitted.

A simple Google search would show that issues with unprofessional, sexist, and outright ridiculous behavior in the Ruby community is hardly baseless. Its driven from the top, largely because most mature programmers that would provide a counter to community immaturity have no reason or need to use Ruby.

Sure, things like that have occurred. They occur in many fields. The Linux kernel mailing lists could make your eyes water at times :-) Things like "the [whatever] community is toxic-at-best" or "I don't relish the notion of [whatever] culture" are opinions that in Ruby's case are based on the behavior of a minority. It's like if people say all C developers are "fat bearded men." Quite a few are, but it's an unhelpfu…

> Sure, things like that have occurred. They occur in many fields. The Linux kernel mailing lists could make your eyes water at times :-)

And unsurprisingly, Linux is a terrible overall example of quality kernel development and design.

> If the Ruby community had a general atmosphere or a policy of encouraging sexist or unprofessional behavior, I'd let these remarks slide. But it doesn't.

Except that the only times I've ever had to deal with (or hear of, third-hand) a general atmosphere of sexist, unprofessional behavior in technology has been in relation to the startup community in general, and the Ruby community in particular.

Re: RubyMotion - Ruby for iOS

#214

Earlier quoted context omitted.

"polyglot programmers that choose the best language for the job" You just described the majority of Ruby coders I've ever worked with. (mentally scrolls work history roster of Ruby devs...) Yeah, in fact you've just described all of them. I'm sorry your sampling of Ruby coders has been so poor, and I'm sure you could present examples to defend your prejudice. I know the stereotype you're talking about. I haven't work…

If that describes said ruby programmers, then why are they using Ruby? > Nevertheless, it seems to me you've become the thing you claim to despise: insular and closed off to experiences that would contradict your dogmas. That would be the opposite of "polyglot". I can find value in Clojure's concurrency design, Python's scientific community, Scala's marriage of OO and functional, F#'s modernization of ML environments…

You're describing a sub-group of young Valley-centric developers (and the occasional outspoken charismatic CEO), drawn to Rails because of its prominence in the start-up environment. It's simple numbers: since Rails is arguably the most popular for ambitious SV companies, then sure, it's going to reflect that culture to some extent. But the community runs deeper than that, and the "Matz Is Nice So We Are Nice" world still exists and thrives. That's the majority of the Ruby and Rails world I've encountered.

Again, I'm sorry your poor sampling seems to have traumatized you into an an irrational, confirmation-bias myopia, but my experience has been very different.

You like C#'s language design? Me too. I especially like its adoption of Ruby-ish idioms like lambdas and the LINQ collections DSL, and the C#-on-Rails framework goodness of ASP MVC.

"it's just yet another imperative scripting language with a poorly designed runtime"

Sweet Lord what an ignorant statement.

Here's the thing that Ruby does astonishingly well that none of those others you mentioned can do: metaprogramming. None of the languages can touch Ruby for its ability to consolidate expressive, DSL-like idioms that eliminate code duplication (and therefore bugs), increase communication and application logic clarity. This is where Ruby really eclipses everybody else, in its ability to create frameworks, DSLs and micro-solutions that drive interesting and expressive conventions that drastically reduces the time it takes to code and deliver a feature out the door.

This is why frameworks like Rails and Sinatra have been so successful with polyglot programmers like the ones I work with, and why new frameworks like Merb and Padrino keep popping up and offer new idioms and expressive possibilities. It's just a creative, open language to work with, that allows a creativity and level of surprising possibilities that have real business consequences. At the application level, where code conciseness and time-to-delivery are at a premium, Ruby simply shines.

Re: RubyMotion - Ruby for iOS

#215

Earlier quoted context omitted.

If that describes said ruby programmers, then why are they using Ruby? > Nevertheless, it seems to me you've become the thing you claim to despise: insular and closed off to experiences that would contradict your dogmas. That would be the opposite of "polyglot". I can find value in Clojure's concurrency design, Python's scientific community, Scala's marriage of OO and functional, F#'s modernization of ML environments…

You're describing a sub-group of young Valley-centric developers (and the occasional outspoken charismatic CEO), drawn to Rails because of its prominence in the start-up environment. It's simple numbers: since Rails is arguably the most popular for ambitious SV companies, then sure, it's going to reflect that culture to some extent. But the community runs deeper than that, and the "Matz Is Nice So We Are Nice" world…

I strongly disagree with your statement that Ruby excels and metaprogramming and DSLs. Other languages (Scala, C#, F#, etc) with coherent type systems have demonstrated an ability to define equivalently useful DSLs with the added property of validating correctness of a declarative language at compile time.

You mention LINQ as somehow deriving from Ruby -- it doesn't, it derives from set theory, relational algebra, and some very careful consideration of how to model those in a typesafe environment. You fail to mention that LINQ is type-safe, which is an enormous advantage to its use compared to traditional approaches of modeling set theory / relational data problems, and has value for things well beyond databases or querying simple data structures, eg: http://msdn.microsoft.com/en-us/data/gg577609

You claim lambdas as Ruby-ish idioms, and yet totally ignore where "lambda" derives from: lambda calculus. This is not a Ruby-ism, and Ruby discards much of what is of value in lambda calculus: http://en.wikipedia.org/wiki/Lambda_calculus#Lambda_calculus...

Ruby is a "me too" on those fronts, and not a particularly novel one.

Re: RubyMotion - Ruby for iOS

#216

Earlier quoted context omitted.

Though you seem completely uninterested in anything but repeating your toxic, dogmatic, and insular refrain, I may as well add my voice to the chorus of those who see a different community than the one you do. But I also want to respond to the somewhat more interesting portions of your argument - is ruby "technically interesting", "notable", "novel", and/or lacking in "solid applied computer science", and to what ext…

How does it combine the OO of smalltalk and the functional programming of lisp? What was smalltalk lacking that ruby added?

Adoption.

Re: RubyMotion - Ruby for iOS

#217

Earlier quoted context omitted.

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:b…

Seeing as we're splitting hairs... :)

In the Ruby version I wouldn't use that selector with any parens. The resulting line would be one character longer than the ObjC version but use the Shift key one less time and would avoid two pinky trips out to the square brackets. (unless I am miscounting)

All other things being equal between the two options, and of course they aren't but let's just keep splitting hairs for a moment, it sounds like a typing win for the Ruby option. Readability is of course in the eye of the beholder.

Re: RubyMotion - Ruby for iOS

#218
post #6

Earlier quoted context omitted.

Actually they say that this is based on MacRuby: http://www.rubymotion.com/features/ at the bottom of the page: RubyMotion is based on MacRuby, a widely-used implementation of Ruby created and maintained by Apple for over 4 years. Starting from a solid and stable code base, the guys who originally created MacRuby now work on RubyMotion. You're in good hands.

Ah, now I see! I suppose I glossed over that. It should be bigger. ;)

I agree, I looked at pretty much every page on the site wondering what the connection was to MacRuby, until I found it in the FAQ.

Re: RubyMotion - Ruby for iOS

#219

Earlier quoted context omitted.

You're describing a sub-group of young Valley-centric developers (and the occasional outspoken charismatic CEO), drawn to Rails because of its prominence in the start-up environment. It's simple numbers: since Rails is arguably the most popular for ambitious SV companies, then sure, it's going to reflect that culture to some extent. But the community runs deeper than that, and the "Matz Is Nice So We Are Nice" world…

I strongly disagree with your statement that Ruby excels and metaprogramming and DSLs. Other languages (Scala, C#, F#, etc) with coherent type systems have demonstrated an ability to define equivalently useful DSLs with the added property of validating correctness of a declarative language at compile time. You mention LINQ as somehow deriving from Ruby -- it doesn't, it derives from set theory, relational algebra, an…

"Ruby is a "me too" on those fronts, and not a particularly novel one."

Of course. No one, especially not Matz, ever claimed Ruby was novel. Why should I care whether a language feature is new when I have features to ship? What you seem to be dogmatically, blindly ignoring is that Ruby's peculiar amalgamation of existing techniques, borrowed from (standing on the shoulders of) Smalltalk, Perl, Python, certain aspects of Lisp and others, created an expressiveness with those idioms that invited widespread adoption that Smalltalk and Lisp in all their glory only ever dreamed of. Innovation was the least of Ruby's concerns, and it's irrelevant to the conversation at hand.

Type-safety seems to be a big thing for you. This may seem to be an enormous advantage to you, and I wish you well. I personally think type safety is the most overrated language feature in CS history. In my crankier moments I'd say it's essentially a compile-time unit test and refactoring/code-browsing crutch for IDE-jockeys that don't test their code. In my less-cranky moments...I'll probably say the same thing. And that's after a decade and an half in Java and C#, not quite a decade in Ruby. To me, type safety imposes far more overhead than it's worth -- generics, abstract classes, interfaces, all irrelevant and basically built-in and implicit in dynamic environments like Ruby. But that's another digression. Suffice it to say, in my entire software career I've kept track of the sum total of bugs I've fixed related to passing the wrong type to a method, or receiving a wrong type from a method, and that number, to date, is (whirring, calculating sounds): 0. Total number of times I wished I had a refactoring shortcut for "extract interface", "rename method", "introduce parameter object" in a Ruby environment: 0.

I've not written a line of Scala or F#, so I can't speak to those, but the notion that C# could construct a DSL a fraction as concise and expressive as Ruby could is absurd. I like C# quite a bit, but let's not be ridiculous.

And I never claimed that LINQ or C# lambdas were derived from Ruby, just that they were Ruby-ish. Clearly someone in Redmond is watching Ruby and Rails. ASP MVC directly borrows Rails idioms, and many aspects of LINQ seem to have at least had Ruby in view, like 'Select', etc., even down to using hashrockets, although in a different manner. I certainly wouldn't be the first to point these parallels out:

http://nerdfortress.com/2008/06/12/c-30-encourages-rubyisms/

http://haacked.com/archive/2007/05/24/ruby-like-syntax-in-c-...

http://blog.troyd.net/PermaLink,guid,c4d8233b-77f4-4660-91a9...

http://rubysource.com/c-dynamic-features-helped-me-learn-rub...

Re: RubyMotion - Ruby for iOS

#220
post #171

Earlier quoted context omitted.

I don't understand how this relates to anything I've said. How is this meant to show that the time it would take to learn Objective-C while you're learning Cocoa is prohibitive? Actually, I think your code examples support my point. You're not contrasting Ruby and Objective-C, you're contrasting Ruby's standard library with the Objective-C library Foundation, which is what you need to learn to get any real use out of…

Are normal ruby regex expressions not available in macruby/Rubymotion? If so, why would you bother to use the above code using cocoa regex when the idiomatic ruby version is so much shorter and simpler? The example was supposed to illustrate that some things are easier and more concise in ruby, and thus also presumably in something like Rubymotion. The relevance to your posts is that you are ignoring some very good r…

I really feel like you believe I'm arguing that you shouldn't use Ruby or RubyMotion. I'm not! Ruby has been my go-to language for half a decade now. Heck, I even follow both the MacRuby mailing list and Twitter list. To reiterate, this is the entirety of my argument:

> "I don't want to go to the trouble of learning Objective-C" is a weak reason to use RubyMotion, because you'll have to do 99.95% of the same work anyway.

The fact that Ruby can express things very concisely has nothing to do with whether or not learning Objective-C adds an appreciable amount to time to the process of learning Cocoa. That's why I was ignoring it. If you simply like Ruby on its own merits, that's a good reason to use it.

Post reply on HN