summaryrefslogtreecommitdiff
path: root/anim/tools/chart.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 14:43:13 -0300
committerGabriel Schneider <[email protected]>2026-11-11 16:17:33 -0300
commit3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6 (patch)
treef1bc91879a447f178dfaba39d0df107d01e557bd /anim/tools/chart.py
parenta72831d5c322078260314c305ddd940e4967947d (diff)
downloadcomputeranim-3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6.tar.gz
computeranim-3093eb55ac4a7054f51f06ea2786b5f9c9ec73f6.zip
canim: a minimap in each pane; source wherever it can be had, libc's included
From the user. Each pane with more than it shows carries a strip of its whole column at its right edge, the pane's window outlined and what happens off it marked there; the corner minimap is gone and the dive folds each column of the map into its pane's strip. The source panel follows the pc into any file the build has: glibc's own, from the distro's debuginfod by an optional step that caches them by build id (zig build sources; nothing else touches the network), and musl's, from Zig's lib directory. The syscalls scene shows open64.c on the way down, and a new scene follows the same call through a Zig-built musl. A graph's counts and inks are as of the moment shown. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/tools/chart.py')
-rw-r--r--anim/tools/chart.py41
1 files changed, 25 insertions, 16 deletions
diff --git a/anim/tools/chart.py b/anim/tools/chart.py
index 7cc0925..290c59e 100644
--- a/anim/tools/chart.py
+++ b/anim/tools/chart.py
@@ -39,27 +39,36 @@ def split(drawing, view, source, disasm, slots, backtrace=0):
out["backtrace"] = (976, right + ph(17) + 12 + ph(slots) + 12, 880, ph(backtrace))
return out
-# The words that are not panels (motion.WORDS): the clock (its count, ranged right at 1648,
-# changes in a frame by design), the caption (its 1400 from the margin), and the minimap at
-# the caption band's right end, secondary action. The caption's box starts under the clock's count
-# and the run's step counter (912 to 934).
-words = {"clock": (0, 888, 1656, 46), "caption": (0, 940, 1464, 140), "minimap": (1664, 912, 192, 108)}
+# The words that are not panels (motion.WORDS): the clock (its count, ranged right at 1856,
+# changes in a frame by design) and the caption (its 1400 from the margin). The caption's box
+# starts under the clock's count and the run's step counter (912 to 934).
+words = {"clock": (0, 888, 1920, 46), "caption": (0, 940, 1464, 140)}
none, beside, subject = split(0, 0, 14, 17, 8, 4), split(152, 152, 8, 17, 8), split(296, 200, 10, 9, 6)
# The `blocks` lens: the graph over the program column, the source alone under it; the disassembly
# (its view) over the state column, seven rows, the registers and six words under it.
blocks = {**subject, "view": (976, 48, 880, ph(7)), "source": (64, 356, 880, ph(20))}
del blocks["disasm"]
+# Each pane's minimap a region of its own (motion.strips), secondary action: the source's, the
+# disassembly's, the stack's, and the view's where it is a dump (not the calls lens's backtrace,
+# not the syscalls lens's log).
+def strips(panes, view):
+ out = motion.strips(panes)
+ if not view and "view strip" in out:
+ del out["view strip"]
+ out["view"] = panes["view"]
+ return out
motion.REGIONS.update({
- "fib": {**subject, **words},
- "sort": {**blocks, **words},
+ "fib": {**strips(subject, False), **words},
+ "sort": {**strips(blocks, True), **words},
# The band is the calls so far; the disassembly a descent.
- "syscalls": {**beside, **words},
- "heap": {**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},
+ "syscalls": {**strips(beside, False), **words},
+ "musl": {**strips(beside, False), **words},
+ "heap": {**strips(subject, True), **words},
+ "list": {**strips(subject, True), **words},
+ # The band's drawing is the backtrace, then the kernel's side; its view a dump.
+ "sqlite": {**strips(subject, True), **words},
+ "zoom": {**strips(none, False), **words},
+ "gallery": {**strips(beside, True), **words},
})
# `cut`: the gallery is the catalogue's pages, cut from one to the next (scenes/gallery.zig: 3, 6, 9.6, 13, 16,
# 19.8, 21 and 24 s), not a scene: a page's first frame changes everything at once by design.
@@ -92,8 +101,8 @@ def shown(text):
text = re.sub(r"\\(.)", r"\1", text.replace("\\n", ""))
return len(text.replace("`", ""))
-# A scene that opens on the map dives (scenes/list.zig: at 2.5 s, 150 f): the falling map passes under the
-# caption, which does not change. Its frames are no caption's arrival or leaving.
+# A scene that opens on the map dives (scenes/list.zig: at 2.5 s, 150 f): the map's columns go into their
+# strips over the caption, which does not change. Its frames are no caption's arrival or leaving.
DIVES = {"list": (150, 300)}
_lint = motion.lint