Gap surfaced by a consumer (eigen-sheet, the spreadsheet forcing-function
repo): EigenScript exposes no wall-clock builtin — no time, now,
clock, or epoch source anywhere in the runtime. A consumer that needs the
current time (a spreadsheet's TODAY()/NOW(), a logger, a scheduler) has
nothing to call and cannot get it without shelling out.
Why this belongs upstream, and why it's tape-first
A clock read is a nondeterministic input — exactly the class the trace
tape exists to make replayable. The embed API already has the seam
(eigs_trace_record_nondet / eigs_replay_take, PR #365, consumed by EigenOS
M11 and the liferaft/tidelog replay gates). A clock builtin must record its
value on the tape at capture and take it from the tape on replay, so a program
that reads the time still replays byte-for-byte. A naive gettimeofday
builtin that bypassed the tape would be the standing-veto case (untraced
nondeterminism).
Proposed surface
A builtin returning the current time as a number the caller can interpret —
e.g. clock_unix of null -> seconds since the Unix epoch (float, sub-second
ok). Consumers derive what they need (eigen-sheet: spreadsheet serial =
unix/86400 + 25569). Routed through the nondeterminism seam so it's captured
and replayed like any other tape record.
Consumer impact
Unblocks eigen-sheet #34 (TODAY/NOW). Also the obvious primitive for any
future time-aware consumer (logs, schedulers, EigenOS uptime/vitals).
Requested by the eigen-sheet LibreOffice-Calc-parity work; happy to consume
whatever shape you prefer, as long as it's tape-captured.
Gap surfaced by a consumer (eigen-sheet, the spreadsheet forcing-function
repo): EigenScript exposes no wall-clock builtin — no
time,now,clock, or epoch source anywhere in the runtime. A consumer that needs thecurrent time (a spreadsheet's
TODAY()/NOW(), a logger, a scheduler) hasnothing to call and cannot get it without shelling out.
Why this belongs upstream, and why it's tape-first
A clock read is a nondeterministic input — exactly the class the trace
tape exists to make replayable. The embed API already has the seam
(
eigs_trace_record_nondet/eigs_replay_take, PR #365, consumed by EigenOSM11 and the liferaft/tidelog replay gates). A clock builtin must record its
value on the tape at capture and take it from the tape on replay, so a program
that reads the time still replays byte-for-byte. A naive
gettimeofdaybuiltin that bypassed the tape would be the standing-veto case (untraced
nondeterminism).
Proposed surface
A builtin returning the current time as a number the caller can interpret —
e.g.
clock_unix of null-> seconds since the Unix epoch (float, sub-secondok). Consumers derive what they need (eigen-sheet: spreadsheet serial =
unix/86400 + 25569). Routed through the nondeterminism seam so it's captured
and replayed like any other tape record.
Consumer impact
Unblocks eigen-sheet #34 (TODAY/NOW). Also the obvious primitive for any
future time-aware consumer (logs, schedulers, EigenOS uptime/vitals).
Requested by the eigen-sheet LibreOffice-Calc-parity work; happy to consume
whatever shape you prefer, as long as it's tape-captured.