Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
azakai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
361.
▲
by
azakai
5y ago
No, this is an issue currently, both for network data and canvas data. All wasm instructions can do is read and write from the wasm Memory that the wasm is initialized with. They can't even refer to separate things like a new ArrayBuff
362.
▲
by
azakai
5y ago
Thanks!
363.
▲
by
azakai
5y ago
> I [..] could never get the performance or package size to a good place. Do you have any more details on that? I'm curious how close this got, and what were the main issues (on both size and speed).
364.
▲
by
azakai
5y ago
The wasm file is dc7bb6f6208af7f13f16.module.wasm which is 2MB uncompressed.
365.
▲
by
azakai
5y ago
I'm not close to Zig development, but in addition to the GeneralPurposeAllocator work that a comment already links to, there is other ongoing stuff in that space, like an allocator in 64-bit that does not reuse pages (and instead keeps
366.
▲
by
azakai
5y ago
In principle, clang could do it, you're right. I think there are two main reasons why it hasn't. First, Zig has a pretty unique and impressive build&caching system. It makes something like this a lot less painful than it would
367.
▲
by
azakai
5y ago
While WebAssembly is better for some things than JS, for most code you run in a browser, it's no improvement and actually worse. When you do need wasm, though, then it opens up entire new possibilities, things you really couldn'
368.
▲
by
azakai
5y ago
It could be even smaller, it seems, as the wasm file is base64-encoded (so that it all fits in a single file - which is convenient, but larger).
369.
▲
by
azakai
5y ago
Skimming the download, this does indeed use wasm, but it's also possible to build to pure JS with emscripten (in WASM=0 mode, wasm2js compiles the wasm to JS). Perhaps that's what they used to do and the docs have not been updated
370.
▲
by
azakai
5y ago
It's even worse than that. Aside from deviations, this is a main point in the article: > The death rate if infected was always going to be higher in the vaccinated groups if most of the vaccinated were those likely to die in the fir
371.
▲
by
azakai
5y ago
> Servo was never meant to be a full engine replacement for mainline Firefox I don't think that's a fair summary of the history. There were multiple points of view on this inside Mozilla, and some (including myself) definitely
372.
▲
by
azakai
5y ago
> from what I've seen in the wild, no one has written a serious business critical application using it yet. There are lots of such applications, including: * Figma * Unity games on the Web * Google Earth * AutoCAD * Aside from entir
373.
▲
by
azakai
5y ago
You're right that Go has those flaws, and it would be nicer if they didn't exist. However, in practice Go is still far, far safer than C and C++. Use after free etc. are far easier to exploit than Go's races. If you can write
374.
▲
by
azakai
5y ago
In addition, zig cc uses a remarkable compile+cache mechanism, which makes it possible to distribute a single build that can be used to cross-compile anything. It will cross-compile the necessary files as you need them, transparently - with
375.
▲
by
azakai
5y ago
You're right that wasm programs can overflow internal buffers in linear memory, which can be dangerous. However, wasm does a lot more than only protect the boundary with the rest of the system, including * Safe call stack (opaque /
376.
▲
by
azakai
5y ago
You're right that it doesn't remove all risk automatically. You can still corrupt data inside the sandbox. However, wasm has a very clear sandboxing boundary. The ability of an exploit to escape the sandbox is very small if you ar
377.
▲
by
azakai
5y ago
Another minor typo, "web assembly" should be WebAssembly (no space, and CamelCase).
378.
▲
by
azakai
5y ago
I'm skeptical of the article's point, but I think it does try to answer this question of yours: > Does gain of function research yield more high impact papers than more benign types of virology research? The article seems to su
379.
▲
by
azakai
5y ago
The largest wasm file I see downloaded on the website is 440K. Disassembling it, it seems to contain a bunch of libc-like filesystem code, and was built using the rust toolchain. So it doesn't look like v8 has been compiled to wasm her
380.
▲
by
azakai
5y ago
SQLite has been ported to JS (and wasm) for some time, https://sql.js.org/#/ https://github.com/sql-js/sql.js/
381.
▲
by
azakai
5y ago
That data is from 2 years ago. Lower down in the post it has an update for the present: > performance since the 2019 announcement has improved greatly: "Performance ranges between near native to up to 3 to 5 times slower, depending
382.
▲
by
azakai
5y ago
16x? FTA: > performance since the 2019 announcement has improved greatly: "Performance ranges between near native to up to 3 to 5 times slower, depending on the benchmark."
383.
▲
by
azakai
5y ago
Wasm 1.0 did not include garbage collection, but there is a lot of effort right now by many people to add it (that is what I work on myself currently). Once wasm has GC, languages like Grain will be able to save a lot on code size, and have
384.
▲
by
azakai
5y ago
> The question in my mind is do we need a language specialized for this? Based on my experience writing wasm toolchains, I think specialized languages can have big benefits. Existing languages always have downsides on the web and in wasm
385.
▲
by
azakai
5y ago
Emscripten used to use Java for Closure Compiler minification, but no longer does since there are (AOT compiled Java) binaries available for it, for all major platforms. It fetches them using npm. So that part of your post is a little out o
386.
▲
by
azakai
5y ago
That's a definite risk in general. But worth adding that Wasm by design lets you statically inspect all the things the Wasm can call. If the Wasm receives access to networking, or eval(), etc., then there is a real risk. However, often
387.
▲
by
azakai
5y ago
It depends on what you mean by "safely". The spectre family of exploits has no general solution and requires specific mitigations. Aside from that, Wasm provides a sandbox that disallows escaping from it. That does leave scribblin
388.
▲
by
azakai
6y ago
You're right that that's a possibility. A completely undiagnosed underlying condition would be missed by that type of control group. But we know that COVID admittances caused a big increase in the total number of people hospitaliz
389.
▲
by
azakai
6y ago
As mentioned in the discussion above, their control group answers the question "if a person got COVID and was hospitalized because of it, how much worse off are they than had those things not happened?" They do justify their choic
390.
▲
by
azakai
6y ago
See the discussion above - it's very intentional that the control group wasn't hospitalized. It's the right approach for the question they are trying to answer, "how bad off is a person that got COVID and got hospitalize
More ›