From: bbense+comp.lang.ruby.Oct.25.02@... Date: 2002-10-26T00:05:15+09:00 Subject: Re: NODE tree introspection -----BEGIN PGP SIGNED MESSAGE----- In article <867kg8vp5k.fsf@squash.oucs.ox.ac.uk>, Simon Cozens wrote: >ptkwt@shell1.aracnet.com (Phil Tomson) writes: >> Yes and no. Since Ruby doesn't use a bytecode interpretting virtual >> machine (instead it walks an AST) what exactly do you mean by bytecode >> here (or are you defining a bytecode for Ruby). > >Sorry; "bytecode" is probably the wrong word because it implies some kind >of serialized assembler. I'm using it in a much looser sense. Perl walks >an AST, too. But being able to get at and fiddle with the AST leads to a >lot of very interesting things: serialization of the internal form to disk >so you *do* get true bytecode, translation to C, graphing the internal >structure of the program, and so on. > >My ulterior motive, of course, is to enable a Ruby->Parrot backend. > >> I think what you're working on is very important and would be useful for a >> variety of projects (Like Cardinal for example). Please if possible can >> you start up a sourceforge or savannah project for this? > >I'll need some help; as I'm very new to Ruby, I don't know exactly what's >required to set up and distribute a Ruby extension the politically correct >way. :) - - Don't worry, nobody else knows how to do it the "politically correct" way yet either. There is no standard way yet to set up a module. There is the ruby equivalent of Config.pm in rbconfig.rb and rpkg is an emerging standard, but there is still not consensus or anything remotely like h2xs, Makefile.PL and CPAN. > >What I'll do is dump the code into my CVS tree, and make it publically >available, and I can give you or whoever else commit access to >that. I'll also send you the code off-list for now, because I have to head >away for a few days. - - Did you look at Ruth? It's not quite the same as what you're trying to do, but it does walk the AST tree fairly well. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPblb8mTWTAjn5N/lAQEkqAP/WwbQYYW4i6IbwsnaT+wEsZPYGpapY+fc uK48/n3mBJhqFGN4mRvsu95gal0aFwAlqFc9cP+ipRoXMcMFOSbRUd6Ht509VKca oZ7JOwFcYmU3Ot/mah3+cFItqfZaoF23w4j4LFbeAJh/Zm1b/ekAONhthcMwNAPf mRlhvD3w+zY= =Hi/c -----END PGP SIGNATURE-----