What the painters were given

A hand in time (round 6, branch r6-time)

notes/time.md · 447 lines · Notes

Given to 1 painter:

A hand in time (round 6, branch r6-time)

Paint dried on a clock (notes/drying.md: open, setting, tacky, dry; wait(minutes) at the easel), but painting took no time. A work{} of 200,000 hatched strokes happened in zero minutes, so what was wet or dry depended only on the wait() calls a painter wrote. The sketchbook's habit of dry() before every passage then finishes each object alone over dry paint.

Alice's principle: a stroke costs the time a hand takes to make it; a painter works in sittings of a few hours and paint sets between them. Economy and wet/dry timing should come from that physics, not from rules.

This stream adds:

Hand time is off unless a painting turns it on, and every existing log replays byte for byte as before (tested).

The API (easel)

canvas{style="friedrich", aspect=1.4, seed=7, hand=true}   -- hand time on from the start
hand_time(true)            -- or turn it on (or off) later; returns whether it was on
sitting{hours=3}           -- a new sitting starts now (a clean palette); sitting(3) too
rest(16)                   -- step away: the paint sets; the next mark starts a new sitting
rest()                     -- overnight (16 h)
t = timesheet()            -- {clock=, sitting=, sittings=, hours=, hand=, open=, setting=,
                           --  tacky=, dry=, strokes=, touches=, reloads=, piles=, hand_min=}
print(string.format("%.0f min at the easel this sitting, %.0f%% of the canvas open", t.sitting, 100 * t.open))

A sitting that runs long ends (Round 7). "Constraints are enforced, not reported" (notes/principles.md, against reward hacking, item 4): Evening at a Mountain Lake reported a 3 h sitting running 17.8 h and went on painting. Now, with hand time on, once a sitting's time (the clock since it began, with the hand time not yet clocked) reaches its hours, the easel refuses every verb that marks the canvas (strokes, touches and the motif verbs built on them, work, blend, stipple, glaze, pencil lines, varnish) with the sitting is over after 3.0 h: rest(hours) first. Queries (timesheet, clock, drying, look, status) still answer; wait, dry and rest still run, and a rest (rest, or a wait of 2 h or more) starts the next sitting. As any failing chunk, the refused chunk is rolled back whole, so plan chunks by the time left (t.hours*60 - t.sitting from timesheet()).

The overrun note stays (sitting 2: 3.8 h at the easel, 3.0 h planned; finish the passage while it is open, then rest(hours)). In a strict session it now means that the pass that just ended was the last one.

easel look --mode wet            # open (blue), setting (green), tacky (orange), dry (gray)
easel look --mode wet --crop 400,280,800,480

--mode wet dims the picture to gray (its values still read) and tints each pixel by where its paint is in drying, with a legend in the corner. It combines with the other modes (--mode wet,squint). The older --wet flag is still an alias of --dried (the paint as it will look once dry), as before.

The engine

How long a mark takes

Tags: [S] from a source (search summaries; I did not read the full papers), [E] my estimate. All constants are in paint::tally::pace.

