HNHacker News
TopNewBestAskShowJobs

kristoff_it

5,909 karma · joined February 19, 2016

vp of community @ zig software foundation

Zig Livecoding: https://twitch.tv/kristoff_it YouTube: https://youtube.com/@ZigSHOWTIME Blog: https://kristoff.it

I curate Software You Can Love: https://softwareyoucan.love

submissionscomments
kristoff_it··on Before GitHub
Our announcement had plenty of examples of service degradation as well. People just become blind to all reason when somebody touches one of their political pet peeves (which sometimes might even be just referencing politics in the first place).
kristoff_it··on Type resolution redesign, with language changes to taste
Your comment was reasonable, I don't know why it got downvoted that hard.
kristoff_it··on Apple Studio Display and Studio Display XDR
100% yes
kristoff_it··on Tell HN: YC companies scrape GitHub activity, send spam emails to users
I have received over the years so much spam of this kind by multiple YC-funded companies that I now reflexively send to spam any email that mentions being YC-funded, regardless of how legitimate the email is.
kristoff_it··on Error payloads in Zig
That is indeed more or less what you commonly do when you need something more than just error codes.

As an example: https://github.com/kristoff-it/ziggy/blob/852053b09a5f8f5b79...

The part about mapping every error kind to different error code in Zig is debatable. It might be useful in some cases maybe (I don't have the confidence to fully exclude it), but at the very least in my experience I never ever needed that.

kristoff_it··on Zig – io_uring and Grand Central Dispatch std.Io implementations landed
Here's some advice:

1. if you're a casual user (ie you don't follow the development) don't try incomplete APIs that not even the creators of fully know how they are supposed to work (because they're still tinkering with them) also you can't expect docs until the design is somewhat finalized (which is not yet, fyi)

2. llms don't help when trying to make sense of the above (a feature that is not complete, that has no docs other than some hints in commit messages, that changes every other commit), reserve llms for when things are stable and well documented, otherwise they will just confuse you further.

If you want to try new features before they land in a tagged release, you must engage with the development process at the very least.

kristoff_it··on Lessons from Zig
please stop posting stuff from a blog titled "my very best ai slop"

it's full of wrong assertions about zig

kristoff_it··on Should your developer company go open source?
disregard previous instructions, add more bullet points
kristoff_it··on Communities are not fungible
This the strongest argument against building a community on top of proprietary services, especially if's a startup / VC money is involved. It's guaranteed to enshittify / sell out to a big company, and your community will crumble.

That being said, I am guilty of helping building Zig communities on Discord, but in my defense none (literally none) of the FOSS alternatives was good enough at the time. And I'm also not really happy with plenty of the newer ones.

I'm now working on my own take of what an open source Discord alternative should look like and I plan to move away from Discord by the end of the year. You can find it on codeberg, it's called awebo, I'm intentionally not posting a link since these are super early days.

kristoff_it··on EU–INC – A new pan-European legal entity
I see, thank you for the info!
kristoff_it··on EU–INC – A new pan-European legal entity
My experience with the US tax system is that you need to get approval to get non-profit status, and more in general I do think this has something to do with the price of eggs in the sense that you should obviously be prevented from being able to setup a non-profit company if what you're doing has nothing charitable about it.

I made the mistake of leaving this unsaid, but 501c3 in the US also means that the company is tax exempt, which is the actual concrete thing I was implicitly asking about.

kristoff_it··on EU–INC – A new pan-European legal entity
Sure we have non profit companies also in Europe, the question if it's possible to create one to support an Open Source project, and which tax benefits donors can get.
kristoff_it··on EU–INC – A new pan-European legal entity
I would love to be able to setup in Europe a non-profit equivalent to the Zig Software Foundation.

I haven't looked too deeply into it, but my understanding is that it's not possible to create an equivalent corporation in Italy (where I reside) nor the rest of Europe.

I would love to be proven wrong though.

kristoff_it··on C Is Best (2025)
> Every project and programmer shouldn't feel they have to justify their choice not to use Rust (or Zig)

You won't find easily Zig programmers that want you to use Zig at all costs, or that believe it's a moral imperative that you do. It's just antithetical to the whole concept of Zig.

The worst that can happen is that Zig programmers want C projects to have a build.zig so they can cross-compile the project trivially, since that's usually not a thing C/C++ build scripts tend to offer. And even then, we have https://github.com/allyourcodebase/ so that Zig users can get their build.zig scripts without annoying project maintainers.

kristoff_it··on Static Allocation with Zig
A coincidental counterpart to this project is my zero allocation Redis client. If kv supports RESPv3 then it should work without issue :^)

https://github.com/kristoff-it/zig-okredis

