code wiki / _hdl_build / nx_vizsla_calendar.nx
nx_vizsla_calendar.nx
buildroot/runtime/_hdl_build/nx_vizsla_calendar.nx
about
nx_vizsla_calendar.nx -- NISHI VIZSLA R-CAL.0: the calendar substrate (events + FREE/BUSY).
Operator 2026-06-22: "...running our personal relationship management and calendar and to dos..."
The census (nx_vizsla_census) measured the ENTIRE calendar area ABSENT; this is the keystone rung it
names -- everything time-based (recurrence R-CAL.1, conflicts R-CAL.2, time-blocking R-CAL.3) composes
on it. Events are CID records on the SAME tamper-evident seg_store data plane as money (V1) +
relationships (V4) + maintenance (V6): additive, idempotent-by-construction (law 10), as-of time-travel.
FREE/BUSY is computed integer-only (NO-FLOAT) -- busy = merged union of [start,start+dur); free = the
complement within the 1440-minute day. Determinism: stdout has no clocks (today/date are argv).
Commands (argv[1]):
load <eventsfile> <prefix> [segid] EVENT <id> <date YYYY-MM-DD> <start_min> <dur_min> <title>
-> "cal:" CID records on seg_store.
day <prefix> <date> the day's events sorted by start + merged BUSY intervals +
the FREE complement within [00:00,24:00) + a verdict line.
Loud-fail law: missing file, bad date, non-digit/out-of-range start|dur, event crossing midnight = exit 1.
EXCEED (grounded knowledge/fetched/pa_c2_icalendar.raw VEVENT/VFREEBUSY): free/busy on a sovereign,
auditable, time-travelable data plane -- Google Calendar's free/busy is a cloud query with no portable
history. spec: knowledge/research/2026-06-22-vizsla-sclass-roadmap.md license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 22 | const K_MAGIC_1970: i64 = 1970 |
| 23 | const K_MAGIC_146097: i64 = 146097 |
| 24 | const K_MAGIC_719468: i64 = 719468 |
| 25 | const K_MAGIC_146096: i64 = 146096 |
| 26 | const K_MAGIC_1460: i64 = 1460 |
| 27 | const K_MAGIC_36524: i64 = 36524 |
| 28 | const K_MAGIC_2048: i64 = 2048 |
| 29 | const K_MAGIC_1440: i64 = 1440 |
| 30 | const K_MAGIC_4096: i64 = 4096 |
| 31 | const K_MAGIC_131072: i64 = 131072 |
| 32 | const K_MAGIC_262144: i64 = 262144 |
functions
| 34 | func vc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 35 | func vc_p(s: *u8) -> i64 { sys_write(1, s, vc_slen(s)); return 0 } |
| 37 | func vc_eq(a: *u8, b: *u8) -> i64 |
| 48 | func vc_dup(s: *u8) -> *u8 |
| 56 | func vc_atoi(s: *u8) -> i64 |
| 67 | func vc_digits(s: *u8) -> i64 called by 1: vc_cmd_load |
| 79 | func vc_isws(c: i64) -> i64 called by 1: vc_tok |
| 86 | func vc_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 108 | func vc_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 114 | func vc_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 128 | func vc_hhmm(dst: *u8, off: i64, m: i64) -> i64 |
| 140 | func vc_find(list: *i64, n: i64, s: *u8) -> i64 |
| 149 | func vc_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 159 | func vc_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 186 | func vc_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 191 | func vc_log_append(prefix: *u8, tag: *u8, rep: *u8, o: i64) -> i64 |
| 213 | func vc_datedays(s: *u8) -> i64 |
| 255 | func vc_ymd2days(y0: i64, m: i64, d: i64) -> i64 called by 1: vc_occ |
| 268 | func vc_civil(z0: i64, out: *i64) -> i64 |
| 287 | func vc_dim(y: i64, m: i64) -> i64 called by 1: vc_occ |
| 304 | func vc_daystr(dst: *u8, off: i64, days: i64) -> i64 |
| 321 | func vc_occ(freq: *u8, sd0: i64, sy: i64, sm: i64, sd: i64, interval: i64, k: i64) -> i64 |
| 336 | func vc_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64 |
| 365 | func vc_cmd_load(argc: i64, argv: *i64) -> i64 |
| 528 | func vc_cmd_day(argc: i64, argv: *i64) -> i64 |
| 709 | func vc_cmd_expand(argc: i64, argv: *i64) -> i64 |
| 811 | func vc_cmd_conflicts(argc: i64, argv: *i64) -> i64 |
| 992 | func main(argc: i64, argv: *i64) -> i64 |