Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
TUSF
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
TUSF
3y ago
> Microsoft's .NET There's your problem. Sure, .NET is technically cross-platform, but that's a relatively recent development, and WASM has runtimes that let it run in most environments, even microcontrollers. Also, looks
32.
▲
by
TUSF
3y ago
Last I checked, the GC primitives in WASM are rather low level, and are more for building a GC system on top of, rather than relying on it to be your whole GC.
33.
▲
by
TUSF
3y ago
"self-hosted compiler" in this case means moving all the non-LLVM code (which was previously in C++) to Zig itself.
34.
▲
by
TUSF
3y ago
See the previous paragraph, describing things that "could go wrong."
35.
▲
by
TUSF
3y ago
I'd been wanting to see this, preferably with JS being optional, and just allowing direct DOM access. I initially thought this was what Azul was, but it's only just using Servo's WebRender compositor, and rolls its own CSS pa
36.
▲
by
TUSF
4y ago
Zig compiles everything as one large compilation unit, so inlining isn't much of an issue there. If you want to have private fields, there's a couple ways to go about it. You can make use of opaque types, of course, or you could u
37.
▲
by
TUSF
4y ago
As far as I understand, it's more geared towards embedded systems, game ui, and gui icons. Places where a full SVG renderer is absolutely overkill. I think they see the tooling being used to create SVGs as usual, but then converting th
38.
▲
by
TUSF
4y ago
Its simpler format should make it faster to parse & decode, at least. Whether that might affect render times is likely to depend on the renderer itself.
39.
▲
by
TUSF
4y ago
> Don't know how many of those checkboxes Go ticks (I think it can at least import C headers?). Go lets you write C in your Go files, and reference it with a psuedo-package, "C". So you can import C headers, but Go itself
40.
▲
by
TUSF
4y ago
> Is it an `if` resolved at compile time causing the uncompileable code to be unused and disappear after the Zir stage? Yes. It's exactly that, because Zig very aggressively evaluates values that are known at compile time. It's
41.
▲
by
TUSF
4y ago
I don't really see this as OOP. It's just sytax sugar.
42.
▲
by
TUSF
4y ago
> Odin doesn't do OOP. Zig does. I don't know why a C replacement would try to. What sort of OOP does Zig do, exactly?
43.
▲
by
TUSF
4y ago
The issue isn't from user-initiated requests. It's from the hundreds of automatic refreshes that the proxy then performs over the course of the day and beyond. One person who was running a git server that hosts a Go repo only they
44.
▲
by
TUSF
4y ago
You can already use WebGPU today, if you're targeting something other than the browser. There's already game engines & graphics libraries being made thru one of the WebGPU implementations, and you can always start using it now
45.
▲
by
TUSF
4y ago
It varies by the runtime, and the codegen of the WASM itself. From some benchmarks & anecdotes I've seen, the faster runtimes (v8, Spidermonkey, WAVM) are within about 10-50% of native speeds, give or take. There's also some r
46.
▲
by
TUSF
4y ago
They wanted you to only have to use what's in the git repo itself, plus whatever C compiler is on your system. Thus, a basic WASM→C converter was written, and kept minimal to save on space, because it's only meant to work on this
47.
▲
by
TUSF
4y ago
> because it (IMHO) doesn't adds enough business value I dunno about this. We're seeing Zig being used as the compiler toolchain in per-existing C and C++ codebases here and there, and is used by at least one big tech companies
48.
▲
by
TUSF
4y ago
> Most of the Rust compiler is in C++, and they have no plan to change that. What? I just went and searched the Rust compiler, and the only C++ code to speak of was LLVM itself, and a thin wrapper around LLVM to provide a C API. Which is
49.
▲
by
TUSF
4y ago
Weird take. This wasn't gone to avoid supporting cross-compilation—Zig can already cross-compile, even without the LLVM backend. This was to avoid having to provide a binary for every individual OS and Architecture combination that Zig
50.
▲
by
TUSF
4y ago
Defen explained explains this well here: https://news.ycombinator.com/item?id=33914969
51.
▲
by
TUSF
4y ago
They wrote it in C++, because llvm is in C++. Currently the only critical parts of the Zig compiler that are in C++ are the bindings to llvm and I think stuff for linking clang.
52.
▲
by
TUSF
4y ago
> I don't think WASM should/would unify the GC across memory models WASM already has a GC proposal[0] which is already at the "Implementation stage"[1] so it looks like this IS going to happen, although it's unce
53.
▲
by
TUSF
4y ago
Ok, it seems you're right. There is a flag for preventing the use of LLVM, and using a native backend for codegen, although without all the optimizations and such that LLVM has.
54.
▲
by
TUSF
4y ago
The Go compiler doesn't use LLVM. They pretty much built all their codegen for every platform from the ground up. But that's only possible because they have the resources to do that. As far as I know, the only viable alternative t
55.
▲
by
TUSF
4y ago
Other than some fantasy consoles like WASM-4, which have some retro-inspired limitations, there isn't really a standard way to do any kind of GUI in Wasm yet. Wasmer has a non-standard way[1], which they hide behind compilation flags,
56.
▲
by
TUSF
4y ago
> But isn't WASI considered harmful? Lmao. The guy is just mad that WASI uses utf-8, as opposed to utf-16 (which is what Javascript uses)
57.
▲
by
TUSF
4y ago
I've never used lisp, but I'm pretty sure you have the right idea. The only limitation is that it can only act on data that is compile-time known, which is a defined concept in Zig. At the moment you can't do comptime allocat
58.
▲
by
TUSF
4y ago
> Better interoperability AFAIK, the examples you give all target a basic C ABI [0] or can be made to target the same ABI. In Rust, it means targeting wasm32-unknown-emscripten The Rust team is also working on a "WASM ABI"[1] w
59.
▲
by
TUSF
4y ago
Pretty sure I saw that title on the Zig subreddit when the link was posted there, so they probably copied the title from there.
60.
▲
by
TUSF
5y ago
I can totally see how some nodes could block content, and refuse to propagate information on certain content addresses, but as far as I know, this would only slow down reaching the desired content, not completely block it—every node on the
More ›