Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
azakai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
451.
▲
by
azakai
7y ago
In my opinion this is a fascinating approach, and it may end up transforming our industry. But the main question I've had is how big the overhead is, specifically since modules don't share their wasm Memory. That means data will b
452.
▲
by
azakai
7y ago
Sadly Flash is incredibly hard to write a 100% implementation for. That's why there are so many attempts; they've all failed (but they can work well for specific Flash games/apps).
453.
▲
by
azakai
7y ago
Emscripten does use some WASI APIs already, both normally and especially in standalone mode [1]. But yeah, for now WASI and wasm don't provide enough to do things like C++ exceptions, longjmp, etc., so Emscripten supports them using no
454.
▲
by
azakai
7y ago
That's not a limitation of WASI - WASI is just the system APIs. Exceptions don't work natively in wasm yet, that's true. But they do work in wasm+JS (using JS exceptions for unwinding, in Emscripten).
455.
▲
by
azakai
7y ago
There is interop code between the wasm and its JS runtime, but that's very easy to audit for exactly what the wasm is given and what it returns. Also that interop code will be a combination of standard runtime code - very heavily teste
456.
▲
by
azakai
7y ago
It's possible to try to support that, but you can never be sure. For example, imagine that LLVM has a known bug with some pass, and it has a workaround somewhere else that disables generating IR that would hit that bug. A different ver
457.
▲
by
azakai
7y ago
The issue isn't of being able to load the bitcode (which LLVM has gotten pretty good at supporting in a backwards compatible way). It's that the meaning of things might change, undefined behavior may be handled differently, and so
458.
▲
by
azakai
7y ago
The need to use "compatible" versions of LLVM between the C++ and Rust compilers is scary. Anything aside from the exact same LLVM revision could in theory lead to bad results, including bugs or security vulnerabilities (if LLVM c
459.
▲
by
azakai
7y ago
>> cases where you would like to use Python but it would be too slow. > Would be cool if Rust could cover that gap. To really cover most of that gap, writing Rust would need to be as easy as writing Python, since that's one of
460.
▲
by
azakai
7y ago
> You don't have much control over allocation in Go Maybe you mean something different by "control over allocation"? Go does allow that, for example "The Journey of Go's Garbage Collector" talk has a good su
461.
▲
by
azakai
7y ago
Streaming and tiering do help, and I believe all browsers do that. Still, the article's point is valid that offline compilers can spend more time compiling, because even if you have a faster tier before you, running a slower compiler e
462.
▲
by
azakai
7y ago
Very interesting! One of the key points here: > This means that [Ownership/Borrowing] can be added to D code incrementally, as needed, and as time and resources permit. It becomes possible to add OB while, and this is critical, keep
463.
▲
by
azakai
7y ago
Definitely not the first JS VM compiled to the browser. Aside from JSC as another comment mentioned, there was also js.js which is SpiderMonkey compiled to JS (around 2012!), https://github.com/jterrace/js.js/ Thi
464.
▲
by
azakai
7y ago
SQL queries and GL shaders tend to be much shorter than a typical program. There are exceptions of course, but it's rare to find shaders with thousands of lines of code or more.
465.
▲
by
azakai
7y ago
I've been thinking of writing a blogpost comparing the advantages and disadvantages of emscripten, wasi, and plain llvm (which is what is discussed here), and also how those interact with web vs server. This space has definitely gotten
466.
▲
by
azakai
8y ago
Browser vs server-side is always going to be a tradeoff, yeah. In some cases you're ok with paying for server time, and then don't need to depend on clients running your code. But in other cases it's much more cost-effective
467.
▲
by
azakai
8y ago
> With Lucet, Fastly’s edge cloud can execute tens of thousands of WebAssembly programs simultaneously, in the same process , without compromising security. [emphasis mine] How does it handle Spectre, etc.?
468.
▲
by
azakai
8y ago
What about platform differences like how file permissions work on windows vs posix? (i.e., stuff that Python does not fully normalize)
469.
▲
by
azakai
8y ago
Looks like it's a blazor app (mono compiled to wasm using emscripten), so it should run in all modern browsers - what error do you get on Safari?
470.
▲
by
azakai
8y ago
> Adair Turner, a senior fellow at the Institute for New Economic Thinking in London, argues that the economy today resembles what would have happened if farmers had spent their extra income from the use of tractors and combines on domes
471.
▲
by
azakai
8y ago
I believe Figma is C++ + WebGL + WebAssembly on the client, and Rust (and probably others) on the server. https://www.figma.com/blog/building-a-professional-design-to... https://www.figma.com/blog/
472.
▲
by
azakai
8y ago
Some more details here, including an explanation for that visual glitch: https://groups.google.com/d/msg/emscripten-discuss/pKcWvKppj...
473.
▲
by
azakai
8y ago
The AssemblyScript conversion sounds very interesting! Is there an issue or PR where I can follow that?
474.
▲
by
azakai
8y ago
For almost all platforms that's true, but the culture of standardization on the Web is unique. It comes from wanting a Web page to have the maximal chance of running across all standard-compliant browsers, forever - that's just no
475.
▲
by
azakai
8y ago
> there would be clear benefits in also delegating basic dynamic memory management to the host. It would be quite hard to spec malloc/free into the Web platform, because of the necessary detail: the behavior of that malloc/free
476.
▲
by
azakai
8y ago
It's true that in theory a NULL pointer could be 0xffffffff or such, and that would prevent some of the problems the article mentions. However, that would only help when you assign NULL to a pointer explicitly. The problem is that in p
477.
▲
by
azakai
8y ago
Pressing tab (when the canvas is the focused element) should bring up the emulator control screen, where you can see and modify the controls.
478.
▲
by
azakai
8y ago
Python C extensions like NumPy are compiled into shared libraries, and loaded using dlopen() etc. normally by the main compiled Python runtime. (The only special thing here is that all those components are compiled to WebAssembly so it can
479.
▲
by
azakai
8y ago
True, but the asm.js is then compiled to machine code by the browser's JS JIT. I'd expect some overhead from sandboxing etc., but it should be fairly close to native speed.
480.
▲
by
azakai
8y ago
Another option might be for them to open source the code and let others do the port. However, there might be legal barriers to doing that if they don't own the rights to it all.
More ›