3 ms·
Dennis Ritchie's "anti-preface" to this handbook contains the hard-to-forget metaphor: your book is a pudding stuffed with apposite observations, many
by charlesism 8y ago
Dennis Ritchie's "anti-preface" to this handbook contains the hard-to-forget metaphor:
your book is a pudding stuffed with apposite observations,
many well-conceived. Like excrement, it contains enough
undigested nuggets of nutrition to sustain life for some.
But it is not a tasty pie
- delish 8y agoAnd: > Your sense of the possible is in no sense pure: sometimes you want the same thing you have, but wish you had done it yourselves; other times you want something different, but can't seem to get people to use it; sometimes one wonders why you just don't shut up and tell people to buy a PC with Windows or a Mac. No Gulag or lice, just a future whose intellectual tone and interaction style is set by Sonic the Hedgehog.
- eternalban 8y ago"a future whose intellectual tone and interaction style is set by Sonic the Hedgehog" Ironically, Unix won yet here we are..
- 77pt77 8y agoAnd sonic died...
- aarch64 8y agoOne of these "apposite observations" is in the section on pipes (p. 199 of link). The authors use this convoluted bash script to show that pipes are best suited for simple hacks and might fail mysteriously under certain circumstances: egrep '^To:|^Cc:' /var/spool/mail/$USER | \ cut -c5- | \ awk '{ for (i = 1; i <= NF; i++) print $i }' | \ sed 's/,//g' | grep -v $USER | sort | uniq Although this is hard to read, it can be simplified from 7 commands to 5: awk '/^To:|^Cc:/ { for (i = 2; i <= NF; i++) print $i }' /var/mail/$USER | \ sed 's/,//g' | grep -v myemail@exmaple.com | sort | uniq By folding the egrep pattern matching into awk as it is supposed to be used and starting from the second field instead of removing the first four characters with cut, this script is both easier to read and fewer lines long. By inverse grepping for myemail@example.com, there will not be mysterious behavior if $USER is in another person's email address.