From: Alexander Kellett Date: 2004-08-11T18:10:21+09:00 Subject: Re: Ruby and Mono On Wed, Aug 11, 2004 at 07:53:55AM +0200, Alexander Kellett wrote: > On Wed, Aug 11, 2004 at 09:54:53AM +0900, Hal Fulton wrote: > > 1. A Ruby interpreter ported to Mono? > > 2. A native (x86/whatever) interpreter that spits out CIL bytecodes? > > 3. A combo of these? An interpreter ported to Mono that outputs Mono? > > 4. A library that simply allows calling the CLR and such? > > 5. Or something else entirely? > > i've got a small c extension to bind to system.reflection.emit > thusly allowing generation and execution of cil bytecode / dlls. er... what i mean by this is. i have a small ruby/c extension. code using it looked a bit like this for example: $se.OpCodeVoid(OpCodeFactory.NewLdloc_1) $se.OpCodeVoid(OpCodeFactory.NewLdc_I4_1()) $se.OpCodeVoid(OpCodeFactory.NewAdd()) could be neatened up majorly. but for a few days of hacking it ain't too bad at all. it can be downloaded from here: http://www.lypanov.net/websitedata/monoruby-2003-10-17.tar.bz2 the basic idea: could write a ruby -> clr compiler in ruby which could later on be bootstrapped if the system.reflection.emit wrapper itself was bound from within. the method: very trivial mono binding based on paolo mauros mono-perl. this provides access only to static methods. no instances. so rather than hack lots in c. i write a c# extension which makes s.r.e to static interfaces only. this could of course be majorly improved by integrated better with mono but i just wanted a proof of concept clr byte code generation + execution library. mvg Alex -- Ummmmm ... Beeeeeeeeerrr..... - Simpson, Homer