I have no formal education in computer science but I have been programming in Java, Ruby, jQuery for a long time.
I was checking out macruby project. I keep running into statements which are similar to "In MacRuby objective-c runtime is same as ruby runtime".
I understand what MRI is. I understand what ruby 1.9 is bringing to the table. However I fail to understand how the VM for one language can support another language.
I know I am asking a question answer to which relies on years of formal education. Still any pointers and any discussion will help.
Also I like what I see in macruby.
Well,
The simplest explanation is that MacRuby is a ruby 1.9 VM. During earlier versions it was a modified version of the YARV (ruby 1.9's official VM) which instead of using custom types for things like ruby strings, hashes etc. made use of equivalents found within apples foundation classes such as NString. With the advent of version 0.5 a whole new VM has been developed based on the LLVM framework, again ruby 1.9 compatible, which is ground up based on apples foundation classes.
Therefore you can think of Macruby simply as a ruby 1.9 VM. However, due to the use of aforementioned foundation classes it has been possible to interface natively with much of apples own api's providing additional features only available to those running MacRuby (such as HotCocoa for example.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With