On Feb 15, 2009, at 7:04 AM, Soh Dubom wrote:

> Ken Bloom wrote:
>> On Sat, 14 Feb 2009 20:41:52 -0500, Soh Dubom wrote:
>>
>>> Is it true that ruby language will change to a compiled or jited
>>> language, like .net or java?
>>
>> Ruby 1.9 introduced a bytecode-based interpreter (which converts your
>> program to its own bytecodes and then interprets those bytecodes a la
>> very old Java VMs). JRuby already has an interpreter which compiles  
>> to
>> the Java VM, and these days that is JITted, so I guess it's already
>> changed.
>>
>> --Ken
>
> Hum, does it make Ruby 1.9 a compiled language as, let's say C#? The
> reason I got interested in Ruby is because it's an interpreted  
> language
> and I don't have to, for every change, re-compiled it

Ruby 1.9 would be considered a compiled language since there is a  
process of converting Ruby code into bytecode (analogous to a C  
compiler converting C code into Assembly). However as far as I know,  
the 1.9 VM isn't a JIT. It merely "compiles" that code each time and  
runs. Like Ken said though, since JRuby runs on the JVM, it  
technically JIT'd.

Every language has to be interpreted or parsed in some fashion so its  
always going to take at least some time (even if miniscule) to parse  
the program. If its a VM based language it'll then either generate  
bytecode and run that on the VM, otherwise it will just begin  
executing code based on what the parse tree looks like (a la Ruby  
1.8.x).

So in short the process between compiling and interpreting isn't  
hugely different from your point of view as far as time goes and  
you'll still have to wait, but its not going to be any great length of  
time (unless its a huge script).

Hope that helps.

-Zac

Note: If I'm wrong about any of these details regarding Ruby, someone  
please correct me :).