path: root/site/cleopatra/
diff options
authorThomas Letan <>2021-03-28 00:03:41 +0100
committerThomas Letan <>2021-03-28 14:19:29 +0200
commit495f9db0606b0ed09e6fac59dc32de4cdc8c0087 (patch)
tree82ea5c5e247c664de247a0f3818f393ffdb00067 /site/cleopatra/
parent1a197fb354a82a31deca4f9b118f057bbd0038b6 (diff)
2021 Spring redesign
Diffstat (limited to 'site/cleopatra/')
1 files changed, 20 insertions, 7 deletions
diff --git a/site/cleopatra/ b/site/cleopatra/
index be25097..63e0b02 100644
--- a/site/cleopatra/
+++ b/site/cleopatra/
@@ -1,6 +1,8 @@
-<h1>Literate Programming Projects</h1>
+#+TITLE: Literate Programming Projects
+#+SERIES: ../cleopatra.html
+#+SERIES_PREV: ./org.html
+#+SERIES_NEXT: ./theme.html
Literate programming is an interesting exercice. It forces programmers
to think about how to present their code for other people to
@@ -12,18 +14,27 @@ That being said, literate programming is particularly well-suited for
blog posts, since at the very least it provides the tool to enforce
the code presented to readers is correct.
+<nav id="generate-toc"></nav>
+<div id="history">site/cleopatra/</div>
+* Tangling
We use Emacs and ~org-mode~ to tangle the literate programming
projects present in the ~posts/~ directory of this website. This is
done with the following emacs lisp script.
#+BEGIN_SRC emacs-lisp :tangle export-lp.el
-(cleopatra:configure) ; opinionated configuration provided by cleopatra
+;; opinionated configuration provided by cleopatra
+;; allow the execution of shell block code
- '((shell . t))) ; allow the execution of shell block code
+ '((shell . t)))
- ;; scan the posts/ directory and tangled it into lp/
+;; scan the posts/ directory and tangled it into lp/
(setq org-publish-project-alist
:base-directory "site/posts"
@@ -46,6 +57,8 @@ literate-programming-prebuild :
ARTIFACTS += lp/ site/posts/deps.svg
+* Building
In the =build= phase, we actually try to compile the tangled projects.
As of now, there is only one literate program: [[../posts/][the Echo server
implemented in Coq]] which demonstrates how ~coqffi~ can be used to
@@ -54,7 +67,7 @@ implement realistic software projects.
#+BEGIN_SRC makefile :tangle
COQFFI_ARCHIVE := site/files/coqffi-tutorial.tar.gz
-coqffi-tutorial-build : literate-programming-prebuild
+coqffi-tutorial-build : literate-programming-prebuild _opam/init
@cleopatra echo "Building" "coqffi tutorial"
@cd lp/coqffi-tutorial; dune build --display quiet
@cleopatra echo "Archiving" "coqffi tutorial"