Slashdot Mirror


Python Converted To JavaScript, Executed In-Browser

lkcl writes "Two independent projects, Skulpt and Pyjamas, are working to bring Python to the web browser (and the JavaScript command-line) the hard way: as JavaScript. Skulpt already has a cool Python prompt demo on its homepage; Pyjamas has a gwtcanvas demo port and a GChart 2.6 demo port. Using the 64-bit version of Google v8 and PyV8, Pyjamas has just recently and successfully run its Python regression tests, converted to JavaScript, at the command-line. (Note: don't try any of the above SVG demos with FF2 or IE6; they will suck.)"

1 of 176 comments (clear)

  1. Now I've heard everything by Ancient_Hacker · · Score: 0, Troll

    Just when you thought things could not get any crazier, there's this story. Let's hope it's an early April Fool.

    There's no way one could simulate more than about 12% of Python's complex OO semantics in JavaScript.
    Python itself already has a hard and slow slog trying to perform all its tricks.

    To add yet another layer of translation or simulation sounds like a lose-lose proposition. Slower and hopelessly inexact.

    Not to mention many of the more useful Python modules have a considerable C component, making them completely unusable as JavaScript.

    ( Yes, I know, in theory JavaScript is Turing-complete, so you can do anything in it, given a universe full of CPU's ).