14 ms·
Richard Stallman Announces GNU C Language Reference Manual
- throwaway49949 4y ago
- chomp 4y agoThis is not relevant to the submitted article.
- vintermann 4y agoHe calls himself "Chief GNUisance of the GNU Project" in the very same sig, so it doesn't seem like this is an attempt at stolen valour exactly.
- zppln 4y agoSo... where is it?
- throwaway744678 4y agoFollowing the link from the message: https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/ https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/
- whartung 4y agoIt's a link in the email message to a git repo with Texinfo files. git clone https://git.savannah.gnu.org/git/c-intro-and-ref.git
- synu 4y agoLink in the email goes to https://savannah.gnu.org/git/?group=c-intro-and-ref https://savannah.gnu.org/git/?group=c-intro-and-ref, but that seems to be down.
- dvfjsdhgfv 4y agogit clone https://git.savannah.gnu.org/git/c-intro-and-ref.git https://git.savannah.gnu.org/git/c-intro-and-ref.git It's in the Texinfo format though, so you'd probably want to texi2html it.
- teddyh 4y ago> you'd probably want to texi2html it. Or just make c.html
- klyrs 4y agoIt's behind the link in the post. On, perhaps, the worst git repo browser ever. RMS's link: https://savannah.gnu.org/git/?group=c-intro-and-ref https://savannah.gnu.org/git/?group=c-intro-and-ref click "browse sources repository" https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git hunt for the word "tree" and click it: https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/tree/ https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/tre... Oh look, a directory listing! Click the manual! https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/tree/c.texi https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git/tre... What, you don't want to read the 13k-line tex source? Sorry. Clone it and build it yourself, I guess.
- verytrivial 4y agoThis is an idiologist's moral choice, not a choice of the most convenient technology, though, right? That's his "whole thing."
- Jtsummers 4y agoThe other GNU manuals are available here: https://www.gnu.org/manual/manual.en.html https://www.gnu.org/manual/manual.en.html They don't try to hide them. This is the git repo of the new version of the C reference and will end up on that page at some point, replacing the one there now.
- davexunit 4y agoIt's just cgit. It's a pretty good git browser that has few dependencies and runs fast. There's plenty of things to complain about with savannah, but I don't think cgit is one of them.
- lioeters 4y agoThe first challenge for the prospective reader is building the manual itself. git clone https://git.savannah.gnu.org/git/c-intro-and-ref.git cd c-intro-and-ref make c.pdf
- jandrese 4y agoOn my machine this failed to build the index sections at the end.
- projektfu 4y agoThe command in the Makefile should be "texi2dvi" or "texi2pdf".
- ntoslinux 4y agoThanks for the instructions. sudo apt update sudo apt install texlive-latex-extra sudo apt install dvipdf sudo apt install ghostscript sudo apt install texinfo git clone https://git.savannah.gnu.org/git/c-intro-and-ref.git https://git.savannah.gnu.org/git/c-intro-and-ref.git cd c-intro-and-ref make c.pdf makeinfo --html -v c.texi -o c.html --no-split
- orsenthil 4y agoI ran these after creating a docker container on my mac. > docker run -t -i -v $HOME/docker-mounted:/tmp ubuntu /bin/bash And copy the c.pdf from /tmp in docker to my local mac.
- 0xbadcafebee 4y agoWith Docker: mkdir -p out.d ; chmod 1777 out.d docker run --rm -it -v "$(pwd)/out.d:/out.d" \ debian:latest \ sh -c " apt update && apt install --no-install-recommends -y \ texlive-latex-extra \ texlive-base \ ghostscript \ texinfo \ git \ ca-certificates \ && git clone --depth 1 https://git.savannah.gnu.org/git/c-intro-and-ref.git \ && cd c-intro-and-ref \ && make c.pdf \ && makeinfo --html -v c.texi -o /out.d/c.html --no-split "
- rwmj 4y agoAs a reference manual, will this eventually replace the GCC info files?
- jolmg 4y agoThis is a reference manual of the language, not their compiler. They did however already have The GNU C Reference Manual[1] before, so I wonder if this is meant to replace that. [1] https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html
- mjw1007 4y agoI think it is, yes. The introduction says: "This manual incorporates the former GNU C Preprocessor Manual, which was among the earliest GNU Manuals. It also uses some text from the earlier GNU C Manual that was written by Trevis Rothwell and James Youngman."
- dvfjsdhgfv 4y agoA HTML copy: https://crms.tiiny.site/ https://crms.tiiny.site/
- raverbashing 4y agoSo, the C style they use is: function types on their own line and spaces between function names and their parameters? That's not a style I would be encouraging to use today It also uses sizeof to calculate the size of an array which would be good in any language except C
- ctrlmeta 4y ago> It also uses sizeof to calculate the size of an array which would be good in any language except C It is a pretty standard and popular way of finding the size on an array. The only caveat is that the programmer really has to be sure that it really is an array and not a pointer to an array.
- eMSF 4y agoOn the contrary: the sizeof operator is the only way to generally get the size of an arbitrary array (with e.g. no known sentinel to mark its last element) in C. You couldn't use a function instead even if you wanted to. Many other languages however don't have the equivalent of the sizeof operator because they don't expose an object's memory representation quite as much as C does.
- raverbashing 4y agoYou're right, but it only works for fixed-sized arrays (which are not as common). Also for a learner it is very easy to think that I can do: int * my_array; my_array = malloc(100*sizeof(int)); int array_length = sizeof(my_array);
- enriquto 4y ago> it only works for fixed-sized arrays It also works for variable length arrays. void f(int n) { float a[n]; int m = sizeof a / sizeof *a; assert(n == m); }
- an1sotropy 4y agoChapter 28 "Floating Point in Depth" is a lot more in depth than I expected, and has a nice list of references for further reading.
- dark-star 4y ago30 years late to the party, and in a format that is inaccessible to anyone just casually browsing the web but needs to be built using 40+ year old build systems, hosted on a server that apparently cannot handle the "gentle" influx of HN readers... Sounds just like any other GNU project ;-) I mean I seriously admire RMS's endurance and persistence, and I'm looking forward to this manual, I'm sure it'll be great, but is this really what GCC needs most? A new language manual?
- jacooper 4y agoMan, the FSF and the GNU project need a new refresh and new blood in them ASAP. everything from their projects, to their websites is outdated and distant from how people actually use tech everyday.
- pram 4y agoIIRC Stallman 'browses the web' with something like a cron job scraping URLs with Lynx, and then it emails him the output so he can peruse it later. This isn't a joke lol
- AdmiralAsshat 4y agoI believe he used to print them out, so perhaps we should consider at least reading them via an email client to be some sort of progress. Although I'm sure it was to be more "eco-friendly" than anything
- ydlr 4y agoThat sounds... reasonable. There are some web-to-newsletter services that try to sell this feature.
- bitwize 4y agoGiven how intrusive, ad-encrusted, and potentially malware-encrusted the web is becoming, this sounds like one of those Stallman absurdities that make increasing amounts of sense the more you think on them.
- billpg 4y agoNot starting with "Hello World"? Is that even legal?
- maxlybbert 4y agoI have the “Primer of Algol 60 Programming” by Dijkstra. It was created ten years before K&R, so of course it doesn’t start with “Hello World.” But that fact surprised me a little the first time I read it.
- pbreit 4y agoI always thought Hello World was the dumbest example. Useful examples are always better.
- kevin_thibedeau 4y agoA minimal viable program that demonstrates basic I/O and allows one to confirm their build tooling works isn't useful?
- erik_seaberg 4y agoI try to start with a failing test, because tests not being identified or failures not breaking the build are serious problems.
- pwdisswordfish9 4y agoI used to think foo and bar were really dumb and I thought less of writers who used them for not putting in more effort to provide realistic examples. That has changed and I'm now grateful to writers who stick with foo and bar, the same way I'm grateful for syntax highlighting. It helps me focus on what is being demonstrated and skip over the stuff that isn't important. Use of foo and bar is good for this, and realistic examples aren't. There's an argument to be made for hello world that falls along similar lines, probably.
- michaelhoffman 4y agoI appreciated this: > Personal note from Richard Stallman: Eating with hackers at a fish restaurant, I ordered Arctic Char. When my meal arrived, I noted that the chef had not signed it. So I complained, “This char is unsigned—I wanted a signed char!” Or rather, I would have said this if I had thought of it fast enough.
- RcouF1uZ4gsC 4y agoWhat is also nice about this story, is that it gives an official pronunciation for ‘char’.
- deleted 4y ago[deleted]
- chrisseaton 4y ago> official pronunciation Stallman didn’t design C or invent ‘char’ if that’s what you’re thinking.
- AdmiralAsshat 4y agoI'm pretty sure I've heard someone in the Kernighan/Ritchie/Thompson camp (i.e guys who actually worked on the C Language) pronounce it like "care" in interviews before, so I'm not sure Stallman's pronunciation is really authoritative here. It really depends on whether you read it as its own word (like to "char" the grilled meat), or whether you read it as the first half of "character".
- jstanley 4y agoIf you pronounce the start of "character" the same way you pronounce "care" then I'm afraid you're pretty far away from the norm already.
- amock 4y agoThe audio on https://en.wiktionary.org/wiki/care https://en.wiktionary.org/wiki/care and https://en.wiktionary.org/wiki/character https://en.wiktionary.org/wiki/character sound like the same initial sound to me. I've never heard anyone pronounce them differently.
- svnpenn 4y agoWhere is the PDF and/or website? This is not that: https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git https://git.savannah.nongnu.org/cgit/c-intro-and-ref.git I get not wanting to build an executable for different platforms, but FFS, this is HTML or a PDF, just build the thing for us please. Talk about tone deaf. Its not 1990 anymore.
- maxlybbert 4y agoI’m sure they’ll eventually make those available on gnu.org. This doesn’t look like an announcement that the book is generally ready, but that the first draft is ready enough for people to make suggestions. I’m sure they’ll have PDFs and webpages on gnu.org eventually, right next to their other manuals.
- Erlangen 4y agoIt's best read with emacs info mode, given that RMS is an emacs lord.
- pkaye 4y agoNow to download 500 dependencies of obscure tools so I can build it!
- JJMcJ 4y agoThose are hardly obscure. Tex, makeinfo, dvipdf? If that's too much, wait for a finished version to appear on the literature download page.
- cantSpellSober 4y agoI thought this website labelled "manual" would be a website that's a manual. Can we change the title to "source code" please?
- josephcsible 4y agoI notice a few problems with this: 1. The text on the title page runs off the right border. 2. The contents are blank and the indexes say "(Index is nonexistent)". 3. The inline links are all broken, e.g., "See ⟨undefined⟩ [Arithmetic], page ⟨undefined⟩." I generated the PDF by running "make c.pdf" in a Docker container from this Dockerfile: FROM archlinux RUN pacman -Syu --noconfirm texlive-most ghostscript make Did I somehow build incorrectly, or are these issues with the upstream repository?
- Thoreandan 4y agoI believe the project's supporting files for other formats aren't complete ... I also ran into the texinfo => tex => PDF version having title page & other errors in the rendering steps - but saw that the ASCII version "make c.txt > text.txt" generated the indexes / cross-references. I think the build environment will be likely getting several enhancements to render correctly.
- Karellen 4y agoHow is it that on HN, people are complaining about being given a link to the git repo for the project source?!? Not only that, but Oh no!!, there's no `README.md` or `INSTALL.md` yet in this 4-day old, 2-commit repository to tell users how to build it? How will they ever figure it out, and find the 25-line `Makefile` out of the... 6 files in the repo? Seriously?
- 0xbadcafebee 4y agoWhat kind of person goes to the trouble of creating an entire reference manual and doesn't take the very last step of generating the readable files? It's like inviting somebody over for a meal, only to dump a set of kitchen utensils, ingredients, and recipe in their lap.
- nousermane 4y agoThat's one excellently human-readable makefile, too.
- dale_glass 4y agoThat's the use case where Makefile shines. Though it's not a particularly good one, the dependencies are lacking. Eg, .html doesn't depend on .texi, and so this one won't work right. IMO, Makefile is at its best on small projects with trivial rules and no configuration. Once you go to a generator it's a waste, because it's not human friendly anymore. And complex projects want something more like cmake anyway.
- asdfasfa3r23r 4y agoPeople are NOT complaining about that (git, source, 4day old code, readable makefile that is better than a readme, etc) People here are programmed to react a certain way to the very mention of Stallman. I will not elaborate further.
- DonHopkins 4y agoNot only are people here are programmed to react a certain way to the very mention of Stallman, but also Emacs. http://www.art.net/studios/hackers/hopkins/Don/text/rms-vs-doctor.html http://www.art.net/studios/hackers/hopkins/Don/text/rms-vs-d...
- gigatexal 4y ago
- idontpost 4y ago[[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Man, oh man, just when I thought Stallman couldn't have gotten any more sanctimonious than he was 20 years ago ...
- arisbe__ 4y agoThe Twitter handle for nixCraft went ahead and rendered an HTML & PDF output. https://twitter.com/nixcraft/status/1567222479139250181 https://twitter.com/nixcraft/status/1567222479139250181
- sireat 4y agoGNU manual is quite nice actually, a welcome companion to my worn copy of C: A Reference Manual, 5th Edition by Guy Steele and Harbison Looking at https://crms.tiiny.site/#Function-Pointers https://crms.tiiny.site/#Function-Pointers I am glad I do not have to program C anymore.. /\* Declare a function returning char *. */ char *a (char *); /\* Declare a pointer to a function returning char. */ char (*a) (char *); /* Declare a pointer to a function returning char *. */ char *(*a) (char \*); This brings up 20 year old memories of pain. How did I ever remember this?
- teddyh 4y ago“cdecl” is available since 1996; I heartily recommend it.
- douglarek 4y agoA html page mirror: https://c-intro-and-ref.pages.dev/ https://c-intro-and-ref.pages.dev/ , and update per 30 min from the upstream.