- azazel75 parentSome years ago with a friend we built a Lasersaur ( https://lasersaur.com ) from scratch. It is equipped with a 130 w CO2 laser. Amazing open source project. Unfortunately the guy that stays it abandoned the project, but there a ton of resources there
- 1 point
- 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
- 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
- 1) it renders import and from...import statements to equivalent ES6 imports. If you use something like Webpack down the pipeline you can already mix ES6 imports and CommonJS requires. Also, BabelJS by default transpiles ES6 imports to CommonJS requires.
2) What do you mean exactly?
3) There's no direct from-python loader, but the compilation can be splitted in two steps with the BabelJS Webpack loader used for the latter
- For-of only works for iterable sources, it would not be a complete replacement of for...in, also it seems a bit slower that for...in as of now.. see https://kpdecker.github.io/six-speed/
- Javascripthon supports converting either a python source file or a python function object directly, but actually using the embedded js interpreter to do the transpilation takes some time due to BabelJS code bootstrap time.
Having a "HOT" interpreter with an execution context that is persistent and can be used to convert code to ES5 on the fly has been already implemented by duckpy creator and i plan to intergate it very soon.
- The former, it translates Python 3.5 syntax and some of the core semantics to ES6+ JavaScript and then BabelJS is used to transpile that ES6 JS to ES5. All this retaining a sourcemap that maps back to the original Python sources.
It does all without the need for nodejs (even if it can be used of course), it uses an embedded js interpreter.
- 114 points