pyjamas pyv8run converts python to javascript, executes under command-line
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Sat Sep 19 20:05:23 EDT 2009
On 19 Sep, 11:04 pm, robert.kern at gmail.com wrote:
>Daniel Fetchinson wrote:
>>>>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. Does this make it a 'python
>>implementation'? That would be news to me but I've been wrong many
>>times before.
>
>It converts Python code to Javascript.
The question is whether it converts Python code to JavaScript code with
the same behavior. I think you're implying that it does, but you left
it implicit, and I think the point is central to deciding if pyjamas is
a Python implementation or not, so I thought I'd try to make it
explicit.
Does pyjamas convert any Python program into a JavaScript program with
the same behavior? I don't intend to imply that it doesn't - I haven't
been keeping up with pyjamas development, so I have no idea idea. I
think that the case *used* to be (perhaps a year or more ago) that
pyjamas only operated on a fairly limited subset of Python. If this was
the case but has since changed, it might explain why some people are
confused to hear pyjamas called a Python implementation now.
Jean-Paul
More information about the Python-list
mailing list