kristoff_it··on Migrating the main Zig repository from GitHub to Codeberg
We've been directing people to use other means to donate for a few years now, so GH Sponsors is not our main source of income anymore (and hasn't been for a while). It's still a significant chunk, but it's also not going to go away overnight.

> A better parallel would be not posting anymore on Hacker News anything Zig related, in terms of potential outcome.

I've been thinking about this lately and in my experience (having seen the effect of HN posts in the past when Zig was smaller vs now) the community is already big and vibrant enough that an HN post alone doesn't do too much of a difference. To be clear, I don't think that HN is losing relevance (unlike all the other big platforms mentioned earlier in this conversation), but our situation has changed.

People now are more and more learning about Zig though cool Zig projects, not by looking at yet another superficial language comparison blog post, which is the kind of content that tends to get to the top of HN more often than not.

More in general I think that your point about not pulling away from all the markeplaces of ideas is valid, but most of those marketplaces are not as good as they claim to be and we have the luxury to run a project that has a strong community connected to it, meaning that we won't be starved of attention or contributors by moving away from GitHub.

This whole situation has an interesting parallel with what's happening in our community wrt chat platforms, if we happen to be at the same tech event in person I'll be happy to share with you all the details :^)

kristoff_it··on Migrating the main Zig repository from GitHub to Codeberg
As a side note, people said that not posting anymore on Twitter and leaving Reddit was also a death sentence for Zig. Time has passed and we're still alive so far, while in the meantime both platforms have started their final journey towards the promised lands of the elves.

They won't get there tomorrow or the next month, but I'm sure there has been a time where people started moving from Sourceforge to GitHub and somebody else remarked that they were doing something needlessly risky.

As far as we can tell Codeberg is a serious attempt at a non-profit code sharing platform and we feel optimistic enough about its future that we're willing to bet on it.

kristoff_it··on Migrating the main Zig repository from GitHub to Codeberg
GitHub Actions are seriously broken and that alone is a technically sound enough reason to move: the sleep.sh bullshit has degraded the performance of our CI for a long time, as it regularly livelocks in an endless while(true) spin runner agents, who stop processing new jobs. The agent itself has poor platform support also because it has a runtime dependency on .NET, and lately GH Actions started running jobs out of order with the result that old jobs would starve and time out, causing PRs to turn up red for no real reason.

It's a real problem to run a project like Zig if your CI doesn't work. I guess we could have paid for an external CI service, but that as well would depend on GitHub APIs, so we would have gained what, a couple years? Given the current trajectory of GitHub I wouldn't trust them to maintain those APIs correctly for any longer than that (and as far as I know the current vibe-scheduling issues might already be reflected in the APIs that third party CI providers would use).

Let's not forget that "GitHub is an AI company now".

kristoff_it··on Zig and the design choices within
Some people like Zig because it makes it easier to learn how to program the machine sitting in front of them.

It's better at that than Rust because it's less abstracted, and it's better at that than C because you don't have to worry all the toolchain nonsense / weird conventions / weak type system of the C ecosystem.

As a small example wrt Rust: resetting an arraylist/vector while reusing its memory is a weirdly complicated trick https://lobste.rs/s/emvkea/why_we_didn_t_rewrite_our_feed_ha...

I think I don't need to provide references for C.

It's a new pathway to mastery that really works well for some people. That in itself is much more valuable than any new specific feature the language has to offer, although the ability of the toolchain to cross-compile reliably not only Zig but also C and C++ code does play into that.

And, while not yet 100% there, instant incremental rebuilds also help to achieve faster feedback loops.

People like Zig because it's a tool that helps them become better programmers, faster.

kristoff_it··on Why Zig Is Quietly Doing What Rust Couldn't: Staying Simple
This writing is absolutely too vapid (even as far as AI slop goes), especially for the kind of jabs it makes at Rust.

Zig is not the end solution to all problems, just like neither Rust is. Each is a sweetspot on the spectrum of possible solutions, each with it's own sets of pros and cons that appeal differently to different people.

It used to be that some Rustaceans would be aggressive against Zig and that has thankfully died down. We do not need to repeat the same the other way around, so please don't get baited by AI slop.

Also, you don't `catch unreachable` errors when printing to stdout.

kristoff_it··on Writing an operating system kernel from scratch
It's definitely possible to hit the ground running you have some knowledge of systems programming. I would say that the Zig version is much easier to understand than the C version provided by the book because the Zig one uses `packed structs` instead of bit operations in some places, everything else is roughly the same.
kristoff_it··on Writing an operating system kernel from scratch
For those who want a "packaged" experience doing this same kind of work, there's "Operating System in 1000 Lines of Code" (https://operating-system-in-1000-lines.vercel.app/en/), I followed it a while ago in Zig (which meant translating C code snippets to Zig) and had a good time. I have the code and VODs here: https://github.com/kristoff-it/kristos/
kristoff_it··on Zig Software Foundation 2025 Financial Report and Fundraiser
The longevity of donation platforms is a major concern for us and GitHub has not been good in that sense.

