Live data from Hacker News

WebAssembly: a binary format for the web

2ality.com

31–40 of 164 posts

Re: WebAssembly: a binary format for the web

#31
post #28

What does this mean for compile-to-js languages, like Clojurescript, Elm (and ES2015 one might argue)?

So far, not much. Clojurescript, Elm and most others assume that JS is taking care of garbage collection for them. Meanwhile, WebAssembly so far does not include GC support. If someone were to implement a custom GC for Elm on top of wasm's "here's a big array of bytes" memory model, it would be very interesting indeed. But, at the moment wasm is primarily a target for C/C++.

Re: WebAssembly: a binary format for the web

#33
post #11

Earlier quoted context omitted.

All of which are functionally the same Blink-based browser, so you're splitting a really fine hair.

Okay, so let's examine the remaining browsers, shall we? Safari and IE/Edge automatically don't matter because they are exclusive to their respective [proprietary] host operating systems. That leaves Firefox. Does anyone really think there is legitimate competition between Chrome and Firefox anymore? I mean don't get me wrong, Firefox was a godsend in the bad old days of M$IE domination... But this is 2015, and Googl…

What? Whether or not a browser matters depends on the amount of people using it, not on whether you can install it on several operating systems.

Re: WebAssembly: a binary format for the web

#34
As far as the intersection of (innovation in web technology) and (innovation in programming languages) is concerned, I think the focus on performance is like going backwards in time, perhaps to the mid 90s.

I feel like these innovations are being turned into a kind of "social media spectacle" with relatively little discussion of what innovation really means in this context.

For example: I don't understand why Python, JavaScript, Java, Ruby, and so on have not delivered tools that ease the path for those who wish to write applications designed to run code from untrusted sources. I think this would make the web a lot more competitive and overall healthier as an independent institution.

(Yes I understand JavaScript is code from an untrusted source that runs in a sandbox on your computer, the browser client; in this context I'm referring to the ability of a JavaScript web app to load objects (from a JavaScript source code file hosted on ANY domain, in defiance of XSS dogma) which the browser client guarantees does not exceed the bounds of a specified "sandbox" built to spec, a "security envelope" for loading and evaluating code. For example the ability to tell the client, "execute procedure P with arguments A, but kill it if it runs for more than 0.5 seconds of CPU time or allocates more than 500 MB of memory" or "only load this source code as long as the global variables it uses is on this list: ..., the names of properties is uses is on this list: ..., and it refrains from using the following syntactic keywords: ...)

Python put up a warning against its own "restricted execution" a long time ago: https://docs.python.org/2/library/restricted.html

In the age of GitHub, why is there no interest in building infrastructure that allows programmers to define such "security envelopes" for JavaScript, Python, C, and so on and create systems which are composed of mutually distrusting modules which would, I think, simplify reasoning about their security characteristics?

Re: WebAssembly: a binary format for the web

#36

As far as the intersection of (innovation in web technology) and (innovation in programming languages) is concerned, I think the focus on performance is like going backwards in time, perhaps to the mid 90s. I feel like these innovations are being turned into a kind of "social media spectacle" with relatively little discussion of what innovation really means in this context. For example: I don't understand why Python,…

Because they shackle implementations too much. Every time you increase restriction glanularity, you make someone else's life harder. With every restriction or policy you introduce, you've actually increased the implementation's own attack space: you can't stop worrying about validation mechanisms further down the stack, but you now also have to maintain a new set of validations. That's a lot of extra work; given that security is a trade-off, the trade-off in this case is likely not worth it.

Re: WebAssembly: a binary format for the web

#37

As far as the intersection of (innovation in web technology) and (innovation in programming languages) is concerned, I think the focus on performance is like going backwards in time, perhaps to the mid 90s. I feel like these innovations are being turned into a kind of "social media spectacle" with relatively little discussion of what innovation really means in this context. For example: I don't understand why Python,…

> "For example: I don't understand why Python, JavaScript, Java, Ruby, and so on have not delivered tools that ease the path for those who wish to write applications designed to run code from untrusted sources. I think this would make the web a lot more competitive and overall healthier as an independent institution."

I don't understand what you mean. Can you elaborate?

Re: WebAssembly: a binary format for the web

#38
post #12

From Java applets to Java applets in twenty years.

Except with C++ instead of Java and the DOM instead of Java API's.

Not sure if serious... This comment translates to "except without garbage-collection, and with a loose set of inconsistent and constantly-changing interfaces instead of One Sanctioned Spec."

Re: WebAssembly: a binary format for the web

#39
post #23

can you go back to source code from WebAssembly binary? I dont want a web that serves me obfuscated binary blobs.

No, but one of the goals of WebAssembly is to have a textual representation, so in theory you could still View Source. Not sure how that'll work out in practice, though.

doesnt need to be the original source, as long as every browser has some form of decompiler to high level language (C like) Im good. But I cant imagine a future where we are served blobs with no way of knowing whats inside.

Re: WebAssembly: a binary format for the web

#40
post #12

From Java applets to Java applets in twenty years.

Java applets were slow to load because fast loading was never made a priority. WebAssembly is prioritizing small size and fast loading.

Java Applets were completely isolated from the surrounding web page, and vice-versa. I tried writing XEyes as a Java Applet back in the day, but the eyeballs could only follow the cursor while the cursor was directly on top of the applet's rectangle. WebAssembly operates on the single unified DOM and its event model.

Because it uses the DOM, the text and widgets are real. The text is selectable, looks like regular text, etc. Java Applets had their own GUI/widgeting system that looked bad and behaved differently.

Post reply on HN