pyjamas pyv8run converts python to javascript, executes under command-line

Daniel Fetchinson fetchinson at googlemail.com
Sun Sep 20 21:27:06 EDT 2009


>> >> the pyjamas project is taking a slightly different approach to achieve
>> >> this same goal: beat the stuffing out of the pyjamas compiler, rather
>> >> than hand-write such large sections of code in pure javascript, and
>> >> double-run regression tests (once as python, second time converted to
>> >> javascript under pyv8run, d8 or spidermonkey).
>>
>> >> anyway, just thought there might be people who would be intrigued (or
>> >> horrified enough to care what's being done in the name of computer
>> >> science) by either of these projects.
>>
>> > I've added pyjamas to the implementations page on the Python Wiki in
>> > the compilers section:
>>
>> >http://wiki.python.org/moin/implementation
>>
>> In what way is pyjamas a python implementation? As far as I know
>> pyjamas is an application written in python that is capable of
>> generating javascript code.
>
>  it's strictly speaking, according to wikipedia, a "language
> translator".

Yep, this sounds more like what I originally had in mind.
But if people insist on calling it a python implementation, it's fine by me :)

Cheers,
Daniel


> i'm just in the process of adding an AST parser (based
> on lib2to3, from sgraham's work in skulpt) which will become the basis
> of an "exec" function, just like in the skulpt demo.
>
>  also to answer your question: pyjamas has [roughly] two modes: -O and
> --strict.  "-O" is the one where you have to write in a subset of
> python, and you can (unfortunately) do things like 5 + "px" (which
> doesn't throw an exception).  this saves _vast_ amounts of CPU
> cycles.
>
> "--strict" as you would expect is the python-strict converter, where
> we're beginning to add implementations of __add__ etc. etc. and
> generally cope with the nasty grungy bits of javascript that would
> otherwise make arbitrary python applications keel over.


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list