Earlier quoted context omitted.
Why do you think it's hell? I've been using it for about 2-3 years now and it's really grown on me over that time. I think the most common complaint is that it is too verbose, but that has its advantages too.
what's an advantage of being too verbose? extra exercise for your fingers? ;-)
Build iOS Apps In Ruby - Available Summer '12
41–50 of 54 posts
Re: Build iOS Apps In Ruby - Available Summer '12
#42People of Earth: This is nonsense. Objective C is a fantastic language. Appcelerator Titanium, PhoneGap - it's all crap. Customers can feel the difference. To make a native app, learn a native language.
"Oh I've been looking into PhoneGap, it's pretty cool"
"Oh I've been learning Android development"
WHY???? When has a client even asked us to make an Android app.
Re: Build iOS Apps In Ruby - Available Summer '12
#43Earlier quoted context omitted.
Well any way you slice it you're still going to have to interface with the Cocoa frameworks that make up the OS. Anything that masks the interface too much just causes friction. e.g. you can't look stuff up in the docs anymore. MacRuby does a bit better job at first glance than this does, but you can't get past the way the framework you're using works. In Objective-C: Person *person = [Person new]; [person name]; [pe…
The trouble is, this causes almost as much friction as just using Objective C in the first place. I use Ruby and ObjC extensively (have even mixed them in a desktop app), so I'm familiar with both. While I find ObjC immensely frustrating for dealing with strings and text, and love to use Ruby for that, the syntax above just makes me cringe - it's not idiomatic Ruby, which would be something more like: person = Person…
person = Person.new
person.name = "Joe"
person.lastName = "Blogs"Re: Build iOS Apps In Ruby - Available Summer '12
#44Re: Build iOS Apps In Ruby - Available Summer '12
#45How about you learn the native language. You will never get the most out of a platform without going native. Apps like instagram, any games, and the most exciting apps in mobile will always be native. Great programmers have the tools to build what needs to build.
Re: Build iOS Apps In Ruby - Available Summer '12
#46How is this : alert = UIAlertView._alloc \ ._initWithTitle _S("Hello"), :message, _S("I'm MobiRuby"), :delegate, nil, :cancelButtonTitle, _S("I know!"), :otherButtonTitles, nil alert._show supposed to be better than this ? alert = [[UIAlertView alloc] initWithTitle:@"Hello" message:@"I'm ObjC" delegate:nil cancelButtonTitle:@"I know!" otherButtonTitles:nil]; [alert show];
file.rb:
require 'stuff'
class foo
def something
alert = UIAlertView._alloc \
._initWithTitle _S("Hello"),
:message, _S("I'm MobiRuby"),
:delegate, nil,
:cancelButtonTitle, _S("I know!"),
:otherButtonTitles, nil
alert._show
end
end
Instead offile.h
#import
@interface foo
-(void)something:(BOOL)what andthen:(CGRect)thisthing
@end
and then file.m #import
#import
#import "file.h"
#import
#import
#define SOME_HACK
#import
@implementation foo
-(void)something:(BOOL)what butthen:(CGRect)thisthing
{
alert = [[UIAlertView alloc]
initWithTitle:@"Hello"
message:@"I'm ObjC"
delegate:nil
cancelButtonTitle:@"I know!"
otherButtonTitles:nil];
[alert show];
}
Fuck that.1. Don't Repeat Yourself. Computer have more memory than 1986.
2. Don't forget to turn on warnings-as-errors, otherwise that code above will compile and then break because (of course you noticed) the method declaration doesn't actually match the declaration but the compiler doesn't care because its a brutal hack.
Re: Build iOS Apps In Ruby - Available Summer '12
#47How is this : alert = UIAlertView._alloc \ ._initWithTitle _S("Hello"), :message, _S("I'm MobiRuby"), :delegate, nil, :cancelButtonTitle, _S("I know!"), :otherButtonTitles, nil alert._show supposed to be better than this ? alert = [[UIAlertView alloc] initWithTitle:@"Hello" message:@"I'm ObjC" delegate:nil cancelButtonTitle:@"I know!" otherButtonTitles:nil]; [alert show];
Re: Build iOS Apps In Ruby - Available Summer '12
#48How about you learn the native language. You will never get the most out of a platform without going native. Apps like instagram, any games, and the most exciting apps in mobile will always be native. Great programmers have the tools to build what needs to build.
Totally. That is why I code my web apps in assembly. Frameworks and higher level languages have nothing to offer.
Re: Build iOS Apps In Ruby - Available Summer '12
#49People of Earth: This is nonsense. Objective C is a fantastic language. Appcelerator Titanium, PhoneGap - it's all crap. Customers can feel the difference. To make a native app, learn a native language.
Really wish the Flash devs I worked with thought this way. "Oh I've been looking into PhoneGap, it's pretty cool" "Oh I've been learning Android development" WHY???? When has a client even asked us to make an Android app.
Re: Build iOS Apps In Ruby - Available Summer '12
#50Earlier quoted context omitted.
what's an advantage of being too verbose? extra exercise for your fingers? ;-)
With autocomplete you don't get much extra exercise anyway. It helps to strain your brain less however when reading the code.
(Just to establish that I'm not completely talking out my rear end: I've been programming Objective-C for ten years, Ruby for five.)