News for hackers. Stuff that matters.
Re:Using Python to generate JavaScript for creating interact... by nickthemagicman on Wednesday November 13, 2019 @11:52AM (#21526224)
Does Python generate ES5 code for maximum compatibility?

Or does the Python generate the Typescript which is transpiled to ES6 which is then transpiled to ES5 for browser compatibility and the SASS is transpiled to base CSS templates for browser compatibility as well?

What if I'm using web assembly to generate my Python which generates the JS which transpiles to Typescript then to ES6 then to ES5?

I'm a big fan of how flexible all of our web language API's are!

Someone should make one language that transpiles down to Javascript AND Python AND Ruby AND Erlang even! Then you could code in ALL languages with just one language!

Like a terraform for programming languages.

Re:Using Python to generate JavaScript for creating interact... by athenot on Wednesday November 13, 2019 @05:30PM (#21530413)
> Someone should make one language that transpiles down to Javascript AND Python AND Ruby AND Erlang even! Then you could code in ALL languages with just one language!

While not hitting all these targets, you might be interested in Nim, which can compile to both machine executable code (via C-family targets) and JavaScript (for the web).

https://nim-lang.org/docs/backends.html

Re:Using Python to generate JavaScript for creating interact... by excessive on Wednesday November 13, 2019 @06:17PM (#21530864)
> Someone should make one language that transpiles down to Javascript AND Python AND Ruby AND Erlang even!

Well, not every language, but Haxe has you pretty well covered:

https://haxe.org/documentation/introduction/compiler-targets...

Re:Using Python to generate JavaScript for creating interact... by nickthemagicman on Wednesday November 13, 2019 @07:09PM (#21531300)
I SOMEHOW KNEW IT WOULD EXIST!
Re:Using Python to generate JavaScript for creating interact... by bryanrasmussen on Wednesday November 13, 2019 @12:46PM (#21527065)
and that one language could be Brainf*ck!
Re:Using Python to generate JavaScript for creating interact... by nickthemagicman on Wednesday November 13, 2019 @05:24PM (#21530345)
Brainf*ck is great but coding in ArnoldC makes you feel really manly.
Re:Using Python to generate JavaScript for creating interact... by potta_coffee on Wednesday November 13, 2019 @03:15PM (#21528982)
And then we'll need to find a programmer-hobbit to throw that One Ring into the fire for us.
Re:Using Python to generate JavaScript for creating interact... by meddlin on Wednesday November 13, 2019 @12:04PM (#21526417)
One step at a time, there, sparky.