Will Anderson
|
5678745381
|
add runtime/time.el, math.el, state.el — time, math, and state in El
Migrates the time, math/float, and in-process state surfaces from
el-compiler/runtime/legacy/el_runtime.c to self-hosted El source:
- runtime/time.el: time_now, sleep_secs/ms, time_to_parts (via pure-El
Gregorian civil_from_days decomposition), time_format (ISO + strftime
subset), time_add, time_diff, time_from_parts; full Instant/Duration
nanosecond API (now, unix_seconds/millis, duration_seconds/millis,
instant_to_iso8601, sleep_duration); TTL cache (ttl_cache_set/get/age
backed by state); uuid_new / uuid_v4 via __uuid_v4 seed.
- runtime/math.el: el_abs, el_max, el_min (Int); math_sqrt/log/ln/sin/cos/pi
(Float seed wrappers); float_to_str, int_to_float, float_to_int, str_to_float,
format_float (__format_float seed), decimal_round (half-away-from-zero via
pure-El _pow10/_floor_f helpers).
- runtime/state.el: state_set/get/del/keys thin wrappers over __state_* seeds;
convenience helpers state_has and state_get_or.
|
2026-05-03 15:39:48 -05:00 |
|