Live data from Hacker News

Zig Libc

ziglang.org

121–130 of 196 posts

Re: Zig Libc

#121

Earlier quoted context omitted.

It's completely possible to implement printf. here is my impl (not 100% correct yet) of snprintf for my custom libc implemented on top of a platform I'm working on https://zigbin.io/ab1e79 > The va_arg stuff are extern because zig's va arg stuff is pretty broken at the moment. Here's a C++ game ported to web using said libc running on top of the custom platform and web frontend that implements the platform ABI https:…

yeah I just thought there are "compiler shenanigans" involved with printf! zig's va arg being broken is sad, I am so zig-pilled, I wish we could just call extern "C" functions with a tuple in place of va arg =D

The only thing C compilers do for printf, is static analyze the format string for API usage errors. Afaik such isn't possible in zig currently. But idk why'd you downgrade yourself to using the printf interface, when std.Io.Writer has a `print` interface where fmt is comptime and args can be reflected so it catches errors without special compiler shenigans.

Re: Zig Libc

#122
Does Zig does have the man power to keep these up to date?

I think we either need to make operating systems not in C, or just accept that at some level we rely on C.

Re: Zig Libc

#123

Earlier quoted context omitted.

>The vast majority are picking strawberries and working cheap construction jobs, This doesn't matter. I do not want the idea that someone can invade my country as long as they avoid drugs and guns to spread through the world. Due to how great America is people are going to want to come here even if they aren't allowed, so they must understand that coming here illegal will end badly for them so they fully understand n…

> Due to how great America is Well, not to worry then, hateful little attitudes like yours are rapidly undoing America's greatness. Soon noone will want to be there, including Americans. Better start practicing your Chinese.

Enforcing the law is not a hateful attitude. If people don't want to be in a society that enforces laws they can feel free to go to some lawless society.

Re: Zig Libc

#124
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…

Please stay safe.

I can't hold it so had to create an account to share, I'm sorry. I'm one of the minor zig contributors, and I'm reading ziglang blog for the purpose of engagement in software engineering craft. I don't want to see these ICE stuff or whatever else political opinion you or somebody else have. I'm not from US and I barely know what ICE is but you're hating on people (I'm sure you think it's deserved, as with any hate) and I assume you may hate me at some point because I do something you don't share or like (like this comment for example). Thinking that creator of Zig may hate me, takes a lot of fun from using the language let alone contributing to it or areas surrounding it. What if tomorrow people with tattoos at particular spot will be hated in media and you'll be posting "Abolish people with tattoo". Not the best comparison, but I hope you got why I feel scared of engaging with community now.

I think you have big responsibility for maintaining community of people with different political opinions and you are definitely free to share it on your personal blog. But you chose to do it in the community driven project as a lead of that project. And it's not first time. It's a bit different. For me at least.

Also the fear is what made me create this new account, I'm not a bot or something like that. I'm just afraid due to many (political) reasons and I want to find peace in playing with computers and one of these safe places was just taken from me, which you probably have the right to do but you could've avoided it. You're not the only one. There are many projects like this who mention Gaza, Ukraine, Russia, Israel, all these stuff. It's getting less and less projects to engage with (again, for me, I think it works well for those projects as they attract people they like).

I'm sorry you have to suffer and see people deaths. Me too. I understand it's difficult to hold these stuff inside. As you can see I couldn't ether. But I hoped you're stronger than me.

Re: Zig Libc

#125
That just reminds me anyone know whether rust has something similar? Not wanting to start any Rust v. Zig debate. I am just wanting to be even more independant when it comes to some of my Rust projects.

Re: Zig Libc

#126
post #108

Earlier quoted context omitted.

It's kind of hilarious to call 2 single words at the end of a blogpost that you could have read over "pushing politics down your throat". As you said, you didn't even have an idea what it meant. For all you knew before you looked it up, he was complaining about the frigid winter weather.

Programmers are curious by nature. So it's not 2 words; it's 2 words + wikipedia article + news articles about it, just to know what he's writing about. All uncalled for.

Be a little more curious then, friend. The author lives in Portland, which has been experiencing federal brutalization for months. Same place where the feds are repeatedly violating standards for warfare by using chemical munitions on civilians and engaging in large-scale misinformation campaigns against immigrants.

It’s almost astonishing how you found his statement “uncalled for”, while neglecting these facts.

https://www.theguardian.com/us-news/2026/feb/02/portland-ven...

Re: Zig Libc

#127

250 C files were deleted. 2032 to go. Watching Zig slowly eat libc from the inside is one of the more satisfying long term projects to follow

That's something I've always admired about Zig. A lot of languages claim to be a C replacement, but Zig is the second language I've seen that seemed like it had a reasonable plan to do so at any appreciable scale. The language makes working with the C ABI pretty easy, but it also has a build system that can seamlessly integrate Zig and C together, as well as having a translate-c that actually works shockingly well in…

D can import C files directly, and can do C-source to D-source translation.

D can compile a project with a C and a D source file with:

    dmd foo.d bar.c
    ./foo

Re: Zig Libc

#128

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…

Please stay safe. I can't hold it so had to create an account to share, I'm sorry. I'm one of the minor zig contributors, and I'm reading ziglang blog for the purpose of engagement in software engineering craft. I don't want to see these ICE stuff or whatever else political opinion you or somebody else have. I'm not from US and I barely know what ICE is but you're hating on people (I'm sure you think it's deserved, a…

Get some empathy and awareness. I’m not from the US either but I am against fascist thugs occupying cities. It’s not difficult.

Re: Zig Libc

#129

That just reminds me anyone know whether rust has something similar? Not wanting to start any Rust v. Zig debate. I am just wanting to be even more independant when it comes to some of my Rust projects.

There is a couple libc implementations:

- c-ward [0] a libc implementation in Rust

- relibc [1] a libc implementation in Rust mainly for use in the Redox os (but works with linux as well)

- rustix [2] safe bindings to posix apis without using C

[0]: https://github.com/sunfishcode/c-ward

[1]: https://gitlab.redox-os.org/redox-os/relibc/

[2]: https://github.com/bytecodealliance/rustix

Re: Zig Libc

#130
Does anyone know if there is a timeline on when Zig might achieve 1.0? I've been interested in the language for a while, but I'm a bit concerned about writing anything important in it when it seems to be evolving so much at the moment
Post reply on HN