Literate Wiki

The basic idea behind Literate Wiki is for a wiki page to describe and document a software program as well as to extract the code that is described.

Weave and Tangle

A keyboard shortcut, or a button in the page, could trigger the extraction of the source code from the code chunks.

In "classical" literate programming systems weaving is the process of producing the documentation, while tangling is for extracting the code.

In a Literate Wiki there is no need for weaving in this sense, given the wiki provides the medium for documenting and describing the construction of the program. We therefore redefine the term to describe the early, often social stage of assembling fragments and pieces of literate code into an application.

Tangle

A Literate Wiki needs two special paragraphs:

  • code chunk, and
  • code chunk reference

A code chunk has 3 attributes: name, language, destination.

Of the 3 only name is necessary. Language and destination should be included in the first code chunk of a given name.

Subsequent chunks of code in a page "expand" upon each other and various naming and scoping mechanisms yet to be discovered.

# Tangled Web

Using the idea of Polyglot Webservice Hosting we do not need to concern ourselves with the language, or name attributes - as the URL is the name and the dereferenced URL is the destination, and the language is effectively always HTTP.

A Literate Wiki would simply execute a series of HTTP requests one after the other from a range of servers, with Fedwiki acting as the unifying glue.

# See also