I am trying to automatically compile / convert code written using Python semantics into native and fast Javascript code.
What tools can do this, with good debugging support, like Java, etc.
Has anyone done this?
Why?
I am trying to write visualization code with a complex main loop, a timeline, some physical simulation, and some complex interaction. IE: this is a real CPU binding issue.
Writing with Javascript and testing in its browser environment is more difficult to debug than say Java, .NET or Python, working in a decent IDE. But in order to do real large-scale web development with complex client code, you must at least compile Javascript, if not write directly.
Background: Recent Achievements
Emscripten allows you to compile C / C ++ into Javascript, which can work with improved browser performance due to support for ArrayBuffer array arrays and new JS browsers, as ASM.js and LLJS, use the improved Mozilla enhancements recently (which is most likely other vendors will follow).
Altjs.org has a list of Javascript alternaltives underwear, but it does not focus on the latest speed improvements or good semantics yet but for people it is becoming more common for coding browsers with better tools. Emscripten in particular downloads amazing demos .
Possible options:
- Shedskin - I have currently tried working with Shedskin, but I have limited C ++ / C skills (Emscripten provides only the C API for the garbage collector created by Boehm that it uses, and Shedskin needs a C ++ garbage collection class for it that doesn’t exist yet).
- Unladen Swallow / RPython, LLVM - unable to configure Ubuntu correctly
- Boo to Java, then LLVM (not yet installed on my Ubuntu system)
Additional restrictions:
- I need to use this on my Ubuntu system.
- Compiled Javascript must be less than 1 MB
- Debugging in the native language, which is also compiled, is still possible, allowing you to use existing debugging tools.
"This process of constructing instruction tables should be very exciting. There should be no real danger that it will ever become a hard work, since any processes that are completely mechanical can be transferred to the machine itself." - Alan M. Turing, 1946
source share