A true Ruby compiler (for Linux)

People,

I have found RubyScript2Exe but that is not a real compiler. Ruby is
such an nice OO language to develop in - why isn't there a demand to
compile a finished script? - then you get the benefits of fast
development times as well as fast run times.

Thanks,

Phil.

···

--
Philip Rhoades

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
Mobile: +61:(0)411-185-652
Fax: +61:(0)2-8221-9599
E-mail: phil@pricom.com.au

Philip Rhoades wrote:

Ruby is
such an nice OO language to develop in - why isn't there a demand to
compile a finished script?

I think you're confusing demand and supply. :stuck_out_tongue:

Devin

Philip Rhoades wrote:

I have found RubyScript2Exe but that is not a real compiler. Ruby is
such an nice OO language to develop in - why isn't there a demand to
compile a finished script? - then you get the benefits of fast
development times as well as fast run times.

XRuby is a Ruby compiler that compiles Ruby to Java Bytecode. You can
run Java Bytecode on Linux, so, technically speaking, XRuby is a Ruby
compiler for Linux. There are also various compilers out there that
compile Java Bytecode to native objectcode (e.g. GCJ), allowing you to
produce native objectode from Ruby sourcecode with an extra step.

Ruby.NET is a Ruby compiler that compiles Ruby to CIL Bytecode. You
can run CIL Bytecode on Linux, so, technically speaking, Ruby.NET is a
Ruby compiler for Linux. I think that there are also various
compilers out there that compile CIL Bytecode to native objectcode,
allowing you to produce native objectode from Ruby sourcecode with an
extra step.

jwm

http://www.atdot.net/yarv/

Same type of thing that Python does now: byte-compile the python code and
interpret through a VM. This will be available for Ruby 2.0, though you can
use it now.

Jason

···

On 12/5/06, Devin Mullins <twifkak@comcast.net> wrote:

Philip Rhoades wrote:
> Ruby is
> such an nice OO language to develop in - why isn't there a demand to
> compile a finished script?
I think you're confusing demand and supply. :stuck_out_tongue:

Devin

Rubinius also has this feature (saving portable, intermediate bytecode
for later execution). Not ready for production use yet, but it's
moving very quickly. Bignums, Regexp, and continuations went in this
week. Also, the development is validated with valgrind, which makes me
happy.

···

On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:

Philip Rhoades wrote:
> I have found RubyScript2Exe but that is not a real compiler. Ruby is
> such an nice OO language to develop in - why isn't there a demand to
> compile a finished script? - then you get the benefits of fast
> development times as well as fast run times.

XRuby is a Ruby compiler that compiles Ruby to Java Bytecode. You can
run Java Bytecode on Linux, so, technically speaking, XRuby is a Ruby
compiler for Linux. There are also various compilers out there that
compile Java Bytecode to native objectcode (e.g. GCJ), allowing you to
produce native objectode from Ruby sourcecode with an extra step.

Ruby.NET is a Ruby compiler that compiles Ruby to CIL Bytecode. You
can run CIL Bytecode on Linux, so, technically speaking, Ruby.NET is a
Ruby compiler for Linux. I think that there are also various
compilers out there that compile CIL Bytecode to native objectcode,
allowing you to produce native objectode from Ruby sourcecode with an
extra step.

Wilson Bilkovich wrote:

···

On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:

Philip Rhoades wrote:

I have found RubyScript2Exe but that is not a real compiler. Ruby is
such an nice OO language to develop in - why isn't there a demand to
compile a finished script? - then you get the benefits of fast
development times as well as fast run times.

XRuby is a Ruby compiler that compiles Ruby to Java Bytecode. You can
run Java Bytecode on Linux, so, technically speaking, XRuby is a Ruby
compiler for Linux. There are also various compilers out there that
compile Java Bytecode to native objectcode (e.g. GCJ), allowing you to
produce native objectode from Ruby sourcecode with an extra step.

Ruby.NET is a Ruby compiler that compiles Ruby to CIL Bytecode. You
can run CIL Bytecode on Linux, so, technically speaking, Ruby.NET is a
Ruby compiler for Linux. I think that there are also various
compilers out there that compile CIL Bytecode to native objectcode,
allowing you to produce native objectode from Ruby sourcecode with an
extra step.

Rubinius also has this feature (saving portable, intermediate bytecode
for later execution). Not ready for production use yet, but it's
moving very quickly. Bignums, Regexp, and continuations went in this
week. Also, the development is validated with valgrind, which makes me
happy.

Great! I didn't know that.

IIRC, IronRuby, JRuby and YARV will eventually grow a compiler, too.

jwm

