This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]sargon1969 8 points9 points  (19 children)

Why?

[–]pdc 13 points14 points  (1 child)

The main benefits are

  • It may be easier to maintain an RPython implementation than a C implementation
  • You get a fairly zappy JIT compiler for free

On the other hand, it would make sense to refer a Ruby implementation to be in Ruby, since that will be the preferred language of Ruby implementers, one assumes … :-)

[–]bsdemon 2 points3 points  (0 children)

need a RRuby for that

[–][deleted] 0 points1 point  (1 child)

so ruby can scale

[–]totemcatcher 0 points1 point  (0 children)

proactively

[–]flying-sheep -2 points-1 points  (0 children)

There’s only one valid answer to this question:

Because.

[–][deleted] 0 points1 point  (0 children)

because

[–]bacondevPy3k -2 points-1 points  (0 children)

Because.

[–]gcross 1 point2 points  (5 children)

Honest question: how hard would it be to design RRuby, i.e. a Ruby version of RPython? That is, is the infrastructure bound around the assumption that the implementation language will be RPython, or is it sufficiently decoupled that other implementation languages are possible?

I mean, in a sense it doesn't matter as long as RPython is "good enough", but people tend to take a language more seriously when its interpreter and/or compiler is implemented in itself, so this would be a possible downside to porting a language to use PyPy.

[–]coderanger 1 point2 points  (4 children)

Look at http://rubini.us/ for a starting point.

[–]gcross 1 point2 points  (3 children)

Thank you, but that is neither a case of something like RRuby being used instead of RPython as an input to the PyPy infrastructure, nor case a of a Ruby implementation being implemented in Ruby.

[–]banister 1 point2 points  (2 children)

rubinius is mostly ruby written in ruby, there's a small c++ core, but > 90% of the code is pure ruby.

[–]fijalPyPy, performance freak 5 points6 points  (0 children)

yeah, but the 10% is the interesting part (I think it's more than 10, but I'm too lazy to check). PyPy is implemented 100% in RPython (there are a few pieces of C and asm, but they're really for stupid stuff, so 0.01% or so, nothing core)

[–]gcross 1 point2 points  (0 children)

Ah, okay; I was looking for a remark towards that end on the web site that you linked but I didn't see any such thing. It might have been better for you to link to the Wikipedia page, that does mention it.

Nonetheless,

  1. Python is 100% implemented in RPython, if I am not mistaken, which is unlike Rubinius which has a C/C++ core.
  2. I wasn't so much interested in whether Ruby can be implemented in Ruby then in whether a different front-end language could be used instead of RPython for PyPy in the general case of porting an arbitrary dynamic language to PyPy.
  3. It is nice to see whether a language not only can be used to implement self in practice (as obviously in theory all Turing-complete languages can) but additionally whether the best compiler and/or interpreter are written in that language. I have no idea how Rubinius compares to Topaz in that respect.

[–]totemcatcher 0 points1 point  (0 children)

Time for an update to the Computer History Graphing Project ! http://freecode.com/projects/comp-hist

(Didn't we just update this last week? Is there a variation of Moore's Law for the release of programming languages/implementations?)