From this perspective, we therefore refer to the worfklow exposed by these kinds of computational notebooks (not just IPython, but also Sage, Mathematica and others), as "literate computing": it is the weaving of a narrative directly into a live computation, interleaving text with code and results to construct a complete piece that relies equally on the textual explanations and the computational components.
By coining the phrase “literate programming,” I am imposing a moral commitment on everyone who hears the term; surely nobody wants to admit writing an illiterate program.
Literate computing is the act of creating computable documents to share with both humans and computers.
https://yihui.name/en/2018/09/notebook-war/
Many users choose notebooks as a way to communicate, and the avante garde is transitioning from word processors and slide shows to unified notebook workflows. As these changes happen, more notebook users are have to communicate with real-world data with all the caveats.
I feel a major difference between the R culture and Python culture is that Python users seem to create code more often, whereas R users often use code. There seems to be a strong atmosphere of software engineering in the Python world: in the beginning was the custom class (with methods). For R users, in the beginning was the data.
from matplotlib_venn import venn2, venn3
venn2()
<function matplotlib_venn._venn2.venn2(subsets, set_labels=('A', 'B'), set_colors=('r', 'g'), alpha=0.4, normalize_to=1.0, ax=None, subset_label_formatter=None)>
Literate computing is a more natural style of compute.
Literate computing is a more natural style of compute.
sys:1: NoMarkdownCodeWarning: Cannot interpret Markdown cells with no block or inline code objects.
File "<ipython-input-93-dc7604d4c644>", line 1 Literate computing is a more natural style of compute. ^ SyntaxError: invalid syntax
repl = "digraph {rankdir=LR input->compute->output->input}"; repl
digraph {rankdir="LR"; subgraph clusterc{ label="literate computing"; data->"interactive computing" ->data -> "literate programming" ->data} {"interactive computing" "literate programming"} -> machines "literate programming" -> people {machines people} -> 🙉🙈🙊}
[Literate Programming](https://en.wikipedia.org/wiki/Literate_programming) is a style of programming that considers
both the human readability and computability of a computational document. In literate programming, there are
two stages: __tangling__ & __weaving__.
__Tangling__ refers to extracting computable objects from source. This is similar to the Markdown
forward coding approach we have discussed extensively in other posts.
Markdown is chosen because it is language agnostic and could supply an existing grammar to a
multi-kernel interface.
__Weaving__ transforms the source and computable objects into views.
Literate Programming is a style of programming that considers both the human readability and computability of a computational document. In literate programming, there are two stages: tangling & weaving.
Tangling refers to extracting computable objects from source. This is similar to the Markdown forward coding approach we have discussed extensively in other posts.
Markdown is chosen because it is language agnostic and could supply an existing grammar to a multi-kernel interface.
Weaving transforms the source and computable objects into views.
sys:1: NoMarkdownCodeWarning: Cannot interpret Markdown cells with no block or inline code objects.
File "<ipython-input-85-5b64d9dd6ca3>", line 1 [Literate Programming](https://en.wikipedia.org/wiki/Literate_programming) is a style of programming that considers ^ SyntaxError: invalid syntax
import sys, IPython; ip = get_ipython()
digraph {
rankdir=LR compound=true
subgraph cluster_tangle{label=Tangle "ip.input_transformer_manager" -> "ip.ast_transformers" -> "ip.compile" -> "ip.runcode"}
subgraph cluster_weave{label=Weave "ip.display_formatter" "_repr_*_" "ip.custom_exceptions"}
subgraph cluster_input{label=Input "ip.run_cell"}
subgraph cluster_output{label=Output "sys.stdout" "sys.stderr" "IPython.display"}
"ip.run_cell"->"ip.input_transformer_manager" [ltail=cluster_input lhead=cluster_tangle]
"ip.runcode" -> "IPython.display"
"ip.runcode" -> "ip.custom_exceptions"
"IPython.display" -> {"ip.display_formatter" "_repr_*_"}
}