…grabbing it from SVN or Git . Keep in mind that in the case of the latter, LLVM is still a moving target in terms of releases and is subjected to rapid API and feature changes. It is for this reason that MacRuby is forced to use specific builds as specified in the README.
Compiling LLVM and MacRuby from source can be quite time consuming and tedious. In particular, LLVM will take about 1 hour to compile utilizing both CPU cores on a unibody MacBook Pro. Luckily, our …
LLVM Optimization
Up to now, we've simply been constructing information to feed to LLVM. Now we actually hand over the IR to LLVM. The first thing LLVM does is run a number of optimization passes over the IR. This cleans up the IR and makes it quite a bit more efficient. At this stage, the IR can be reduced in size by five to ten times by remove redundancies and reordering.
LLVM Code Generation
Finally, the optimized IR is run through LLVMs code generator. This code generator …
So what changed since 0.4? Too many things for me to list them here but basically 0.5 uses LLVM to compile code and make MacRuby faster and integrate better with the Obj-c runtime. However since the last beta, here is what changed:
HotCocoa is now a separate gem
improved AOT compilation
Grand Central Dispatch support - use all your cores without the pain of threads. Read this post for more info.
0.5 is a solid release which I consider production ready, I personally …
MacRuby: Objective-C, LLVM and Ruby
Want to mix and match Cocoa API's or access OSX system libraries all within a Ruby VM? Then MacRuby is the answer and the VM is picking up steam fast. On March 9th, MacRuby 0.4 shipped with a threaded GC, full 64-bit support, DTrace probes, and many improvements to the HotCocoa API's. Since then, the project has switched from YARV to a completely new VM based on LLVM compiler infrastructure ( shipped …
Oh noes! llc is a tool that ships with the LLVM (upon which MacRuby is built), however it's not included with MacRuby's installer (it will be in the future). But fear not my friends, there is a solution:
$ svn co -r 82747 https://llvm.org/svn/llvm-project/llvm/trunk llvm-trunk $ cd llvm-trunk $ ./configure $ UNIVERSAL = 1 UNIVERSAL_ARCH = "i386 x86_64" ENABLE_OPTIMIZED = 1 make -j2 $ sudo env UNIVERSAL = 1 UNIVERSAL_ARCH = "i386 x86_64" ENABLE_OPTIMIZED …
Good news everyone!
MacRuby beta 1 has been released! Official announcement here .
Download MacRuby 0.5 beta1
Note that the download is only for SnowLeopard, intel machines.
Lots of great stuff in this new release, the first one based on LLVM. Check the Laurent's post to learn more about the work done on compilation, optimization, concurrency, compatibility and Cocoa interaction. And a big thank you to Laurent Sansonetti who is putting so much effort in this project!
…LLVM , a compiler infrastructure also sponsored by Apple. Thanks to LLVM, MacRuby is able to transform the Ruby abstract syntax tree ( AST) from the parser directly into highly optimized machine code. MacRuby supports both Just in Time ( JIT) and Ahead of Time ( AOT) compilation. The JIT mode will compile down the code at runtime, and the AOT mode will allow you to save on disk the compilation result. AOT compilation makes MacRuby a true Ruby…
MacRuby, the new Ruby implementation powered by LLVM and based on CoreFoundation and Cocoa, has garnered a lot of attention from both the Ruby and the Cocoa communities. Patrick will offer an overview of the rationale behind its creation, explain the ways in which it can benefit your application, and speculate wildly as to what the future may hold.
Peter Wayner: Translucent Databases
One or more of your apps probably has a database in it. And chances are you're …
Cocoaheads MN July 2009
Bill Heyman from Code Morphic led a discussion on varied topics from WWDC 2009 and iPhone 3.0 SDK features.
CoreLocation adds compass data.
OpenGL ES 2.0. Takes advantage of new GPU in iPhone 3G S hardware.
Grand Central Dispatch available in Snow Leopard.
Clang and LLVM briefly. Clang will be part of Xcode.
"External accessory" third party hardware devices connected through the dock connector. "made for ipod" program.
…CabooseConf greeted me. The comfort and sanity of watching my programming buddies hacking together an LLVM implementation for AVR was like slipping under a warm, soft blanket, after the frenzy that had started while I was sitting in the Reptile Room, watching some giant lizards get ready to feast on fresh ideas.
Days had passed, but in the strange netherworld between Vegas's clockless existence, and the constant Twitter flow of new input, I had lost all sense of temporality. It …