12 ms·
Open-source Zig book
- jasonjmcghee 11mo agoSo despite this... > The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices. I just don't buy it. I'm 99% sure this is written by an LLM. Can the author... Convince me otherwise? > This journey begins with simplicity—the kind you encounter on the first day. By the end, you will discover a different kind of simplicity: the kind you earn by climbing through complexity and emerging with complete understanding on the other side. > Welcome to the Zigbook. Your transformation starts now. ... > You will know where every byte lives in memory, when the compiler executes your code, and what machine instructions your abstractions compile to. No hidden allocations. No mystery overhead. No surprises. ... > This is not about memorizing syntax. This is about earning mastery.
- PaulRobinson 11mo agoYou can't just say that a linguistic style "proves" or even "suggests" AI. Remember, AI is just spitting out things its seen before elsewhere. There's plenty of other texts I've seen with this sort of writing style, written long before AI was around. Can I also ask: so what if it is or it isn't? While AI slop is infuriating, and the bubble hype is maddening, I'm not sure every time somebody sees some content they don't like the style of we just call out it "must" be AI, and debate if it is or it isn't is not at least as maddening. It feels like all content published now gets debated like this, and I'm definitely not enjoying it.
- maxbond 11mo agoYou can be skeptical of anything but I think it's silly to say that these "Not just A, but B" constructions don't strongly suggest that it's generated text. As to why it matters, doesn't it matter when people lie? Aren't you worried about the veracity of the text if it's not only generated but was presented otherwise? That wouldn't erode your trust that the author reviewed the text and corrected any hallucinations even by an iota?
- geysersam 11mo ago> but I think it's silly to say that these "Not just A, but B" constructions don't strongly suggest ai generated text Why? Didn't people use such constructions frequently before AI? Some authors probably overused them the same frequency AI does.
- maxbond 11mo agoI don't think there was very much abuse of "not just A, but B" before ChatGPT. I think that's more of a product of RLHF than the initial training. Very few people wrote with the incredibly overwrought and flowery style of AI, and the English speaking Internet where most of the (English language) training data was sourced from is largely casual, everyday language. I imagine other language communities on the Internet are similar but I wouldn't know. Don't we all remember 5 years ago? Did you regularly encounter people who write like every followup question was absolutely brilliant and every document was life changing? I think about why's (poignant) Guide to Ruby [1], a book explicitly about how learning to program is a beautiful experience. And the language is still pedestrian compared to the language in this book. Because most people find writing like that saccharin, and so don't write that way. Even when they're writing poetically. Regardless, some people born in England can speak French with a French accent. If someone speaks French to you with a French accent, where are you going to guess they were born? [1] https://poignant.guide/book/chapter-1.html https://poignant.guide/book/chapter-1.html
- PaulRobinson 11mo agoIt's been alleged that a major source of training data for many LLMs was libgen and SciHub - hardly casual.
- maxbond 11mo agoEven if that were comparable in size to the conversational Internet, how many novels and academic papers have you read that used multiple "not just A, but B" constructions in a single chapter/paper (that were not written by/about AI)?
- Rochus 11mo agoWho cares? Still better than just nagging.
- maxbond 11mo agoUsing AI to write is one thing, claiming you didn't when you did should be objectionable to everyone.
- Rochus 11mo agoWho wants to be so petty. I'm sure there are more interesting things to say about this book.
- maxbond 11mo agoSo petty as to lie about using AI or so petty as to call it out? Calling it out doesn't seem petty to me. I intend to learn Zig when it reaches 1.0 so I was interested in this book. Now that I see it was probably generated by someone who claimed otherwise, I suspect this book would have as much of a chance of hurting my understanding as helping it. So I'll skip it. Does that really sound petty?
- deleted 11mo ago[deleted]
- Rochus 11mo ago[flagged]
- maxbond 11mo agoI understand being okay with a book being generated (some of the text I published in this manual [1] is generated), I can imagine not caring that the author lied about their use of AI, but I really don't understand the suggestion I write a book about a subject I just told you I'm clueless about. I feel like there's some kind of epistemic nihilism here that I can't fathom. Or maybe you meant it as a barb and it's not that deep? You tell me I guess. [1] https://maxbondabe.github.io/attempt/intro.html https://maxbondabe.github.io/attempt/intro.html
- rudedogg 11mo agoI was pretty skeptical too, but it looks legit to me. I've been doing Zig off and on for several years, and have read through the things I feel like I have a good understanding of (though I'm not working on the compiler, contributing to the language, etc.) and they are explained correctly in a logical/thoughtful way. I also work with LLMs a ton at work, and you'd have to spoon-feed the model to get outputs this cohesive.
- gamegoblin 11mo agoPangram[1] flags the introduction as totally AI-written, which I also suspected for the same reasons you did [1] one of the only AI detectors that actually works, 99.9% accuracy, 0.1% false positive
- ants_everywhere 11mo agoKeep in mind that pangram flags many hand-written things as AI. > I just ran excerpts from two unpublished science fiction / speculative fiction short stories through it. Both came back as ai with 99.9% confidence. Both stories were written in 2013. > I've been doing some extensive testing in the last 24 hours and I can confidently say that I believe the 1 in 10,000 rate is bullshit. I've been an author for over a decade and have dozens of books at hand that I can throw at this from years prior to AI even existing in anywhere close to its current capacity. Most of the time, that content is detected as AI-created, even when it's not. > Pangram is saying EVERYTHING I have hand written for school is AI. I've had to rewrite my paper four times already and it still says 99.9% AI even though I didn't even use AI for the research. > I've written an overview of a project plan based on a brief and, after reading an article on AI detection, I thought it would be interesting to run it through AI detection sites to see where my writing winds up. All of them, with the exception of Pangram, flagged the writing as 100% written by a human. Pangram has "99% confidence" of it being written by AI. I generally don't give startups my contact info, but if folks don't mind doing so, I recommend running pangram on some of their polished hand written stuff. https://www.reddit.com/r/teachingresources/comments/1icnren/pangram_a_much_higher_accuracy_ai_detection_tool/#bottom-comments https://www.reddit.com/r/teachingresources/comments/1icnren/...
- gamegoblin 11mo agoWeird to me that nobody ever posts the actual alleged false positive text in these criticisms I've yet to see a single real Pangram false positive that was provably published when it says it was, yet plenty such comments claiming they exist
- agucova 11mo agoHow long were the extracts you gave to Pangram? Pangram only has the stated very high accuracy for long-form text covering at least a handful of paragraphs. When I ran this book, I used an entire chapter.
- simonklee 11mo agoIt's just an odd claim to make when it feels very much like AI generated content + publish the text anonymously. It's obviously possible to write like this without AI, but I can't remember reading something like this that wasn't written by AI. It doesn't take away from the fact that someone used a bunch of time and effort on this project.
- jasonjmcghee 11mo agoTo be clear, I did not dismiss the project or question its value - simply questioned this claim as my experience tells me otherwise and they make a big deal out of it being human written and "No AI" in multiple places.
- simonklee 11mo agoI agree with you. After reading a couple of the chapters I'd be surprised if this wasn't written by an LLM.
- gre 11mo agoDid they actually spend a bunch of time and effort though? I think you could get an llm to generate the entire thing, website and all. Check out the sleek looking terminal--there's no ls, cd, it's just an ai hallucination.
- deleted 11mo ago[deleted]
- the-anarchist 11mo agoDoesn't mean that the author might not use AI to optimise legibility. You can write stuff yourself and use an LLM to enhance the reading flow. Especially for non-native speakers it is immensely helpful to do so. Doesn't mean that the content is "AI-generated". The essence is still written by a human.
- lukan 11mo agoBut then you cannot write that "The Zigbook intentionally contains no AI-generated content—it is hand-written"
- tredre3 11mo ago> Doesn't mean that the author might not use AI to optimise legibility. I agree that there is a difference between entirely LLM-generated, and LLM-reworded. But the statement is unequivocal to me: > The Zigbook intentionally contains no AI-generated content—it is hand-written If an LLM was used in any fashion, then this statement is simply a lie.
- mrob 11mo ago>If an LLM was used in any fashion, then this statement is simply a lie. While I don't believe the article was created this way, it's possible to use an LLM purely as a classifier. E.g. prompt along the lines of "Does this paragraph contain any errors? Answer only yes or no." and generate only a single set of token probabilities, without any autoregression. Flag any paragraphs with sufficient probability of "yes" for human review.
- blt 11mo agoClarity in writing comes mostly from the logical structure of ideas presented. Writing can have grammar/style errors but still be clear. If the structure is bad after translation, then it was bad before translation too.
- chris_pie 11mo agoI don't think so, I think it's just a pompous style of writing.
- CathalMullan 11mo agoPretty clear it's all AI. The @zigbook account only has 1 activity prior to publishing this repo, and that's an issue where they mention "ai has made me too lazy": https://github.com/microsoft/vscode/issues/272725 https://github.com/microsoft/vscode/issues/272725
- smj-edison 11mo agoAfter reading the first five chapters, I'm leaning this way. Not because of a specific phrase, but because the pacing is way off. It's really strange to start with symbol exporting, then moving to while loops, then moving to slices. It just feels like a strange order. The "how it works" and "key insights" also feel like a GPT summarization. Maybe that's just a writing tic, but the combination of correct grammar with bad pacing isn't something I feel like a human writer has. Either you have neither (due to lack of practice), or both (because when you do a lot of writing you also pick up at least some ability to pace). Could be wrong though.
- ants_everywhere 11mo agoIMO HN should add a guideline about not insinuating things were written by AI. It degrades the quality of the site similarly to many of the existing rules. Arguably it would be covered by some of the existing rules, but it's become such a common occurrence that it may need singling out.
- ModernMech 11mo agoWhat degrades conversation is to lie about something being not AI when it actually is. People pointing out the fraud are right to do so. One thing I've learned is that comment sections are a vital defense on AI content spreading, because while you might fool some people, it's hard to fool all the people. There have been times I've been fooled by AI only to see in the comments the consensus that it is AI. So now it's my standard practice to check comments to see what others are saying. If mods put a rule into place that muzzles this community when it comes to alerting others a fraud is being affected, that just makes this place a target for AI scams.
- ants_everywhere 11mo agoIt's 2025, people are going to use technology and its use will spread. There are intentional communities devoted to stopping the spread of technology, but HN isn't currently one of them. And I've never seen an HN discussion where curiosity was promoted by accusations or insinuations of LLM use. It seems consistent to me with the rules against low effort snark, sarcasm, insinuating shilling, and ideological battles. I don't personally have a problem with people waging ideological battles about AI, but it does seem contrary to the spirit of the site for so many technical discussions to be derailed so consistently in ways that specifically try to silence a form of expression.
- ModernMech 11mo agoI'm 100% okay with AI spreading. I use it every day. This isn't a matter of an ideological battle against AI, it's a matter of fraudulent misrepresentation. This wouldn't be a discussion if the author themselves hadn't claimed what they had, so I don't see why the community should be barred from calling that out. Why bother having curious discussions about this book when they are blatantly lying about what is presented here? Here's some curiosity: what else are they lying about, and why are they lying about this?
- NoboruWataya 11mo ago> Can the author... Convince me otherwise? Not disagreeing with you, but out of interest, how could you be convinced otherwise?
- jasonjmcghee 11mo agoI'm not sure, but I try my best to assume good faith / be optimistic. This one hit a sore spot b/c many people are putting time and effort into writing things themselves and to claim "no ai use" if it is untrue is not fair. If the author had a good explanation... Idk not a native English writer and used an LLM to translate and that included the "no LLMs used" call-out and that was translated improperly etc
- chris_pie 11mo agonote that the front page also says: "61 chapters • Project-based • Zero AI"
- ummonk 11mo agoGit log / draft history
- Jach 11mo agoTo me it's another specimen in the "demonstrating personhood" problem that predates LLMs. e.g. Someone replies to you on HN or twitter or wherever, are they a real person worth engaging with? Sometimes it'll literally be a person but their behavior is indistinguishable from a bot, that's their problem. Convincing signs of life include account age, past writing samples, and topic diversity.
- keyle 11mo agoI wish AI had the self-built irony of adding vomit emojis to their sycophantic sentences.
- ninetyninenine 11mo agoThe sweet irony of this post is that this very post itself is written by an LLM.
- PaulRobinson 11mo agoThis looks fantastic. Pedagogically it makes sense to me, and I love this approach of not just teaching a language, but a paradigm (in this case, low-level systems programming), in a single text. Zig got me excited when I stumbled into it about a year ago, but life got busy and then the io changes came along and I thought about holding off until things settled down - it's still a very young language. But reading the first couple of chapters has piqued my interest in a language and the people who are working with it in a way I've not run into since I encountered Ruby in ~2006 (before Rails hit v1.0), I just hope the quality stays this high all the way through.
- mi_lk 11mo ago> Pedagogically it makes sense to me It does not. It dives into compiler details on chapter 01, and smells heavily AI (not in a good way) as others have pointed out
- amitav1 11mo agoIt looks cool! No experience with Zig so can't comment on the accuracy, but I will take a look at it this week. Also a bit annoying that there is no PDF version that I could download as the website is pretty slow. After taking a look at the repository (https://github.com/zigbook/zigbook/tree/main https://github.com/zigbook/zigbook/tree/main), each page seems to be written in AsciiDoc, so I'll take a look about compiling a PDF version later today.
- hoshikihao 11mo agoIf there is a PDF version, please remember to give me one. Thank you in advance.
- deleted 11mo ago[deleted]
- forgotpwd16 11mo agozigbook.pdf => https://files.catbox.moe/gobtw7.pdf https://files.catbox.moe/gobtw7.pdf HOWTO: The text can be found per-chapter in `./pages/{chapter}.adoc` but each chapter includes code snippets found in a respective `./chapters-data/code/{chapter}/` subdirectory. So, perhaps a hacky way to do it but quite lazy to fully figure asciidoctor flags, created using a script a combined book.adoc that includes all others with `include::{chapter}.adoc` directives, then run `asciidoctor-pdf -a sourcedir=../chapters-data/code -r asciidoctor-diagram -o book.pdf ./pages/book.adoc`.
- gigatexal 11mo agothere's no way someone made this for free, where do I donate? im gonna get so much value from this this feels like stealing
- cultofmetatron 11mo agoSAME. I was looking for a donation button myself! I've paid for worse quality instructional material. this is just the sort of thing I'm happy to support
- gamegoblin 11mo agoIt's AI-written FWIW though maybe AI is getting to the point it can do stuff like this somewhat decently
- popcar2 11mo agoThe first page says none of the book was written by AI
- gamegoblin 11mo agoYes, it's a false claim
- skor 11mo agohow do you know this? let us know please, thanks. edit, I see you used this to check: https://news.ycombinator.com/item?id=45948220 https://news.ycombinator.com/item?id=45948220
- gamegoblin 11mo agopangram.com, the most accurate and lowest false positive AI detector https://www.pangram.com/blog/third-party-pangram-evals https://www.pangram.com/blog/third-party-pangram-evals
- wosined 11mo agoSome text is unreadable because it is so small.
- gooodvibes 11mo ago[flagged]
- curtisblaine 11mo ago"nobody uses in the real world yet" is uncharitable, as Zig is used in many real-world projects (Bun and Tigerbeetle are written in Zig, for example). But there's value being at the forefront of technologies that you think are going to explode soon, so that's how people find time and energy, I guess.
- hoten 11mo agoSimple: your priors are wrong. People use Zig.
- deleted 11mo ago[deleted]
- testdelacc1 11mo agoEven if what you say is true, people make bets on new tech all the time. You show up early so you can capture mindshare. If Zig becomes mainstream then this could be the standard book that everyone recommends. Not just that, it’s more likely the language succeeds if it has good learning materials - that’s an outcome the author would love.
- cultofmetatron 11mo ago> people make bets on new tech all the time. You show up early so you can capture mindshare. I got on the ground floor with elixir. got my startup built on it. now we have 3 fulltime engineers working on elixir fulltime. None of that would have happenned if I looked at a young language and said "its not used in the real world"
- cultofmetatron 11mo agoghostty and bun aren't real world enough for you?
- serial_dev 11mo agoIt was very hard to find a link to the table of contents… then I tried opening it and the link didn’t work. I’m on iOS. I’d have loved to take a look quickly what’s in the book…
- hoten 11mo agohttps://github.com/zigbook/zigbook/tree/main/pages https://github.com/zigbook/zigbook/tree/main/pages
- serial_dev 11mo agoI found it, maybe it was there all along. Go to chapters, then open the side menu with the hamburger button.
- deleted 11mo ago[deleted]
- p2detar 11mo agoHmm, the explanation of Allocators is much more detailed in the book, but I feel although more compact, it seems much more reasonable in the language reference. [0] I'll keep exploring this book though, it does look very impressive. 0 - https://ziglang.org/documentation/master/#Memory https://ziglang.org/documentation/master/#Memory
- shuraman7 11mo agoIt's really hard to believe this isn't AI generated, but today I was trying to use the HTTP server from std after the 0.15 changes, couldn't figure out how it's supposed to work until I've searched repos in Github. LLM's couldn't figure it out as well, they were stuck in a loop of changing/breaking things even further until they arrived at the solution of using the deprecated way. so I guess this is actually handwritten which is amazing because it looks like the best resource I've seen up until now for Zig
- tredre3 11mo agoI've had the same experience as you with Zig. I quite love the idea of it Zig but the undocumented churn is a bit much. I wish they had auto generated docs that reflect the current state of the stdlib, at least. Even if it just listed the signatures with no commentary. I was trying to solve a simple problem but Google, the official docs, and LLMs were all out of date. I eventually found what I needed in Zig's commit history, where they casually renamed something without updating the docs. It's been renamed once more apparently, still not reflected in the docs :shrugs:.
- smj-edison 11mo agoWait, doesn't `zig std` launch the autogenerated docs?
- geophph 11mo agoIt’s currently broken, or was recently on the 0.16 dev branch (master)
- Aeolun 11mo agoBut you can tell your LLM to just go look at the source code (after checking it out so it doesn’t try 20s github requests). Always works like a charm for me.
- blks 11mo ago> It's really hard to believe this isn't AI generated Case of a person who is relying on LLMs so much he cannot imagine doing something big by themselves.
- smj-edison 11mo agoIt's pretty incredible how much ground this covers! However, the ordering feels a little confusing to me. One example is in chapter 1. It talks about symbol exporting based on platform type, without explaining ELF. This is before talking about while loops. It's had some interesting nuggets so far, and I've followed along since I'm familiar with some of the broad strokes, but I can see it being confusing to someone new to systems programming.
- johnfn 11mo agoThe book claims it’s not written with the help of AI, but the content seems so blatantly AI-generated that I’m not sure what to conclude, unless the author is the guy OpenAI trained GPT-5 on: > Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. “Not just X - Y” constructions. > By Chapter 61, you will not just know Zig; you will understand it deeply enough to teach others, contribute to the ecosystem, and build systems that reflect your complete mastery. More not just X - Y constructions with parallelism. Even the “not made with AI” banner seems AI generated! Note the 3 item parallelism. > The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices. I don’t have anything against AI generated content. I’m just confused what’s going on here! EDIT: after scanning the contents of the book itself I don’t believe it’s AI generated - perhaps it’s just the intro? EDIT again: no, I’ve swung back to the camp of mostly AI generated. I would believe it if you told me the author wrote it by hand and then used AI to trim the style, but “no AI” seems hard to believe. The flow charts in particular stand out like a sore thumb - they just don’t have the kind of content a human would put in flow charts.
- geysersam 11mo agoClearly your perception of what is AI generated is wrong. You can't tell something is AI generated only because it uses "not just X - Y" constructions. I mean, the reason AI text often uses it is because it's common in the training material. So of course you're going to see it everywhere.
- johnfn 11mo agoFind me some text from pre-AI that uses so many of these constructions in such close proximity if it’s really so easy - I don’t think you’ll have much luck. Good authors have many tactics in their rhetorical bag of tricks. They don’t just keep using the same one over and over.
- andyferris 11mo ago
- VerifiedReports 11mo ago[flagged]
- mjaniczek 11mo agoWhat is it with HN and the "oh, I thought {NAME} is the totally different tool {NAME}" comments? Is it some inside joke?
- VerifiedReports 11mo agoOr just incredulity that people naming a technology are ignorant of the fact that another well-known technology is already using it. ¯\_(ツ)_/¯
- mikelitoris 11mo agoOne is Zig the other is Zigbee, I don't understand your comment...
- VerifiedReports 11mo agohttps://stockshed.com/products/t3542-zig-2-4-ghz-wireless-mesh-network-temperature-humidity-sensor https://stockshed.com/products/t3542-zig-2-4-ghz-wireless-me... I think ZigBee uses Zig. It's an implementation.
- maxbond 11mo agoThe page you've linked is very confusing, but as far as I can tell that's a Zigbee device that the manufacturer (Tensor plc) consistently describes as a "Zig" device. I have no idea why, it's bizarre. - This thesis [1] identifies a product in this family as a Zigbee device. It's on the 80th page (numbered 62). Elsewhere it's referred to as a Zig device. - I can't find anyone else claiming to make Zig devices or any references to a Zig protocol outside of this one manufacturer and their distributors. - The manufacturer makes a lot of weird typos. They variously say these devices operate at 2.4GHz, 2.4MHz, and 2.4Mhz. - There's nothing about a Zig protocol on the Zigbee Wikipedia page. [1] https://theses.ncl.ac.uk/jspui/bitstream/10443/4329/1/Liang%20XinXin%202018.pdf https://theses.ncl.ac.uk/jspui/bitstream/10443/4329/1/Liang%...
- deleted 11mo ago[deleted]
- fifhtbtbf 11mo ago[flagged]
- gigatree 11mo agoinb4 people start putting a standardized “not AI generated” symbol in website headers
- mendelmaleh 11mo ago> The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices. I think it's time to have a badge for non LLM content, and avoid the rest.
- gregsadetsky 11mo agoThere seems to be https://notbyai.fyi/ https://notbyai.fyi/ and https://no-ai-icon.com/ https://no-ai-icon.com/ ..!
- Rasthor 11mo agoThere is also Brainmade: https://brainmade.org/ https://brainmade.org/
- benatkin 11mo agoThe name seems odd to me, because I think it's fine to describe things as a digital brain, especially when the word brain doesn't only apply to humans but to organisms as simple as a 959 cell roundworm with 302 neurons.
- righthand 11mo agoAlso the logo seems to imply a plant has taken over this person and the content was made by some sort of body-snatched pod person.
- grodriguez100 11mo agoIt’s cordyceps :-D
- kaycey2022 11mo agoWhat's stopping AI made content from including this as well?
- brcmthrowaway 11mo agoNeed this but to learn AI
- thomascountz 11mo agoThe book content itself is deliberately free of AI-generated prose. Drafts may start anywhere, but final text should be reviewed, edited, and owned by a human contributor. There is more specificity around AI use in the project README. There may have been LLMs used during drafting, which has led to the "hallmarks" sticking around that some commenters are pointing out.
- ummonk 11mo agoThat statement is honestly self-contradictory. If a draft was AI-generated and then reviewed, edited, and owned by a human contributor, then the parts which survived reviewing and editing verbatim were still AI-generated...
- ako 11mo agoWhy do you care, if a human reviewed and edited it, someone filtered it to make sure it’s correct. It’s validated to be correct, that is the main point.
- littlestymaar 11mo ago> if a human reviewed and edited it, someone filtered it to make sure it’s correct Yes. But it's not “free from AI-generated prose”, so why advertise it as such? And since the first sentence is a lie, why should we believe the second sentence at all?
- freehorse 11mo agoBecause it never works like that in practice. People have the illusion of reviewing and "owning" the final product, but that is not how it looks like from the outside. The quality, the prose style, the errors that pass through due to inevitable AI-induced complacency ALWAYS EVENTUALLY show. If people got out of the AI bubbles they would see it too, alas. We keep reading the same stories for at least a couple of years now. There is no novelty anymore. The core issues and problems have stayed the same since gpt3.5. And because they are so omnipresent in the internet, we have grown to be able to recognise them almost automatically. It is no longer just a matter of quality, it is an insult to the readers when an author pretends that content is not AI generated just because they "reviewed it". Reviewing sth that somebody else wrote is not ownership, esp when that sth is an LLM. In any case, I do not care if people want to read or write AI generated books, just don't lie about it being AI generated.
- bricss 11mo agoBut can we train AI on this beautifully hand-crafted material, and ask it later to rewrite Rust with Zig? :]
- eibrahim 11mo agoSo many comments about the AI generation part. Why does it matter? If it’s good and accurate and helpful why do you care? That’s like saying you used a calculator to calculate your equations so I can’t trust you. I am just impressed by the quality and details and approach of it all. Nicely done (PS: I know nothing about systems programming and I have been writing code for 25 years)
- maipen 11mo agoInsecurity, that's why. I too have this feeling sometimes. It's a coping mechanism. I don't know why we have this but I guess we have to see past it and adapt to reality.
- hatefulmoron 11mo agoIf you believed that you wouldn't explicitly say there was no AI generated content at all, you'd let it speak for itself.
- gassi 11mo ago> Why does it matter? Because AI gets things wrong, often, in ways that can be very difficult to catch. By their very nature LLMs write text that sounds plausible enough to bypass manual review (see https://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-slops/ https://daniel.haxx.se/blog/2025/07/14/death-by-a-thousand-s...), so some find it best to avoid using it at all when writing documentation.
- DrNosferatu 11mo agoHumans get things wrong too. Quality prose usually only becomes that after many reviews.
- gassi 11mo agoAI tools make different types of mistakes than humans, and that's a problem. We've spent eons creating systems to mitigate and correct human mistakes, which we don't have for the more subtle types of mistakes AI tends to make.
- reactordev 11mo agoA lot of love went into this. It's evident throughout. Great job!
- cracki 11mo agoNah, just a lot of prompting.
- matsy007 11mo agoWhy do we need another language?
- jesseb34r 11mo agoThis source is really hard to trust. AI or not, the author has done no work to really establish epistemological reliability and transparency. The entire book was published at once with no history, no evidence of the improvement and iteration it takes to create quality work, and no reference as to the creative process or collaborators or anything. And on top of that, the author does not seem to really have any other presence or history in the community. I love Zig, and have wanted more quality learning materials to exist. This, unfortunately, does not seem to be it.
- ncgl 11mo agoHow do you feel about regular books, whose iterations and edits you dont see?
- jesseb34r 11mo agoFor books that are published in more traditional manners, digital or paper, there is normally a credible publisher, editors, sometimes a foreword from a known figure, reviews from critics or experts in the field, and often a bio about the author explaining who they are and why they wrote the book etc. These different elements are all signals of reliability, they help to convey that the content is more than just fluff around an attention-grabbing title, that it has depth and quality and holds up. The whole publishing business has put massive effort into establishing and building these markers of trust.
- trenchpilgrim 11mo agoDo you have any criticism of the content, or just "I don't know the author"?
- Brian_K_White 11mo agoThey didn't say "this is in error", so they don't need any such example errors. They also didn't say just "I don't know the author".
- charlie90 11mo ago>Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. Zig is just C with a marketing push. Most developers already know C.
- dcre 11mo agoI suspect most developers do not know C.
- downrightmike 11mo agoC is fine C++ is where they jumped the shark
- bnolsen 11mo agoC++ explored a lot of ideas that some modern languages borrowed. C++ just had to haul along all the cruft it inherited and built up.
- jeltz 11mo agoNo, C is not fine. It is a really bad language that I unfortunately have to code professionally.
- MyOutfitIsVague 11mo agoC++ is far better than C in very many ways. It's also far worse than C in very many other ways. Given a choice between the two, I'd still choose C++ every day just for RAII. There's only so much that we can blame programmers for memory leaks, use-after-free, buffer overflows, and other things that are still common in new C code. At some point, it is the language itself that is unsuitable and insufficient.
- cowsandmilk 11mo agoI’m not sure what that has to do with the comment you’re replying to…
- pjmlp 11mo ago
- delifue 11mo agoA nitpick about website: the top progress bar is kind of distracting (high-constrast color with animation). It's also unnecessary because there is already scrollbar on the right side.
- samgranieri 11mo agoAs someone who is diving deep into Zig, I’m actually going to evaluate all this (and compare this to Ziglings) or the Zig track on Exercism.
- zer0x4d 11mo agoFor me, personally, any new language needs to have a "why." If a new language can't convince me in 1-2 sentences why I need to learn it and how it's going to improve software development, as a whole, it's 99% bs and not worth my time. DHH does a great job of clarifying this during his podcast with Lex Friedman. The "why" is immediately clear and one can decide for themselves if it's what they're looking for. I have not yet seen a "why" for Zig.
- anta40 11mo agoHmmm what about this: https://ziglang.org/learn/why_zig_rust_d_cpp/ https://ziglang.org/learn/why_zig_rust_d_cpp/ Convincing enough?
- jamiejquinn 11mo agoFor many languages I agree, especially languages with steep learning curves (e.g. Rust, Haskell). But zig is dead fast to learn so I'd recommend just nipping through Ziglings and seeing if its a language you want to add to the toolbox. It took me only about 10 hours to pick up and get used to and it has immediately replaced C and C++ in my personal projects. It's really just a safer, more ergonomic C. If you already love C, I maybe wouldn't bother.
- jimmytucson 11mo ago> [Learning Zig] is about fundamentally changing how you think about software. Learning LISP, Fortran, APL, Perl, or really any language that is different from what you’re used to, will also do this for you.
- userbinator 11mo agoI'd add Prolog to that list; but Fortran and Perl aren't all that different from other procedural languages.
- pjmlp 11mo agoKind of, Perl was one of the first languages to bring FP to the masses, while Lisp and ML languages were hardly looked up by them. See https://hop.perl.plover.com/book/ https://hop.perl.plover.com/book/
- deleted 11mo ago[deleted]
- jamiejquinn 11mo agoI agree, I love zig but the things that make me program differently are features like excellent enum/union support, defer and comptime, which aren't readily available in the other languages I tend to use (C++, Fortran and Python).
- rrgok 11mo agoI guess now the trend is Zig. The era of Javascript framework has come to end. After that was AI tend. And now we have Zig and its allocators, especially the arena allocator. /S
- poly2it 11mo ago> Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. I'm not sure what they expect, but to me Zig looks very much like C with a modern standard lib and slightly different syntax. This isn't groundbreaking, not a thought paradigm which should be that novel to most system engineers like for example OCaml could be. Stuff like this alienates people who want a technical justification for the use of a language.
- userbinator 11mo agoFor those who actually want to learn languages which are "fundamentally changing how you think about software", I'd recommend the Lisp family and APL family.
- zwnow 11mo agoI'd also throw Erlang/Elixir out there. And I really wished Elm wasn't such a trainwreck of a project...
- matu3ba 11mo agoWhat is the most optimal Erlang/Elixir you can think of regarding standardized effect systems for recording non-determinism, replaying and reversible computing? How comparable are performance numbers of Erlang/Elixir with Java and wasm?
- zwnow 11mo agoI'd recommend asking the Elixir community about this as I didn't even understand your question. I am by no means a professional with Erlang/Elixir. I threw it out there because these language force you to think differently compared to common OOP languages.
- 59nadir 11mo agoNo need to include Elixir here; none of the important bits that will change how you view software come from Elixir, it's just a skin on top of Erlang (+ some standard library wrappers) and that's it.
- pkphilip 11mo agoVery well done! wow! Thanks for this. Going through this now. One comment: About the syntax highlighting, the dark blue for keywords against a black background is very difficult to read. And if you opt for the white background, the text becauses off white / grey which again is very difficult to read.
- CraftingLinks 11mo agoThe gratuit accusations in this thread should be flagged.
- deleted 11mo ago[deleted]
- finalhacker 11mo agowow, it's so cool.
- pelasaco 11mo agoI'm a C/C++ developer. I write production code in MQL5 (C-like) and Go, and I use Python for research and Automation. I can work with other languages as well, but I keep asking myself: why should I learn Zig? If I want to do system or network programming, my current stack already covers those needs — and adding Rust would probably make it even more future-proof. But Zig? This is a genuine question, because the "Zig book" doesn’t give me much insight into what are the real use cases for Zig.
- tamnd 11mo agoIf you're doing it for real-world values, keep doing that. But if you want traction, writing in a "fancy" language is almost a requirement. "A database engine written in Zig" or "A search engine written in Zig" sounds much flashier and guarantees attention. Look at this book: it is defintely an AI slop, but it stays at the top spot, and there's barely any discussion about the language itself. Enough rant, now back on some reasons for why choosing Zig: - Cross platform tools with tiny binaries (Zig's built in cross compilation avoids the complex setup needed with C) - System utilities or daemons (explicit error handling instead of silent patterns common in C) - Embedded or bare metal work (predictable rules and fewer footguns than raw C) - Interfacing with existing C libraries (direct header import without manual binding code) - Build and deployment tooling (single build system that replaces Make and extra scripts) For my personal usage, I'm working on replacing Docker builds for some Go projects that rely heavily on CGO by using `zig cc`. I'm not using the Zig language itself, but this could be considered one of its use cases.
- pelasaco 11mo ago> For my personal usage, I'm working on replacing Docker builds for some Go projects that rely heavily on CGO by using `zig cc`. I'm not using the Zig language itself, but this could be considered one of its use cases. Hm, i can see a good use case when we want to have reproducible builds from go packages, including its C extensions. Is that your use case, or are you aiming for multi-environment support of your compiled "CGO extensions"
- 11mo ago
- atwrk 11mo ago> Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software. Written by ChatGPT?
- wkjagt 11mo ago> You came for syntax. You'll leave with a philosophy.
- virajk_31 11mo agoFolks! do I really need learn Zig? I am already good with Rust!!
- epolanski 11mo agoBar C if you're into system's programming there's no language you *need* to learn.
- virajk_31 11mo agoPartially agree on this, std lib/crates and ease of use do make a difference (this is not even the main reason to use Rust), though Rust certainly has its own headaches. (Imagine searching for someone's implementation of HashedMap on github or using dedicated packages like glib, when you get it easily at crates.io). Again this is subjective based on use cases.
- epolanski 11mo agoNot much for authoring new code as much as reading it, it's the lingua franca.
- tamnd 11mo agoYeah, you should. Zig is a trending language right now, and in the coming years many projects are likely to be rewritten in Zig instead of Rust (often referred to as "riiz").
- virajk_31 11mo agoIs this sarcasm? if yes I got your joke otherwise please enlighten me _/\_
- tamnd 11mo agoI was half joking. Folks keep saying everything will get rewritten in Zig, so I played along with that. Nothing serious behind it. With only half serious intent, I think only the real wizard types, like Jarred Sumner (Bun) and Mitchell Hashimoto (Ghostty), who understand both low level systems and higher level languages, should be writing big tools in Zig. The tough part in the next few years will not be building things, it will be keeping them alive if the authors step away or the ecosystems move in a different direction.
- timeon 11mo agoUsing Next.js and Tailwind-bloat feels contradictory to Zig.
- smakt 11mo agoHaha the fucking garbage. Before AI, before the internet, this overexaggerated, hokey prose was written by scummy humans and it came exclusively in porn magazines along with the x-ray specs and sea-monkey fishtanks.
- bargainbin 11mo ago> No hidden control flow: Zig has no hidden allocators, goroutines… Neither of those things are control flow, and yet again I’m reading a pro-Zig text taking a dig at Go without any substance to the criticism. Also funny having a dig at goroutines when Zig is all over the place with its async implementation.
- vad1d3v 11mo agoI don't know any of you. But Zig has opened way big door for system programming for people like me who has never done that before. And, Zig code looks (for a guy comes from curly braces language) easier to understand with really small learning curve.
- rudedogg 11mo agoI submitted this and unfortunately it is likely AI generated. The authors github history suggests it at the very least, along with seemingly misunderstanding a reference to a Zig language feature (labeled blocks - https://zig.guide/language-basics/labelled-blocks/ https://zig.guide/language-basics/labelled-blocks/) in the project issues (https://github.com/zigbook/zigbook/issues/4 https://github.com/zigbook/zigbook/issues/4). I’m not sure how much value is to be had here, and it’s unfortunate the author wasn’t honest about how it was created. I wish I wouldn’t have submitted this so quickly but I was excited about the new resource and the chapters I dug into looked good and accurate. I worry about whether this will be maintained, if there are hallucinations, and if it’s worth investing time into.
- Wowfunhappy 11mo agoAre you sure? Right on https://www.zigbook.net/chapters/00__zigbook_introduction https://www.zigbook.net/chapters/00__zigbook_introduction it says: > The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices. The author could of course be lying. But why would you use AI and then very explicitly call out that you’re not using AI?
- UpsideDownRide 11mo agoBecause AI content is at minimum controversial nowadays. And if you are ok with lying about authorship then It is not further down the pole to embelish the lie a bit more
- rudedogg 11mo ago> Are you sure? There are too many things off about the origin and author to not be suspicious of it. I’m not sure what the motivation was, but it seems likely. I do think they used the Zig source code heavily, and put together a pipeline of some sort feeding relevant context into the LLM, or maybe just codex or w/e instructed to read in the source. It seems like it had to take quite a bit of effort to make, and is interesting on its own. And I would trust it more if I knew how it was made (LLMs or not). As another suspicious data point see this issue by the author: https://github.com/microsoft/vscode/issues/272725 https://github.com/microsoft/vscode/issues/272725 Edit: https://news.ycombinator.com/item?id=45952581 https://news.ycombinator.com/item?id=45952581 found some concrete issues
- booleandilemma 11mo agoI wonder if HN should mandate an [AI] tag for links to AI generated content.
- krapp 11mo agoIt should be against HN policy to link to AI generated content just as it's against HN policy to post AI generated comments. Futile as it is.
- lenkite 11mo ago"The Zigbook intentionally contains no AI-generated content—it is hand-written, carefully curated, and continuously updated to reflect the latest language features and best practices." Such a bald-faced and utterly disgusting lie. The introduction itself ticks every single flag of AI generated slop. AI is trained well on corporate marketing brochures.
- nstart 11mo agoWelp. I wish I had read the comments first to discover that this is AI generated. On the other hand, I got to experience the content without bias. I opted to give it a try instead of reading the comments and the book was arranged in a super strange way where it's discussing concepts that a majority of programmers would never be concerned with when starting out with learning a language. It's very different to learn about some of these concepts if you are reading a language doc in order to work on the language itself. But if you want to learn how to use the language, something like: > Choose between std.debug.print, unbuffered writers, and buffered stdout depending on the output channel and performance needs. is absolutely never going to be something you dump into chapter 1. I skimmed through a few chapters from there and it's blocks of stuff thrown in randomly. The introduction to the if conditional throws in Zig Intermediate Representation with absolutely no explanation of what it is and why it's even being discussed. Came here to comment that this has been written pretty poorly or just targets a very niche audience and now I discover it's slop. What a waste of time. The one thing AI was supposed to save.
- dominicrose 11mo ago> Most programming languages hide complexity from you A garbage collector isn't "hidden complexity". We all know they exist and use memory and CPU. How Zig is better than Ruby: - it has a linear performance gain - the IDE has more information That's great if you absolutely need it, but in a lot of cases: - you don't need linear performance gains or you need the gains to be more than linear - the linear performance gains come at a huge cost: code readability (assuming you managed to write it and it compiles) - relying too much on the IDE won't make better programs and won't make you a better programmer
- lr1970 11mo agoThe biggest red flag for me is the author hiding their name. If you wrote quality book about a programming language you are not hiding your identity from the world.
- morningscifi 11mo agoThe repository also has a misconfigured .gitignore file which allowed them to check in some built executables into the repository. This is something that I wouldn't judge beginners for, but someone claiming to be an expert writing a book on the topic should know how to configure a .gitignore for their particular language of expertise.
- Copenjin 11mo agoIf the code/text is wrong since that too is AI slop, why is this not flagged yet? We were better at this once.
- hiro4910 11mo ago[flagged]
- nbobko 11mo agoOh no, it's paginated