Literate programming
Name Supported Languages Written in Markup Language Comments
WEB Pascal Pascal TeX The first published literate programming environment
CWEB C++ and C C TeX Is WEB adapted for C and C++
NoWEB Any C , AWK , and Icon LaTeX , TeX , HTML and troff It is well known for its simplicity and it allows for text formatting in HTML rather than going through the TeX system
Literate Any D Markdown Supports TeX equations . Compatible with Vim ( literate.vim )
FunnelWeb Any C HTML and TeX It has more complicated markup , but has many more flexible options
NuWEB Any C++ LaTeX It can translate a single LP source into any number of code files . It does it in a single invocation ; it does not have separate weave and tangle commands . It does not have the extensibility of noweb
pyWeb Any Python ReStructuredText Respects indentation which makes usable for the languages like Python , though you can use it for any programming language
Molly Any Perl HTML Aims to modernize and scale it with folding HTML and virtual views on code . It uses noweb markup for the literate source files
Codnar Ruby It is an inverse literate programming tool available as a Ruby Gem . Instead of the machine-readable source code being extracted out of the literate documentation sources , the literate documentation is extracted out of the normal machine-readable source code files
Emacs org-mode Any Emacs Lisp Plain text Requires Babel , which allows embedding blocks of source code from multiple programming languages within a single text document . Blocks of code can share data with each other , display images inline , or be parsed into pure source code using the noweb reference syntax
CoffeeScript CoffeeScript CoffeeScript , JavaScript Markdown CoffeeScript supports a literate mode , which enables programs to be compiled from a source document written in Markdown with indented blocks of code
Maple worksheets Maple ( software ) XML Maple worksheets are a platform-agnostic literate programming environment that combines text and graphics with live code for symbolic computation . Maple Worksheets . www.maplesoft.com . Retrieved 2020-05-30 . .mw-parser-output cite.citation { font-style : inherit } .mw-parser-output .citation q { quotes : \\ '' } .mw-parser-output .id-lock-free a , .mw-parser-output .citation .cs1-lock-free a { background-image : url ( //upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png ) ; background-image : linear-gradient ( transparent , transparent ) , url ( //upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg ) ; background-repeat : no-repeat ; background-size:9px ; background-position : right .1em center } .mw-parser-output .id-lock-limited a , .mw-parser-output .id-lock-registration a , .mw-parser-output .citation .cs1-lock-limited a , .mw-parser-output .citation .cs1-lock-registration a { background-image : url ( //upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png ) ; background-image : linear-gradient ( transparent , transparent ) , url ( //upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg ) ; background-repeat : no-repeat ; background-size:9px ; background-position : right .1em center } .mw-parser-output .id-lock-subscription a , .mw-parser-output .citation .cs1-lock-subscription a { background-image : url ( //upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png ) ; background-image : linear-gradient ( transparent , transparent ) , url ( //upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg ) ; background-repeat : no-repeat ; background-size:9px ; background-position : right .1em center } .mw-parser-output .cs1-subscription , .mw-parser-output .cs1-registration { color : # 555 } .mw-parser-output .cs1-subscription span , .mw-parser-output .cs1-registration span { border-bottom:1px dotted ; cursor : help } .mw-parser-output .cs1-ws-icon a { background-image : url ( //upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png ) ; background-image : linear-gradient ( transparent , transparent ) , url ( //upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg ) ; background-repeat : no-repeat ; background-size:12px ; background-position : right .1em center } .mw-parser-output code.cs1-code { color : inherit ; background : inherit ; border : inherit ; padding : inherit } .mw-parser-output .cs1-hidden-error { display : none ; font-size:100% } .mw-parser-output .cs1-visible-error { font-size:100% } .mw-parser-output .cs1-maint { display : none ; color : # 33aa33 ; margin-left:0.3em } .mw-parser-output .cs1-subscription , .mw-parser-output .cs1-registration , .mw-parser-output .cs1-format { font-size:95% } .mw-parser-output .cs1-kern-left , .mw-parser-output .cs1-kern-wl-left { padding-left:0.2em } .mw-parser-output .cs1-kern-right , .mw-parser-output .cs1-kern-wl-right { padding-right:0.2em } .mw-parser-output .citation .mw-selflink { font-weight : inherit }
Wolfram Notebooks Wolfram Language Wolfram Language Wolfram notebooks are a platform-agnostic literate programming method that combines text and graphics with live code
Playgrounds Swift ( programming language ) Provides an interactive programming environment that evaluates each statement and displays live results as the code is edited . Playgrounds also allow the user to add Markup language along with the code that provide headers , inline formatting and images
Jupyter Notebook , formerly IPython Notebook Python and any with a Jupyter Kernel HTML Works in the format of notebooks , which combine headings , text ( including LaTeX ) , plots , etc . with the written code
R Markdown Notebooks ( or R Notebooks ) R , Python , Julia and SQL PDF , Microsoft Word , LibreOffice and presentation or slide show formats plus interactive formats like HTML widgets
Literate programming practices
There are various other implementations of the literate programming concept ( some of them do n't have macros and hence violate the order of human logic principle ) :
Literate programming is a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated. The literate programming paradigm, as conceived by Knuth, represents a move away from writing computer programs in the manner and order imposed by the computer, and instead enables programmers to develop programs in the order demanded by the logic and flow of their thoughts. Literate programs are written as an uninterrupted exposition of logic in an ordinary human language, much like the text of an essay, in which macros are included to hide abstractions and traditional source code. Literate programming (LP) tools are used to obtain two representations from a literate source file: one suitable for further compilation or execution by a computer, the tangled code, and another for viewing as formatted documentation, which is said to be woven from the literate source. While the first generation of literate programming tools were computer language-specific, the later ones are language-agnostic and exist above the programming languages.