Quick
index
main
eev
maths
blogme
dednat6
littlelangs
PURO
(GAC2,
C3TD,
λMDetc)
(Chapa 1)

emacs
lua
(la)tex
fvwm
agda
tcl
forth
icon
debian
irc
contact

Using test blocks in eev

This video is about how I've been documenting complex functions and data structures by putting chunks of executable code in comments (in "test blocks", see below), and how I execute these chunks line by line with eepitch. The "line by line" trick lets me follow what each line does without having to add any comments.

Links to the video (4m45s long):
http://angg.twu.net/eev-videos/2021-test-blocks.mp4
http://www.youtube.com/watch?v=fpsF_M55W4o

Links to documentation:
(find-eepitch-intro "3. Test blocks")
(find-eepitch-intro "3.2. Test blocks as documentation")

More videos about eev:
http://angg.twu.net/emacsconf2020.html#more-videos
(find-videos-intro "1. Some videos")

Discussion on Reddit:
https://www.reddit.com/r/emacs/comments/l3tg2x/using_test_blocks_in_eev/

Index:
(code-eevvideo "testbls" "2021-test-blocks" "fpsF_M55W4o")
(code-video "testblsvideo" "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4")
(find-testblsvideo "0:00")
(find-testblsvideo "0:16" "I just added this section here to the documentation:")
(find-testblsvideo "0:30" "3.2. Test blocks as documentation")
(find-testblsvideo "0:36"   "most people think that test blocks are very alien")
(find-testblsvideo "1:04"   "The demo is this thing here:")
(find-testblsvideo "1:25"   "this part downloads dednat6-minimal.zip with eepitch")
(find-testblsvideo "1:50"   "we run this code-c-d so that the hyperlinks below will work")
(find-testblsvideo "1:56"   "we run this setenv to set up the init file that Lua uses")
(find-testblsvideo "2:06"   "the header of 'edrxlib.lua' explains how that init file works")
(find-testblsvideo "2:19" "let's go to this test block: in 'treetex.lua'...")
(find-testblsvideo "2:23" "test block 1: 'Treenode-tests'")
(find-testblsvideo "2:24" "this thing here is colored as a comment - it is a comment")
(find-testblsvideo "2:33"   "if I run f8 here I start a new Lua interpreter")
(find-testblsvideo "2:44"   "the line 'require \"treetex.lua\"' loads the current file")
(find-testblsvideo "2:57"   "I use it as documentation for certain data structures")
(find-testblsvideo "3:31" "test block 2: 'dedtorect-tests'")
(find-testblsvideo "3:44"   "run this start a new Lua interpreter")
(find-testblsvideo "4:14" "again: these things are treated by Lua as comment but...")
(find-testblsvideo "4:24" "to learn more about test blocks go to the eepitch tutorial")
(find-testblsvideo "4:36" "to the section: '3. Test blocks'")