From: Stefan Matthias Aust Date: 2001-05-27T06:40:04+09:00 Subject: [ruby-talk:15773] Re: Challenges of java interpreter "Wayne Blair" wrote: >To create a java interpreter for ruby, ruby would ideally be coded in itself >(MetaRuby). We should identify functionality which would be particularly >painful or inefficient to code this way, so we can discuss alternatives: Well, this would be only useful IMHO if there's a way to compile the ruby code into another language - be C or Java or whatever. Look at the Squeak Smalltalk project how to do it right. The advantage here is, that you can debug the Squeak VM in Squeak itself. This would then also be possible with Ruby. However, Squeak isn't as fast as it could be if you'd code it directly in C/Assembler. Dolphin Smalltalk, another Smalltalk interpreter which is written in optimized C++/assembler is much faster. However, it would be nice, if most parts of the runtime library would be coded in Ruby. It seems, nearly everything of String/Hash/etc. is coded directly in C, even if you could express most methods based on other methods. This is of course done for speed, but now, it adds to the work needed to implement Ruby in a different language. >Could those of you more familiar with ruby add more to this list, especially >areas that you think would be most painful to express in java or metaruby. I'm not that familiar with Ruby yet, but the area I see the most difficulties is the somewhat "feature"-driven handling of local variables and the eval code in general. Otherwise, I don't expect problems to port the class library once you get the hidden meta level (how to represent class and method objects) right. bye -- Stefan Matthias Aust \/ Truth Until Paradox