Live data from Hacker News

Learn WebAssembly by writing small programs

github.com

81–87 of 87 posts

Re: Learn WebAssembly by writing small programs

#81

Because I've read it here and elsewhere quite often: What is missing from WASM in the browser isn't "just" DOM access, but "everything" else - including fetch or XMLHttpRequest - too. Here is a list of all web APIs supported by browsers and not supported by WASM, the DOM is just one of them: https://developer.mozilla.org/en-US/docs/Web/API But at least there is hope, that these interfaces will be available once GC is…

If they "solve" that then they risk being the next Java Applets.

Re: Learn WebAssembly by writing small programs

#82
post #81

Because I've read it here and elsewhere quite often: What is missing from WASM in the browser isn't "just" DOM access, but "everything" else - including fetch or XMLHttpRequest - too. Here is a list of all web APIs supported by browsers and not supported by WASM, the DOM is just one of them: https://developer.mozilla.org/en-US/docs/Web/API But at least there is hope, that these interfaces will be available once GC is…

If they "solve" that then they risk being the next Java Applets.

Funny how have things have progressed. We went from using HTML + CSS for simple presentation of information, to enriching with small amounts of client side scripting, to plug-and-play sandboxed applications with Flash/Java. Then we realised those were a terrible idea, Flash and Java Applets died, so we started treating JavaScript as a compilation target to mount behemoth abstractions enabling a native application-like experience. When browsers collapsed under the weight of all that crap, WASM was born by necessity. And so we're back to applets.

Am I getting this right?

Re: Learn WebAssembly by writing small programs

#83
post #82
post #81

Earlier quoted context omitted.

If they "solve" that then they risk being the next Java Applets.

Funny how have things have progressed. We went from using HTML + CSS for simple presentation of information, to enriching with small amounts of client side scripting, to plug-and-play sandboxed applications with Flash/Java. Then we realised those were a terrible idea, Flash and Java Applets died, so we started treating JavaScript as a compilation target to mount behemoth abstractions enabling a native application-lik…

[dead]

Re: Learn WebAssembly by writing small programs

#84

Earlier quoted context omitted.

The two language problem is, indeed, awkward. DOM bindings in WASM would be awesome. I would be a happy nerd if I could do all of my web dev in OCaml. In the meantime, WASM has real, just not for front end dev. The two language problem is hardly unique to web dev. It’s also ubiquitous in the machine learning/data science space with Python and C/C++/CUDA playing the roles of JS and WASM, respectively.

> DOM bindings in WASM would be awesome. I would be a happy nerd if I could do all of my web dev in OCaml. DOM is not enough for that. You almost certainly would like to be able to communicate with your backend ;) Here is a list of the "usual" web APIs: https://developer.mozilla.org/en-US/docs/Web/API And everything that needs network access or access to local resources (file system in the worst case) will never happ…

But you will be able to do network access though the fetch API, and fs access though its own API.

Re: Learn WebAssembly by writing small programs

#85
post #78

Because I've read it here and elsewhere quite often: What is missing from WASM in the browser isn't "just" DOM access, but "everything" else - including fetch or XMLHttpRequest - too. Here is a list of all web APIs supported by browsers and not supported by WASM, the DOM is just one of them: https://developer.mozilla.org/en-US/docs/Web/API But at least there is hope, that these interfaces will be available once GC is…

I haven't been following webassembly, but as the former 'cure' for JS, why has it taken so long to get the basics?

It's niche. Front end devs want to use JS or equivalents, not back end languages. And back end devs don't want to browser stuff. So only full stack devs left

Re: Learn WebAssembly by writing small programs

#86
post #45

Looks very similar to the Exercism model, which also has a free WASM course filled with small exercises[1]. I wonder if the author considered contributing to that course or working together with them, it might get their work to a broader audience and leverage the existing toolset Exercism has to offer. [1] https://exercism.org/tracks/wasm

One thing I don't like about Exercism is that except for the most popular languages, the exercises are often not "sysematics". In other words, it's just a bunch of leetcode-like questions, ordered by difficulties. A proper course should order the exercises by language features. Exercism actually has built a fantastic interface for this[1], but not utiltized it for most langauges. [1]: https://exercism.org/tracks/csha…

But leetcode has this https://leetcode.com/studyplan/

Re: Learn WebAssembly by writing small programs

#87
post #82
post #81

Earlier quoted context omitted.

If they "solve" that then they risk being the next Java Applets.

Funny how have things have progressed. We went from using HTML + CSS for simple presentation of information, to enriching with small amounts of client side scripting, to plug-and-play sandboxed applications with Flash/Java. Then we realised those were a terrible idea, Flash and Java Applets died, so we started treating JavaScript as a compilation target to mount behemoth abstractions enabling a native application-lik…

Our current web standards are ill-suited for what we really want out of the web (rich desktop-like GUI's), so people keep trying different things in desperation. One thing not really tried yet is a state-ful GUI markup language standard. Also, maybe applets could be done right on a second try, applying lessons of the first.
Post reply on HN