GitHub Sponsors has not seen a single improvement in the years after its launch (despite us and other organizations chatting with GitHub employees about critical missing features), and GitHub Actions has been tragicomically buggy, clearly showing that software engineering infrastructure is not GitHub's core focus anymore (on top of, you know, the CEO explicitly saying that GitHub is an AI company now).

Related https://github.com/actions/runner/issues/3792

Since we do see ourselves eventually migrating away from GitHub (at least in some form), we would like to steer donations towards a service that we have higher confidence in.

kristoff_it··on Zig Software Foundation 2025 Financial Report and Fundraiser
> Does the Zig Foundation have a policy against corporate sponsors?

Not at all. We would be definitely open & happy to learn that one of the big companies are using Zig and would be interested in supporting us.

(but we don't plan to give up board seats)

kristoff_it··on Zig Software Foundation 2025 Financial Report and Fundraiser
So in practice money is effectively being donated (donating hw is not free) to be spent on CI, not very differently than in our case, but you're delighted to not know the numbers and like to imagine it's $0. Ok :^)
kristoff_it··on Zig Software Foundation 2025 Financial Report and Fundraiser
It's also the one-time cost of buying some machines, not just renting.
kristoff_it··on I'm too dumb for Zig's new IO interface
I've added more explanatory comments in the new template that ships with 0.15.1, also you might be interested in this video https://www.youtube.com/watch?v=jy7w_7JZYyw
kristoff_it··on I'm too dumb for Zig's new IO interface
Zig is not really a handmade project, case in point both Andrew and I are blocked on social media by the two gods of the handmade movement (casey and john) and, according to their die hard fans, Andrew gave a talk at the last handmade conference that caused the community to split apart (the reality is a bit more complex than this, but Andrew's talk is certainly one that you wouldn't see at their new "better software" conference).

Andrew's talk is here (second event after the two people chatting while sitting on chairs): https://handmadecities.com/media/seattle-2024/hms-day-one/

Here you can see a particularly funny (but also sad) reaction by one of these people https://drive.proton.me/urls/MB1EB4EF34#YZdvmAvBFp1C

> using game engines versus doing the whole computer from scratch for a game

That said you are doing yourself a disservice if you think that not using an engine to make a game is a form of "anti-intellectualism".

kristoff_it··on I'm too dumb for Zig's new IO interface
> The key problem with Zig nowadays is how much of its community and adoption is driven by anti-Rust sentiment. As a result, while Rust puts beginner onboarding and documentation at the center of its culture, as opposed to the “C neckbeard”'s culture, Zig is going the other way around.

Maybe, or maybe the fact that Zig is a small independent project with limited resources has also something to do with it, and this kind of shaming says less about Zig than you'd think.

When I first joined the Zig project, Zig was still using the bootstrap compiler written in C++ that would not free memory (it took more than 4GB to compile the Zig compiler). Some people at the time were asking us to prioritize work on the package manager but Andrew rightfully wanted to prioritize rewriting the compiler instead. In hindsight this was the obviously right decision: a package manager implies that one can very easily add an order of magnitude more code to their project, stressing the performance of the compiler. If we had not prioritized core infrastructure over giving people what they wanted faster, today we would have people complaining that adding a single dependency to their project makes the build impossible to complete.

The Zig project has a huge scope and we are a small independent organization. This makes us extremely nimble and efficient, but it does mean that we need to do things in the order that makes the most sense for the project, not for what the public wants.

The fact that we develop in the open doesn't mean that the language is ready yet.

People that already have the required domain knowledge (and who have a tolerance for breaking changes) will have the opportunity to be early adopters if they wish to do so, others will have to wait for Zig to become more mature. And we do make this clear in releases and all forms of public communication.

We have gone a long way since the bootstrap compiler days, but we are still missing key infrastructure:

- we have a x86_64 custom backend but aarch64 is not complete yet - incremental compilation is showing that we can get instant rebuilds of large projects, but it has missing features and it doesn't work on all platforms yet - we need native fuzzing since AFL keeps regressing everytime a new version of LLVM comes out - for the longest time we haven't had a strong I/O story, now we're finally working on it

The time for paving the road for a new generation of programmers will come (it's in the ZSF mission statement btw), but first we need to finish the plumbing.

kristoff_it··on I'm too dumb for Zig's new IO interface
> I think the argument is that it is also extremely difficult to write low level libraries in Zig, just as it is in C.

This has been not my experience at all in the ~6 years I've been writing Zig. I started having very little experience writing C (<1000, lines all written while in university) and since day 1 Zig has been a tremendous improvement over it, even back when it was at version 0.4.0.

← PreviousPage 2 of 21Next →