News for hackers. Stuff that matters.
Re:Flutter 2 by ttt0 on Wednesday March 03, 2021 @03:35PM (#26334050)
So now every website will require enabled WebAssembly to run god knows what code and I will have to install an anti-virus for my browser? No thanks. JS might be a bad language, but it's even worse in how it's abused with frameworks, tracking, etc for no good reason.

edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about wasm and JS frameworks is just a step too far lol.

Re:Flutter 2 by ec109685 on Wednesday March 03, 2021 @03:42PM (#26334158)
WASM is still stuck within a highly protected sandbox, so you don't need to run anti-virus software for your browser.
Re:Flutter 2 by ttt0 on Wednesday March 03, 2021 @03:43PM (#26334179)
Bitcoin miners?
Re:Flutter 2 by leppr on Wednesday March 03, 2021 @06:45PM (#26336521)
...that run only when the tab is loaded. Non-issue.
Re:Flutter 2 by hnuser123456 on Wednesday March 03, 2021 @03:50PM (#26334307)
better than rootkits
Re:Flutter 2 by dagmx on Wednesday March 03, 2021 @03:42PM (#26334170)
Wasm can't do anything JS couldn't do already.
Re:Flutter 2 by yjbanov on Wednesday March 03, 2021 @05:12PM (#26335441)
There are a few things that WASM can do that JS can't (at least not now):

- Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)

Re:Flutter 2 by hajile on Thursday March 04, 2021 @10:52AM (#26343921)
Bytecode caching has been a browser feature for years[0]

JS has atomics and shared memory arrays which also basically bypass garbage collection [1]

JS had working simd.js implementations in both Firefox and Chrome until they were pulled in favor of WASM

[0] https://v8.dev/blog/code-caching-for-devs

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[2] https://github.com/tc39/ecmascript_simd

https://blog.mozilla.org/javascript/2015/03/10/state-of-simd...

https://01.org/blogs/2014/bringing-simd-javascript

Re:Flutter 2 by dagmx on Thursday March 04, 2021 @10:38AM (#26343747)
I should clarify, in the context of the reply I was referring to security. Wasm is inherently as secure as JavaScript.
Re:Flutter 2 by AlchemistCamp on Thursday March 04, 2021 @05:24AM (#26340758)
It can do integers.
Re:Flutter 2 by hajile on Thursday March 04, 2021 @10:57AM (#26343982)
BigInt landed in ES2020 and has been supported in something like the last 10-20 versions of Chrome and Firefox, so no huge worries about using it (the "current" browser without support is IE11).

The `123|0` type hint is also recognized and implemented by most browsers too. It forces a 31-bit integer on most platforms (and can offer a significant performance boosts if you're running a tight algorithm).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Flutter 2 by ttt0 on Wednesday March 03, 2021 @03:43PM (#26334189)
What JS can do is already bad enough.
Re:Flutter 2 by anoncake on Wednesday March 03, 2021 @06:03PM (#26336085)
> edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about wasm and JS frameworks is just a step too far lol.

I'm not surprised. You probably happen to agree with the majority of HN on these topics so the upvotes outweigh the downvotes.