Most active commenters
  • PaulRobinson(3)

←back to thread

Open-source Zig book

(www.zigbook.net)
692 points rudedogg | 38 comments | | HN request time: 0.809s | source | bottom
1. rudedogg ◴[] No.45952436[source]
I 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/) in the project issues (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.

replies(13): >>45952561 #>>45952581 #>>45952667 #>>45952728 #>>45952742 #>>45952869 #>>45953014 #>>45953055 #>>45953161 #>>45953533 #>>45953660 #>>45956501 #>>45969184 #
2. Wowfunhappy ◴[] No.45952561[source]
Are you sure? Right on 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?

replies(2): >>45952613 #>>45952661 #
3. cryptocod3 ◴[] No.45952581[source]
> if there are hallucinations

Plenty. I assumed that the code examples had been cleaned up manually, so instead I looked at a few random "Caveats, alternatives, edge cases" sections. These contain errors typically made by LLMs, such as suggesting to use features that doesn't exist (std.mem.terminated), are non-public (argvToScriptCommandLineWindows) or removed (std.BoundedArray). These sections also surfaces irrelevant stdlib and compiler implementation details.

replies(2): >>45952750 #>>45953367 #
4. UpsideDownRide ◴[] No.45952613[source]
Because 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
5. rudedogg ◴[] No.45952661[source]
> 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

Edit: https://news.ycombinator.com/item?id=45952581 found some concrete issues

6. PaulRobinson ◴[] No.45952667[source]
I'd love it if we can stop the "Oh, this might be AI, so it's probably crap" thing that has taken over HN recently.

1. There is no evidence this is AI generated. The author claims it wasn't, and on the specific issue you cite, he explains why he's struggling with understanding it, even if the answer is "obvious" to most people here.

2. Even if it were AI generated, that does not automatically make it worthless. In fact, this looks pretty decent as a resource. Producing learning material is one of the few areas we can likely be confident that AI can add value, if the tools are used carefully - it's a lot better at that than producing working software, because synthesising knowledge seen elsewhere and moving it into a new relatable paradigm (which is what LLMs do, and excel at), is the job of teaching.

3. If it's maintained or not is neither here nor there - can it provide value to somebody right now, today? If yes, it's worth sharing today. It might not be in 6 months.

4. If there are hallucinations, we'll figure them out and prove the claim it is AI generated one way or another, and decide the overall value. If there is one hallucination per paragraph, it's a problem. If it's one every 5 chapters, it might be, but probably isn't. If it's one in 62 chapters, it's beating the error rate of human writers quite some way.

Yes, the GitHub history looks "off", but maybe they didn't want to develop in public and just wanted to get a clean v1.0 out there. Maybe it was all AI generated and they're hiding. I'm not sure it matters, to be honest.

But I do find it grating that every time somebody even suspects an LLM was involved, there is a rush of upvotes for "calling it out". This isn't rational thinking. It's not using data to make decisions, its not logical to assume all LLM-assisted writing is slop (even if some of it is), and it's actually not helpful in this case to somebody who is keen to learn zig to decide if this resource is useful or not: there are many programming tutorials written by human experts that are utterly useless, this might be a lot better.

replies(3): >>45952747 #>>45952800 #>>45952953 #
7. bool3max ◴[] No.45952728[source]
We really are in the trenches. How is this garbage #1 on the front page of *HN* right now?

Even if it was totally legitimate, the "landing page" (its design) and the headline ("Learning Zig is not just about adding a language to your resume. It is about fundamentally changing how you think about software."?????) should discredit it immediately.

replies(4): >>45952849 #>>45954061 #>>45957480 #>>45959906 #
8. lenkite ◴[] No.45952742[source]
Created https://github.com/zigbook/zigbook/issues/18
replies(1): >>45961859 #
9. toinewx ◴[] No.45952747[source]
> 1. There is no evidence this is AI generated. The author claims it wasn't, and on the specific issue you cite, he explains why he's struggling with understanding it, even if the answer is "obvious" to most people here.

There is, actually, You may copy the introduction to Pangram and it will say 100% AI generated.

replies(1): >>45952762 #
10. PaulRobinson ◴[] No.45952750[source]
This looks like more data towards the "LLMs were involved" side of the argument, but as my other comment pointed out, that might not be an issue.

We're used to errata and fixing up stuff produced by humans, so if we can fix this resource, it might actually be valuable and more useful than anything that existed before it. Maybe.

One of my things with AI is that if we assume it is there to replace humans, we are always going to find it disappointing. If we use it as a tool to augment, we might find it very useful.

A colleague used to describe it (long before GenAI, when we were talking about technology automation more generally) as following: "we're not trying to build a super intelligent killer robot to replace Deidre in accounts. Deidre knows things. We just want to give her better tools".

So, it seems like this needs some editing, but it still has value if we want it to have value. I'd rather this was fixed than thrown away (I'm biased, I want to learn systems programming in zig and want a good resource to do so), and yes the author should have been more upfront about it, and asked for reviewers, but we have it now. What to do?

replies(2): >>45952843 #>>45952863 #
11. PaulRobinson ◴[] No.45952762{3}[source]
That's not evidence, at least not evidence that would stand up to a peer review if the author were to refute it.
replies(3): >>45952778 #>>45952819 #>>45959117 #
12. toinewx ◴[] No.45952778{4}[source]
When I give my own writings to Pangram, it says 100% human.
13. zwnow ◴[] No.45952800[source]
> 2. Even if it were AI generated, that does not automatically make it worthless.

It does make it automatically worthless if the author claims it's hand made. How am I supposed to trust this author if they just lie about things upfront? What worth does learning material have if it's written by a liar? How can I be sure the author isn't just lying with lots of information throughout the book?

