3 ms·
See things like https://github.com/aosabook/500lines https://github.com/aosabook/500lines http://plzoo.andrej.com/ http://plzoo.andrej.com/ Or any somewhat r
by sitkack 9y ago
See things like
https://github.com/aosabook/500lines https://github.com/aosabook/500lines
http://plzoo.andrej.com/ http://plzoo.andrej.com/
Or any somewhat readable, compact codebases. Redis, Lua, etc. Often they are pedagogical in purpose, but sometimes on accident due to ruthless factoring.
No one can "learn compilers" from reading LLVM source code. But one could get the idea in a couple hours of reading
http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Comp...
And in a couple more by porting it to a new language.
Think of building an exact scaled down replica of a plane or a ship before embarking on the larger version. Now build an even lighter weight model, just for learning how to build the model. This is a "fruit-fly" code.