code wiki / _hdl_build / nx_vizsla_group.nx
nx_vizsla_group.nx
buildroot/runtime/_hdl_build/nx_vizsla_group.nx
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
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
| 27 | const K_MAGIC_1970: i64 = 1970 |
| 28 | const K_MAGIC_146097: i64 = 146097 |
| 29 | const K_MAGIC_719468: i64 = 719468 |
| 30 | const K_MAGIC_146096: i64 = 146096 |
| 31 | const K_MAGIC_1460: i64 = 1460 |
| 32 | const K_MAGIC_36524: i64 = 36524 |
| 33 | const K_MAGIC_2048: i64 = 2048 |
| 34 | const K_MAGIC_1440: i64 = 1440 |
| 35 | const K_MAGIC_4096: i64 = 4096 |
| 36 | const K_MAGIC_262144: i64 = 262144 |
| 37 | const K_MAGIC_65536: i64 = 65536 |
functions
| 39 | func vg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 40 | func vg_p(s: *u8) -> i64 { sys_write(1, s, vg_slen(s)); return 0 } |
| 42 | func vg_eq(a: *u8, b: *u8) -> i64 |
| 54 | func vg_cmp(a: *u8, b: *u8) -> i64 called by 1: vg_cmd_tally |
| 68 | func vg_dup(s: *u8) -> *u8 |
| 76 | func vg_atoi(s: *u8) -> i64 |
| 87 | func vg_digits(s: *u8) -> i64 |
| 99 | func vg_isws(c: i64) -> i64 called by 1: vg_tok |
| 106 | func vg_tok(b: *u8, off: i64, lend: i64, dst: *u8, cap: i64) -> i64 |
| 128 | func vg_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 134 | func vg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 147 | func vg_hhmm(dst: *u8, off: i64, m: i64) -> i64 |
| 159 | func vg_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 169 | func vg_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 196 | func vg_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 201 | func vg_datedays(s: *u8) -> i64 |
| 242 | func vg_ymd2days(y0: i64, m: i64, d: i64) -> i64 called by 1: vg_occ |
| 254 | func vg_civil(z0: i64, out: *i64) -> i64 |
| 272 | func vg_dim(y: i64, m: i64) -> i64 called by 1: vg_occ |
| 288 | func vg_occ(freq: *u8, sd0: i64, sy: i64, sm: i64, sd: i64, interval: i64, k: i64) -> i64 |
| 302 | func vg_daystr(dst: *u8, off: i64, days: i64) -> i64 |
| 316 | func vg_find(list: *i64, n: i64, s: *u8) -> i64 |
| 325 | func vg_put(keys: *i64, vals: *i64, nf: i64, kp: *u8, st: *i64) -> i64 |
| 358 | func vg_cmd_load(argc: i64, argv: *i64) -> i64 |
| 516 | func vg_busy_day(calpfx: *u8, qd: i64, bs: *i64, be: *i64, np: *i64) -> i64 |
| 597 | func vg_cmd_findtime(argc: i64, argv: *i64) -> i64 |
| 763 | func vg_cmd_tally(argc: i64, argv: *i64) -> i64 |
| 931 | func main(argc: i64, argv: *i64) -> i64 |