Live data from Hacker News

Compiling to WebAssembly: It’s Happening

hacks.mozilla.org

41–50 of 225 posts

Re: Compiling to WebAssembly: It’s Happening

#41
post #37

I suspect too many web applications are going use WebAssembly to obscure their code and the way they work, thus making it impossible to learn by studying their code. As someone who learned programming mostly by looking at other people's code, I'm afraid the web will change in a way that would make it a lot harder to do so.

Being able to view source is a design goal of WebAssembly, according to [0].

If an organization doesn't want you reading their JS, there are already plenty of tools to make it nearly impossible as-is. Do you really learn anything from reading minified, obfuscated code? At some point you're just reverse engineering, which is obviously still possible with WebAssembly.

'Open source by default' is a problem to be solved at a cultural level, not a technical one.

[0] https://github.com/WebAssembly/design/blob/master/FAQ.md#wil...

Re: Compiling to WebAssembly: It’s Happening

#42
post #37

I suspect too many web applications are going use WebAssembly to obscure their code and the way they work, thus making it impossible to learn by studying their code. As someone who learned programming mostly by looking at other people's code, I'm afraid the web will change in a way that would make it a lot harder to do so.

Basically, you took it for granted that web had source as the binary, unlike the rest of the world (native binaries are not the source).

You'll still be able to find and read source of open source web projects, like like you can for open source non-web projects.

> 'Open source by default' is a problem to be solved at a cultural level, not a technical one.

Highly agree.

Re: Compiling to WebAssembly: It’s Happening

#44
I'm very interested in compiling Go to WebAssembly. Based on what I read, it seems that so far you can primarily try it with C/C++ code.

If one were to build a Go -> WebAssembly compiler, what are good routes to take? I can see there's going to be multiple possibilities.

Re: Compiling to WebAssembly: It’s Happening

#45
YES YES YES!!! OMG! THANK YOU <3 <3 <3 I've been waiting so long for this! Maybe my dream of running native Lua on the browser will come true? Will I already be able to run Lua's interpreter now? :D :D Gonna look deeper into this as soon as I have time, omg so excited <3

Re: Compiling to WebAssembly: It’s Happening

#46
post #6
post #3

Web assembly always makes me a little sad. It feels like we are going back to flash only it won't be bad this time, I promise, no really. I always feel like the most obvious use for it is to start writing truly hateful and abusive code. I'm sure this is because I'm getting old.

The important use case is to allow people to write web applications with their language of choice, instead of horrible javascript. And get near full performance.

I think that's like saying: "I prefer to use the hammer instead of the screwdriver" for something with a helical ridge.

You are better off re-inventing Java or Python, but in a container and streamed over the Internet from an URL.

Re: Compiling to WebAssembly: It’s Happening

#47
post #3

Web assembly always makes me a little sad. It feels like we are going back to flash only it won't be bad this time, I promise, no really. I always feel like the most obvious use for it is to start writing truly hateful and abusive code. I'm sure this is because I'm getting old.

The big difference is that WebAssembly can only do what Web APIs allows it to do. You'll have to do the same AJAX calls, the same DOM manipulations as with Javascript. There is no plugin here.

> I always feel like the most obvious use for it is to start writing truly hateful and abusive code.

Sure, but it will also developers to have a better experience by allowing them to chose the language they want, and not to be forced to use JavaScript. Choice is good, it's something you cannot deny.

Re: Compiling to WebAssembly: It’s Happening

#48
post #3

Web assembly always makes me a little sad. It feels like we are going back to flash only it won't be bad this time, I promise, no really. I always feel like the most obvious use for it is to start writing truly hateful and abusive code. I'm sure this is because I'm getting old.

We will eventually come to terms with the fact that Flash was 15 years ahead of everything else on multiple fronts and we ought to have been just chastised the terrible developers doing awful and horrendous things with pretty technically sound software.

Re: Compiling to WebAssembly: It’s Happening

#49
post #3

Web assembly always makes me a little sad. It feels like we are going back to flash only it won't be bad this time, I promise, no really. I always feel like the most obvious use for it is to start writing truly hateful and abusive code. I'm sure this is because I'm getting old.

Many of the worst parts of flash had to do with (IMO) the single-source nature, that is to say Adobe. Flash is using all your RAM? Flash is slow? Flash is hard to develop good UI for and integrates poorly in browsers? Too bad, it's Adobe's runtime & plugin, or nothing.

Re: Compiling to WebAssembly: It’s Happening

#50
post #29
post #15

WebAssembly lets people write in C++, Ruby, Python, etc and for that code to work in the browser like Javascript does at the moment. Am I correct?

Mostly. The initial target is C++ and similar languages, and it will not have DOM access, but using suitable libraries (libc, SDL, etc., for example emscripten's) you can write a normal C++ program and have it run in the browser. You can also run Ruby and Python in the browser by just compiling their C or C++ VMs. But that won't still work "like JavaScript" - their objects won't be native VM objects in the browser, i…

Thanks for the explanation
Post reply on HN