Any thoughts on RubyMotion?

302 views
Skip to first unread message

Mykn

unread,
May 3, 2012, 4:13:49 PM5/3/12
to Programming Nu

http://www.rubymotion.com/

Seems similar to Nu (built on the objective-c runtime)

If you watch the video (http://www.rubymotion.com/getting-started/)
at around 4:30 he begins manipulating the iOS simulator from the
command line.
That would be an awesome to do with Nu.



Message has been deleted

ksjogo

unread,
May 3, 2012, 4:31:25 PM5/3/12
to program...@googlegroups.com
Funny, I actually implemented Simulator Control via Distributed Objects some days ago: https://github.com/ksjogo/nu
Take a look into the NuRemoteHost and NuRemoteClient.

I think Nu has some advantages:
No ugly syntax ObjC forced into.
No need to recompile. With NuRemote you could just send the changed the files to the simulator and it gets evaled.

Jack Nutting

unread,
May 3, 2012, 5:27:10 PM5/3/12
to program...@googlegroups.com
My initial thought is that they've taken the open source MacRuby
stuff, applied it to iOS, wrapped it up in some niceties, and are
trying to sell it for $200 a pop. Nice trick, but it would be even
nicer if they'd pay back the open source MacRuby effort by making
RubyMotion open source as well, instead of trying to turn a quick
buck. Anyway, a person who puts two and two together may come to the
conclusion that Apple will likely provide something along these lines
at some point, for free.
> --
> You received this message because you are subscribed to the Google Groups
> "Programming Nu" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/programming-nu/-/RmQwpaQ_6GgJ.
>
> To post to this group, send email to program...@googlegroups.com.
> To unsubscribe from this group, send email to
> programming-n...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/programming-nu?hl=en.



--
// Jack Nutting
// jnut...@gmail.com
// http://nuthole.com
// http://learncocoa.org

Jonathon Mah

unread,
May 3, 2012, 6:50:05 PM5/3/12
to program...@googlegroups.com
RubyMotion is headed by the creator and lead developer of MacRuby (after leaving Apple).

On 2012-05-03, at 14:27, Jack Nutting wrote:

> My initial thought is that they've taken the open source MacRuby
> stuff, applied it to iOS, wrapped it up in some niceties, and are
> trying to sell it for $200 a pop. Nice trick, but it would be even
> nicer if they'd pay back the open source MacRuby effort by making
> RubyMotion open source as well, instead of trying to turn a quick
> buck. Anyway, a person who puts two and two together may come to the
> conclusion that Apple will likely provide something along these lines
> at some point, for free.



Jonathon Mah
m...@JonathonMah.com


Ivan Storck

unread,
May 3, 2012, 7:03:38 PM5/3/12
to program...@googlegroups.com
I don't think Laurent is trying to make a "quick buck", I think he's trying to create a sustainable income source. Because he has left a cushy job at Apple for this new venture - which may or may not work out. He has said he left so that he could focus solely on RubyMotion / MacRuby instead of being put on other projects at Apple, now that MacRuby is stable.

-- 
Ivan Storck

Jack Nutting

unread,
May 4, 2012, 1:18:28 AM5/4/12
to program...@googlegroups.com, program...@googlegroups.com
Oh! In that case I take it all back. :) I've been living under a rock apparently, and didn't realize that was Laurent's project. If anyone deserves to make a buck  (quick or otherwise) off a MacRuby offshoot, it's Laurent!

// jack

stephen white

unread,
May 4, 2012, 4:59:58 AM5/4/12
to program...@googlegroups.com
On 04/05/2012, at 5:43 AM, Mykn wrote:
> Seems similar to Nu (built on the objective-c runtime)

I doubt they've fixed up the problems pointed out here:

http://programming.nu/rubycocoa-and-rubyobjc

--
st...@adam.com.au


Jack Nutting

