Live data from Hacker News

Zig Libc

ziglang.org

21–30 of 196 posts

Re: Zig Libc

#22
post #20
post #17

Earlier quoted context omitted.

Seems like it ought to be able to do inlining and dead code stripping which, I think, wouldn't be viable at link time against optimized static libraries.

It is viable against the IR that static libraries contain when LTO is enabled. LTO essentially means “load the entire compiler backend into the linker and do half of the compilation work at link time”. It’s a great big hack, but it does work.

Right, but I think that's what the question of "Why is the linker too late?" is getting at. With zig libc, the compiler can do it, so you don't need fat objects and all that.

---

expanding: so, this means that you can do cross-boundary optimizations without LTO and with pre-built artifacts. I think.

Re: Zig Libc

#23
post #10

"Abolish ICE" at the bottom. Obviously a Bad Bunny fan, as I am.

The very same day I sat at home writing this devlog like a coward, less than five miles away, armed forces who are in my city against the will of our elected officials shot tear gas, unprovoked, at peaceful protestors, including my wife.

https://www.kptv.com/2026/01/31/live-labor-unions-rally-marc...

This isn't some hypothetical political agenda I'm using my platform to push. There's a nonzero chance I go out there next weekend to peacefully protest, and get shot like Alex Pretti.

Needless to say, if I get shot by ICE, it's not good for the Zig project. And they've brought the battle to my doorstep, almost literally.

Abolish ICE.

Re: Zig Libc

#24

Cool idea, for sure, but I can't help but wonder: for the code that's been ported, is there a concern that you'd have to perpetually watch out for CVEs in glibc/musl and determine if they also apply to the Zig implementations?

Yes but we already have to do that for our own standard library. For shared codepaths (e.g. math) it's strictly fewer potential bugs.

Re: Zig Libc

#26
post #10

"Abolish ICE" at the bottom. Obviously a Bad Bunny fan, as I am.

The very same day I sat at home writing this devlog like a coward, less than five miles away, armed forces who are in my city against the will of our elected officials shot tear gas, unprovoked, at peaceful protestors, including my wife. https://www.kptv.com/2026/01/31/live-labor-unions-rally-marc... This isn't some hypothetical political agenda I'm using my platform to push. There's a nonzero chance I go out there n…

[flagged]

Re: Zig Libc

#27
post #10

"Abolish ICE" at the bottom. Obviously a Bad Bunny fan, as I am.

The very same day I sat at home writing this devlog like a coward, less than five miles away, armed forces who are in my city against the will of our elected officials shot tear gas, unprovoked, at peaceful protestors, including my wife. https://www.kptv.com/2026/01/31/live-labor-unions-rally-marc... This isn't some hypothetical political agenda I'm using my platform to push. There's a nonzero chance I go out there n…

[flagged]

Re: Zig Libc

#28
post #7
post #5

This strikes me as a very agent-friendly problem. Given a harness that enforces sufficiently-rigorous tests, I'm sure you could spin up an agent loop that methodically churns through these functions one by one, finishing in a few days.

Have you ever used an LLM with Zig? It will generate syntactically invalid code. Zig breaks so often and LLMs have such an eternally old knowledge cutoff that they only know old ass broken versions. The same goes for TLA+ and all the other obscure things people think would be great to use with LLMs, and they would, if there was as much training data as there was for JavaScript and Python.

To be fair, this was true of early public LLMs with rust code too. As more public zig repositories (and blogs / docs / videos) come online, they will improve. I agree it's a mess currently.

Re: Zig Libc

#29

Earlier quoted context omitted.

The very same day I sat at home writing this devlog like a coward, less than five miles away, armed forces who are in my city against the will of our elected officials shot tear gas, unprovoked, at peaceful protestors, including my wife. https://www.kptv.com/2026/01/31/live-labor-unions-rally-marc... This isn't some hypothetical political agenda I'm using my platform to push. There's a nonzero chance I go out there n…

[flagged]

These few-minutes-old accounts swooping in on hot button issues to try persuade people are such a goddamn scourge, I wish there were something that could be done about it.

In the end I probably just need to leave HN for a while because it's really doing a number on what's left of my ability to trust what I read online.

Re: Zig Libc

#30

Earlier quoted context omitted.

[flagged]

These few-minutes-old accounts swooping in on hot button issues to try persuade people are such a goddamn scourge, I wish there were something that could be done about it. In the end I probably just need to leave HN for a while because it's really doing a number on what's left of my ability to trust what I read online.

[flagged]
Post reply on HN