From: Luis Lavena Date: 2008-12-27T12:10:00+09:00 Subject: Re: ruby -> python On Dec 26, 11:11 pm, Roger Pack wrote: > >> I'd imagine that most Ruby constructs have their Python equivalent. > > > Why introduce Python, when on many platforms, you have the ability to > > use inline C, C++ or assembler? IIRC it works on Cygwin, all *Nix > > platforms and probably MacOS X as well. > > Because I don't want to rewrite my bottlenecks to C--I want to leave > them as ruby and have them "automagically translated" > > Main advantage: Python and Ruby are pretty similar, so a translator > shouldn't be as hard to write as, say, a ruby to c JIT translator [psyco > is a Python->bytecode JIT translator, so the work has been done there]. > > Obviously a translator to C would be the best, I just think it would be > pretty  hard, and if one could translate to Python, a lot of the > optimization exists. A fit of python envy, you could call it. > Thoughts? > -=r What about _why experiments on Ruby to Python front (only YARV): http://hackety.org/2008/05/05/sneakingRubyThroughGoogleAppEngine.html I know, is silly, but is bytecode translated ;-) Another option is look at ParseTree for the AST and generate C code from it (ruby2c) -- Luis Lavena