unread,
May 4, 2012, 5:17:13 AM5/4/12
to program...@googlegroups.com
Actually, I think to a large extent they have. MacRuby is completely
different from RubyCocoa and other bridging integrations, since
there's really no bridging going on at all. Instead, they've
implemented ruby (including most of its standard libraries) on top of
llvm and foundation, to the extent that when you create a "normal"
ruby string in Mac Ruby, you are actually creating an NSString of some
kind, etc. They've also extended ruby's method syntax to make it
somewhat more compatible with Objective-C.

//jack

stephen white

unread,
May 4, 2012, 6:55:05 AM5/4/12
to program...@googlegroups.com
On 04/05/2012, at 6:47 PM, Jack Nutting wrote:
> Actually, I think to a large extent they have. MacRuby is completely
> different from RubyCocoa and other bridging integrations,

Good answer, and I wasn't aware of this. Link to why you're right:

http://www.macruby.org/documentation/why-macruby.html

--
st...@adam.com.au


Nick C

unread,
Jun 26, 2012, 11:43:40 AM6/26/12
to program...@googlegroups.com
After just under two months it has 163 repositories on Github.

Nick C

unread,
Jul 15, 2012, 9:51:45 AM7/15/12
to program...@googlegroups.com
There is huge momentum behind RubyMotion so I'm sure it will soon come to dominate Objective-C.  I have pasted the Objective-C, Ruby and Nu versions of the Aaron Hillegass' Cocoa Programming for Mac OS X Speakline examples. The code is by A. Hillegass, B Schwartz and T Burks respectively.
---------start ruby-----------------------
class ApplicationController
attr_writer :textField, :stopButton, :startButton
attr_reader :synth, :textField
def init
@synth = NSSpeechSynthesizer.alloc.initWithVoice(nil)
synth.delegate = self
super
end
def sayIt(sender)
unless textField.stringValue.strip.empty?
synth.startSpeakingString(textField.stringValue)
end
@stopButton.enabled = true
@startButton.enabled = false
end
def stopIt(sender)
synth.stopSpeaking
end
private
def speechSynthesizer(sender, didFinishSpeaking: success)
@stopButton.enabled = false
@startButton.enabled = true
end
def awakeFromNib
@stopButton.enabled = false
end
end
----------------end ruby----------------------
----------------start objective-c-------------
//   Aaron Hillegass .Copyright 2007
#import <Cocoa/Cocoa.h>

@interface AppController : NSObject {
IBOutlet NSTextField *textField;
NSSpeechSynthesizer *speechSynth;
}
- (IBAction)sayIt:(id)sender;
- (IBAction)stopIt:(id)sender;

@end


@implementation AppController

- (id)init
{
[super init];
NSLog(@"init");
speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice:nil];
return self;
}

- (IBAction)sayIt:(id)sender
{
NSString *string = [textField stringValue];
// Is 'string' zero-length?
if ([string length] == 0) {
return;
}
[speechSynth startSpeakingString:string];
NSLog(@"Have started to say: %@", string);
}
- (IBAction)stopIt:(id)sender
{
NSLog(@"stopping");
[speechSynth stopSpeaking];
}

@end
----------------end objective-c---------------
----------------start nu----------------------

(load "Nu:nu") ;; basics
(load "Nu:cocoa") ;; cocoa definitions
(load "Nu:menu") ;; menu generation

(class AppController is NSObject
     (ivar (id) textField
           (id) colorWell
           (id) speechSynth)
     
     (- (id) init is
        (super init)
        (set @speechSynth ((NSSpeechSynthesizer alloc) initWithVoice:nil))
        self)
     
     (- awakeFromNib is
        (@colorWell setColor:(@textField textColor)))
     
     (- changeTextColor:(id)sender is
        (@textField setTextColor:(@colorWell color)))
     
     (- sayIt:(id)sender is
        (@speechSynth startSpeakingString:(@textField stringValue)))
     
     (- stopIt:(id)sender is
        (@speechSynth stopSpeaking)))

((NSApplication sharedApplication) activateIgnoringOtherApps:YES)
(NSApplicationMain 0 nil)
----------------end nu------------------------
Reply all
Reply to author
Forward
0 new messages