code wiki / _hdl_build / nx_vizsla_group.nx

nx_vizsla_group.nx

buildroot/runtime/_hdl_build/nx_vizsla_group.nx

34765 B939 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_group.nx -- NISHI VIZSLA GROUP COORDINATION: multi-member FIND-A-TIME + slot POLL. Operator 2026-07-07: "exposing a calendar for a group to coordinate ... simple for a friend group". The Cal.com-collective / Doodle capability, sovereign: each member keeps their OWN R-CAL calendar store (privacy: nobody uploads a calendar anywhere); the group organ READS the member stores it is told about, intersects their free time, and runs slot polls -- all on the same tamper-evident CID/seg_store plane. Integer-only, NO-FLOAT, deterministic stdout. Records (load <file> <prefix> [segid], additive + CID-idempotent law 10): MEMBER <gid> <name> <calprefix> -> "grp:" (roster: member's calendar store) SLOT <pid> <slotid> <date> <start_min> <dur_min> -> "pol:" (a proposed poll slot) VOTE <pid> <slotid> <member> <yes|no> <date> -> "vot:" (latest date per (slot,member) wins) Commands: findtime <prefix> <gid> <from> <to> <dur_min> [earliest_min latest_min] for each day: union every member's busy (cal: events + rec: occurrences incl YEARLY) -> the group's merged busy -> maximal FREE windows within [earliest,latest) (default the whole day 0..1440 -- bounds are ARGS not magic numbers) -> windows >= dur are candidates. tally <prefix> <pid> per slot: yes/no counts (latest vote per member wins; additive history kept) -> winner = max yes, tie -> lexicographically smaller slotid (deterministic). Loud-fail: bad dates/times, to<from, unknown gid (0 members), unknown pid (0 slots), bad vote. EXCEED posture (honest): Doodle/Cal.com do this in a data-harvesting cloud; here the member calendars never leave the machine and every poll mutation is tamper-evident 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_group.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 vg_p sys_write vg_slen vg_eq vg_cmd_load vg_p ↻ vg_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 ↻ vg_tok vg_isws vg_eq ↻ vg_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 sys_mmap ↻ sha256_k sha256_update

structs

none

consts

27const K_MAGIC_1970: i64 = 1970
28const K_MAGIC_146097: i64 = 146097
29const K_MAGIC_719468: i64 = 719468
30const K_MAGIC_146096: i64 = 146096
31const K_MAGIC_1460: i64 = 1460
32const K_MAGIC_36524: i64 = 36524
33const K_MAGIC_2048: i64 = 2048
34const K_MAGIC_1440: i64 = 1440
35const K_MAGIC_4096: i64 = 4096
36const K_MAGIC_262144: i64 = 262144
37const K_MAGIC_65536: i64 = 65536

functions

39func vg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: vg_pvg_dupvg_kmemeq
40func vg_p(s: *u8) -> i64 { sys_write(1, s, vg_slen(s)); return 0 }
42func vg_eq(a: *u8, b: *u8) -> i64
54func vg_cmp(a: *u8, b: *u8) -> i64
called by 1: vg_cmd_tally
68func vg_dup(s: *u8) -> *u8
76func vg_atoi(s: *u8) -> i64
87func vg_digits(s: *u8) -> i64
99func vg_isws(c: i64) -> i64
called by 1: vg_tok
106func vg_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64
called by 1: vg_cmd_load calls 1: vg_isws
128func vg_cat(dst: *u8, off: i64, s: *u8) -> i64
134func vg_catn(dst: *u8, off: i64, v: i64) -> i64
147func vg_hhmm(dst: *u8, off: i64, m: i64) -> i64
called by 2: vg_cmd_findtimevg_cmd_tally calls 1: vg_catn
159func vg_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: vg_fieldvg_iskind calls 1: vg_slen
169func vg_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
196func vg_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
201func vg_datedays(s: *u8) -> i64
242func vg_ymd2days(y0: i64, m: i64, d: i64) -> i64
called by 1: vg_occ
254func vg_civil(z0: i64, out: *i64) -> i64
272func vg_dim(y: i64, m: i64) -> i64
called by 1: vg_occ
288func vg_occ(freq: *u8, sd0: i64, sy: i64, sm: i64, sd: i64, interval: i64, k: i64) -> i64
called by 1: vg_busy_day calls 3: vg_eqvg_dimvg_ymd2days
302func vg_daystr(dst: *u8, off: i64, days: i64) -> i64
316func vg_find(list: *i64, n: i64, s: *u8) -> i64
called by 2: vg_putvg_cmd_findtime calls 1: vg_eq
325func vg_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64
358func vg_cmd_load(argc: i64, argv: *i64) -> i64
516func vg_busy_day(calpfx: *u8, qd: i64, bs: *i64, be: *i64, np: *i64) -> i64
597func vg_cmd_findtime(argc: i64, argv: *i64) -> i64
763func vg_cmd_tally(argc: i64, argv: *i64) -> i64
931func main(argc: i64, argv: *i64) -> i64