News for hackers. Stuff that matters.
Re:Build a simple 2D physics engine for JavaScript games (2012) by pwdisswordfish0 on Wednesday August 24, 2022 @07:14AM (#32577811)
Rust isn't JS...
Re:Build a simple 2D physics engine for JavaScript games (2012) by onion2k on Wednesday August 24, 2022 @07:49AM (#32578119)
Through the magic of WASM compilers every language is JS now.

has nightmare

Re:Build a simple 2D physics engine for JavaScript games (2012) by TheRealPomax on Wednesday August 24, 2022 @01:01PM (#32582359)
No, now it's web assembly[1], which is a flavour of assembly code that can run in all modern browsers because those browsers add WASM runtimes. It is as far away from JS as you can get while running in a browser. Even Flash and Java were closer to JS than WASM is.

You can implement a WASM runtime _in_ JavaScript (and people have done this, and it turned out to run so well that in some cases the performance hit was basically irrelevant), but that's because JS is Turing complete and any Turing complete system can emulate any other Turing complete system.

[1] https://webassembly.org/

Re:Build a simple 2D physics engine for JavaScript games (2012) by pwdisswordfish0 on Wednesday August 24, 2022 @11:54AM (#32581119)
No, that's still not JS. JS is a programming language. It doesn't mean "any program that runs in the browser".
Re:Build a simple 2D physics engine for JavaScript games (2012) by onion2k on Wednesday August 24, 2022 @02:07PM (#32583410)
Evidently the "has nightmare" line wasn't enough of a clue that I was making a hilarious joke.
Re:Build a simple 2D physics engine for JavaScript games (2012) by pwdisswordfish0 on Wednesday August 31, 2022 @04:10PM (#32667693)
It's obvious there was a joke in the comment. It just didn't lie in the conflating-/not-conflating-things-with-JS part of the comment. Also, it was lame.
Re:Build a simple 2D physics engine for JavaScript games (2012) by samkon on Wednesday August 24, 2022 @07:45AM (#32578071)
Compiled to wasm, it can be used in javascript games.