diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 20:16:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 20:27:13 -0300 |
| commit | dc3b58781420be6070fca896e55776bc27db905d (patch) | |
| tree | f77ebd77edf5a360df0ea9255f55daf47e5baf34 /anim/tools | |
| parent | 13fe4003276daf884da4e29112fb4db8630ad46a (diff) | |
| download | computeranim-dc3b58781420be6070fca896e55776bc27db905d.tar.gz computeranim-dc3b58781420be6070fca896e55776bc27db905d.zip | |
canim: a scene from a real program: SQLite's row on its way to disk
Three inserts stopped at sqlite3BtreeInsert with their payloads read off
the caller's stack, the commit's backtrace from unixWrite up to main, the
pwrite64 crossing into the kernel, and page 2 as the kernel took it: its
header, its cell pointers and the three rows, read by field. The scene
is built only where SQLite's source is (-Dsqlite=DIR); its recording is
181 moments, 95 KB.
What a real program asked of the blocks: a dump read by the fields a
scene gives it, with the rows between collapsed; addresses of twelve
digits and line numbers of six; the backtrace as a lens's drawing; a
continue's motion (shared frames slide, a far window fades); memory drawn
only where the stop read it. In the kernel lens a register is framed as
carrying an argument only while it holds it at the stop shown, and an
allocator row is read only where an allocation follows the word.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'anim/tools')
| -rw-r--r-- | anim/tools/chart.py | 2 | ||||
| -rw-r--r-- | anim/tools/sqlite.c | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/anim/tools/chart.py b/anim/tools/chart.py index 78ba34d..168060a 100644 --- a/anim/tools/chart.py +++ b/anim/tools/chart.py @@ -42,6 +42,8 @@ motion.REGIONS.update({ "sort": {**subject, **words}, "syscalls": {**subject, **words}, "list": {**subject, **words}, + # The band's drawing is the backtrace, then the kernel's side. + "sqlite": {**subject, **words}, "zoom": {**none, **words}, "gallery": {**beside, **words}, }) diff --git a/anim/tools/sqlite.c b/anim/tools/sqlite.c new file mode 100644 index 0000000..5d018c6 --- /dev/null +++ b/anim/tools/sqlite.c @@ -0,0 +1,18 @@ +// Three rows into a table of a file database, in one transaction: SQLite's +// amalgamation (not ours: build.zig takes it from -Dsqlite) as a library. +#include "sqlite3.h" + +int main(void) { + sqlite3 *db; + if (sqlite3_open("t.db", &db) != SQLITE_OK) return 1; + int rc = sqlite3_exec(db, + "CREATE TABLE t(word TEXT);" + "BEGIN;" + "INSERT INTO t VALUES ('alpha');" + "INSERT INTO t VALUES ('beta');" + "INSERT INTO t VALUES ('gamma');" + "COMMIT;", + 0, 0, 0); + sqlite3_close(db); + return rc; +} |