I wonder how much traction XRuby will ever be able to get now that JRuby is
a Sun sponsored project. Maybe the XRuby guy should touch base with the
JRuby team about combining the two in some way or another.

Though given the name XRuby, maybe the guy's overall goal is to build a
compiler that can compile Ruby into any number of bytecodes.

Either way, I like seeing this work. It means that we'll eventually be able
to shut up those 'Ruby is too slow' naysayers.

Jason

···

On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:

Wilson Bilkovich wrote:
> On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:
>> Philip Rhoades wrote:
>>> I have found RubyScript2Exe but that is not a real compiler. Ruby is
>>> such an nice OO language to develop in - why isn't there a demand to
>>> compile a finished script? - then you get the benefits of fast
>>> development times as well as fast run times.
>> XRuby is a Ruby compiler that compiles Ruby to Java Bytecode. You can
>> run Java Bytecode on Linux, so, technically speaking, XRuby is a Ruby
>> compiler for Linux. There are also various compilers out there that
>> compile Java Bytecode to native objectcode (e.g. GCJ), allowing you to
>> produce native objectode from Ruby sourcecode with an extra step.
>>
>> Ruby.NET is a Ruby compiler that compiles Ruby to CIL Bytecode. You
>> can run CIL Bytecode on Linux, so, technically speaking, Ruby.NET is a
>> Ruby compiler for Linux. I think that there are also various
>> compilers out there that compile CIL Bytecode to native objectcode,
>> allowing you to produce native objectode from Ruby sourcecode with an
>> extra step.
> Rubinius also has this feature (saving portable, intermediate bytecode
> for later execution). Not ready for production use yet, but it's
> moving very quickly. Bignums, Regexp, and continuations went in this
> week. Also, the development is validated with valgrind, which makes me
> happy.

Great! I didn't know that.

IIRC, IronRuby, JRuby and YARV will eventually grow a compiler, too.

jwm

I wonder how much traction XRuby will ever be able to get now that JRuby is
a Sun sponsored project. Maybe the XRuby guy should touch base with the
JRuby team about combining the two in some way or another.

The groups are talking about things, as are many of the other active ruby
implementation projects.

···

On 12/5/06, Jason Roelofs <jameskilton@gmail.com> wrote:

Though given the name XRuby, maybe the guy's overall goal is to build a
compiler that can compile Ruby into any number of bytecodes.

Either way, I like seeing this work. It means that we'll eventually be able
to shut up those 'Ruby is too slow' naysayers.

Jason

On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:
>
> Wilson Bilkovich wrote:
> > On 12/5/06, Jörg W Mittag <Joerg.Mittag@web.de> wrote:
> >> Philip Rhoades wrote:
> >>> I have found RubyScript2Exe but that is not a real compiler. Ruby is
> >>> such an nice OO language to develop in - why isn't there a demand to
> >>> compile a finished script? - then you get the benefits of fast
> >>> development times as well as fast run times.
> >> XRuby is a Ruby compiler that compiles Ruby to Java Bytecode. You can
> >> run Java Bytecode on Linux, so, technically speaking, XRuby is a Ruby
> >> compiler for Linux. There are also various compilers out there that
> >> compile Java Bytecode to native objectcode (e.g. GCJ), allowing you to
> >> produce native objectode from Ruby sourcecode with an extra step.
> >>
> >> Ruby.NET is a Ruby compiler that compiles Ruby to CIL Bytecode. You
> >> can run CIL Bytecode on Linux, so, technically speaking, Ruby.NET is a
> >> Ruby compiler for Linux. I think that there are also various
> >> compilers out there that compile CIL Bytecode to native objectcode,
> >> allowing you to produce native objectode from Ruby sourcecode with an
> >> extra step.
> > Rubinius also has this feature (saving portable, intermediate bytecode
> > for later execution). Not ready for production use yet, but it's
> > moving very quickly. Bignums, Regexp, and continuations went in this
> > week. Also, the development is validated with valgrind, which makes me
> > happy.
>
> Great! I didn't know that.
>
> IIRC, IronRuby, JRuby and YARV will eventually grow a compiler, too.
>
> jwm
>

--
thanks,
-pate
-------------------------

Jason Roelofs wrote:

Either way, I like seeing this work. It means that we'll eventually be able
to shut up those 'Ruby is too slow' naysayers.

A significant part of the slowness comes from the computation model. So,
no, it probably won't, even the resulting bytecodes will have to go
through significant epicycles to preserve the runtime dynamism. It will
help, but won't bring it on par to a language with a more strict
computational model, at least not at first. (There's apparently some
deep voodoo implemented in some of the academic Smalltalk VMs and other
exploratory programming language runtimes that can be applied to narrow
the gap even more.)

David Vallner