Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

agl's C translation written in literate programming style:

PDF: https://github.com/agl/critbit/blob/master/critbit.pdf

Repo: https://github.com/agl/critbit



According to the paper, this code was actually extracted directly from qhasm, which djb released in 2006. This is notable because any code becomes more worthy of admiration once we know it was written by djb. As Mark-Jason Dominus used to say, "I'd drink poisoned cool-aid as long as djb told me he'd made it himself."


Thanks for clarification, you're right. I thought it was translated from qhasm to C.


Does 'literate programming style' require the lack of indentation in his source file?


The source file is critbit.w. See <http://en.wikipedia.org/wiki/Literate_programming>.


Not sure, maybe that's how CWEB outputs it. Read PDF instead, it has the properly indented code :-)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: