Live data from Hacker News

WebAssembly 101: A developer’s first steps

blog.openbloc.fr

51–60 of 153 posts

Re: WebAssembly 101: A developer’s first steps

#51
post #29

Remember when you could hit "View Source" to see how the web was built? I don't like where this is going. Minification was bad enough, now we're going to be getting more non-free blobs shoved into our browsers and this is being touted as a great new feature for us. It will end up being a tool of control and surveillance like always. This guy says it a bit more eloquently than I can: https://lobste.rs/s/wjtu7c/webasse…

https://github.com/WebAssembly/design/blob/master/FAQ.md#wil... The text form of Wasm looks like it's going to be far easier to read than minified JS.

The addition of type information already makes it more explicit.

Re: WebAssembly 101: A developer’s first steps

#52

It looks like the spec is here: https://webassembly.github.io/spec/introduction/index.html I feel like writing a mini-compiler after glancing through it. It looks closer to a binary AST than an instruction set, though.

> 32 bit integers also serve as Booleans and as memory addresses.

I'm already looking forward the day that 32-bit pointers won't be enough for web applications.

Re: WebAssembly 101: A developer’s first steps

#53
post #29

Remember when you could hit "View Source" to see how the web was built? I don't like where this is going. Minification was bad enough, now we're going to be getting more non-free blobs shoved into our browsers and this is being touted as a great new feature for us. It will end up being a tool of control and surveillance like always. This guy says it a bit more eloquently than I can: https://lobste.rs/s/wjtu7c/webasse…

What I don't understand about this viewpoint is, don't all of these caveats also apply to native apps?

Political views aside, I think I understand a key difference in that, presuming one wants to run Free (Libre) software, it's relatively easy to do if you are running one of the FSF recommended Linux distributions.

By contrast, if in common usage people are only running software compiled to Web Assembly, then:

1. You probably have some work to do to figure out the licensing of the code running in your browser.

2. The ability to look at the program logic for study or reuse is diminished in practice as compared to the early web when you could view source.

Re: WebAssembly 101: A developer’s first steps

#54
post #29

Remember when you could hit "View Source" to see how the web was built? I don't like where this is going. Minification was bad enough, now we're going to be getting more non-free blobs shoved into our browsers and this is being touted as a great new feature for us. It will end up being a tool of control and surveillance like always. This guy says it a bit more eloquently than I can: https://lobste.rs/s/wjtu7c/webasse…

This was discussed literally the day wasm was announced, and Brendan Eich weighed in too: https://news.ycombinator.com/item?id=9734947

Thank you for the link, you too had a very nice discussion.

However I find unsetting how Eich ends up defending WASM by hoping it's not too successful (used only in some hot pathes, not full blob apps.) That's frankly quite ridiculous: I predict a full apps adoption pretty soon. Just wait for more mainstream languages to support it.

The open web in the sense the OP meant has been dead for a while, WASM is just another tombstone.

Re: WebAssembly 101: A developer’s first steps

#55

I was disappointed that this doesn't really explain what webassembly is, and the link that says 'if you don't know what webassembly is, click here' just redirects to a tank game with no explanation. I thought maybe it was some way to write x86 assembly in the browser, but apparently it's a tank game.

You might be interested in this thread from a few weeks ago. https://news.ycombinator.com/item?id=14341623

For me, the most helpful comment in that discussion was a link to this paper, written by the WebAssembly designers.

https://github.com/WebAssembly/spec/blob/master/papers/pldi2...

Re: WebAssembly 101: A developer’s first steps

#56

Earlier quoted context omitted.

This was discussed literally the day wasm was announced, and Brendan Eich weighed in too: https://news.ycombinator.com/item?id=9734947

Thank you for the link, you too had a very nice discussion. However I find unsetting how Eich ends up defending WASM by hoping it's not too successful (used only in some hot pathes, not full blob apps.) That's frankly quite ridiculous: I predict a full apps adoption pretty soon. Just wait for more mainstream languages to support it. The open web in the sense the OP meant has been dead for a while, WASM is just anothe…

You'll notice that basically everyone involved with WASM agrees that it won't be used for full applications any time soon if ever. It's only people who aren't as involved who are calling for it.

WASM is not a replacement for javascript, and it's not trying to be. You won't be writing entire applications in whatever you compile to WASM, it's not how it's designed, it's not how it's meant to run, and it's worse in most ways than just compiling your favorite language to javascript (which has been possible for a long time now, but nobody uses it because it's such a leaky abstraction).

The open web is flourishing more than ever, and WASM is keeping that alive with it's "text" mode.

Re: WebAssembly 101: A developer’s first steps

#57
post #37

Earlier quoted context omitted.

> Emscripten is quite mature and compiles even very complex C/C++ code without complaining. Because it's just Clang with WASM target.

I think it's a bit more than that given that the project has amassed more than 16.000 commits so far. You must not forget that JS does not provide support for many of the things that are required to run a C program (e.g. printing), so emscripten needs to take care of providing alternative implementations for all these things.

Oh, alright. We are speaking about two different things. I was thinking about compilation and specifically supporting complex language features which are mostly handled by a compiler frontend which is this case is clang. And it seems that you are thinking about runtime libraries (or the whole tool chain).

Re: WebAssembly 101: A developer’s first steps

#58

Earlier quoted context omitted.

What I don't understand about this viewpoint is, don't all of these caveats also apply to native apps?

Political views aside, I think I understand a key difference in that, presuming one wants to run Free (Libre) software, it's relatively easy to do if you are running one of the FSF recommended Linux distributions. By contrast, if in common usage people are only running software compiled to Web Assembly, then: 1. You probably have some work to do to figure out the licensing of the code running in your browser. 2. The…

1. is identical on linux distros. How many licenses are you using right now? Probably 20+ distinct licenses as a lowball guess. It's not easy to figure this out, and if it's something you and others really want, i'm sure a standard could be thought up to be able to on-demand get a list of software licenses used in a project which could then be built into browsers similar to sourcemaps.

2. might be more possible with WASM than it is with minified JS since WASM has a text mode which is very readable.

Re: WebAssembly 101: A developer’s first steps

#59
I wonder where the world is going with this. At first glance it looks like webassembly is a potential faster replacement for javascript in the browser. However, javascript is an increasingly popular language everywhere. I'm not sure people will want to move away from it for most development. The part that is actually causing performance problems with web application is the HTML/CSS/DOM layer which was not designed as a UI widget library but as a document rendering and styling framework.

Webassembly/Webgl standardization enables the creation high performance replacements for HTML/CSS/dom.

We might end up with applications that are still mostly written in javascript but that call into new webassembly/webgl ui frameworks for rendering instead of into the html/css/dom layer.

Re: WebAssembly 101: A developer’s first steps

#60
post #16

I hope they add support for garbage collected languages soon. I don't feel like going back to work with malloc and free after 20 years.

Maybe https://nim-lang.org would make sense for you? It's GC'd but compiles to C. I've been meaning to try it out and try compiling to WASM when I get a chance.

This brings up a question I've been meaning to ask when the topic came up, because I know almost nothing about GC. How does nim (a GC'd language) compile to a non-GC'd language? And since this is a thing that's possible (unless I'm misunderstanding, which is likely), why does WASM need to add support for GC (http://webassembly.org/docs/gc/#native-gc)?

Post reply on HN