News for hackers. Stuff that matters.
Re:The reckless, infinite scope of web browsers by zozbot234 on Wednesday March 18, 2020 @10:41AM (#22617134)
> Like, binaries are LLVM IR, Jit'd to the local architecture.

LLVM IR is not platform independent, it's really just a bunch of (closely-related, ofc.) platform-specific IR's. What's wrong with WASM? Everything else seems broadly OK, of course. (Also, WASM directly supports "applets", via Canvas.)

Re:The reckless, infinite scope of web browsers by Nihilartikel on Wednesday March 18, 2020 @10:51AM (#22617256)
Then something like WASM, but avoiding the 1.5x or so slowdown over native. Perhaps WASM is the answer, but with improved runtime.

What I'm driving at is - if we can dream, why not aim for maximal hardware performance and minimal overhead? Even if it comes down to just pre-compiling native code for common architectures like Android apps do. Right now, the browser is an idiosyncratic HAL burdened by its past... what would a really nice next generation be?

Interesting thing to know about the LLVM IR - I'm only casually familiar.

Re:The reckless, infinite scope of web browsers by pfraze on Wednesday March 18, 2020 @11:04AM (#22617412)
Wasm comes to mind for a new browser arch because in theory it could be a userland replacement for traditional platform features like the UI. You could have a wasm module for HTML, for instance, which could be chosen for legacy sites, but replaced for a different approach (VR UI, cloud service which doesnt need one, etc). This would help minimize the browser core and make the execution environments swappable and reusable across browser cores.

That said, I agree that performance may be a dealbreaker on that idea. HTML/DOM is also tightly integrated into a lot of browser behaviors, so I have no idea whether it's feasible to extract it into a swappable module. EDIT: It's still an idea that gets me pretty excited to try.

Re:The reckless, infinite scope of web browsers by hajile on Wednesday March 18, 2020 @11:25AM (#22617648)
Re:The reckless, infinite scope of web browsers by bb010g on Sunday March 22, 2020 @03:08PM (#22657627)
A working compiler from Wasm to native using LLVM: https://innative.dev/
Re:The reckless, infinite scope of web browsers by jhoechtl on Wednesday March 18, 2020 @11:15AM (#22617522)
> Then something like WASM, but avoiding the 1.5x or so slowdown over native. Perhaps WASM is the answer, but with improved runtime.

Once we are done with WASM we will look at it, compare it with Java Applets and say: Look, we already had that!

Re:The reckless, infinite scope of web browsers by hajile on Wednesday March 18, 2020 @11:24AM (#22617632)
The difference is that Java bytecode is fundamentally insecure. Wasm seems to take inspiration from the research that went into NaCl/pNaCl.
Re:The reckless, infinite scope of web browsers by cesarb on Wednesday March 18, 2020 @01:11PM (#22618881)
The worst problem with the Java sandbox was not the bytecode (though it did have its share of bytecode validation bugs). The worst problem was the vast API surface with its "blacklist" security model: all methods which should not be called from the sandbox have to explicitly call a AccessController.checkPermission() or similar. Miss one, and you have a hole in the sandbox. WASM instead follows a "whitelist" approach, which is much more robust.
Re:The reckless, infinite scope of web browsers by Pyxl101 on Wednesday March 18, 2020 @07:42PM (#22622705)
How is Java bytecode fundamentally insecure? (Example?)
Re:The reckless, infinite scope of web browsers by AnIdiotOnTheNet on Wednesday March 18, 2020 @01:15PM (#22618916)
> What's wrong with WASM?

Wake me when it can free memory.