[MacRuby-devel] Mixing ruby code with Objective-C code within a Cocoa project...

Frederick C. Lee frederick_lee at apple.com
Mon Oct 25 10:39:39 PDT 2010


I can see the use of Ruby in doing some intense data massaging, like string/math/dates sort of processing that would be quite verbose in Objective C.
I'm thinking of using Ruby in place of plain 'C'  (or Perl) in doing some rudimentary stuff such as that.

I'm somewhat aware of the Ruby/Objective-C APIs out there...  and the paradigm of doing such, albeit I haven't come across formal documentation yet.

As to the IOS...
... I'm assuming that Ruby support for the iOS platform will be a reality sometime in the not-to-distant future; particularly when OS X & iOS appear to be merging.... 
... somewhat....

Ric.



On Oct 22, 2010, at 11:29 AM, Alistair Holt wrote:

> Hi Ric
> 
> I think I'm right in saying that you can mix the two languages but not in the same file. Also, you wont be able to use Ruby to write anything for iOS as it's not currently supported. 
> 
> --
> Alistair Holt
> 
> On 22 Oct 2010, at 18:32, "Frederick C. Lee" <frederick_lee at apple.com> wrote:
> 
>> Greetings:
>>  I'm a MacRuby neophyte and wonder if I'll be able to mix Ruby with Objective-C, similar to the ability to write Objective-C++ code.
>> I'm particularly interested in exploiting the power of Ruby's terse language to aid in Objective-C projects; preferably for iOS.
>> 
>> Or... would I have to keep Ruby code in its own .rb file and pass data to/from ruby routines as parameters.
>> 
>> Any info?   Demo code?
>> 
>> Regards,
>> 
>> Ric.
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list