The return type of fgetc() is `int` and not `char`. This example will not differentiate between end-of-file in input versus reading 0xff. 82.7 appears to be the only example with this issue, all other places with fgetc correctly uses `int`.
----
I found another section with lots of syntax errors, for example:
int x = 10;
int *p = &x;
int pp = &p; // Should be int **pp
> The return type of fgetc() is `int` and not `char`. This example will not differentiate between end-of-file in input versus reading 0xff
Be aware that character literals in c, e.g., 'f' or 'A', have type int for probably this reason. From the ANSI C89 spec:
> An integer character constant has type int. The value of an
integer character constant containing a single character that maps
into a member of the basic execution character set is the numerical
value of the representation of the mapped character interpreted as an
integer.
I've been preparing these notes for 20 years, and now it's finally time to put them online. Please judge them by their content, not by whether they were "LLM-assisted" or not. All the books are licensed under CC-BY-SA, and I intend to keep sharing more with the community free of charge.
If you find any errors, please open an issue or submit a pull request, and I'm happy to fix them.
https://github.com/little-book-of/c/pull/4 (for examples, this one)
I know many of these books still need polishing (fixing bugs, improving wording, etc.), but I'm glad that some people already find them helpful.
It really saddens me when people dismiss the project as just "AI slop." I've poured a lot of time and care into it.
How much is CC-BY-SA worth if nobody knows how much of the content fell out of an LLM?
> I've been preparing these notes for 20 years, and now it's finally time to put them online.
As much as I would like to believe that, there are too many red flags at this point and you have given little indication that it's true. If you really are an expert in all the fields of your little books, it should be easy for you to provide references/credentials?
No, that's not gatekeeping, as in this day and age, those things become more and more important to be able to separate the sea of slop from the real deal.
Oh wow, I would not have caught that. I had a look at the first couple of pages, and as not-a-C-expert, it looked pretty solid to me. Readjusting our heuristics to generated slop (or even non-slop?) is gonna take so much more energy than before.
Although I've also been thinking about the overall role of effort in products, art, or any output really. Necessary effort to produce something is / was at least some indicator of quality that means that the author spent a certain amount of time with the material, and probably didn't want to release something bad if it meant they had to put a certain threshold of effort in anyways. With that gone, of course some people are gonna get their productivity enhanced and use this tool to make even better things, more often. But having to expend even more engery as a consumer to find out whether something is worth it is incredibly hard.
Because all the content is taken from my personal notes (with more to come on building a search engine, vector database, and graph database in C and Go), in the last step I used an LLM for editing and fixing grammar and formulas (typing LaTeX by hand takes a lot of time). If you find the content to be just AI slop, I'm sorry for taking your time.
I wonder if those LICENSE files in such repositories even mean anything in the world of LLM created stuff/slop/crap.
There is no obvious authorship attached to this "Little book" which is a tell-tale sign since anybody investing time into actually writing such a book would surely like to claim authorship.
It's just me and my operating system called Emacs, with no editor and no publisher. With the help of LLMs, I can finally share some of my notes and ideas with the world.
Because of some LLM editing and the help of "AI policies," some people call this book "AI slop." I admit that I used an LLM for editing, and this book still needs heavy editing and a thorough review to fix all the bugs in the code. But I wanted to share it early to see if anyone is still interested in C before I move on to reviewing the list of exercises and preparing for several upcoming projects: building a search engine, a vector database, and a columnar database from scratch in C.
This book is open source, open for contributions, and completely free of charge, and anyone with a GitHub account can contribute.
Thanks for your kind words! They really encourage me to share more. Please be aware that there might still be some bugs, so feel free to create issues or pull requests!
There is a bug in this example:
https://little-book-of.github.io/c/books/en-US/book.html#exa...
The return type of fgetc() is `int` and not `char`. This example will not differentiate between end-of-file in input versus reading 0xff. 82.7 appears to be the only example with this issue, all other places with fgetc correctly uses `int`.
----
I found another section with lots of syntax errors, for example:
https://little-book-of.github.io/c/books/en-US/book.html#add...
Most likely because the two asterisks needed for pointer-to-pointer isn't rendering properly.
> The return type of fgetc() is `int` and not `char`. This example will not differentiate between end-of-file in input versus reading 0xff
Be aware that character literals in c, e.g., 'f' or 'A', have type int for probably this reason. From the ANSI C89 spec:
> An integer character constant has type int. The value of an integer character constant containing a single character that maps into a member of the basic execution character set is the numerical value of the representation of the mapped character interpreted as an integer.
However, in C++, they have type char.
I have fixed some bugs here: https://github.com/little-book-of/c/pull/4
Let me carefully review all the code snippets, create tests, and integrate them into the CI/CD pipeline to make sure everything is correct.
My next step is to extract all the code into the "src/" folder and set up proper CI/CD to test everything.
Could you help create some GitHub issues? I will fix them in my free time next weekend.
Nobody finds it at all questionable that this submitter has "authored" around a dozen such books in 30 days?
Yeah, 15 different "Little books of..." here: https://news.ycombinator.com/item?id=45434678.
And many of them have the same "citation" to the math one by a Duc-Tam Nguyen, which they then didn't bother to adjust the title of.
I'd vote for flagging this submission. It's just AI slop.
I've been preparing these notes for 20 years, and now it's finally time to put them online. Please judge them by their content, not by whether they were "LLM-assisted" or not. All the books are licensed under CC-BY-SA, and I intend to keep sharing more with the community free of charge. If you find any errors, please open an issue or submit a pull request, and I'm happy to fix them. https://github.com/little-book-of/c/pull/4 (for examples, this one) I know many of these books still need polishing (fixing bugs, improving wording, etc.), but I'm glad that some people already find them helpful. It really saddens me when people dismiss the project as just "AI slop." I've poured a lot of time and care into it.
How much is CC-BY-SA worth if nobody knows how much of the content fell out of an LLM?
> I've been preparing these notes for 20 years, and now it's finally time to put them online.
As much as I would like to believe that, there are too many red flags at this point and you have given little indication that it's true. If you really are an expert in all the fields of your little books, it should be easy for you to provide references/credentials?
No, that's not gatekeeping, as in this day and age, those things become more and more important to be able to separate the sea of slop from the real deal.
Oh wow, I would not have caught that. I had a look at the first couple of pages, and as not-a-C-expert, it looked pretty solid to me. Readjusting our heuristics to generated slop (or even non-slop?) is gonna take so much more energy than before.
Although I've also been thinking about the overall role of effort in products, art, or any output really. Necessary effort to produce something is / was at least some indicator of quality that means that the author spent a certain amount of time with the material, and probably didn't want to release something bad if it meant they had to put a certain threshold of effort in anyways. With that gone, of course some people are gonna get their productivity enhanced and use this tool to make even better things, more often. But having to expend even more engery as a consumer to find out whether something is worth it is incredibly hard.
Because all the content is taken from my personal notes (with more to come on building a search engine, vector database, and graph database in C and Go), in the last step I used an LLM for editing and fixing grammar and formulas (typing LaTeX by hand takes a lot of time). If you find the content to be just AI slop, I'm sorry for taking your time.
Thanks for noticing!
I wonder if those LICENSE files in such repositories even mean anything in the world of LLM created stuff/slop/crap.
There is no obvious authorship attached to this "Little book" which is a tell-tale sign since anybody investing time into actually writing such a book would surely like to claim authorship.
It's just me and my operating system called Emacs, with no editor and no publisher. With the help of LLMs, I can finally share some of my notes and ideas with the world.
So you assume that writing those books takes little time? Just some "prompt magic," and boom, a book appears?
1 reply →
If the "little" book is 461 pages, I can't wait to see the big book.
I'm planning to create a 10-page cheatsheet for fast learners, and I'd like to shorten the book to around 150–200 pages.
For comparison, the "gold standard" of K&R is roughly 200 pages.
fr that's like the size of full C spec lol
I do not get this ? Why is this flagged ?
I agree in flagging in the cases I have seen, but flagging a C book seems very odd.
Because of some LLM editing and the help of "AI policies," some people call this book "AI slop." I admit that I used an LLM for editing, and this book still needs heavy editing and a thorough review to fix all the bugs in the code. But I wanted to share it early to see if anyone is still interested in C before I move on to reviewing the list of exercises and preparing for several upcoming projects: building a search engine, a vector database, and a columnar database from scratch in C.
This book is open source, open for contributions, and completely free of charge, and anyone with a GitHub account can contribute.
This reads like one of the clearest intros to C that I have seen in a long time. Feels approachable the whole way through.
Thanks for your kind words! They really encourage me to share more. Please be aware that there might still be some bugs, so feel free to create issues or pull requests!
Nice effort. Good to see 'C'!
I use Go for my professional work, but it feels great to "C" again!
LLM output to get clicks. Yeah, really nice effort.
/s