New Ruby implementation?

Hi,

Does somebody know what could be the simplest and fastest way to
build a new Ruby compiler? There are so many Ruby implementations,
and I'm wondering if there are great tools that make it easy to bring up
just another one.

The first (and most important) thing is a parser. It would be great to use
MRI Ruby's parse.y file but I'm afraid that's just to tightly wired to the
other parts of the implementation. There's racc too, that could be a good
way to build my compiler prototype if there would be a Ruby description
written in racc. (It's a tempting idea to write a prototype of the compiler
in Ruby...) Of course, I could write my own parser, but that's something
that would be great to borrow from other implementations, and just let me
focus on the output code generation part. It would be great to use a parser
that is ISO/MRI compliant out of the box.

What tools do you think are useful for one, who plans to create yer another
Ruby implementation? I know RubySpec and mspec, those are almost
necessary to get things right. But is there anything else that I should be
aware of?

If you're in the prototype/R&D phase of things and want to quickly whip together an interpreter, I gave a talk last year that's up your alley:

http://www.zenspider.com/presentations/2013-gogaruco.html

It uses ruby_parser and sexp_processor to put a subset of ruby together in < 30 minutes.

···

On May 2, 2014, at 6:08, Nokan Emiro <uzleepito@gmail.com> wrote:

Hi,

Does somebody know what could be the simplest and fastest way to
build a new Ruby compiler? There are so many Ruby implementations,
and I'm wondering if there are great tools that make it easy to bring up
just another one.

The first (and most important) thing is a parser. It would be great to use
MRI Ruby's parse.y file but I'm afraid that's just to tightly wired to the
other parts of the implementation. There's racc too, that could be a good
way to build my compiler prototype if there would be a Ruby description
written in racc. (It's a tempting idea to write a prototype of the compiler
in Ruby...) Of course, I could write my own parser, but that's something
that would be great to borrow from other implementations, and just let me
focus on the output code generation part. It would be great to use a parser
that is ISO/MRI compliant out of the box.

What tools do you think are useful for one, who plans to create yer another
Ruby implementation? I know RubySpec and mspec, those are almost
necessary to get things right. But is there anything else that I should be
aware of?

Hi,

You might feel mruby <https://github.com/mruby/mruby&gt; to be a good
start. It has 1.9 compliant parser, code generator, VM and class
libraries, yet small.

              matz.

···

In message "Re: new Ruby implementation?" on Fri, 2 May 2014 15:08:01 +0200, Nokan Emiro <uzleepito@gmail.com> writes:

Hi,

Does somebody know what could be the simplest and fastest way to
build a new Ruby compiler? There are so many Ruby implementations,
and I'm wondering if there are great tools that make it easy to bring up
just another one.

The first (and most important) thing is a parser. It would be great to use
MRI Ruby's parse.y file but I'm afraid that's just to tightly wired to the
other parts of the implementation. There's racc too, that could be a good
way to build my compiler prototype if there would be a Ruby description
written in racc. (It's a tempting idea to write a prototype of the compiler
in Ruby...) Of course, I could write my own parser, but that's something
that would be great to borrow from other implementations, and just let me
focus on the output code generation part. It would be great to use a parser
that is ISO/MRI compliant out of the box.

What tools do you think are useful for one, who plans to create yer another
Ruby implementation? I know RubySpec and mspec, those are almost
necessary to get things right. But is there anything else that I should be
aware of?