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.
Xiki is a new wiki which explores the link between the command line and a wiki.
Weave and Tangle
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 given the wiki provides the medium for documenting and describing the construction of the program.
Tangle
A Literate Wiki needs two special paragraphs:
- code chunk, and
- code chunk reference
A keyboard shortcut, or a button in the page, could trigger the extraction of the source code from the code chunks.
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.
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.
Example
chunk 1
This is a library of functions.
import helpers
These are other things.
def foo(): pass
helpers
def f(): pass
Resources
The reduce plugin reads (and executes) the code in method plugins. Reduce decides what plugins by looking for page names in the same page. That serves as some kind of reference. See About Reduce Plugin
The reduce plugin does a simple form of tangle to turn method markup into excel spreadsheet. See More About Reduce Plugin
The PageFold was introduced as a reliable way to create machine-readable structure in an individual wiki page without overloading the hierarchy possible with json. See About PageFold Plugin