14. tpoacher ◴[] No.45952819{4}[source]
It's not proof but it's definitely evidence.
15. spacechild1 ◴[] No.45952843{3}[source]
> and yes the author should have been more upfront about it

They should not have lied about. That's not someone I would want to trust and support. There's probably a good reason why they decided to stay anonymous.

16. spacechild1 ◴[] No.45952849[source]
Yes, this should immediately set off all BS alarms.
17. necklesspen ◴[] No.45952863{3}[source]
There's a difference between the author being more upfront about it and straight-up lying on multiple locations that zero AI is involved. It's stated on the landing page, documentation and GitHub - and there might be more locations I havent' seen.

Personally, I would want no involvement in a project where the maintainer is this manipulative and I would find it a tragedy if any people contributed to their project.

18. CraftingLinks ◴[] No.45952869[source]
I looked into that project issue your referencing. There is absolutely zero mentioning of zig labeled blocks in that exchange. There is no misunderstanding or confusion whatsoever.
replies(1): >>45953954 #
19. xeonmc ◴[] No.45952953[source]

    That didn't happen.
    And if it did, it wasn't that bad.
    And if it was, that's not a big deal.
    And if it is, that's not my fault.
    And if it was, I didn't mean it.
    And if I did, you deserved it.
20. qouteall ◴[] No.45953014[source]
AI is really great at creating superficial signals. And most people just judge things by superficial signal.
21. nsagent ◴[] No.45953055[source]
I literally just came across this resource a couple of days ago and was going to go through it this week as a way to get up to speed on Zig. Glad this popped up on HN so I can avoid the AI hallucinations steering me off track.
22. ayoisaiah ◴[] No.45953161[source]
I also submitted it to Reddit before realizing it largely was AI generated
23. ◴[] No.45953367[source]
24. ecshafer ◴[] No.45953533[source]
That github exchange is hilarious and bizarre. It's very obviously people talking to not people.
replies(1): >>45959350 #
25. MatthiasPortzel ◴[] No.45953660[source]
I seem to remember seeing this a week or two ago, and it was very obviously AI generated. (For those unfamiliar with Zig, AI is awful at generating Zig code: small sample dataset and the language updates faster than the models.) Reading it today I had a hard time spotting issues. So I think the author put a fair amount of work into cleaning up hallucinations and fixing inaccuracies.
replies(1): >>45959928 #
26. jasonjmcghee ◴[] No.45953954[source]
It's a formatting bug with zig labeled blocks and the response was a screenshot of code without one, saying (paraphrasing) lgtm it must be on your end.

See the first screenshot in the exchange with newlines breaking up the label and block - and maybe this for proper formatting https://zig.guide/language-basics/labelled-blocks/

27. frakt0x90 ◴[] No.45954061[source]
I imagine a lot of people didn't even click. They see free Zig materials and upvote.
28. insane_dreamer ◴[] No.45956501[source]
Ok, but even if it's AI generated and won't be maintained or contains errors, I'm not sure that warrants it being _flagged_ on HN.
29. nurettin ◴[] No.45957480[source]
When was the front page of HN that impressive anyways? It has always been latest fad and the first to comment "the right thing to say" gets rewarded with fake internet points.
30. keybored ◴[] No.45959117{4}[source]
What’s the evidence that it is human-generated? Oh I see. If it is AI generated then you still have to judge it by its merit, manually. (Or can I get an AI to do it for me?) And if they lied about it being human-authored? Well what if the author refutes that accusation? (Maybe using AI? But why judge them if they use AI to refute the claim? After all we must judge its on its own merit (repeats forever))
31. nabbed ◴[] No.45959350[source]
The exchange on https://github.com/zigbook/zigbook/issues/4? If so, your botdar is better than mine. While the project owner doesn't understand the issue at first, they seem to get it in the end. The exchange looks sort of normal to me, but then I guess I am doomed to be fooled regularly in our new regime.

Some text in the book itself is odd, but I'll be a guinea pig and try to learn zig from this book and see how far I get.

replies(1): >>45960445 #
32. johnfn ◴[] No.45959906[source]
I made a comment about it obviously being AI generated, and my comment[1] was quickly downvoted, and there were comments explaining how I was obviously incorrect ("Clearly your perception of what is AI generated is wrong."). My comment was pushed under many comments saying the book was a fantastic resource. Extremely strange.

https://news.ycombinator.com/item?id=45948608

33. MatthiasPortzel ◴[] No.45959928[source]
I checked my search history and I was thinking of a different website (zig toolbox, not linking intentionally, because it's purely AI slop).
34. ecshafer ◴[] No.45960445{3}[source]
The exchanges look totally like a robot to me. It looks to be deleted now. But the first response that responded to the bug report with how many systems its tested on seems weird and robot like. Then the screenshot that the "person" has to be told to scroll down, that is very ai like.
35. aleksi ◴[] No.45961859[source]
Aaaand it's gone!
replies(6): >>45961861 #>>45961862 #>>45961863 #>>45961866 #>>45961867 #>>45967626 #
36. kordlessagain ◴[] No.45967626{3}[source]
> 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.

From the readme.

37. metalliqaz ◴[] No.45969184[source]
That issue has been deleted. In addition, the author has tagged other issues with labels that are not appropriate for the mission of being a core zig learning resource:

https://github.com/zigbook/zigbook/issues/25

"AI ALLEGATION" and "RE**ED COMPLAINT"

replies(1): >>45969279 #
38. metalliqaz ◴[] No.45969279[source]
'zigbook' also seems to be using other accounts as sock puppets: 'zigglang' and 'zig-vm'