tags:

views:

103

answers:

2

Ruby has been around for a while now so I was wondering if there was any work being done on a compiler for it? I know that compiler design is hindered by things like Eval() so I would not expect implementations to be 100 percent accurate? My own searches have turned up sparse results.

A: 

Rubinius is a JIT compiler for Ruby. A pure compiler will never exist for Ruby because the language is far too dynamic for a static compiler to work. Whatever it did internally would be incredibly ugly and would evolve towards a JIT as they tried to optimize it anyway.

dasil003
I'm not real familiar with Ruby. Is it really so much more dynamic than Common Lisp, which is normally compiled?
David Thornley
Here is a good walk though of some of the ideas about what is or is not a compiled language. http://stackoverflow.com/questions/376611/why-interpreted-langs-are-mostly-ducktyped-while-compiled-have-strong-typing/376828#376828
JustSmith
+3  A: 

MacRuby offers Ahead-of-Time Compilation as of v0.5. It uses LLVM to compile binaries that will run on the Objective-C runtime.

csexton
I'm running on windows but of the two non-preferred platform responses I like OSX more.
JustSmith