;;;; A program that parks the moment it is up: an agent, a line of output and ;;;; a return from main. ;;;; ;;;; Every other fixture here has to be driven to its park through the run it ;;;; was written for. What the note test needs is the park itself, repeatedly ;;;; and cheaply — a redefinition sent to a parked program is answered with an ;;;; explanation of what "queued" means for one, and the claim under test is ;;;; that the explanation is given once per park rather than once per ;;;; keystroke. So the run is as short as a run can be, and [rerun] gets it ;;;; back to a fresh park in one op. (import agent "vendor:agent") (defvar runs i64) (defn step [] i64 7) ;;; Called by main before the run reaches any (agent/poll), which is what ;;; makes it the probe for *when* a parked delivery installs: a body queued ;;; while the program was parked either got into the ring before main was ;;; re-entered or it did not, and this is the print that says which. (defn main [] i32 (agent/start "/tmp/flan-dev-parknote-fallback.sock") (set runs (+ runs 1)) (print (step)) (println "") 0)