• melfie@lemy.lol
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 hours ago

    WASM 3.0 just published in September includes garbage collection, and the upcoming WASM 4.0 will include support for true threading. Those are pretty key features for widespread adoption.

  • Darkmoon_AU@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    12 hours ago

    What happened to it!? It’s a new technology in the early stages of adoption. A little patience…

  • treadful@lemmy.zip
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    2
    ·
    2 days ago

    This makes questions like “how fast is WebAssembly” a bit hard to answer. […] What people actually mean is “how useful are the constructs of this language to efficient mappings of modern hardware” and “what is the current landscape of systems taking advantage of these constructs”.

  • AudaciousArmadillo@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    5
    ·
    2 days ago

    For many of these, WebAssembly is critical to either their entire product or a major feature.

    But I think this alone is not very convincing. We don’t yet see major websites entirely built with webassembly-based frameworks.

    Why should it be necessary to build things only in wasm for the web? JS is a really good language for building frontends. There is a reason why lots of companies prefer building native applications with React. People always complain about framework bloat with JS, but then we want to hype up shipping huge wasm binaries? Just for basic interaction in a UI?

    Wasm is doing great, inside and outside the browser. But it won’t replace JS because there’s no reason to do so.

    • MagicShel@lemmy.zip
      link
      fedilink
      English
      arrow-up
      23
      ·
      1 day ago

      I agree with your gist but…

      JS is a really good language for building frontends.

      Disagree. I think there is an entire ecosystem built out of coping with it being an awful language. That being said, the ecosystem is pretty good at adding first class features to a third rate language and your points stand. I don’t want anything to do with JS in the back end, though NodeJS isn’t entirely awful.

      • unalivejoy@lemmy.zip
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        23 hours ago

        Its not the language that’s good but the web apis. Many of them iirc aren’t available in webasm.

  • Nighed@feddit.uk
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 day ago

    I played around for a while with Blazor (C# Web assembly) and wasn’t a massive fan.

    The debugging experience was awful.

    Lots of runtime gotchas, it’s limited to one thread, so anything that creates a thread will fail at runtime (but not ‘normal’ async stuff). What code creates a thread? No idea until it fails at runtime.

    Yes, you can share a dto project between front end and backend, but anything else will eventually trip you up.

    It’s still a cool idea though, will try it again at some point.

  • user28282912@piefed.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 day ago

    It seems to just be more attack surface for very little actual gain on JS. At least with JS I have NoScript, Ublock and some actual say over what loads/runs on my box. For this reason, I usually just disable all wasm/webgl/webrtc until I find out that I actually need it which for me is basically never or only for very short periods.

    • Axolotl@feddit.it
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      10 hours ago

      Noscript do block wasm

      wasm allow to make sandboxes which are more secure ways to run code; I’d say that wasm is also useful outside the web because you can use it to allow sandboxing addons for your software

  • whaleross@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 days ago

    It is used where it is applicable. For regular web pages it is overkill that only complicates everything with no gain at all.

  • theherk@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    3
    ·
    2 days ago

    Great article. I think wasm is one of the more interesting things to happen in the last few decades in computer science, though there are many. I think it’s here to stay for sure, but am always curious where the adoption curve will go.

    • jungle@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      2 days ago

      I don’t know much about wasm, but isn’t it the equivalent of bytecode? That’s just a compiler and an interpreter. How is that a significant development in the last few decades in CS?

      • orclev@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        22 hours ago

        It’s a workaround for the historical trash fire of JavaScript in the browser. Since nobody could agree on a way to do something other than JS in the browsers they came up with this gradual replacement where initially WebAssembly was just a special version of JS, then they turned that into a bytecode interpreter. The end goal was to let you use any language as your browser scripting language but the implementation isn’t there yet. It’s pretty painful to do anything with the browser APIs via WebAssembly because you’re still using the terrible JS APIs rather than something more ergonomic for the language you’re using and you need to write JS shims around all your non-JS code.

        Basically it’s a start, but it falls short of what’s needed. Since you end up needing to write a bunch of JS anyway you’re mostly just creating more work for yourself rather than being able to avoid JS in the first place.

        That said, by accident it’s also created something close to a universal bytecode since a very wide variety of languages support compiling to WebAssembly.

      • theherk@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        1 day ago

        It isn’t interesting for being bytecode. Rather for being the first universal sandboxed runtime for the browser and elsewhere. Being able to write in many languages and compile to wasm targets is awesome. Safety guarantees and performance are both great too. And it can run in tiny environments.

        • nyan@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 day ago

          Except that it isn’t really the first iteration of any of those things. Java did most of 'em more than a quarter century ago: browser-embedable, multiple languages could target the JVM, and, yes, sandboxed—the only issue was startup (not runtime) performance. That wasm doesn’t share those startup performance woes makes it useful, but not revolutionary.

          As for tiny environments, a typical desktop system from around 1999 is somewhat similar to a Pi Zero W in terms of ability.

          • Rekall Incorporated@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            13 hours ago

            I would imagine a Pi Zero is significantly more powerful than a 1999 desktop system.

            Pi zero has a 1Ghz single core and 512 MB RAM. 1999 would be a P3, which started out from 500 MHz and I believe RAM was less 512 MB at that points.

            And that’s just high level figures, that ignore faster RAM speed, massive improvements in IPC / CPU microarchitecture.

            I would even speculate the hypothetical 3D capabilities of 1999 desktop could probably be simulated in software.

            • nyan@lemmy.cafe
              link
              fedilink
              English
              arrow-up
              1
              ·
              10 hours ago

              Speaking based on my own PC in that era: it had 512MB RAM and the video card was capable of running FFVII PC version with hardware drivers, so there was some very modest and primitive 3D capability buried in there somewhere. I believe the CPU was a ~500 MHz P3, so I’ll grant you that one, and the one about RAM speed. Well, I did only claim they were “somewhat similar”.

          • theherk@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            The sandboxes are different. The embeddable Java plugin sandbox was a bit different and susceptible to confused deputy and other attacks. So yeah, I guess you can say it is iterative but they’re kind of worlds apart. You can run thousands of wasm modules in a single process and have them all be completely isolated. Its performance and security gains, portability, and usability are all superb.

            I guess I can’t really defend it well, but I think it is interesting and important.

        • frongt@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          Maybe we should get away from “browser than can run apps” and move towards “app sandbox that also happens to render html”.

      • Fiery@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        It’s kinda cool as in you can compile a bunch of languages to wasm, so instead of being locked to JavaScript (/typescript) you can instead code in e.g. rust, have all the advantages of the compiler and still run in the browser.