Skip to main content

Module moving

Module moving 

Source
Expand description

What is moving on the screen right now, and why each thing is allowed to.

§Motion is information wearing a costume

Nothing here spins to prove the program is running. Every moving thing below is a fact the view already holds, drawn over time rather than all at once, so the rate of a change is legible as well as its result:

  • a rolled-up total that climbs shows the rate claims are arriving at, which is the one thing a count of directories cannot say;
  • a row that is lit is a directory the walk found since the last frame;
  • a shimmer through a dash is a claim a pricing thread is inside at this instant — the pool has N threads, so exactly N rows shimmer, and that is honest rather than decorative;
  • a mark running up the ancestors is the subtree operation that just happened, shown instead of inferred;
  • a row emptying is bytes leaving the disk.

The rule that follows from it, and the one worth keeping: if an effect cannot be derived from something true, it does not move. There is no spinner in this file and no place to put one.

§Whimsy before the point of no return, gravity after it

Everything above belongs to finding and waiting. Past the confirmation the only thing that moves is the pair of counters in Chase — reclaimable going down, freed coming up — and that is the whole payoff. A deletion is a thing that might have been a mistake, so it gets no celebration.

§It is bounded by the viewport, not by the tree

Moving::advance is handed the rows that are actually drawn, and it forgets every entry it was not handed this frame. So the per-frame cost is the height of the pane whatever the tree is doing — one real home directory is 22,765 directories and 16,013 claims, and none of that is touched here. A row scrolled away and back has no state to inherit, and starts showing the truth immediately, which is right: nobody watched it change.

Structs§

Chase
One number on its way to another.
Moving
Everything the view is in the middle of showing.

Constants§

ARRIVAL
How long a newly arrived row stays lit.
COUNT_UP
Roughly how long a number takes to reach the one behind it.
DIM
How long an emptied row stays on screen, dimmed, before it collapses away.
FLASH
How long one rung of a mark cascade stays lit.
RUNG
How much later each rung above the marked row lights up.
SHIMMER
How long the pricing shimmer takes to cross its column once.