6 ms·
I remain confused about how Zig makes it to the front page of Hacker News so often. As far as I know, no one is using it in production after 7 years of developm
by andrewedstrom 3y ago
I remain confused about how Zig makes it to the front page of Hacker News so often. As far as I know, no one is using it in production after 7 years of development.
Are people just really excited about this project? Are the people behind it just really good at marketing?
Honest question: why do we all keep talking about Zig?
- mtlynch 3y agoTigerBeetle is using Zig in production.[0] I imagine some of Zig's other corporate sponsors are using it as well.[1] [0] https://tigerbeetle.com/ https://tigerbeetle.com/ [1] https://ziglang.org/zsf/ https://ziglang.org/zsf/
- pixelpoet 3y agoAndrew Kelley's intro[0] is probably the best talk I've ever seen, and his continuing leadership seems really great to me and worth supporting. Besides my reservations for its use in graphics programming (see my other comment) it looks very attractive in many practical ways (build system!! fuck CMake!) I could go from how I currently write my hobby code, sometimes a prototype for future commercial code. [0] https://www.youtube.com/watch?v=Gv2I7qTux7g https://www.youtube.com/watch?v=Gv2I7qTux7g
- PartiallyTyped 3y agoThis is easily one of the best programming talks I have ever seen, I loved the "no compiler magic" compile-time-known string formatting, and generics literally becoming a thing without magic either.
- Cyberdog 3y agoI can't answer you why Zig keeps showing up on HN (except for the surface-level answer that people keep submitting and upvoting it) but in terms of not being used in production, the Bun project, a Node/Deno alternative, is seeing a good deal of momentum by the people who like JavaScript a bit too much. It's probably the most widely used Zig project so far, including in production. https://bun.sh https://bun.sh
- veber-alex 3y agoWho uses bun in production? Seems totally insane to me to use a pre-1.0 application written in a pre-1.0 language in production considering Node and Deno basically do the same thing.
- lpapez 3y agoWhen the company you work for is burning VC money with no hope or intention of profitability, the only rational technology choice you can make as an engineer is to pick a promising but unproven technology which could boost your resume and help you land your next gig more easily. Or you simply pick it because you like and want to work with it and there is no one to stop you. I'd be very happy to hear I am wrong about this and see a profitable company with an established product using it.
- Cyberdog 3y ago> Or you simply pick it because you like and want to work with it and there is no one to stop you. Is there a problem with this? If you have a problem to solve and nobody's telling you you have to use certain tools to solve it, why not try a new tool yourself and see if it solves it better than the old ones? I do this whenever I can on client projects and I've found some rather pleasant tools this way.
- Cyberdog 3y agoI'd argue that nowadays a pre-1.0 version number usually means "this doesn't have all the features I want it to have yet" more often than "this is buggy and shouldn't be used in production yet," at least nowadays. I can't speak for Bun but I know Zig has an extensive test and timing suite to help avoid bugs or significant slow-downs making it into new releases. As for who's using Bun in production, I don't know. But it's been around for a while and seems to have decent buzz around it in the JS community when observed from a safe distance (the proper way to observe the JS community), so I assume someone is. Take that for what it's worth.
- kristoff_it 3y ago> As far as I know, no one is using it in production after 7 years of development. - Uber uses Zig to produce hermetic builds of their backends and was able to move their C/C++ codebases to arm64 thanks to Zig's C/C++ cross-compilation support. https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/ https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastr... - Bun is written in Zig and its sudden success was big enough to cause Deno to have an identity crisis. - TigerBeetle is written in Zig and it's probably the most promising upcoming database company out there. - There are a few more notable examples, but I haven't been given permission to talk about them publicly yet. > Honest question: why do we all keep talking about Zig? > Are the people behind it just really good at marketing? The project is simply inherently interesting. For one reason or another, nobody figured out a proper build & cross-compilation experience for C/C++ before Zig did it, just like nobody has figured out a good package manager yet for C/C++ and we're about to do it. When Apple Silicon came out Zig was the first compiler able to cross-compile for it (way before LLVM btw) thanks to our custom linker, and thanks to it and the fact that we're working on our own custom backends, we're also going to achieve incremental compilation with in-place binary patching, ultimately reducing linking time to basically zero for incremental rebuilds. Zig is also the only language that has async/await but that doesn't have an ugly & wasteful split between blocking and evented versions of the same networking library. I'm stopping here with technical arguments, but there would be more to talk about. Lastly and most importantly, the project has an interesting approach to finances and governance: we've had a non-profit foundation for longer than Rust and we have made a point to never, ever, let big tech companies influence the governance of Zig. The Zig Software Foundation pays its developers (instead of hiring copywriters & marketing people) and 90+% of what we make through donations or support contracts goes to developers. The rest is infrastructure and administrative costs (eg CI, accountant). I'm the guy who's most in charge of marketing and I'm currently working on the automated documentation system because Zig pretty much markets itself.
- eichin 3y agoWas apple silicon the thing that brought "caring about cross compilation" back from the dead in general? small-scale embedded use never really went away, but it was always a distinct niche...
- Ygg2 3y agoHN needs a way to counteract all Rust hype.
- bryancoxwell 3y agoZig is kind of fun to write to be honest. I mean about as fun as a systems programming language can be.
- yankput 3y agoEh if you count “code in production” Java and C would win, each in different category of software. But they are boring; nerds like shiny new objects.
- kuon 3y agoZig solves real problems no other language tackle in the same way. We do embedded development for medical devices, and zig fits perfectly because we can use static allocators and have all the features of the language. It works very well, we write firmware for STM32 serie of chips. We can compile the same code to WASM and run it into a simulator, it works great for us.
- manicennui 3y agoBecause this is Hacker News, not corporate blub news. JFC
- deleted 3y ago[deleted]
- Klonoar 3y agoOne thing nobody has pointed out yet - and this is not a knock on any language whatsoever but moreso a commentary on HN itself, so take it with a grain of salt, but: if you've followed this site since the beginning, programming languages cycle through here with a hype phase every few years like clockwork. The one most people jump to from the past few years is Rust and/or Go, but we've experienced this with other languages like Lisp (& variants), Haskell, Scala had a small window, etc. Zig will no doubt have its own moment like this (if it's not already), and then the hype cycle will settle into wherever Zig is used best. Think of it like a magnifying lens on overall programmer sentiment/interest.
- vanderZwan 3y agoGo was mostly hated on when it came out iirc.
- Klonoar 3y agoYou may be right - I paid less attention to that era of HN.