code wiki / _hdl_build / nx_cdmap_interact_gate.nx
nx_cdmap_interact_gate.nx
buildroot/runtime/_hdl_build/nx_cdmap_interact_gate.nx
about
nx_cdmap_interact_gate.nx -- referee for the position map's INTERACTION DOOR (datavis DV8 cdp_interact, 2026-09-15).
The door is ONE inline script the compare base emits after the 2D cut: hover or focus reveals a mark's values, a legend
button toggles a player, dragging brushes a region whose players are listed and whose bounds are written into the URL
hash as the trace (cdsel=xlo,xhi,ylo,yhi in permil on the cut axes). This gate drives cdp_interact IN-PROCESS onto a
/tmp file and holds the emitted door to its contract: the fit domains and the plot frame it was handed are the numbers
in the script (so a brush converts pixels with the same domains the page drew with), the trace key is built from a
character code (the lexer forbids '#' and '!' in a literal, and the script must carry neither -- the neg-control counts
the bytes), the three interactions are wired, and the trace is re-applied on load. When the live search page is on
disk, its door is cross-checked structurally (buttons equal marks inside the cdmap svg, one script, one output), announced
through gv_kv and never gv_need. SCOPE STATED: a script executed by a browser is the oracle OUTSIDE the path; this gate
proves the door's STRUCTURE and its numbers, never that a browser ran it. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_swcompare_lib.nxnx_syscalls.nxnx_gate_verdict.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
| 16 | const G_DIR: *u8 = "/tmp/nx_cdmap_interact_gate/" |
| 17 | const G_OUT: *u8 = "/tmp/nx_cdmap_interact_gate/door.html" |
| 18 | const G_LIVE_PAGE: *u8 = "sites/nishifamily/compare/search/index.html" |
| 19 | const G_LIVE_API: *u8 = "sites/nishifamily/compare/search/api.json" |
| 20 | const G_MODE_644: i64 = 420 |
| 21 | const G_DIR_MODE: i64 = 493 |
| 22 | const G_XLO: i64 = 700 |
| 23 | const G_XHI: i64 = 1000 |
| 24 | const G_YLO: i64 = 0 |
| 25 | const G_YHI: i64 = 350 |
| 26 | const G_STEP: i64 = 50 |
| 27 | const G_CH_HASH: i64 = 35 |
| 28 | const G_CH_BANG: i64 = 33 |
| 29 | const G_I64_BYTES: i64 = 8 |
functions
| 31 | func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 33 | func g_count(buf: *u8, from: i64, to: i64, needle: *u8) -> i64 |
| 46 | func g_find(buf: *u8, from: i64, to: i64, needle: *u8) -> i64 |
| 58 | func g_has(buf: *u8, n: i64, needle: *u8) -> i64 { if g_count(buf, 0, n, needle) > 0 { return 1 } return 0 } |
| 59 | func g_count_byte(buf: *u8, n: i64, code: i64) -> i64 { var c: i64 = 0; var i: i64 = 0; while i < n { if (buf[i] as i64) == code { c = c + 1 } i = i + 1 } return c } called by 1: main |
| 61 | func main() -> i64 |