From: Ken Bloom Date: 2009-02-16T02:13:22+09:00 Subject: Re: Ruby language: compiled or jited? On Sun, 15 Feb 2009 07:04:16 -0500, 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 doesn't have an ahead-of-time byte compilation mode as far as I know. That means you only have to run one command to run your modified code. Every time you run your script, the interpreter parses it and byte compiles it, which then results in a speed increase when the interpreter runs the script. JRuby has a mode where it parses and compiles the script every time (the jruby command) and an ahead-of-time compilation mode (the jrubyc command). So Ruby 1.9 can run like perl/python. JRuby can run like perl/python or like C#. --Ken -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/