Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

61–70 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#61

Earlier quoted context omitted.

some of the compute workload still needs to be on a backend because of security concerns. if you offload too much stuff on a client-side, then any hacker can mess with it and break your system. for example you can get angular debugger extension for chrome and mess with any online shop that uses this system to "adjust prices" for your cart during checkout

the backend could compile to wasm as well.

and what is the profit in compiling C/C++/Rust into wasm, instead of native binary code?

Re: WebAssembly becomes a W3C Recommendation

#62

Earlier quoted context omitted.

That's just replacing trash with rubbish.

What would you prefer then, Lua, with its 1-based arrays? Python is a mature, universal, versatile, insanely popular dynamic language with a nice syntax. It fits the bill perfectly.

If indexing arrays starting at 1 is a big problem, either the language is fantastic or you aren't challenging yourself. Programming gets a lot harder than that.

Re: WebAssembly becomes a W3C Recommendation

#63

Earlier quoted context omitted.

There is currently no path for any of that. No rendering without a DOM, and no opening WASM files by themselves. The same is true for JavaScript... if you open a JavaScript file, you just see the source code. Of course, why not just use a small HTML+JS shim for your WASM?

Because there is value in ditching legacy cruft.

You still capture the vast majority of that value by having a minimal “legacy cruft” loader that sets up, and passes control to, the modern toolchain

Re: WebAssembly becomes a W3C Recommendation

#64

It's really uncanny how Gary Bernhardt predicted it all [0] a few years ago. [0] https://www.destroyallsoftware.com/talks/the-birth-and-death...

Seems like the obvious next step is using WebAssembly outside the browser so we can really go full-circle on this one

EDIT: some quick googling shows it's already being done

https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...

Re: WebAssembly becomes a W3C Recommendation

#66

Earlier quoted context omitted.

You can take a Canvas element and draw anything you like on it - even hardware accelerated 3d using webGL. I think there are some projects trying to (re) implement a 2d user interface, rendered onto canvas. However the issue id that you will need to reimplement a lot of things the browser already does for you: rendering text, scaling, zoom, input methods, highlighting text, accessibility features, etc... Unless you u…

Mostly I was just curious, although I could see one argument for it. HTML/DOM was meant to display interactive documents, which is far smaller in scope than what browsers are used for today. A lot of the web today (web applications in particular) are therefore hacks of HTML. I know that the standard has responded to these uses by incorporating more application-level features, but IMO this has become burdensome and bl…

> You could argue for an alternative to html/DOM - some kind of rendering format that is meant specifically for full-featured applications.

Well, there are three ways to do that. You can use a 2D canvas, you can use a WebGL canvas, or you can use a bitmap canvas. This is roughly equivalent to what you get when you’re programming a desktop application anyway. This is a cornucopia of alternatives here! I’m having a hard time understanding what is missing.

These “use the DOM” in the same sense that desktop applications use the window manager. You’re just drawing into an element in some compositing system. This is fine, there’s no real benefit to bypassing the DOM—like window managers, you can bypass the compositor when possible and go through the compositor when unavoidable. This is transparent to the application programmer.

Re: WebAssembly becomes a W3C Recommendation

#67

Earlier quoted context omitted.

You can take a Canvas element and draw anything you like on it - even hardware accelerated 3d using webGL. I think there are some projects trying to (re) implement a 2d user interface, rendered onto canvas. However the issue id that you will need to reimplement a lot of things the browser already does for you: rendering text, scaling, zoom, input methods, highlighting text, accessibility features, etc... Unless you u…

Mostly I was just curious, although I could see one argument for it. HTML/DOM was meant to display interactive documents, which is far smaller in scope than what browsers are used for today. A lot of the web today (web applications in particular) are therefore hacks of HTML. I know that the standard has responded to these uses by incorporating more application-level features, but IMO this has become burdensome and bl…

React and friends solves that problem for you. It was designed to be a UI layer for web apps. It does use the DOM at the end, but you are not managing it anymore.

I don't think the downplay of HTML/CSS (referring to it as hacks) is valid just because 30 years ago it was about document delivery. You have to start somewhere. It took a while and it made some people fed up with it, I've seen that. I still have some PTSD from hacking IE6, those were the real hacky days. Nowadays most stuff just works.

What we have as a spec is the lowest common denominator that passed the test of tons of communities and companies, and from this perspective it's incredibly successful.

Re: WebAssembly becomes a W3C Recommendation

#68
post #7
post #6

Another nail in the Java coffin? I hope if doensn't refuse to die (again)

Don't you mean JavaScript? This will have 0 effect on Java at this point since it isn't used in the browser anymore.

For me Java is legacy. A good runtime for the web will have a lot of developers worldwide. I am betting on it not just for the web, but to replace legacy apps as soon as we get a good runtime not just for the web.

Probably Electron can be one of such new runtimes

Post reply on HN