From: Dan Sugalski Date: 2001-12-30T13:04:00+09:00 Subject: [ruby-talk:29695] Re: Python and Ruby: a comparison At 07:57 PM 12/29/2001 -0800, ptkwt@aracnet.com wrote: >In article <5.1.0.14.2.20011229222259.0206fe80@pop.sidhe.org>, >Dan Sugalski wrote: > >At 09:57 AM 12/30/2001 +0900, Ron Stephens wrote: > >>However, for what its worth, the PERL 6 implements, whom I met and > conversed > >>with at the MIT Lightweight Languages conference, are definitely > truing, as a > >>goal, to create a PERL 6 runtime environment that can easily and credibly, > >>someday later on, run Perl, Ruby, and Python. I suppose that could be > >>additional > >>runtime environments for these languages, just like Jython is an additional > >>runtime environment for Python. Maybe that could work, and give some of the > >>advantages of "bringing the tow (or , in this case, three) streams if > >>development back togethers into one mighty river. > >> > >>I am a doubter about this, btu who knows? > > > >Oh, don't doubt. We've pulled it off already, to an extent, with the perl 5 > >engine, and that's a mess as these things go. > > > >Technically, an engine capable of running all three languages (and more) is > >pretty trivial as these things go. Inter-language calling conventions are > >the toughest and that's not really tough at all. The politics involved are > >by far the biggest hurdle, and they exceed the technical difficulties by > >many orders of magnitude. > > > >Having said that, Parrot will be *capable* of running perl, python, and > >ruby. (Whether there's a full-blown language parser for python and ruby is > >up in the air--I'm all for the ruby parser in ruby, as that'd make my life > >really easy. > >So what do we have to do? Parse Ruby and spit out Parrot bytecode, right? For now, yep. Once we get things situated right, you won't even need to spit out bytecode. Spitting out a full AST would be sufficient, which then gets fed into the compiler module. >I think there is a project or two out there to create a Ruby parser in >Ruby. JRuby could always be modified, I suppose, to become PRuby - that >might be another option. Sure, and if you have a ruby parser in ruby, we can run it through the ruby engine as it stands now and spit out ruby bytecode. We run that through the ruby bytecode->parrot bytecode converter (which is already partially written) and get parrot bytecode which we then freeze to disk and poof! we have a working parser. > >We'll have full bytecode translators, but those are trivial > >compared to parsing the languages) Even if it's not fully used, it'll make > >Parrot a better engine. > > > >And anyway, at this point I can wave the "Hey, look, we have a JIT!" flag > >to entice people into writing a ruby parser for Parrot... :) > >I think that there are a lot of Rubyists out there who want to see a Ruby >parser for Parrot and some who would even be willing to work on it. Hey, >wouldn't it be cool if we could get there before the Pythonistas? Yep, darned cool. Heck, we don't have a full perl parser yet--you could even beat us! (Which, personally, I think would be amusing) Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk