News for hackers. Stuff that matters.
Re:A review of RubyMotion by ricksta on Friday May 04, 2012 @01:04AM (#3927113)
Objective C classes and methods are designed to be long and mostly typed by Xcode's autocomplete. With RubyMotion, I will end up typing out all those verbose methods, which I don't know if it's something I feel too big about.

The example author made here feels like I will end up typing about twice as much with RubyMotion than objective C.

Ruby: @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.makeKeyAndVisible

Objective C: self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible];

Re:A review of RubyMotion by jmonegro on Friday May 04, 2012 @01:30AM (#3927180)
I agree. With XCode's powerful autocomplete, I don't have to remember all the methods. In fact, you can guess the names a lot of the times due to their verbose and descriptive naming conventions, and XCode will help you along the way.

I'm a Rubyist, it's my primary language and I'd love to use it over Objective-c. But I'm also starting really like Obj-c, and right now it's the best thing out there for iOS because of XCode.

If you want to learn how to make iOS apps, learn Objective-c. Or at the very least learn it first. Trust me, you'll be glad you did.

Re:A review of RubyMotion by subwindow on Friday May 04, 2012 @07:31AM (#3927930)
The real benefit with Ruby is the creation of DSLs that make working with these UI elements much easier.

It's only a matter of time before someone creates a DSL that looks something like:

  window = screen.main.new_window(
    frame: true,
    key: true,
    visible: true
  )
 
Or something like that. I'm not an iOS developer, so I'm not really sure what parts of the insanely-verbose method calls are actually necessary.

(As an aside, I have Vim rigged up to do autocompletion with Ruby. I'm sure it would work with these Cocoa libraries as well)

Re:A review of RubyMotion by stcredzero on Friday May 04, 2012 @09:13AM (#3928200)
I'm not an iOS developer, so I'm not really sure what parts of the insanely-verbose method calls are actually necessary.

It's called "Intention Revealing Names." Names are long to provide the programmer information, so shortening them would have a negative impact.

As an aside, I have Vim rigged up to do autocompletion with Ruby. I'm sure it would work with these Cocoa libraries as well

If someone writes the necessary plumbing.

Re:A review of RubyMotion by 286c8cb04bda on Friday May 04, 2012 @11:15AM (#3928742)
Somebody already did once[1], though it's gotten a bit out-of-date. It needs to be manually revised every time a new SDK comes out, so it's going to keep falling out-of-date.

[1]: http://www.vim.org/scripts/script.php?script_id=2674

Re:A review of RubyMotion by poutine on Friday May 04, 2012 @11:48AM (#3928909)
You need to keep in mind that you don't actually type out the entirety of XCode's methods. For instance:

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

Was about 45 key presses in Xcode. And this is a fairly short method, take something like animating a view with a block and you're looking at way more typing to do it in Ruby Motion.

Re:A review of RubyMotion by egze on Friday May 04, 2012 @01:55AM (#3927240)
I wonder if IDEs like RubyMine will have a nice autocomplete for RubyMotion
Re:A review of RubyMotion by adamjcooper on Friday May 04, 2012 @12:20PM (#3929081)
RubyMine doesn't support RubyMotion or the iOS SDKs now, but they're considering it (cf. http://devnet.jetbrains.net/message/5458781#5458781). You can vote up the feature here:

http://youtrack.jetbrains.com/issue/RUBY-11039#tab=Comments

Re:A review of RubyMotion by stcredzero on Friday May 04, 2012 @09:17AM (#3928213)
I would look at the autocomplete scripts/library, see how the metadata is handled there, then see if the autocomplete data in XCode can be hooked up.