News for hackers. Stuff that matters.
Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by azazel75 on Thursday March 31, 2016 @10:42AM (#11397522)
The main reason is... context switching, also i'm a big fan of python's standard library, but I have yet to do any complete work just with it.
Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by tanlermin on Thursday March 31, 2016 @11:29AM (#11397869)
Is this supposed to be able to work for really large apps at some point? Some commenter lamented how it didn't work with django.
Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by azazel75 on Thursday March 31, 2016 @11:34AM (#11397913)
It cannot be used to convert python frameworks to javascript, nor Django nor any other
Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by civilian on Thursday March 31, 2016 @02:39PM (#11399490)
That seems to suggest that this isn't a fully-formed py->js transpiler?
Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by azazel75 on Thursday March 31, 2016 @03:27PM (#11399875)
It's in development, as many others software projects are, and is far from complete. The goal is to translate as much of core semantics as possible, but i doubt that all the core semantics will be translated. One for all is multi inheritance which is currently unsupported by current Javascript syntax. Even more, when you use an object such a list, it's really a JS Array that will be manipulated in the end, so you will have to use array.push() to add instead of python's list.append()

But Translating something like Django is out of scope for all the transpilers, it would mean also converting sql drivers and so on? Does this really make any sense? Maybe you have a look at emscripten https://github.com/kripken/emscripten/wiki

Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by tanlermin on Thursday March 31, 2016 @03:36PM (#11399940)
http://www.transcrypt.org/

Does multiple inheritance

Re:A Python-to-JavaScript Transpiler with BabelJS and Source... by azazel75 on Thursday March 31, 2016 @03:53PM (#11400109)
I could assure you that even transcrypt cannot transpile Django.

It does multiple inheritance with a polyfill and overally is much more "fatter" than JavaScripthon.

But with JavaScripthon you can use any tool available in JS land to accomplish the same goal. Want to use Backbone's extend()? Use it.. want to use react's createClass() mixin?, the same