Earlier quoted context omitted.
I've been watching WASM from afar, and it's my understanding that it's not a JS killer because it doesn't have direct access to the DOM or to most DOM APIs. I'm curious if there's another reason I'm missing?
It doesn't have access to _anything_ (in the browser, in other runtimes there is WASI with POSIX functions). Everything has to be imported from or exported to JS. And currently using anything but C, C++ or Rust isn't feasible, as the runtime needed for a GC is way too big. A Haskell "Hello World" for example is about 1MB (even after running `wasm-opt` on the generated WASM binary).
Learn WebAssembly by writing small programs
31–40 of 87 posts
Re: Learn WebAssembly by writing small programs
#32Earlier quoted context omitted.
It doesn't have access to _anything_ (in the browser, in other runtimes there is WASI with POSIX functions). Everything has to be imported from or exported to JS. And currently using anything but C, C++ or Rust isn't feasible, as the runtime needed for a GC is way too big. A Haskell "Hello World" for example is about 1MB (even after running `wasm-opt` on the generated WASM binary).
In the browser, can it integrate with SharedArrayBuffer, worker's postMessage or transferrable offscreen canvas?
Re: Learn WebAssembly by writing small programs
#33Earlier quoted context omitted.
It doesn't have access to _anything_ (in the browser, in other runtimes there is WASI with POSIX functions). Everything has to be imported from or exported to JS. And currently using anything but C, C++ or Rust isn't feasible, as the runtime needed for a GC is way too big. A Haskell "Hello World" for example is about 1MB (even after running `wasm-opt` on the generated WASM binary).
In the browser, can it integrate with SharedArrayBuffer, worker's postMessage or transferrable offscreen canvas?
But you need the WASM thread extension (for atomic access to the shared memory) to be able to use shared memory.
Re: Learn WebAssembly by writing small programs
#34Pretty cool. I haven't really explored WASM hands-on (I'll give this guide a try) but, given that it's already been a few years, I think it's been hugely beneficial for web development. Not the "JavaScript killer" some where hoping for, though it was never meant to be one. Instead it integrates pretty nicely within the existing ecosystem, optimizing existing use-cases and allowing new ones when heavy computations are…
I've been watching WASM from afar, and it's my understanding that it's not a JS killer because it doesn't have direct access to the DOM or to most DOM APIs. I'm curious if there's another reason I'm missing?
Let WASM do the number crunching, let JS do the UI.
Re: Learn WebAssembly by writing small programs
#35Is there a WA UI framework for web similar to Svelte or Vue?
https://learn.microsoft.com/en-us/aspnet/core/blazor/host-an...
Re: Learn WebAssembly by writing small programs
#36Earlier quoted context omitted.
I've been watching WASM from afar, and it's my understanding that it's not a JS killer because it doesn't have direct access to the DOM or to most DOM APIs. I'm curious if there's another reason I'm missing?
It doesn't have access to _anything_ (in the browser, in other runtimes there is WASI with POSIX functions). Everything has to be imported from or exported to JS. And currently using anything but C, C++ or Rust isn't feasible, as the runtime needed for a GC is way too big. A Haskell "Hello World" for example is about 1MB (even after running `wasm-opt` on the generated WASM binary).
Re: Learn WebAssembly by writing small programs
#37This is great, thanks! One of my favorite ways to learn a new language or framework is via "koans"[1], which this reminds me of. It's a gentle ramp up from basic to advanced features, and the TDD-like workflow of seeing a test fail, understanding why, and fixing it, is really conducive to learning, while giving you that dopamine jolt from "a-ha!". [1]: https://github.com/ahmdrefat/awesome-koans/blob/master/koans...
sounds like a great way to learn a language "on your own". unfortunately, Rust is missing. can anyone propose a link?
Re: Learn WebAssembly by writing small programs
#38Earlier quoted context omitted.
I've been watching WASM from afar, and it's my understanding that it's not a JS killer because it doesn't have direct access to the DOM or to most DOM APIs. I'm curious if there's another reason I'm missing?
It doesn't have access to _anything_ (in the browser, in other runtimes there is WASI with POSIX functions). Everything has to be imported from or exported to JS. And currently using anything but C, C++ or Rust isn't feasible, as the runtime needed for a GC is way too big. A Haskell "Hello World" for example is about 1MB (even after running `wasm-opt` on the generated WASM binary).
Someone should tell Anaconda that they can't do this, then: https://pyscript.net/
Re: Learn WebAssembly by writing small programs
#39Re: Learn WebAssembly by writing small programs
#40Is it just me, or does "WebAssembly" seem like an oxymoron? Maybe it's because I've been involved with the web since its earliest beginnings.