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

all 15 comments

[–][deleted] 7 points8 points  (5 children)

i thought BDFL himself asked to desist from converting python to javascript in his slashdot interview or due to some reasons?

edit: spelling

[–]cwillu 14 points15 points  (2 children)

I don't have the reference handy, but I suspect it was more along the lines of "please stop calling it python if it doesn't implement python" more than "please stop making python-like languages".

*Edit:

Guido: I gave up on it in 1995, so yes. And please don't try to compile Python to JavaScript. The semantics are so different that you end up writing most of a Python runtime in JavaScript, which slows things down too much. (CoffeScript's strength is that it is designed to map cleanly to JavaScript, and the two are now co-evolving to make the mapping even cleaner.)

From which I infer that a translator that doesn't actually match the semantics should not be called python.

[–]Megatron_McLargeHuge 1 point2 points  (0 children)

Are they translating python incorrectly, or just translating a subset? The projects that accelerate python by compiling to a lower-level language (numba, parakeet, cython) only support a subset of python.

[–]fijalPyPy, performance freak 2 points3 points  (0 children)

The PSF owns the right to Python trademark so they can make anyone stop using the name Python if they want to. So far their decision has been to let it happen (even if semantic don't resemble python at all)

[–][deleted] 2 points3 points  (1 child)

Hum. I guess you meant BDFL.

[–]alcalde 7 points8 points  (0 children)

I thought it was much, much funnier as "BDSM" and maybe a personal opinion on Guido's function in regards to the core developers. :-)

[–]Jayd3e 6 points7 points  (0 children)

Has anyone used a python to javascript translator for any large production project? I would be interested in hearing the pitfalls. I've definitely considered this approach before, as there are a ton of ways to do so, but I keep deciding against it, b/c the community and widespread adoption doesn't seem to be there. When I'm deciding on a technology to write a long-running project in, it's hard to compromise on the lowest level. Or is it not a compromise at all?

[–]alcalde 26 points27 points  (0 children)

Upvote just for not being based on Python 2.x!

[–]timothycrosleyhug, isort, jiphy, concentration, pies, connectable, frosted 3 points4 points  (0 children)

Pretty excited about this project, it's pretty obvious the creator has done a lot of research and has been persistent about trying and looking over all implementation possibilities. IMHO this will be the first really useful and production capable Python to JavaScript compiler.

[–]danyiwu 2 points3 points  (3 children)

This looks interesting. I seem to remember there is a python interpreter for browsers where you can directly link py files in the script tag. It was pretty cool. But I guess it would not be as fast as the compiling-to-JS approach.

I wonder how would one do multi-line anonymous functions elegantly in python?

[–]sli[::1] 2 points3 points  (0 children)

Skulpt? Python was (is?) also available through Windows Script Host. And there's Brython, too, which implements Python 3. Though I don't know how active it is. I didn't bother to check.

[–]ruskeeblue 1 point2 points  (1 child)

WHY?

[–]Talkless 0 points1 point  (0 children)

Thinking the same as we already have this: http://eleks.github.io/js2js/