--- holger krekel <[EMAIL PROTECTED]> wrote: > Hi Alex! > > On Sun, Sep 25, 2005 at 18:42 -0700, Alex Martelli wrote: > > --- Armin Rigo <[EMAIL PROTECTED]> wrote: > > ... > > > If anyone shows up with a Javascript parser, I'm sure we could > > > together > > > hack (and translate (and later have a JIT from)) a basic > Javascript > > > interpreter within a few weeks :-) > > > > Actually, I think the currently useful thing might be a way to > > compile (any decent language, Python for choice) INTO Javascript > > (with reasonable efficiency), so one could write AJAX pages > without > > actually having to code in Javascript...;-) > > that's a second possibility but there are two crucial > perequesites regarding current PyPy: > > - a translation approach that focuses more on high-level > languages (instead of the current RTyper "C" one) > > - a browser/DOM simulation layer in Python to allow > rapid prototyping.
Yep, the former would surely require lots of work (though maybe not the latter). > > I believe the idea with a PyPy/JS Interpreter is more > interesting, at least from the PyPy perspective. Btw, Possibly, but I advisedly used the adjective "useful" rather than saying "interesting";-) JS's only advantage is one of *deployment* -- browsers have JS interpreters, so you can write AJAX code and dramatically improve the user experience. "Sweating blood" is a charitable description of what it takes, but several examples prove it can work in RL. I just find myself daydreaming that I could do the coding in Python (or almost any other VHLL) rather than JS, that's all;-) > being faster than current JS interpreters is probably > easier than being faster than CPython :-) Yes, good point. > Such a JS-interpreter implementation could be > integrated with browsers allowing JS and Python > directly in the browser. Any Python implementation might be integrated with browsers, but it just seems to take a long time happening (even for Firefox, which should allow it most easily)...;-) > > That being said, it might actually be worthwhile to compile > RPython to Javascript which should be reasonably fast > for small programs. One possibility is to just create > flowgraphs from a python program and then transform the > flowgraph to javascript source code (without much > annotation). True, annotation wouldn't help much here (translating among VHLLs). Alex _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev