-
Notifications
You must be signed in to change notification settings - Fork 0
Home
midgy
converts markdown to executable python and more.
it is the basis for a literate programming metalanguage
with markdown as the document language and python as the programming language.
a lot of code is contained in markdown, but never gets executed.
why not?
midgy
was developed to:
- have more fun writing markdown
- develop a tighter relationship between markdown and code than notebook cells
- explore the best heuristics to synthesize python from markdown
- give reasonable error messages
- improve the writing experience in notebooks
My hope is that the ability to make explanations more natural will cause more programmers to discover the joys of literate programming, because I believe it’s quite a pleasure to combine verbal and mathematical skills; but perhaps I’m hoping for too much.
literate programming - donald knuth
markdown has seen remarkable adoption through social coding platforms. knowledge of markdown is a modern literacy to contribute to most plain text editors. the pervasive adoption and general inclusion of all programming languages makes it a great glue language for scientific and data driven literate programs.
computational notebooks are one of the most popular file forms for literate programs.
most implementations draw strict block level separation between code and narrative.
midgy
allows markdown to used in python and python used in markdown throughout the lifecycle of the tangle and weave phases of literate programming.
this bi-directional coupling allows for novel programs and interactions to be created.
the density of midgy
proves specifically ideal for presentations where blocks of markdown
represent the execution and display of markdown source.
this co-development is also strong early in research because that act is literally turns words into code.
There is, finally between science and literature, a third margin which science must reconquer, that of pleasure.
science vs literature - roland barthes
flow in writing is so important. when we are write literate programs we context switch between code and narrative. markdown naturally brings code and narrative nearer. authors can seamlessly switch between both contexts putting more characters on the page.