move model numbers basis
bringing the brush to the next stroke Fitts: a + b·log2(1 + D/W), D = max(stroke length, 2 widths), W = 2 mark widths a = 0.1 s, b = 0.122 s/bit b: MacKenzie's stylus reanalysis, 95–122 ms/bit [S] (https://www.yorku.ca/mack/phd-ch2.html). a includes lifting and setting the brush down [E]
drawing the stroke steering law: b·L/W, W = 4 mark widths (at least 3 mm), speed at most 400 mm/s b = 0.11 s Accot & Zhai, "Beyond Fitts' law", CHI 1997, stylus in a linear tunnel: a ≈ 0.18 s, b ≈ 0.11 s [S] (https://citeseerx.ist.psu.edu/document?doi=c55bfa1f5f3c8aa97a102ef88dba0026041c38b7&repid=rep1&type=pdf). A brushstroke isn't a tunnel task: tunnel width, floor and top speed [E]
a touch (stipple, dab) Fitts to a spot 2 tips wide, 3 widths away, plus 0.08 s in contact; never faster than tapping 0.34 s (about 3 a second) fastest index-finger tapping is about 5–6 Hz [S] (e.g. https://pmc.ncbi.nlm.nih.gov/articles/PMC9028619/), hence the 1/6 s floor; the rest [E]
reload from a pile two reaches of ~300 mm to a ~10 mm pile (Fitts, ~5 bits, ~0.7 s each) and a turn in the pile 2.5 s [E] from the Fitts numbers above
mixing a new pile 20 s (plus the reload) [E]
wipe on the rag 2 s [E]
look-and-fill dabs a reload serves about 8 dabs [E]
pencil, chalk 40 mm/s, 0.3 s per line [E]
glaze, varnish a 25 mm brush at 150 mm/s, each part gone over twice [E]
same pile colors closer than 0.035 in OKLab; 16 piles on the palette [E]
sittings 3 h; a wait of 2 h or more is a rest; rest() is 16 h; slices of 15 min; brush strokes put on the clock once a minute piles up [E] ("a few hours, a couple of times a day")

Some strokes as the model prices them (a 440 mm Friedrich canvas, 0.44 mm a unit):

stroke hand time
a 10 cm sweep with a 12 mm flat 0.64 s
a 44 mm body stroke with a 12-unit filbert 0.62 s
a 3 mm hatch with a round 1.8 0.39 s
a 20 mm twig with a rigger 1.2 1.5 s
a 10 cm hairline 4.6 s
a stipple touch 0.34 s

What the benchmark paintings cost (the ledger of each log, hand time off, so the pictures are unchanged): notes/loops/l5_near.lua is about 73 hours of hand time (243,000 strokes, 28,000 touches, 66,000 palette trips). 53 hours of that is the fir wood in chunk 7, which has 211,000 hatched strokes. notes/loops/l3_green.lua is about 52 hours (149,000 strokes). A painter needs 17 to 25 sittings of 3 hours for these, which is within "Friedrich over days or weeks". But half of near is one wood behind the clearing, and the hand's time is where mark economy shows first. The sky is 32 minutes, the fir wood two working weeks.

Evidence

All at 1000 px. The logs are in notes/time/; easel run notes/time/<log>.lua reproduces each picture.

1. A hill's edge painted into a sky at five moments (notes/time/edge_timing.jpg, crops of the crest enlarged 3×; logs edge_*.lua). The sky is brought 10 units past the hill's line, then the hill is painted:

So the edge is now decided by when the hill is painted, not by a rule. Whether the soft band looks good is the wet-on-wet stream's question: here the drag is pale and streaky, like a halo.

2. The example in sittings (notes/time/example_three_ways.jpg; logs paintings/lua/example.lua, notes/time/example_sittings.lua, notes/time/example_meet.lua). The same program three ways:

The timesheet printed after each chunk: sky 43 min, ridge 90 (or 42), knoll 83, mist 58, spruce limbs 11, needles 88, grass 3. Sitting 2 ran 3.8 h against 3 planned and said so.

The lesson for a painter working in sittings: in one sitting the paint under a later passage is still open and comes up into it, so lay each passage only where it shows, just past where its neighbor will meet it. That is also the economical way.

3. The wet look mid-sitting (notes/time/wet_midsitting.jpg): the example in sittings during sitting 2, after the ridge, knoll and mist. Yesterday's sky is tacky (orange), today's ridge and knoll are open (blue), and a few thin spots are setting (green). Before the id fix, this look showed green streaks along the slices' seams; that is how the bug was found.

notes/time/example_meet.jpg is the whole of the third version.

Tests

Review fixes (after the merge)

A code review (gpt-6-astra) found three defects. Each now has a regression test that failed on the merged code:

  1. A checkpoint dropped hand time. Canvas::write_state stored neither the slice setting nor the ledger. A resumed hand-timed painting had hand time off and an empty ledger: its passes no longer aged between slices, and the time still owed was lost. Checkpoint version 7 (PAINTCK7) stores both, including clocked. The r6-wet branch drafted its two-layer film as version 7 too, so it becomes 8 when it merges (see the note in checkpoint.rs). Test: tally::tests::a_checkpoint_keeps_hand_time_and_the_ledger, which checks an uninterrupted run against a checkpointed one with time owed: ledger, clock bits and pixels. The easel's own checkpoints already carried the hand state; time::tests::edits_and_undo_keep_the_hand_state_of_a_replay now pins it (an edit and a deep undo match a fresh replay's clock, timesheet and picture).
  2. Clock queries after a finish reused its drying. varnish() dries the paint without telling the studio clock. The flush left that interval unreported, so every later timesheet(), clock() or drying() in the chunk saw it again and started another sitting (2, 3, 7), and the sitting could go negative. Now the flush takes the interval into the clock exactly once and banks it for the chunk's "passed while the paint dried" note, which still appears once. Test: time::tests::queries_after_a_finish_consume_its_drying_once. One side effect: clock() called after a finish in the same chunk now returns the true clock, where before it returned the clock from before the finish until the chunk ended. (Since replaced: every verb that moves the clock now takes the jump in itself; see the thermos maintenance below.)
  3. Hand time overrode an order asked for. With slicing on, explicit order="scatter" and order="passages" also became a sweep down. Handling::order_set (set by order() and sweep()) now separates a choice from the default, and only the default is swept. A preset's own order counted as a default. (Since replaced by Option<Order>, and the ruler preset's scatter now counts as asked for: thermos B2.) Test: tally::tests::hand_time_keeps_an_order_asked_for, which reads the paint's age: a sweep leaves the top rows about 2.3× as cured as the bottom, while explicit scatter and passages age the whole area alike.

Hand time off is unchanged by all three: the benchmark logs are still byte-identical at 1000 px and the golden scene is unchanged.

Maintenance after the thermos review

The thermos review (notes/round6/thermos.md) found four bugs in hand time and asked for its code to be restructured. Each bug has a test that fails on the code before the fix:

The restructuring: one timed-pass runner (paint_pass, with one sweep_down order where there were two), the time::verb wrapper, and smaller items. touch_secs() lost its unused width, stage_at_index in drying.rs holds the one stage rule, the engine's unit-ambiguous names now carry their units (hand_owed_secs, clock_hand_min), and the checkpoint writes the ledger through Tally::to_words in PAINTCK7's byte order. The Verb::Jump rule keeps the studio clock in step with the canvas, so the flush no longer infers time spent away by subtraction, and the chunk's "passed while the paint dried" note is gone. varnish, cracks and relief now report their own wait, as glaze did.

Hand time off paints the same bytes: l5_near and l3_green at 1000 px are identical to a render from before this round when both are built alike (see below), and the golden scene and replay hashes are unchanged. With hand time on, output changes where it's meant to: the ruler (B2), the clock (B4, B5), fill dabs in passes that ran past the gel point (B1) and the sweep down of work (stipple's row-by-row order now serves both; work used Order::Sweep(π/2), whose float bands can mix neighboring rows when tiles are square). That moved 0.3% of the pixels of a hand-timed l5_near at 400 px.

A build caveat for byte checks. The release profile builds incrementally (incremental = true). The same commit (eff0ef6) built in two target directories renders l3_green at 1000 px one pixel apart, by 1/255. Compare renders from binaries built the same way, e.g. both with CARGO_INCREMENTAL=0.

Known issues and ceilings

Next

Source