Web Assembly Working Group Charter Approved
lists.w3.org
lists.w3.org
Edit: Found the answer myself. This is part of the same effort, as mentioned in the official website of Web Assembly[2].
- Presumably there's a preference to be pessimistic on schedules so they don't have to go through the process of being re-chartered if things drag on unexpectedly.
- By the time the standard is wrapped up, you'd expect the major browser vendors to have had fully production-ready implementations for a while, just waiting on any final tweaks.
(Also, v1 is supposed to have achieved recommendation status by Q2 2018.)
It's already enabled by default FF and Chrome (since March 2017), and both pass the huge battery of standardized tests.
But two 32-bit words can span a cache line if the first isn't 64-bit aligned. So what you're doing relies on hardware supporting atomic operations not only on unaligned words, but on words spanning cache lines. Are you really sure ARM and POWER support that?
On x86 a 64 bit atomic can span cache lines.
> Are you really sure ARM and POWER support that?
Do they not?
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....
On older processors, such as ARM9 family based processors, an unaligned load had to be synthesised in software. Typically by doing a series of small accesses, and combining the results.
"The ARMv6 architecture introduced the first hardware support for unaligned accesses. ARM11 and Cortex-A/R processors can deal with unaligned accesses in hardware, removing the need for software routines."
Apart from Load-Exclusive, Store-Exclusive, Load-Acquire,
and Store-Release, addresses can have any alignment unless
strict alignment checking is enabled....
-- Section C3.2 Loads and Stores, page C3-160.
The Load-Exclusive/Store-Exclusive instructions other than
Load-Exclusive pair and Store-Exclusive pair require natural
alignment, and an unaligned address generates an Alignment
fault. Memory accesses generated by Load-Exclusive pair or
Store-Exclusive pair instructions must be aligned to the
size of the pair, otherwise the access generates an
Alignment fault.
-- Section C3.2.6 Load-Exclusive/Store-Exclusive
The Load-Acquire/Store-Release instructions other than Load
Acquire pair and Store-Release pair require natural
alignment, and an unaligned address generates an Alignment
fault. Memory accesses generated by Load-Acquire pair or
Store-Release pair instructions must be aligned to the size
of the pair, otherwise the access generates an Alignment
fault.
-- Section C3.2.7 Load-Acquire/Store-Release
The LoadLOAcquire/StoreLORelease instructions require
natural alignment, and an unaligned address generates an
Alignment fault.
-- Source C3.2.8 LoadLOAcquire/StoreLORelease
The CAS and CASP instructions require natural alignment, and
an unaligned address generates an Alignment fault.
-- Section 3.2.12 Compare and Swap, page C3-172
The LD<OP> and ST<OP> instructions require natural
alignment, and an unaligned address generates an Alignment
fault.
-- Section C3.2.13 Atomic memory operations, page C3-173.
The SWP instructions require natural alignment, and an
unaligned address generates an Alignment fault.
-- Section C3.2.14 Swap, page C3-175
I've only ever dabbled in assembly programming, but the ability of x86 to do atomic operations across cache lines is, AFAIU, rather unique. That Intel and AMD engineers are able to accomplish it relatively performantly is an incredible achievement. But it's not a handicap anybody else wishes to adopt and then compensate for.Having usable and capable _SCRIPTING_ language for web was the biggest achievement of the whole Web 2.0 push, now the browsermaker is about to reverse that
https://github.com/WebAssembly/spec/blob/master/papers/pldi2...
But it doesn't stop there: the worst possible outcome of WASM is that entire custom browser runtimes are being pushed to you [1]. Say goodbye to content linking, sharing, saving, translation, accessibility, ad blocking, etc. Not to mention content will only work on the bundled WebKit version.
WASM is user-hostile and anti-Web. What does it even mean that W3C "approved" a working group? I thought WASM was a WHATWG thing. W3C shouldn't lend what's left of its credibility to it.
That is already posible without WASM. But it's not done because it hurts search engine scores.
For the same reasons all the other kinds of web applications are not developed as native apps as well. Hint: it's not only about speed. Some of the main reasons web apps are winning over native apps is easy of distribution, updates and being multiplataform. And it's being increasingly harder to force javascript to behave as a general application programming environment.
If we ever come to the point where all you need to develop a web browser is a wasm vm, don't you find exciting how much simpler a web browser would become? At the moment it is one of the most complex pieces of software out there. It is so hard to build a modern web browser from scratch nowadays that doing so as a hobby would take a lifetime. This takes the power away from individual developers, since it's not very realistic to build a new browser unless you are a big corporation with money to spare.
This situation also poses a big problem for the development of new operating systems. If your shiny, awesome, new research open source OS does not have a modern web browser, it will never reach wide adoption and thus never atract enough developers to build critical mass. The alternative is to make your OS compatible with POSIX and thus reuse the work of others so that you can build existing web browsers. But then you are most likely bound to become just another unix/linux alike, thus hindering innovation.
I am currently developing a new kind of operating system using nothing but web technologies (ie, it is technically a single-page web app). It might not be the same kind of legacy hardware-centric operating system that most techies fret over, as I am just interested in "userland" ideas (ie, what new kinds of applications can we build, using what new kinds of higher-order abstractions). IMO, the kinds of research programs you are thinking of are really, practically speaking, solved problems.
Also, my OS is compatible with POSIX, as it is the first (that I know of) Javascript implementation of IEEE Std. 1003.1 (Shell Command Language).
The project is called "Linux on the Web" :
~or~
- https://linuxontheweb.appspot.com
As individual developers, we really need to start thinking of web browsers as the hardware layer, virtualized as it may be. Just as the scripting languages of the early 90's allowed us all to start thinking at higher levels at the language layer, modern web browsers allow us to start thinking at higher levels at the OS layer.
But you're not removing complexity, just moving it into the wasm-based runtime, and in the process it removes the power that comes with building the browser, which is shaping how the user sees and interacts with websites.
If every website is a blob of code that you have to execute as a black box, what's the point of writing your own browser? It'll just be a slower copy of every other, since all the potential for making it different has been taken away.
A very insightful comment
Browsers are becoming out of control behemoths.
As much as I hate all the "javascript required to render text" sites out there, I can't agree. Scripting has its uses, and a proper environment will not only make it easier to deal with those accessibility and compatibility problems, it will also make it easier for browsers to sandbox those scripts so they won't mess with your computer.
Ordinary native apps are not safe.
The fact is, this web assembly stuff could be seen in some ways as a response to the walled gardens being built by each vendor right now. I prefer native apps too, but if we're going to have walled gardens, why not one big one we can share.
Wasm is the first time we will get cross platform and fully sandboxed native speed code.
None of what you speak of has anything to do with wasm. You can do all that just fine with JavaScript. We've had that world ever since browsers allowed disabling right clicking. Even before js, you could always distribute your webpage as an image if you wanted that. Wasm just let's you run code faster. It doesn't change anything.
Here they are:
1. A sandbox can have bugs, and they do have them
2. Sandboxed environments have to give huge reach of system api's anyways, and you can do a lot with them
3. There are classes of vulnurabilities that sandboxes can't do anything about: instruction level exploits, hardware bugs, "gpu frying webgl shaders"
4. Human factor (see comments about "run anyways" above)
It does not matter weather your language compiles to JS or WASM, and it does not matter what the browser executes.
Some troubleshooting methods will change, the ability to view source will be reduced, performance will be increase, safety will increase...
And many more subtle things. I agree it is a huge win, but there are some (minor) negatives.
Sandboxing as such will not help you to any degree with that. People promoting sanboxing as a universal solution have poor knowledge of computer security
That is only discouraging people from expressing their opinions.
It does sound like we're headed for some fragmentation here. That list will allow for other scripting languages to run on browsers without having to download a huge runtime, and to interact with the DOM just as JavaScript does. Wasm starts to look more like a multipurpose VM versus looking like ASM.
Yes, you can hack around and push an entire runtime now. There's a reason nobody is doing that. It isn't practical, performant, or a good experience.
Here's Brendan Eich's quote on the matter:
"Certainly GCC or similar could generate wasm, but I think to get to the dynamic languages, like I mentioned Dart, or Ruby, or Python, even JavaScript — that’s gonna require some extensions that I mentioned earlier, like: garbage collection hooks, JIT support, things like that. Otherwise they just won’t be competitive."
Web browsers are currently (to take a reductionist view) just VMs with the ability to also view traditional HTML pages. Java had the right idea with its run-anywhere code and the JVM; it was just a bit too early to the party, and didn't have an HTML viewer to get its foot in the door.
Well, it kindof had one ([1], [2], [3]). Rhino JS (still used all over the place; for example by Google's closure compiler) originated from that time.
[1]: https://en.wikipedia.org/wiki/HotJava
[2]: http://jazilla.sourceforge.net/pmwiki.php
[3]: https://docs.oracle.com/javase/7/docs/api/javax/swing/JEdito...
Having more of Java in JavaScript is bad. Turning browser into a VM is just a recipe to bring pretty much every problem inherent to VMs to web development
It was fine for displaying a "Hello dear user please enter your name" dialog in the 90s.
Now we are just joking ourselves pushing ASCII program code for full-blown web applications down the wire to the user.
If WASM isn't making that any better, it's not making it any worse either.
>full-blown web applications
Well, for underhanded "premium plugin" devs, this opens opportunities. I understand your position.