lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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:

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, <- with subtitles!

and the second video, and the code to run it, are here:

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:

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:

  2. The order in which the lines are executed can change the outcome
     of the test - like this:

Cheers =),
  Eduardo Ochs