logoalt Hacker News

allthetimetoday at 3:01 AM2 repliesview on HN

You're already at a disadvantage having to stuff the context and spend extra tokens coercing the model in the correct direction compared to it already knowing what to do (rust, ts, go, etc.)

Here, I just did a quick test with claude.

1. "make a simple tcp echo server that uses rust"

compiles and runs - took a few seconds to generate.

2. "make a simple tcp echo server that uses zig"

result: compile error, took literal minutes of spinning and thinking to generate

response: "ziglang.org isn't in the allowed domains. Let me check if there's another way, or just verify the code compiles conceptually and present it clean."

/opt/homebrew/Cellar/zig/0.15.2/lib/zig/std/Io/Writer.zig:1200:9: error: ambiguous format string; specify {f} to call format method, or {any} to skip it @compileError("ambiguous format string; specify {f} to call format method, or {any} to skip it"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3. "make a simple tcp echo server that uses zig 0.16"

result: compile error:

zig build-exe main.zig main.zig:30:21: error: no field named 'io' in struct 'process.Init.Minimal' const io = init.io; ^~

4. "make a simple tcp echo server that uses zig 0.15"

result: compile error

zig build-exe main.zig /nix/store/as1zlvrrwwh69ii56xg6yd7f6xyjx8mv-zig-0.15.2/lib/std/Io/Writer.zig:1200:9: error: ambiguous format string; specify {f} to call format method, or {any} to skip it @compileError("ambiguous format string; specify {f} to call format method, or {any} to skip it");

Rust took seconds and just works. Zig examples took minutes and don't work out of the box. The DX & velocity isn't even close.


Replies

andaitoday at 9:54 AM

I guess now we can't make new programming languages anymore.

dimatortoday at 4:04 AM

i mean, if zig is doing its best (inadvertently) at shooing off slop jockeys, then i already have more confidence that:

1. the language and stdlib are written by people who know what they're doing 2. packages in the ecosystem, at the barest level, are written by those who didn't leave after a few compile errors they couldn't reason about

show 1 reply