Post AV8wkBMSsn481Fw4OW by KevinWho@tech.lgbt
 (DIR) More posts by KevinWho@tech.lgbt
 (DIR) Post #AV82qIjcmngVBz6qTg by niconiconi@mk.absturztau.be
       2023-04-29T01:27:24.743Z
       
       4 likes, 2 repeats
       
       JavaScript engine in WebAssemblyWhat a time to be alive.
       
 (DIR) Post #AV82xE5QT11mnpboWG by PeterCxy@comfy.social
       2023-04-29T01:27:52.881Z
       
       1 likes, 1 repeats
       
       @niconiconi@mk.absturztau.be Now I can finally run my JavaScript in JavaScript engine in WebAssembly in JavaScript engine
       
 (DIR) Post #AV82xEim6iVGls1Equ by niconiconi@mk.absturztau.be
       2023-04-29T01:28:39.535Z
       
       0 likes, 0 repeats
       
       @PeterCxy@comfy.social Use the asm.js fallback so it works even in older browsers and in pure JavaScript.
       
 (DIR) Post #AV82yMtrBUxcQVk4qO by niconiconi@mk.absturztau.be
       2023-04-29T01:28:53.321Z
       
       0 likes, 1 repeats
       
       @PeterCxy@comfy.social Use the asm.js fallback for WebAssembly so it works even in older browsers and in pure JavaScript.
       
 (DIR) Post #AV83SAtkN4vDtJu5Eu by lanodan@queer.hacktivis.me
       2023-04-29T01:33:40.348618Z
       
       0 likes, 0 repeats
       
       @PeterCxy @niconiconi Then https://bellard.org/tinyemu/ loading https://bellard.org/quickjs/
       
 (DIR) Post #AV83ejhcnL5rJJDtzs by wakuwaku@mk.absturztau.be
       2023-04-29T01:29:09.720Z
       
       1 likes, 0 repeats
       
       @niconiconi Now all we need is a proper HTML rendering engine in WASM and browsers can finally become much simpler.
       
 (DIR) Post #AV8wkBMSsn481Fw4OW by KevinWho@tech.lgbt
       2023-04-29T02:18:24Z
       
       0 likes, 0 repeats
       
       @niconiconi @PeterCxy where can I find asm.js?
       
 (DIR) Post #AV8wkBxgeOq7shLnPc by niconiconi@mk.absturztau.be
       2023-04-29T11:50:58.122Z
       
       0 likes, 0 repeats
       
       @KevinWho@tech.lgbt @PeterCxy@comfy.social asm.js was a browser extension, not a software library. Supported browsers would recognize the type annotations in asm.js code to run it efficiency, for unsupported browsers it's just regular JavaScript code. Some WebAssembly toolchains still provides an asm.js target, you can also use an asm.js polyfill for WebAssembly code. https://github.com/ibheem/Web-Assembly/blob/master/Polyfill.md
       
 (DIR) Post #AVbydbzfmhPGeLOesy by Moon@shitposter.club
       2023-05-13T12:01:39.744360Z
       
       3 likes, 0 repeats
       
       @niconiconi just use eval LOL
       
 (DIR) Post #AVbyxKca5IcWYszzBg by niconiconi@mk.absturztau.be
       2023-05-13T12:05:12.889Z
       
       0 likes, 0 repeats
       
       @Moon@shitposter.club There are pure WebAssembly runtimes without JavaScript support.
       
 (DIR) Post #AVbzA6ZRdShikVcfFw by coroice@tech.lgbt
       2023-05-13T12:02:36Z
       
       0 likes, 0 repeats
       
       @niconiconi Wait. I'm not up to speed on web development, but this seems cursed as hell.
       
 (DIR) Post #AVbzA7B1NklId3CfpI by niconiconi@mk.absturztau.be
       2023-05-13T12:07:31.025Z
       
       1 likes, 0 repeats
       
       @coroice@tech.lgbt I think WebAssembly is not really about Web in the traditional sense at all. It's now closer to just a runtime to execute arbitrary code, not different from JVM.I recently cross-compiled some FORTRAN linear algebra code from the 80s to WebAssembly. It works!
       
 (DIR) Post #AVbzncJBZLRgTYrH3g by vftdan@mastodon.ml
       2023-05-13T12:14:10Z
       
       1 likes, 0 repeats
       
       @niconiconiThe ultimate polyfill
       
 (DIR) Post #AVbzr0KAjd0rpQw1ke by niconiconi@mk.absturztau.be
       2023-05-13T12:15:15.792Z
       
       1 likes, 0 repeats
       
       @vftdan@mastodon.ml Use WebAssembly to polyfill JavaScript, then use asm.js to polyfill WebAssembly.
       
 (DIR) Post #AVbzxRPcw3SHZtYW9I by coroice@tech.lgbt
       2023-05-13T12:12:40Z
       
       0 likes, 0 repeats
       
       @niconiconi That's also as I understood it, Wasm is made to run applications that normally don't work in a browser (to be able to run them basically everywhere, including in a browser's sandbox). So Javascript running in a WebAssembly app sounds extra cursed.
       
 (DIR) Post #AVbzxS1udi51UdT5pA by niconiconi@mk.absturztau.be
       2023-05-13T12:16:26.361Z
       
       0 likes, 1 repeats
       
       @coroice@tech.lgbt Imagine a time when all mainstream browsers come with a VM runtime that can run arbitrary bytecode... It's WebA cough cough Java applets.
       
 (DIR) Post #AVc0F6g8lGIIUChfPc by Moon@shitposter.club
       2023-05-13T12:19:38.645069Z
       
       0 likes, 0 repeats
       
       @niconiconi just having a jest, friend!
       
 (DIR) Post #AVc1eYW0VDqW0tf8Nc by wi24rd@misskey.io
       2023-05-13T12:34:09.469Z
       
       1 likes, 0 repeats
       
       @niconiconi@mk.absturztau.be @coroice@tech.lgbt 太阳底下无新事。几年前看到 WASM 这个东西我也想到了小时候访问一些网站时需要的 Java 虚拟机。
       
 (DIR) Post #AVc1ea8KUE5v22bFke by niconiconi@mk.absturztau.be
       2023-05-13T12:35:26.250Z
       
       0 likes, 0 repeats
       
       @wi24rd@misskey.io @coroice@tech.lgbt C to MIPS assembly to Java bytecode to Web browsers Java applets (2003): https://www.thisiscool.com/mips2java.htm
       
 (DIR) Post #AVc1oEjusnTvZmmiMS by coroice@tech.lgbt
       2023-05-13T12:36:11Z
       
       0 likes, 0 repeats
       
       @niconiconi @wi24rd :blobcatsweat:
       
 (DIR) Post #AVc1oFMCaS6fUWhI2K by niconiconi@mk.absturztau.be
       2023-05-13T12:37:11.203Z
       
       0 likes, 0 repeats
       
       @coroice@tech.lgbt @wi24rd@misskey.io "Whereas the designers of Mips2Java tout the ability to convert libjpeg and FreeType to Java code, I was intrigued by the possibility of taking a C console application, compiling it to 100% Pure Java and hosting it in an unsigned [Web browser] Java applet."Well ahead of its time.
       
 (DIR) Post #AVc22GoFz1tO3BVSue by clacke@libranet.de
       2023-05-13T12:08:52Z
       
       0 likes, 0 repeats
       
       @niconiconi @PeterCxy also, does JS for WASM support asm.js
       
 (DIR) Post #AVc22He0sbICdhinaK by PeterCxy@comfy.social
       2023-05-13T12:37:27.564Z
       
       0 likes, 0 repeats
       
       @clacke@libranet.de @niconiconi@mk.absturztau.be Any JavaScript interpreter supports ASM.js. It's just that if they recognize the specific syntax used by ASM.js, they can apply more optimization than otherwise.
       
 (DIR) Post #AVc22IHMWIlgbk8Duy by niconiconi@mk.absturztau.be
       2023-05-13T12:39:41.382Z
       
       0 likes, 0 repeats
       
       @PeterCxy@comfy.social @clacke@libranet.de asm.js was basically just JavaScript with (backward compatible) type annotation. Unmodified JavaScript engine can still execute it, just slowly, while newer engines can recognize the annotations to apply optimizations. This was the pre-history of WebAssembly. Many wasm toolchain can still generate asm.js fallback outputs.
       
 (DIR) Post #AVc60YQptQKBwTzNPk by lain_7@tldr.nettime.org
       2023-05-13T13:17:44Z
       
       1 likes, 0 repeats
       
       @niconiconi @coroice Only this time, with a better thought-out security model. I hope.
       
 (DIR) Post #AVcD6ugmklSAO9Qck4 by roytam1@miniwa.moe
       2023-05-13T14:43:49.868769Z
       
       0 likes, 0 repeats
       
       @niconiconi I think you can compile chromium or firefox entirely in wasm and run it in chrome. (Since LibreOffice can work like this, I don't think they can't)