4 ms·
The closest thing I've seen to literate programming "in the wild" is the ipython notebook concept, which encourages you to intersperse your code with explanator
by kcorbitt 12y ago
The closest thing I've seen to literate programming "in the wild" is the ipython notebook concept, which encourages you to intersperse your code with explanatory text to give it context and structure (eg http://nbviewer.ipython.org/github/corbt/city-weather/blob/master/time_change.ipynb http://nbviewer.ipython.org/github/corbt/city-weather/blob/m...). I don't think it's the right fit for all (or even most) programming, but I like it for that class of programming because often a reader is more interested in why you chose to do what you're doing, rather than what the code actually does.
- justin66 12y agoThe only example of actual literate programming with CWEB I've seen in the wild - aside from TeX, whose source code I've actually not read - is Adam Langley's extracted crit-bit trie code, taken from DJB's C stuff: https://github.com/agl/critbit https://github.com/agl/critbit
- burntsushi 12y agoI always understood literate programming as a tool for teaching and not as a tool for writing software. As I've written more and more about code I wrote, I've found myself inventing weird ways of making sure the code samples are compilable, runnable and correct. I've done it enough that now I'm considering using a literate programming tool next time. (To be clear, I'm not referring to traditional API documentation with examples. There exist good tools for testing examples without resorting full-hog to literate programming. I am referring to more general prose whose aim is less specific than documenting an API.)
- Tomte 12y agoMathematica or Maple worksheets, maybe? I haven't really used either, but they seem to go a bit in that direction. Although they are strictly sequential, I guess, so maybe not.