From: Mathieu Bouchard Date: 2001-02-13T05:10:39+09:00 Subject: [ruby-talk:10743] Re: RFC: RubyVM (long) On Mon, 5 Feb 2001, Robert Feldt wrote: > I agree that the Ruby subset we write RubyVM components in should be a > real subset of Ruby. However we will need to make some deviations from > Ruby semantics if we want good performance. Otherwise we are faced with > writing a full Ruby->C translator (and not like rb2c that (correct me if > I'm wrong) needs matz Ruby implementation to work)), ie. essentially a > Ruby compiler. I think this is doable in the long run but it'll not be > easy and will require tight integration with a VM/run-time. I prefer not to discuss about RubyVM at all for now, because I feel there are things that need to be done before and which will give us significant insight on how to do what you propose. I think the ArrayMixin stuff I'm writing is a step in the right direction. I'm currently taking several other similar steps. I'd like also to have a Ruby syntax tree library, and to define a subset of Ruby (Ruby--) that is more like standard SmallTalk/Self syntax, and to have a translator from Ruby to Ruby--, and from Ruby-- to C (just like current .so modules: depending on the Ruby runtime). We could then write a Ruby-- interpreter in Ruby, and then compile it in C. This is enough to get us working for at least a year =) All of the above will allow to reduce the amount of original C code we need by significant amounts, and if not, at least it will make Ruby more useful. And we will still be closer to eliminating C code completely (not that I see any need for that) > > Ruby has its Float boxed too, right? > Yes, I think everything is boxed except Fixnums (and possibly nil and > false et al?). nil, false, true, symbols and integers, I think. matju