Live data from Hacker News

Build Your First Thing with WebAssembly

cultureofdevelopment.com

41–50 of 58 posts

Re: Build Your First Thing with WebAssembly

#41

Earlier quoted context omitted.

The idea is that we will be able to write web applications in a sane, proper language like C# or similar, and then compile to Web Assembly. I, for one, embrace this idea whole heartedly.

I can respect that. However, my point is, are you a web developer who primarily writes code for the web at your day job. Anecdotally, I haven't seen a lot of overlap between people writing web applications and C# developers. I have seen a lot of C family devs think this is awesome, but have no plans to actually develop directly for the front-end web. edit: the first major demonstration was Unity's angry bots accordin…

Web Assembly is exciting to me precisely because I'm not a web developer, and the whole idea of being a web developer as distinct from any other kind of developer is a bit absurd, especially considering the ubiquity of the web and the fact that it basically means you're a JavaScript programmer of some variant. Your language choice shouldn't determine your infrastructure.

Re: Build Your First Thing with WebAssembly

#42
post #7

On one hand, I want to bash WebAssembly because it takes away our ability to see what we're running on our own PCs. On the other, it helps us slowly get away from the mess that is modern JavaScript.

I think "this javascript mess" is largely bourne out of an attempt to mitigate content blocking. asm.js is pretty fast and I am not sure how much improvement wasm will provide, but if given access to more of the low-level environment I am concerned advertisers will implement maliscious code and pop-ups in wasm that is non-trivially blocked.

It's the same VM as JS, so why would it be any less secure?

Re: Build Your First Thing with WebAssembly

#43

I suspect webassembly will fail miserably. If it succeeds anywhere it will be for gaming applications. I could be totally wrong, but most web developers who build applications and sites will not be likely to embrace this given the leverage JS provides and the simplicity of use. Again, I am not extremely against wasm, but this writeup is pretty well done and my take away was that it was non-trivial to pickup, buggy an…

It's not even released yet. Of course it will be buggy and poorly documented.

Re: Build Your First Thing with WebAssembly

#44
post #41

Earlier quoted context omitted.

I can respect that. However, my point is, are you a web developer who primarily writes code for the web at your day job. Anecdotally, I haven't seen a lot of overlap between people writing web applications and C# developers. I have seen a lot of C family devs think this is awesome, but have no plans to actually develop directly for the front-end web. edit: the first major demonstration was Unity's angry bots accordin…

Web Assembly is exciting to me precisely because I'm not a web developer, and the whole idea of being a web developer as distinct from any other kind of developer is a bit absurd, especially considering the ubiquity of the web and the fact that it basically means you're a JavaScript programmer of some variant. Your language choice shouldn't determine your infrastructure.

> You language choice shouldn't determine your infrastructure.

Of course. I am a js dev and work mostly with nodejs. However, I would push back here and say that JS is the only real choice for web development as you must code for a browser which most often interprets html/css and js. So not surprisingly, and especially with the proliferation of nodejs, all the people writing code for the web are javascript programmers. React, Angular, VueJS, Meteor ect all provide rich javascript frameworks/libs for writing web applications and a full stack can be written with a single language.

My point is that asm.js seems to provide a lot of leverage as an option and internet speed and machi ne resources also are improving. I would not say that the web, the browser or the current situation is ideal-- far from it, but webassembly seems like a very small improvement patch. It basically allows games devs who want to code specifically for the non-mobile browser to have slightly better performance by learning a very obtuse new language paradigm that is brand new.

- It doesn't improve on marking up apps in IBM markup language from the 60s which was originally developed for research papers.

- It doesn't improve security. I think it may actually be net bad for security given the obfuscation.

- It is targeted at a very narrow community

- It is largely embraced and championed by people who do not currently write web apps. It is unclear if their enthusiasm will carry over to them actually coding in it.

The web ecosstem is horribly broken. I would love something as innovative as javascript to come along again, when Eich put Scheme into the browser people were very excited. They could do something new and 10x better than previously possible. Given that there are such glaring problems in with the web right now (and I do admit performance is one of them) this marginal improvement, if indeed it proliferates and in fact does improve things, seems so minimal at a pretty steep cost to learn it, that I don't find it exciting and expect it to have virtually no impact.

