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.  
 
I believe the idea with a PyPy/JS Interpreter is more 
interesting, at least from the PyPy perspective.  Btw, 
being faster than current JS interpreters is probably 
easier than being faster than CPython :-) 
Such a JS-interpreter implementation could be 
integrated with browsers allowing JS and Python 
directly in the browser. 

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).  

I guess only real experiments would shed more light. 

cheers, 

    holger
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to