[HN Gopher] Open-source Zig book
___________________________________________________________________
Open-source Zig book
Author : rudedogg
Score : 226 points
Date : 2025-11-16 19:44 UTC (3 hours ago)
(HTM) web link (www.zigbook.net)
(TXT) w3m dump (www.zigbook.net)
| jasonjmcghee wrote:
| So 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 wrote:
| You 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 wrote:
| You 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 wrote:
| > 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 wrote:
| I 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
| Rochus wrote:
| Who cares?
|
| Still better than just nagging.
| maxbond wrote:
| Using AI to write is one thing, claiming you didn't when you
| did should be objectionable to everyone.
| Rochus wrote:
| Who wants to be so petty.
|
| I'm sure there are more interesting things to say about
| this book.
| maxbond wrote:
| So 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?
| littlestymaar wrote:
| This.
|
| I wouldn't mind a technical person transparently using AI
| for doing _the writing_ which isn 't necessary their
| strength, as long as the content itself comes from the
| author's expertise and the generated writing is thoroughly
| vetted to make sure there's no hallucinationated
| misunderstanding in the final text. At the end of the day
| this would just increase the amount of high quality
| technical content available, because the set of people with
| both a good writing skill and a deep technical expertise is
| much narrower than just the later.
|
| But claiming you didn't use AI when you did breaks all
| trust between you a your readership and makes the end
| result pretty much worthless because why read a book if you
| don't trust the author not to waste your time?
| rudedogg wrote:
| I 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 wrote:
| Pangram[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
| simonklee wrote:
| It'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 wrote:
| To 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 wrote:
| I agree with you. After reading a couple of the chapters
| I'd be surprised if this wasn't written by an LLM.
| the-anarchist wrote:
| Doesn'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 wrote:
| But then you cannot write that
|
| "The Zigbook intentionally contains no AI-generated content--
| it is hand-written"
| tredre3 wrote:
| > 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.
| chris_pie wrote:
| I don't think so, I think it's just a pompous style of writing.
| CathalMullan wrote:
| Pretty 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
| smj-edison wrote:
| After 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 wrote:
| IMO 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.
| NoboruWataya wrote:
| > Can the author... Convince me otherwise?
|
| Not disagreeing with you, but out of interest, how could you be
| convinced otherwise?
| PaulRobinson wrote:
| This 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.
| amitav1 wrote:
| It 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), each page seems
| to be written in AsciiDoc, so I'll take a look about compiling a
| PDF version later today.
| gigatexal wrote:
| there'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 wrote:
| SAME. 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 wrote:
| It's AI-written FWIW
|
| though maybe AI is getting to the point it can do stuff like
| this somewhat decently
| popcar2 wrote:
| The first page says none of the book was written by AI
| gamegoblin wrote:
| Yes, it's a false claim
| skor wrote:
| how do you know this? let us know please, thanks. edit, I
| see you used this to check:
| https://news.ycombinator.com/item?id=45948220
| gamegoblin wrote:
| pangram.com, the most accurate and lowest false positive
| AI detector
|
| https://www.pangram.com/blog/third-party-pangram-evals
| fuzzy_biscuit wrote:
| Why does this feel like an ad? I've seen pangram
| mentioned a few times now, always with that tagline. It
| feels like a marketing department skulking around
| comments.
| gamegoblin wrote:
| The other pangram mention elsewhere in this comment
| section is also me -- I'm totally unaffiliated with them,
| just a fan of their tool
|
| I specify the accuracy and false positive rate because
| otherwise skeptics in comment sections might otherwise
| think it's one of the plethora of other AI detection
| tools that don't really work
| wosined wrote:
| Some text is unreadable because it is so small.
| serial_dev wrote:
| It 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 wrote:
| https://github.com/zigbook/zigbook/tree/main/pages
| p2detar wrote:
| Hmm, 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
| shuraman7 wrote:
| It'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 wrote:
| I'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 wrote:
| Wait, doesn't `zig std` launch the autogenerated docs?
| blks wrote:
| > 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.
| shuraman7 wrote:
| it's not only the size - it was pushed all at once,
| anonymously, using text that highly resembles that of an AI.
| I still think that some of the text is AI generated. perhaps
| not the code, but the wording of the text just reeks of AI
| BlackjackCF wrote:
| Can you provide some examples where the text reeks of AI?
| smj-edison wrote:
| It'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 wrote:
| The 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 wrote:
| Clearly 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 wrote:
| Find 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.
| finder83 wrote:
| Every time I read things like this, it makes me think that AI
| was trained off of me. Using semicolons, utilizing classic
| writing patterns, and common use of compare and contrast are
| all examples of how they teach to write essays in high school
| and college. They're also all examples of how I think and have
| learned to communicate.
|
| I'm not sure what to make of that either.
| johnfn wrote:
| To be explicit, it's not general hallmarks of good writing.
| It's exactly two common constructions: not X but Y, and 3
| items in parallel. These two pop up in extreme disproportion
| to normal "good writing". Good writers know to save these
| tricks for when they really want to make a point.
| finder83 wrote:
| Interesting, I'll have to look for those.
| VerifiedReports wrote:
| They named a programming language after a wireless protocol?
| mjaniczek wrote:
| What is it with HN and the "oh, I thought {NAME} is the totally
| different tool {NAME}" comments? Is it some inside joke?
| gigatree wrote:
| inb4 people start putting a standardized "not AI generated"
| symbol in website headers
| mendelmaleh wrote:
| > 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 wrote:
| There seems to be https://notbyai.fyi/ and https://no-ai-
| icon.com/ ..!
| Rasthor wrote:
| There is also Brainmade: https://brainmade.org/
| brcmthrowaway wrote:
| Need this but to learn AI
| thomascountz wrote:
| The 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.
___________________________________________________________________
(page generated 2025-11-16 23:00 UTC)