

Ask HN: Interesting code to read - vorador

Hi,<p>Do you know some really interesting code to read (the kind of code that shows best practices in action), in C, python, yacc and lisp ?
======
silentbicycle
For C, the Lua source is great, and there's a hyperlinked version here -
<http://www.lua.org/source/5.1/> . It's written in strictly compliant ANSI C.

For Lisp and Scheme, try Peter Norvig's _Paradigms of Artificial Intelligence
Programming_ and Christian Queinnec's _Lisp in Small Pieces_ (PAIP and LiSP).
The former has more Common Lisp, the latter Scheme. Both will give you quite a
bit to think about. :)

------
icey
Peter Norvig has written some very nice Python and Lisp. I think most of the
code he has on his website (<http://norvig.com/>) is in Python, but PAIP is
all Lisp.

------
cperciva
I'm a bit biassed here, but several people have told me that they think the
tarsnap source code (all in C) is "beautiful", "well designed", "very UNIXy",
"incredibly clean", etc.

------
scott_s
For C, I think the Linux kernel is a good representative:
<http://miller.cs.wm.edu/lxr3.linux/http/source/?v=2.6.11.12>

~~~
michael_dorfman
Personally, I find the Minix3 kernel to be a better read:
<http://www.minix3.org/doc/>

The book serves as nice documentation and explanation of the principles (as
well as containing the full source, printed.)

