Thanks for the work, very impressive. And detailed post, I see now the power of Python JS. Yes, Brython code tries to have globals, locals, to conform to Python sematic, but it is "too much".
My pet project: - Compiling very reduced set of Python to JavaScript (written in JavaScript) https://github.com/ajlopez/JPyScript there are express sample apps (import http maps to require('http')) I want to explore type inference, but in another pet project, trying to emulate RPython: https://github.com/ajlopez/RedPython again, using JavaScript/Nodejs, this time translate Python to C. There is a primes.py working sample I guess you can get the same from pure Python. Instead processing .pyc (I guess this is the strategy of PyPy), take the AST, inference types, and output C plain code. Even annotations in functions and arguments could help to type inference. But I prefer JavaScript ;-) Angel "Java" Lopez @ajlopez On Tue, Nov 12, 2013 at 5:18 AM, Harts Antler <[email protected]> wrote: > PythonJS is a Python to JavaScript translator like Brython, but produces > faster output code than Brython, see this > post<http://pyppet.blogspot.com/2013/11/brython-vs-pythonjs.html> > . > PythonJS 0.8.4 now works with NodeJS, and includes special wrappers for it. > > Sample Code: > > from nodejs.io import * > from nodejs.sys import * > > path = sys.argv[ len(sys.argv)-1 ] > f = open( path, 'rb' ) > print f.read() > > https://github.com/PythonJS/PythonJS > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
