How long do you have?
This was for a project called "willshake." The system provides a rough overview of itself [0].
I was using Org for documentation, and I decided to try migrating to a literate codebase.
It was clear immediately that I needed a "real" build tool. After some research, I decided that was Tup [1]. Tup is a strict, "functional reactive" build system with extremely fast incremental builds.
So I run the Tup monitor, and everything gets tangled as I write. Great.
But tangling through Emacs/Org was way too slow. So I wrote my own gawk-based tangle [2] that supports the subset of Org Babel's features that I needed, but would tangle any file in 20-50ms.
But usually I want to do something with the tangled code (you know, compile it, run it). So I also define build rules inside of the documents (for example, [3]). I just extract the rules from the documents and feed them to Tup.
Now I can just write whatever I want in a document, and stuff just happens as I write. This includes the removal of obsoleted build targets, which Tup handles. So I can "literally" remove a document file from the project and the feature is removed; return it, and the feature is restored.
But as the system grew, the build started to push 2 seconds. This is because Tup was reviewing thousands of rules whenever any file changed. So I decided (following Christopher Alexander), to treat directories of documents as isolated subsystems.[4]
So I can create features and subsystems with continuous builds ~250ms, using
only Org files and directories.
It still sucks. I'm taking a detour to explore dynamic documents, which I think precedes considerations about "programming."
[0] https://willshake.net/about#more-about
[1] http://gittup.org/tup/
[2] https://bitbucket.org/gavinpc/willshake/src/default/bootstra...
[3] https://willshake.net/about/the_stylesheets#sec-4
[4] https://bitbucket.org/gavinpc/willshake/src/default/bootstra...