Nobody has mentioned Knuth’s corpus of work in Pascal-Web for the TeX ecosystem. This is code written for an era where there wasn’t an ecosystem of libraries for common tasks and even things like being able to access a file in random access order couldn’t be counted on. Even 7-bit ASCII couldn’t be counted on as a given (EBCDIC-based IBM mainframes were a significant element of the computing landscape still). Against…
Ask HN: What's the best source code you've read?
121–130 of 271 posts
Re: Ask HN: What's the best source code you've read?
#122Since diving into stable diffusion, I found the original code not very well organized not factored. Then trying and looking at https://github.com/geohot/tinygrad which can implement SD, it’s really well written and ideas well organized, concise, and it works on multiple platforms well.
Re: Ask HN: What's the best source code you've read?
#123Earlier quoted context omitted.
That's from "The mythical man-month". Old, and some parts are obsolete, but still worth a read as it does have a bunch of good insights.
I have not read it in a while but it would be interesting to debate what essays are no longer relevant. I'll be grabbing it off the shelf next to my original copy of the Byte issue on C mentioned yesterday and having a look for expired relevancy.
Re: Ask HN: What's the best source code you've read?
#124The best - it compiled to the sane hex file.
Re: Ask HN: What's the best source code you've read?
#125Postgres code is very good, redis as well. Some of the core parts of Linux also totally worth learning from. I also remember how Qt UI code and docs were a revelation after the nightmare of win32 and related frameworks. Bellard's original Tinycc was very entertaining and took a while to digest. Most old and well-maintained projects are worth learning from. Apart from some local tips and tricks what is more important…
Re: Ask HN: What's the best source code you've read?
#126I quite like the FreeBSD src tree, as it comprises both the system kernel as well as the userland applications. The folders are organized similarly to the OS file system hierarchy, which I find helpful for navigating the source tree. I found it accessible to slowly learn how various parts of the OS work under the hood and compound my knowledge faster due to less context shifting, since it’s self-contained in one sour…
Re: Ask HN: What's the best source code you've read?
#127Postgres code is very good, redis as well. Some of the core parts of Linux also totally worth learning from. I also remember how Qt UI code and docs were a revelation after the nightmare of win32 and related frameworks. Bellard's original Tinycc was very entertaining and took a while to digest. Most old and well-maintained projects are worth learning from. Apart from some local tips and tricks what is more important…
Re: Ask HN: What's the best source code you've read?
#128Re: Ask HN: What's the best source code you've read?
#129C4 and its follow-up C4x86:
Re: Ask HN: What's the best source code you've read?
#130Nobody has mentioned Knuth’s corpus of work in Pascal-Web for the TeX ecosystem. This is code written for an era where there wasn’t an ecosystem of libraries for common tasks and even things like being able to access a file in random access order couldn’t be counted on. Even 7-bit ASCII couldn’t be counted on as a given (EBCDIC-based IBM mainframes were a significant element of the computing landscape still). Against…
Back in the day I worked quite a bit with Knuth's early SAIL (an extended Algol on the PDP-10) implementation of Metafont. They could have used some of the documentation the later WEB versions had as he tended to get tricky with squeezing everything out of the 36-bit words (which I was porting to a 32-bit word machine). But the code was an education and a joy to read well before he polished it for publication.
⸻
1. My very first exposure was DEK’s article “TeX and Metafont” in a copy of Dr Dobb’s Journal that was part of a trove my brothers got a hold of—and then in 1984 seeing someone in the IIT computer lab paging through a copy of The TeXbook, so when I found out that UIC had just installed TeX on their mainframe, I was one of the first people to use it there.