Slashdot Mirror


WebAssembly: An Attempt To Give the Web Its Own Bytecode

New submitter Josiah Daniels writes with this kernel from a much more detailed article at Ars Technica about what already looks like a very important initiative: WebAssembly is a new project being worked on by people from Mozilla, Microsoft, Google, and Apple, to produce a bytecode for the Web. WebAssembly, or wasm for short, is intended to be a portable bytecode that will be efficient for browsers to download and load, providing a more efficient target for compilers than plain JavaScript or even asm.js

8 of 126 comments (clear)

  1. Makes Perfect Sense by cmorriss · · Score: 4, Insightful

    This is ultimately where the browsers need to go. Many have tried in the past, but always from some side angle assuming that it had to be through a plugin or had to use Javascript as the underlying byte code, e.g. GWT. This could finally allow a wide array of languages to be used to build web applications, similar to the explosion of languages that now run on a JVM.

    --
    10 minutes working on a sig. What a waste.
    1. Re:Makes Perfect Sense by Anonymous Coward · · Score: 5, Interesting

      No. We need to completely abandon this aspect of the browser. Desktop applications are far, far better and their toolkits are far better. What we need is excellent sandboxes so you can download any program and run it without fear of destroying your system. Doing everything as web apps only makes the installation process easier. It makes everything else harder. Instead of trying to make everything else easier, we should be making the single task of installation easier and safer.

      Everything the web is doing already exists in 'real' applications, they're just reinventing everything badly in an attempt to get around HTML shortcomings. The easy solution is to drop back to real applications running with similar restrictions as web pages have. We used to have that but the sandboxes had too many holes. Please just make better sandboxes instead of turning everyone's browser into more of an OS.

  2. Back to the future .. by nickweller · · Score: 4, Insightful

    Java virtual machine (JVM)

  3. Re:Too slow by jbeaupre · · Score: 4, Funny

    If you'd submitted it in some sort of compressed, machine readable format, it would have been faster.

    --
    The world is made by those who show up for the job.
  4. Here's a FAQ for slashdotters by goruka · · Score: 5, Informative

    1) Why is this needed?

    With the removal of binary plugins in Chrome and Edge (and soon to happen on Firefox), a way to code at native performance in the browser is still needed. Mainly to run high performance games, audio software, etc. You may not want it, but a lot of people consumes this content so there is a large industry behind it.

    2) Why not asm.js?

    This is almost the same as asm.js, except it's precompiled, so it' s more efficient for Javascript engines to JIT or AOT. Currently, compiling large asm.js codebases results in a large download and resource intensive compilation.

    3) How is this different from Java, Flash, Silverlight?

    It is different because:
    A) It' s a w3c standarized effort
    B) All the big players are behind it (Google, Mozilla, Microsoft and Apple)
    C) It relies on the browser security model, it does not bypass it
    D) It' s a low-level bytecode, more so than AS3, JVM or Silverlight, so it can run any language.
    E) It runs in the same "space" as the DOM, it's not a separate/embeeded app.

    4) Isn' t this unsafe or a new attack vector?

    No, it relies on the same browser security model as Javascript, so It's as dangerous as having Javascript enabled. Read up on how PNACL works for material on why this is not unsafe.

    5) Will it replace Javascript?

    It is not intended to, but it gives developers the same API with the ability of writing in any language, even C++, so developing a website using tools such as Qt will become possible (efficiently at least).

  5. Re:Guys, you're losing it by viperidaenz · · Score: 4, Informative

    You're confused about Java
    The byte code is compatible.
    Code compiled in the first ever Java compiler will run on the latest JVM. There have been a few additions to the byte codes, so it doesn't always work the other way.

    If you really want your new code to work in old JVM's all you need to do is set the compiler compliance level.

    You don't need to down-grade a JVM for it to correctly interpret byte code from an old compiler.

    The compatibility problems come with changes to the run-time libraries. Byte code has nothing to do with that. Compiling from source won't fix it.

  6. Re:The Web needs a lot of things by quietwalker · · Score: 4, Informative

    I have also been saying this for years.

    It's nice that HTML and CSS were accessible to the masses, and without their simplicity, we could never have reached the level of adoption we now have. See the argument over the MEDIA vs. IMG tag from way back for a good example of that. However, now, that additive simplicity is holding us back.

    What we need is a language with flow control, variables, functions, templating, the whole 9 yards. Not just on top of HTML & CSS, but as part of it. So we can dynamically change the size of page elements based on other page elements (think layout managers) without making incredibly complex and highly specific css for a variety of media screen sizes. Common features like centering a dialog box or a three-column display with header and footer sections shouldn't be a hack you need to ferret out, that may behave badly with long or short pages. It'd be nice to explicitly link action management with page elements and avoid much of the code required to identify actors and route events. Heck, some sort of built in asynchronous request mechanism might be nice, rather than having to write custom javascript each time.

    What we don't need is another life support extension to a markup language.

  7. Re:The Web needs a lot of things by viperidaenz · · Score: 4, Insightful

    Have you tried the latest framework, Vanilla JS? It's faster and more efficient than any other framework.