Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
azakai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
421.
▲
by
azakai
6y ago
That feels a little unfair. WebAssembly has been shipping in the majority of production browsers for over three years now. That's one of the most security-sensitive attack targets that exists. Those browsers would not have done so if i
422.
▲
by
azakai
6y ago
Definitely, yes, and you do need to be careful about those outputs. Still, the sandboxing guarantee here is very useful! This isn't theoretical, Firefox does this approach in production (using RLBox, which is mentioned in the post), h
423.
▲
by
azakai
6y ago
That's a good article! Some notes on it: https://twitter.com/kripken/status/1284576787624648705 Perhaps wasm isn't (yet) a good replacement for native binaries for the reasons they mention. In particular
424.
▲
by
azakai
6y ago
Exactly, by default code sandboxed by wasm is fully deterministic and can't do any timing measurements, not unless you explicitly give it access to an import that does such a measurement. On the web, a website might run arbitrary wasm
425.
▲
by
azakai
6y ago
This is an important point. Languages compiled to wasm have an FFI cost, and we will never fully remove it because it just uses different types than Web APIs do. This isn't a Rust problem or a C problem, it's just how wasm is. Was
426.
▲
by
azakai
6y ago
Try Emscripten's new MINIMAL_RUNTIME option. You can often get js files of just a few Kb.
427.
▲
by
azakai
7y ago
The CDC is working on this, for example https://www.statnews.com/2020/04/04/cdc-launches-studies-to-...
428.
▲
by
azakai
7y ago
It doesn't appear to mention what type of test was done. Were they checking for current active infection, or for antibodies which would indicate if the person has ever been infected? (if the latter, they may have had symptoms back then
429.
▲
by
azakai
7y ago
> Around 200 million Americans will eventually get it, barring extraordinary events (like a vaccine arriving in 6 months). We cannot change this. We don't know that's inevitable. Korea, Japan and Taiwan suggest another outcome
430.
▲
by
azakai
7y ago
Aside from Whole Foods, Amazon also has Amazon Prime Now (go to https://primenow.amazon.com/ and pick store: Amazon). They have a lot of staple foods there, and sometimes they have more availability than Whole Foods. (I
431.
▲
by
azakai
7y ago
See also this response: https://gist.github.com/kripken/cbffda150b4e1583bdad832d0709...
432.
▲
by
azakai
7y ago
The title may be slightly confusing. They aren't suspending shipments to customers, they are suspending shipments to Amazon from vendors (Fulfillment by Amazon vendors, who ship to Amazon and then Amazon handles everything from there
433.
▲
by
azakai
7y ago
Yes, it's not optimal, but based on my experience I think you'll be fine without the normal orientation. I would worry more about the actual crisis the world is going through (not that I'm saying you need to be overly worried
434.
▲
by
azakai
7y ago
It would still be useful in that case as defense in depth. Specifically it could guard against compiler bugs, use of "unsafe", etc.
435.
▲
by
azakai
7y ago
Wasm is already supported natively by clang. Binaryen is an optional optimizer that you can run on the emitted wasm, to make it smaller (either manually, or a toolchain may integrate it for you, like emscripten or wasm-pack).
436.
▲
by
azakai
7y ago
> It seems that this solution was carried over to WebAssembly without much deep thought given. That's definitely not true - a lot of thought was given at the time to this. I'm not saying the optimal conclusion was arrived at (n
437.
▲
by
azakai
7y ago
Yes! Part of the cross-platform story here is an Emscripten port of webgpu.h, https://github.com/emscripten-core/emscripten/pull/10218 So you can write an application and run it either natively (using Dawn or
438.
▲
by
azakai
7y ago
A pool allocator could have reduced the number of existing allocations (1 big one instead of many small ones), making those spikes less significant. (But that depends on how Go handles interior pointers and GC, so I'm not sure.)
439.
▲
by
azakai
7y ago
The article says the 2 million includes vendored code. I assume that means all the dependencies and their dependencies. (So yes, the project itself is just a small fraction of the total lines, but I'm not sure if the measurement here w
440.
▲
by
azakai
7y ago
The 2 million figure includes vendored code. A quick count suggests the repo itself has less than 200K, https://codetabs.com/count-loc/count-loc-online.html
441.
▲
by
azakai
7y ago
> it's not like there are any other modern GC languages that make multi-threading particularly easy (with the possible exception of Java). Go is another exception, goroutines are a core part of the design.
442.
▲
by
azakai
7y ago
> There are no cross-platform APIs for something as simple as "blit a bunch of pixels to the screen" anyway, so WASI is pretty much free to define its own. [..] compatibility with web APIs is useful Personally I think Web comp
443.
▲
by
azakai
7y ago
Some more detail: Emscripten has defaulted to emit wasm even earlier, in May 2018. The change this year was to switch how that wasm is emitted, from the old fastcomp+asm2wasm path to the new LLVM wasm backend.
444.
▲
by
azakai
7y ago
There is a difference in degree, though. Unminified JS is usually easier to read than wasm text, in general. One practical factor: I often debug wasm files by compiling them to JS first. At least wasm has structured control flow, which help
445.
▲
by
azakai
7y ago
I assume the author is thinking of compilers like Clang and GCC when saying it's unusual to ship rapid releases. Yeah, there are definitely other examples, like you mentioned. Another example is Emscripten, which ships a new version ev
446.
▲
by
azakai
7y ago
When ready, browsers simply enable new features. Until then, it's usually behind a flag you can test with. Compilers generally require flags to enable features. There hasn't been a post-MVP feature that has widespread enough adopt
447.
▲
by
azakai
7y ago
I see, thanks. Curious to learn more when it is public.
448.
▲
by
azakai
7y ago
Oh, where? I don't think I see anything about controlled memory sharing there, but I guess I missed it. Which section is it in?
449.
▲
by
azakai
7y ago
It is possible to share memory in wasm today, yes (we use that to optimize wasm/JS interaction, and wasm/wasm dynamic linking) - and that won't go away, it's a core feature of wasm, you're right. But the specific ap
450.
▲
by
azakai
7y ago
Interesting! Is that written up somewhere public?
More ›