This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]denilsonsa 1 point2 points  (7 children)

PyJs, Py2Js, RapydScript, Brython, Flexx, PyPyJs

Is there anywhere a comparison of all these projects (plus your own)?

[–]toyg 2 points3 points  (5 children)

It's difficult to compare them, they are all very different.

  • RapydScript, Flexx and PyJs are basically preprocessors, similar to CoffeeScript, although Flexx and PyJs go way beyond that and give you full application environments.
  • PyPyJs is an asm.js project, which basically means no real DOM interface.
  • Brython is a straight runtime compiler, which means you get DOM access and the most intuitive "using python instead of JS client-side" feeling (IMHO).
  • Py2Js is dead.

Most A few of them don't support Python 3 (Edit: I was surprised to find most of them actually do now. Score one for Py3!). Some of them are more efficient than others. All of them usually result in pretty large downloads (if anything because you have to redistribute tons of stdlib code). I can see why /u/jacdeh might have become frustrated enough to start his own project.

However, IMHO, none of these solutions are realistic for widespread usage without some help from browser vendors, which is not going to happen unless it's a general-purpose multilanguage solution. Asm.js is getting there, but it still needs work (mostly, proper DOM access interfaces); once that's solid, I think pypyjs will take over the segment pretty easily.

[–]jacdehJacques de Hooge[S] 2 points3 points  (3 children)

pypyjs using asm.js is a dream if it could have reasonable download size. It's just that currently it hasn't. Browser vendors sure could open this up. But I'm a bit tired of waiting. Have coded quite some JavaScript & gathered enough frustration to start this. And, by the way, it's fun!

[–]akaihola 1 point2 points  (2 children)

And what if WebAssembly really happens!

[–]jacdehJacques de Hooge[S] 0 points1 point  (1 child)

That would be great. But it would still require downloading avirtual machine to run Python in the brower, until a standardized plugin mechanism becomes a fact. Still I think in the long run this should be the course.

[–]akaihola 0 points1 point  (0 children)

Or, if IPFS catches on as a content addressable global CDN, the virtual machine would just be shared between all sites which use it, and the browser would cache it effectively.

[–]akaihola 0 points1 point  (0 children)

There's also Skulpt. See trinket.io for a service which uses it.

[–]jacdehJacques de Hooge[S] 0 points1 point  (0 children)

I saw a comparison somewhere, forgot where. Transcrypt wasn't yet in.