MacRuby enhances multi-core CPU usage
The modest nature of the version number incrementation belies the scale of behind the scenes changes in the recently released first beta of MacRuby 0.5. The move away from the YARV 1.9 virtual machine generally used in Ruby implementations offers developers a native code compiler and simplified threading.
Until now, it has not been possible to compile a Ruby application into a directly executable form – a Ruby runtime environment was always required on the target system. MacRuby's new architecture, based on the open source Low Level Virtual Machine (LLVM), allows the use of both just-in-time and ahead-of-time compilers. These generate executables which can run directly on Intel Macs and which launch significantly faster than interpreter based runtime systems.
The developers note that the release is intended for testing and experimentation purposes only and use in production environments and on mission critical systems is not advised. Users who find any bugs are asked to report them so that they can be addressed before the final release.
An interface with Apple's Grand Central Dispatch (GCD), part of the recently released OS X 10.6 (Snow Leopard), aims to simplify threading. MacRuby allows developers to pass Ruby code blocks to queues. GCD takes care of assigning code blocks to threads, ensuring optimal use of the available cores. MacRuby 0.5 beta 1 is available to download (direct download) and requires Mac OS X 10.6 or later. Sources are released under the Ruby license.
- MacRuby 0.5 - Now with LLVM, a report from The H.
- MacRuby 0.4: Ruby support for Mac OS X, a report from The H.