;;;; The dev agent, as Flan sees it. Three calls, and the shape of them is the ;;;; design: loading a redefinition and installing it are separate, because ;;;; only the program knows when it is between frames. ;;;; ;;;; (agent/start path) listen on a unix socket; once, at startup ;;;; (agent/poll) install whatever has arrived; returns how many ;;;; (agent/wait ms) the same, but waits for something first ;;;; ;;;; A game loop calls poll at the top of the frame and ignores the result. ;;;; wait is for a headless test, where waiting is what makes a reload ;;;; deterministic rather than a race against the frame rate. ;;;; ;;;; No aggregate crosses this boundary, so there is no shim: a Flan string is ;;;; already ptr+len and flan_agent_start takes it that way. (declare start-raw [path string] i32 "flan_agent_start") (declare poll-raw [] i32 "flan_agent_poll") (declare wait-raw [ms i32] i32 "flan_agent_wait") (defn start [path string] i32 (start-raw path)) (defn poll [] i32 (poll-raw)) (defn wait [ms i32] i32 (wait-raw ms))