3 ms·
It's a very old idea. Donald Knuth implemented it with both Pascal and C to promote an idea of "literate programming" -- you'd literally just write prose sprink
by chungy 6y ago
It's a very old idea. Donald Knuth implemented it with both Pascal and C to promote an idea of "literate programming" -- you'd literally just write prose sprinkled with little bits of programming. On compilation, you can choose to compile either the documentation or program.
- someoldguy 6y agoFor an example, the PBRT book is great.
- WalterGR 6y agoPBRT is Physically Based Rendering: From Theory To Implementation by Matt Pharr, Wenzel Jakob, Greg Humphreys. https://www.pbrt.org https://www.pbrt.org https://www.pbr-book.org https://www.pbr-book.org https://www.amazon.com/Physically-Based-Rendering-Theory-Implementation/dp/0128006455 https://www.amazon.com/Physically-Based-Rendering-Theory-Imp...
- jonas21 6y ago> This book has deservedly won an Academy Award. I believe it should also be nominated for a Pulitzer Prize — Donald Knuth It's hard to beat that book review.
- truthr 6y agoThe deep learning library fastai uses this. Their source code is also their documentation. They use something called "nbdev" to accomplish this. And I have also seen other projects both related and unrelated to deep learning adopt it. This idea stems from Knuth.