From LiteratePrograms
Jump to: navigation, search

LiteratePrograms, opened on February 27, 2006, is a website designed and implemented by User:Dcoetzee (largely based on the MediaWiki wiki software) to exploit the synergy between Donald Knuth's literate programming and the wiki format, which lends itself well to expository material. As an editor on Wikipedia, Dcoetzee encountered code samples for algorithms on Wikipedia and Wikisource, but these had a number of problems:

  • It's difficult to ensure that the code remains correct, because extracting the code, adding a test driver, and compiling it is a taxing procedure, even when it's in one piece.
  • There is a tradeoff between organizing code in a way that's useful for exposition and organizing it in a way that facilitates downloading, compiling, and reusing the code.
  • All their content is released under the GFDL license, which while great for English prose contributions, is not at all suitable for code contributions, which require at the very least a disclaimer of warranty and liability.

LiteratePrograms overcomes these issues by placing all its content under the non-copyleft MIT/X11 software license (see LiteratePrograms:Copyrights) and by adding a "download code" tab to every article to automatically invoke the noweb literate programming tool. With this, a single click downloads a dynamically generated archive containing ready-to-build code generated from the article, and this code is never out of date.

Literate programming also gives the article the freedom to arrange the code in the best way for presenting it as a public document, as opposed to a big chunk of text. The article, which can include all sorts of HTML markup such as sectioning, tables, images, and even complex mathematical formulas, is much more flexible and powerful than simple textual comments.

We rely on categories to arrange the articles because this makes it easy to jump to related articles by visiting the categories containing an article. The extensions to the software are relatively trivial and are documented at LiteratePrograms:How to write an article.

Welcome to LiteratePrograms. I hope you find what you're looking for, and I'll be happy to answer any comments or suggestions at my talk page (or if you prefer, you can e-mail me).