[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Test blocks (for Emacs users)
- From: Eduardo Ochs <eduardoochs@...>
- Date: Tue, 30 Nov 2021 13:38:23 -0300
Hi all,
My presentation at the EmacsConf2021, that happenned this weekend, was
about a way to document code using "test blocks" that can be run
interactively line by line in Emacs. The slides explain everything:
http://angg.twu.net/LATEX/2021emacsconf.pdf
My presentation was supposed to be just 5 minutes long - it ended up
with 6 minutes - so I had to make a separate video with a real-world
example of how I've been using these test blocks, and that's where Lua
comes in. The video of the main presentation is here,
http://angg.twu.net/eev-videos/emacsconf2021.mp4
https://emacsconf.org/2021/talks/test/ <- with subtitles!
and the second video, and the code to run it, are here:
http://angg.twu.net/emacsconf2021.html#real-world-example
http://angg.twu.net/eev-videos/emacsconf2021-dednat6.mp4
Long story short: a good part of the Lua code that I write nowadays is
in "private" extensions for Dednat6. Dednat6 is a package for LuaLaTeX
that is described here:
http://angg.twu.net/dednat6/tug-slides.pdf
By "private" I mean "very few people are interested in Dednat6 and no
one is interested in those extensions", and as no one else cares about
those extensions I was free to experiment with ways of documenting
them... and these test blocks turned out to be very practical and a
lot of fun to use. Btw, here are two details that are not obvious:
1. They can be changed on the fly. See this example:
https://www.youtube.com/watch?v=QUMo7vgkHJI&t=396s
2. The order in which the lines are executed can change the outcome
of the test - like this:
http://angg.twu.net/eev-intros/find-eval-intro.html#3
Cheers =),
Eduardo Ochs
http://angg.twu.net/#eev