The Lua VM's source (http://www.lua.org/source/5.1/)
Ask HN: What source code is worth studying?
41–50 of 117 posts
Re: Ask HN: What source code is worth studying?
#42SQLite's source listing is great. I learned a lot about good C practices and documentation reading it.
Re: Ask HN: What source code is worth studying?
#43It feels well organized almost throughout, and it's a joy to experience the clarity of thought that went into it. In fact, most of djb's code has a similar feeling to it.
Arthur Whitney's code: http://www.nsl.com/papers/origins.htm
Being able to read this (and not merely decode it, but read it, in a manner similar to how you would read a book) will broaden your horizons like nothing else I've seen.
Re: Ask HN: What source code is worth studying?
#44Any recommendations for good C# code? Much of the web is open source oriented so I don't hear too much about great C# code.
Re: Ask HN: What source code is worth studying?
#45Any recommendations for Ruby/Rails projects?
Re: Ask HN: What source code is worth studying?
#46That's also where I saw calloc.c - A portable implementation of calloc. I distinctly remember it being one of the cleverest hacks I've seen.
Re: Ask HN: What source code is worth studying?
#47Re: Ask HN: What source code is worth studying?
#48Earlier quoted context omitted.
Perhaps MediaWiki?
Personally, I wouldn't recommend it. Unfortunately I can't give a better alternative, but I've done some hacking on MediaWiki since version 1.7 and while it's some of the better examples of PHP out there, it still leaves lots to be desired in different places.
Re: Ask HN: What source code is worth studying?
#49Re: Ask HN: What source code is worth studying?
#50Your compiler's source code. That should shake your confidence in the world.
for an easier time, your favorite language interpreter's source code ... interpreters are easier to comprehend than compilers, since you can 'follow along' with the flow of execution in the main interpreter loop just like you're executing a program ... e.g., creating stack frames, allocating heap memory, assigning variables, etc.