They should do so much more than this. Imagine even if browser companies put a python or ruby interpreter (or even a native c++ one) into the browser. Imagine all the possiblities of adding natice scss support, limiting or removing very old unused feature support and refactoring the codebases. ect. Imagine not using 1960s era research paper syntax to write a web app. There is so much room for improvement that making something that requires me (and so many others) how to write applications for very little benefit will be met with crickets. or extreme enthusiasm from people who don't write web apps and never will, but find it reminiscient of their mem-mgmt c-like language they use for mobile or systems programming.

Re: Build Your First Thing with WebAssembly

#45

Nice investigation! A minor point about your description of wasm: "WebAssembly or wasm is a bytecode specification for writing performant, browser agnostic web components." The term "web components" already has a pretty specific meaning referring to the in-progress specs for custom html ui elements and surrounding technologies (see https://developer.mozilla.org/en-US/docs/Web/Web_Components ). You probably don't want…

That's fair. Originally asm.js was named capsule.js but that was taken and didn't really mean what it was. We could also call it modules but there is another very related spec out there for that as well. What would you call it instead?

Web libraries?

Re: Build Your First Thing with WebAssembly

#46

Earlier quoted context omitted.

I think "this javascript mess" is largely bourne out of an attempt to mitigate content blocking. asm.js is pretty fast and I am not sure how much improvement wasm will provide, but if given access to more of the low-level environment I am concerned advertisers will implement maliscious code and pop-ups in wasm that is non-trivially blocked.

It's the same VM as JS, so why would it be any less secure?

I am not sure exactly how it can be implemented, but I imagine that compiling and serving a binary file could allow for some maliscious things. My biggest worry is that many content blockers override js and search scripts for keywords and functionality which they muitigate. I could see a binary file executing code which provides pop-ups, advertisements or drm which would be harder to eliminate than it is now.

I am not 100% sure if this is true, but it seems possible.

Re: Build Your First Thing with WebAssembly

#47
post #41

Earlier quoted context omitted.

Web Assembly is exciting to me precisely because I'm not a web developer, and the whole idea of being a web developer as distinct from any other kind of developer is a bit absurd, especially considering the ubiquity of the web and the fact that it basically means you're a JavaScript programmer of some variant. Your language choice shouldn't determine your infrastructure.

> You language choice shouldn't determine your infrastructure. Of course. I am a js dev and work mostly with nodejs. However, I would push back here and say that JS is the only real choice for web development as you must code for a browser which most often interprets html/css and js. So not surprisingly, and especially with the proliferation of nodejs, all the people writing code for the web are javascript programmer…

You could say the same thing about any assembly language though. But they are still important, even if only a few people need to truly master them. The main advantages web assembly should provide are that it be a simpler target for compilers, minimizes overhead for doing so, and that its performance be independent of that of a higher-level-language like javascript.

All the things you want require a standardized, performant web assembly to meaningfully and portably implement.

Re: Build Your First Thing with WebAssembly

#49
post #6

Earlier quoted context omitted.

That's fair. Originally asm.js was named capsule.js but that was taken and didn't really mean what it was. We could also call it modules but there is another very related spec out there for that as well. What would you call it instead?

Object files? https://en.m.wikipedia.org/wiki/Object_file Of course the term "object" is confusingly overloaded too...

web object file?

Not like anyone aside from Apple uses WebObjects seriously anymore...

Re: Build Your First Thing with WebAssembly

#50

Earlier quoted context omitted.

It's the same VM as JS, so why would it be any less secure?

I am not sure exactly how it can be implemented, but I imagine that compiling and serving a binary file could allow for some maliscious things. My biggest worry is that many content blockers override js and search scripts for keywords and functionality which they muitigate. I could see a binary file executing code which provides pop-ups, advertisements or drm which would be harder to eliminate than it is now. I am no…

Serving a binary file is in principle no different than serving a string file. What can be done with WebAssembly today can most likely also be done with asm.js.
Post reply on HN