It's nice, I'm new to using ruby (I've been an iOS dev for a while now), I'd give it ago. But I assume it uses storyboards in the same way as ObjC, set it in the target and in the Info.plist, and it figures it out... it'd be nice to see it working though.
RubyMotion - Ruby for iOS
151–160 of 250 posts
Re: RubyMotion - Ruby for iOS
#152Earlier quoted context omitted.
From the Features: "It's Ruby, you don't need to think about managing memory. Ever. RubyMotion will by itself release the objects you create when they are no longer needed. Our memory model, similar to Objective-C ARC in design, does not require any extra memory or processor footprint to allocate and reclaim unused objects."
I still wonder how they did that. The classic problem with reference counting is correctly releasing cycles, which ARC handles by allowing "weak" references. How does MacRuby know when to insert a weak reference as opposed to the usual "strong" reference? If that could be automatically detected, why does Obj-C ARC not automatically do it for you?
So, basically, you're stuck with retain cycles right now. My bet is that they implement a way of marking weak references rather than becoming more intelligent than ARC.
Re: RubyMotion - Ruby for iOS
#153Just a note, not sure if this is intentional, but the audio on the video is in stereo, but with no right channel. edit: also, please stop the heavy breathing into the mic. Driving me crazy!! :)
I could not watch the video (on headphones) because it is physically painful to do so. That's a HUGE problem.
Re: RubyMotion - Ruby for iOS
#154I 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…
Sure, it's not hard to learn. But in my spare time, am I really going to work with a language I can't stand to make my iPhone app or am I just going to want to make a web app in Ruby? The latter sounds a lot more fun, but the former is obviously more efficient. The fact that we can now combine both? Holy shit.
Re: RubyMotion - Ruby for iOS
#155Earlier quoted context omitted.
From the Features: "It's Ruby, you don't need to think about managing memory. Ever. RubyMotion will by itself release the objects you create when they are no longer needed. Our memory model, similar to Objective-C ARC in design, does not require any extra memory or processor footprint to allocate and reclaim unused objects."
I still wonder how they did that. The classic problem with reference counting is correctly releasing cycles, which ARC handles by allowing "weak" references. How does MacRuby know when to insert a weak reference as opposed to the usual "strong" reference? If that could be automatically detected, why does Obj-C ARC not automatically do it for you?
Re: RubyMotion - Ruby for iOS
#156nice, but where is the advantage over just using objc? the hard part of coding for iOS isn't objc, it's learning how to use all the API's.
I write code in both Ruby and Objective C pretty regularly, but man oh man is my Ruby code SO MUCH shorter and cleaner in a lot of respects. A lot of the Objective-C API's are just terribly terribly verbose. My favorite one to whine about is NSTask; it shouldn't take me 10 lines of code to spawn a simple external process. :P For me, I prefer working in Ruby. Some people don't. But I think this will probably spurn me…
Re: RubyMotion - Ruby for iOS
#157Earlier quoted context omitted.
I write code in both Ruby and Objective C pretty regularly, but man oh man is my Ruby code SO MUCH shorter and cleaner in a lot of respects. A lot of the Objective-C API's are just terribly terribly verbose. My favorite one to whine about is NSTask; it shouldn't take me 10 lines of code to spawn a simple external process. :P For me, I prefer working in Ruby. Some people don't. But I think this will probably spurn me…
But you're going to be coding to those same Apis in ruby too, just with a lightly different syntax.
I can use Ruby's nice facilities for external processes (e.g., "x = `ls`" to get a directory listing or "system('do_something')") or simple regular expressions (i.e., "'string' =~ /my_regex/" and friends vs. NSRegularExpression's verbose syntax). I'm not forced to use Cocoa's verbose API if it has a nice Ruby wrapper (and if it doesn't have one, I can make one).
Re: RubyMotion - Ruby for iOS
#158Earlier quoted context omitted.
No hostility :) You're just on the defensive, so it feels like hostility. It's understandable... > My point is that if you did make the comparison... But I didn't. I never compared the two. My statement was one of a speed gain by simply using the languages/tools you're most familiar with, instead of learning new languages/tools. It cuts out a lot of time, it's not a hard concept to understand ;)
> No hostility :) > You're just on the defensive, so it feels like hostility. It's understandable... Really, no. I don't know if it's intentional or not, but you come across as very passive-aggressive and condescending. I don't even know what it is I'm supposed to be "on the defensive" about — the fact that learning Objective-C takes much less time than learning Cocoa? I feel pretty secure in that knowledge. > But I…
For example, consider using regular expressions in Ruby to check a string -
puts "The limits of my language define the limits of my world" if string =~ /foobar(\d*\w)/
or in Objective C: NSError *error = NULL;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"foobar(\\d*\\w)"
options:NSRegularExpressionCaseInsensitive error:&error];
NSTextCheckingResult *match = [regex firstMatchInString:string
options:0
range:NSMakeRange(0, [string length])];
if (match) {
NSLog(@"The limits of my language define the limits of my world - Wittgenstein")
}
Until quite recently it wasn't even possible to do this in ObjC without an external library.Re: RubyMotion - Ruby for iOS
#159There's a reasonably new language called HTML that is a good development platform too. Works on all devices.
Re: RubyMotion - Ruby for iOS
#160I'll say this again: No programming language is fundamentally bad. Bad programmers have a tendency to move from language to language, blaming their tools for their lack of skill. This stuff is exciting.
Some languages have constituent parts that I'd say are objectively bad. I'll argue all day that Objective-C's handling of nil is stupid beyond belief. Nil/Null itself is bad enough...