Well, eye opening was the C++ source code I was able to work with at a previous company, they were an automotive HMI developer company. They had really strict and well planned code structure that just hit a chord with me. Can't provide source though on that one, as it's a propietary engine. Recently I've enjoyed reading the source code to Sokol, lot's of really good decisions there and I love the minimal C -style str…
Nix source code is also a pleasure to read through. I was surprised that c++ could be so beautiful and well written.
Ask HN: What's the best source code you've read?
141–150 of 271 posts
Re: Ask HN: What's the best source code you've read?
#142Re: Ask HN: What's the best source code you've read?
#143Earlier 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?
#144Re: Ask HN: What's the best source code you've read?
#145Contrarian answer: Conway's Game of Life in Dyalog APL https://www.youtube.com/watch?v=a9xAKttWgP4 It feels like the logical end state of "clever" code, for better or for worse. Or, alternatively, what happens when a standard library is gigantic but each keyword is 1-2 characters.
In the same vein, John Scholes' collection of APL code in the Dfns workspace[0] is positively wonderful to read through. I think it's probably one of the finest repositories of annotated code ever assembled.
Re: Ask HN: What's the best source code you've read?
#146I like the TypeScript compiler source (in TypeScript.) It's clean, easy on the eyes with well placed white space and just the right amount of comments. https://github.com/microsoft/TypeScript/blob/main/src/compil...
Re: Ask HN: What's the best source code you've read?
#147Re: Ask HN: What's the best source code you've read?
#148Earlier quoted context omitted.
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.
I haven't read it in a while either, but from memory the team organization of one "architect" and a bunch of implementers seems obsolete, for example.
Re: Ask HN: What's the best source code you've read?
#149Re: Ask HN: What's the best source code you've read?
#150Earlier quoted context omitted.
Nix source code is also a pleasure to read through. I was surprised that c++ could be so beautiful and well written.
C++ gives you an enormous amount of rope to hang yourself with, but it’s also an highly expressive language.