code wiki / _hdl_build / nx_vizsla_calendar.nx

nx_vizsla_calendar.nx

buildroot/runtime/_hdl_build/nx_vizsla_calendar.nx

37965 B1001 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_calendar.nx

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

main vc_p sys_write vc_slen vc_eq vc_cmd_load vc_p ↻ vc_atoi sys_now_us sys_mmap sys_clock_gettime_mono sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_begin ss_begin_cap sys_mmap ↻ vc_tok vc_isws vc_eq ↻ vc_datedays sys_mmap ↻ vc_digits vc_put sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init

structs

none

consts

22const K_MAGIC_1970: i64 = 1970
23const K_MAGIC_146097: i64 = 146097
24const K_MAGIC_719468: i64 = 719468
25const K_MAGIC_146096: i64 = 146096
26const K_MAGIC_1460: i64 = 1460
27const K_MAGIC_36524: i64 = 36524
28const K_MAGIC_2048: i64 = 2048
29const K_MAGIC_1440: i64 = 1440
30const K_MAGIC_4096: i64 = 4096
31const K_MAGIC_131072: i64 = 131072
32const K_MAGIC_262144: i64 = 262144

functions

34func vc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: vc_pvc_dupvc_kmemeq
35func vc_p(s: *u8) -> i64 { sys_write(1, s, vc_slen(s)); return 0 }
37func vc_eq(a: *u8, b: *u8) -> i64
48func vc_dup(s: *u8) -> *u8
56func vc_atoi(s: *u8) -> i64
67func vc_digits(s: *u8) -> i64
called by 1: vc_cmd_load
79func vc_isws(c: i64) -> i64
called by 1: vc_tok
86func vc_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 1: vc_cmd_load calls 1: vc_isws
108func vc_cat(dst: *u8, off: i64, s: *u8) -> i64
114func vc_catn(dst: *u8, off: i64, v: i64) -> i64
128func vc_hhmm(dst: *u8, off: i64, m: i64) -> i64
140func vc_find(list: *i64, n: i64, s: *u8) -> i64
called by 1: vc_put calls 1: vc_eq
149func vc_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: vc_fieldvc_iskind calls 1: vc_slen
159func vc_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
186func vc_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
191func vc_log_append(prefix: *u8, tag: *u8, rep: *u8, o: i64) -> i64
213func vc_datedays(s: *u8) -> i64
255func vc_ymd2days(y0: i64, m: i64, d: i64) -> i64
called by 1: vc_occ
268func vc_civil(z0: i64, out: *i64) -> i64
287func vc_dim(y: i64, m: i64) -> i64
called by 1: vc_occ
304func vc_daystr(dst: *u8, off: i64, days: i64) -> i64
321func vc_occ(freq: *u8, sd0: i64, sy: i64, sm: i64, sd: i64, interval: i64, k: i64) -> i64
336func vc_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64
365func vc_cmd_load(argc: i64, argv: *i64) -> i64
528func vc_cmd_day(argc: i64, argv: *i64) -> i64
709func vc_cmd_expand(argc: i64, argv: *i64) -> i64
811func vc_cmd_conflicts(argc: i64, argv: *i64) -> i64
992func main(argc: i64, argv: *i64) -> i64