Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maxgraey
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
maxgraey
4y ago
Ah shit, here we go again. I just link to my previous comment which quoted in WasmWeekly News https://news.ycombinator.com/item?id=32564105
2.
▲
by
maxgraey
4y ago
> If you don't do frontend stuff, you don't have to use WASM, you know? WebAssembly is excellent for: - Game's scripting engine (UE plugin example: https://www.reddit.com/r/unrealengine/comments&#
3.
▲
by
maxgraey
4y ago
TypeScript has completely different goals. It will always just be a semantic checker on top of JS and nothing more. This has been mentioned more than once: https://github.com/microsoft/TypeScript/issues/9202#i
4.
▲
by
maxgraey
4y ago
The main advantage of using Binaryen directly bypassing LLVM is firstly very fast codegen and optimization (Binaryen architecture perfectly utilizes multithreading as opposed to LLVM). In addition, clean and fast debug builds are not clogge
5.
▲
by
maxgraey
4y ago
> It isn't designed for or suitable for large projects. Why? The compiler itself is written in AssemblyScript and is capable of bootstrapping. The AS code base is quite large. In addition, there are other quite large projects. For e
6.
▲
by
maxgraey
4y ago
old topic: https://github.com/WebAssembly/WASI/issues/401#issue-8177488... The problem with WASI is that it is a some kind of truncated copy of CloudABI and POSIX. With all the goodies like abbreviated error
7.
▲
by
maxgraey
4y ago
The article is relatively old. But I have the most complaints about the performance measurements. The WebAssembly should be tested in a way that eliminates the interop time, which is very expensive. That's why sorting and simple multip
8.
▲
by
maxgraey
4y ago
> Iraq, Afghanistan, Libya, Syria, all within the very recent history, plus countless more US-backed color revolutions - including the one in your very own country, which realistically is the very reason for the current state of affairs
9.
▲
by
maxgraey
5y ago
> And there's been talk of exposing the JS GC to wasm for a few years. Hopefully when that stuff lands, it'll get easier to marshal objects across the gap. You don't need a Wasm GC to do this. If you only need js objects t
10.
▲
by
maxgraey
5y ago
Are you sure UTF-8 is the ideal format? After all, we have grapheme clusters that cannot be rendered as text units using UTF-8. Maybe UTF-8 is already obsolete and never took over the world? I am more than sure that soon we will see the new
11.
▲
by
maxgraey
5y ago
So basically even in UTF8 you can create malformed string. For example ðŸŒ. It miss one byte and may cause to problems in some editors / text viewers which doesn't handle or pre-verify such cases . Valid UTF8 has a specific binary
12.
▲
by
maxgraey
5y ago
Yeah, WebAssembly have i64/u64 types as first class citizens unlike JavaScript which should emulate it or use BigInt which drastically slower than native 64-bit types. That's why crypto algorithms got a lot of speed benefits. Asse
13.
▲
by
maxgraey
6y ago
latest benchmarks with wasm3, wasmer, wasmtime, wavm and etc: https://www.00f.net/2021/02/22/webassembly-runtimes-benchmar...
14.
▲
by
maxgraey
6y ago
That's true. But wasm also required some extra codegen and optimizations for i64 types for example (also simd and atomics). In addition, wasm will have more specific CFG optimizations for WebAssembly. For example https://bug
15.
▲
by
maxgraey
6y ago
It's unnecessary with AssemblyScript due to AS is just subset of TypeScript and can transpile to ordinal idiomtic javascript. Also AS already uses binaryen under the hood and can produce asm.js via --jsFile, -j command line.
16.
▲
by
maxgraey
6y ago
Ruffle - A Flash Player emulator over WebAssembly: https://github.com/ruffle-rs/ruffle
17.
▲
by
maxgraey
6y ago
There site which aggregate prod use cases: https://madewithwebassembly.com/
18.
▲
by
maxgraey
6y ago
Here a great example of how SIMD brings WebAssembly closer to native speed: https://medium.com/@robaboukhalil/webassembly-and-simd-7a7da...
19.
▲
by
maxgraey
6y ago
WebAssembly still not reaching their full potential in browsers. For example: https://bugs.chromium.org/p/v8/issues/detail?id=11085&q=comp... On Firefix and Safari we have the same missing optimizations.
20.
▲
by
maxgraey
6y ago
Yes, indeed. All points are valid. Opaque anyref (externref) or reference-types WebAssembly proposal not yet in all browsers, but after it interop will become much easier. At least you don't need glue code for JS side any more.
21.
▲
by
maxgraey
6y ago
You're right WebAssembly hasn't provide seamless interop for compound objects. AS expose special utility called loader: https://www.assemblyscript.org/loader.html#usage There are also exists other projects which s
22.
▲
by
maxgraey
6y ago
This is a temporary limitation which mean you can't capture free vars from outer scope (except global scope). One of the main goal of AS is performance but closure elimination required some extra efforts like Middle IR, eta/beta-r
23.
▲
by
maxgraey
6y ago
Great dev story about using AssemblyScript in production: https://engineering.q42.nl/webassembly
24.
▲
by
maxgraey
6y ago
Not only syntax, but also standard library, ecosystem and etc. You could easily transpile AssemblyScript project to JavaScript via tsc if use portable glue code. From C it I guess it borrows AOT compilation, ability to use low-level intrins
25.
▲
by
maxgraey
6y ago
> I don't think AssemblyScript will be the answer for you, as the goals of that language seem to be entirely different from "fixing" old JS cruft. Apart from the i32, i64 stuff I guess. Basically AssemblyScript try to fix
26.
▲
by
maxgraey
6y ago
Probably Blazor is immature, but not WebAssembly? Blazor btw run in interpreted mode for CIL modules. Full AOT compilation was planned for .NET 5 but canceled. But you could check rust's frameworks like Yew. That's real world demo
27.
▲
by
maxgraey
6y ago
> but they haven't been implemented in any browser, much less standardized yet. Reference types already implemented. GC is not really needed for non-managed languages like C++ or Rust. Interface types in progress. See this: https:&
28.
▲
by
maxgraey
6y ago
> To get code blocks you have to indent it with four spaces I'll keep that in mind in next time. Thanks for the tip!
29.
▲
by
maxgraey
6y ago
Btw you could speedup your AssemblyScript code: https://bit.ly/2FW2iyN ``` const eps: f64 = 2.3283064365386963e-10; const m: u64 = 6364136223846793005; const inc: u64 = 1442695040888963407; let state: u64 = 1; export functi
30.
▲
by
maxgraey
6y ago
Perhaps if you like TypeScript and still want compile to WebAssembly you might be interested in AssemblyScript which stricter subset of TypeScript which compile to wasm
More ›