code wiki / _hdl_build / nx_cdmap_referee_gate.nx
nx_cdmap_referee_gate.nx
buildroot/runtime/_hdl_build/nx_cdmap_referee_gate.nx
about
nx_cdmap_referee_gate.nx -- referee for the position map's SECOND RULER (datavis DV2a, 2026-09-15): the SVG scanner on a
hand-built figure, the heuristic critic reproducing a hand-worked grade, two PLANTED defects the ruler must fire on
(a label on a label, a label on a mark), the api.json reader with absent-key controls, then -- when the SIL-OFL face is
on disk -- real advances bounded by what a sans face can measure and the metric critic firing on the same plant, and
-- when the live search page is on disk -- the self-grade the emitter published re-derived from its own SVG.
The font and the live page are OPTIONAL witnesses, announced through gv_kv, never gv_need: a witness structurally absent
on one host must not SKIP the whole gate forever there (measured 2026-09-02 on the browser lane). license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_cdmap_referee_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
| 12 | const G_FONT: i64 = 13 |
| 13 | const G_EXP_N: i64 = 2 |
| 14 | const G_FRAME_X0: i64 = 70 |
| 15 | const G_FRAME_X1: i64 = 730 |
| 16 | const G_FRAME_Y1: i64 = 460 |
| 17 | const G_L0_X: i64 = 201 |
| 18 | const G_L0_BOX_Y: i64 = 208 |
| 19 | const G_TW_NISHI: i64 = 36 // cl_text_w(5, 13) |
| 20 | const G_TW_MOJEEK: i64 = 43 // cl_text_w(6, 13) = 43.68 floored |
| 21 | const G_SPREAD_PRISTINE: i64 = 428 // marks 180..483 of 660 (459) and 216..387 of 430 (397), mean 428 |
| 22 | const G_PUB_MM: i64 = 1 |
| 23 | const G_PUB_SPREAD: i64 = 690 |
| 24 | const G_JSON_BYTES: i64 = 512 |
| 25 | const G_CH_QUOTE: i64 = 34 |
| 26 | const G_MIN_EM_PERMIL: i64 = 350 // a sans glyph advance never reads below 0.35 em on average... |
| 27 | const G_MAX_EM_PERMIL: i64 = 900 // ...nor above 0.90 em; outside this band the ruler is broken, not the font |
| 28 | const G_NISHI_CHARS: i64 = 5 |
| 29 | const G_CRIT_W: i64 = 6 |
| 30 | const G_FONT_NAS: *u8 = "knowledge/fonts/LiberationSans-Regular.ttf" |
| 31 | const G_FONT_NAS_BOLD: *u8 = "knowledge/fonts/LiberationSans-Bold.ttf" |
| 32 | const G_FONT_LAPTOP: *u8 = "web_assets/fonts/LiberationSans-Regular.ttf" |
| 33 | const G_FONT_LAPTOP_BOLD: *u8 = "web_assets/fonts/LiberationSans-Bold.ttf" |
| 34 | const G_LIVE_PAGE: *u8 = "sites/nishifamily/compare/search/index.html" |
| 35 | const G_LIVE_API: *u8 = "sites/nishifamily/compare/search/api.json" |
| 36 | const G_BLOCK: *u8 = "readability_cut" |
| 38 | const G_FIX_HEAD: *u8 = "<figure><svg class='cdmap' viewBox='0 0 760 520'>\n<rect x='70' y='30' width='660' height='430' rx='6' fill='var(--nx-color-panel)'/>\n<text x='70' y='475' fill='var(--nx-color-mut)' font-size='11'>700</text>\n<circle cx='180' cy='216' r='15' fill='var(--nx-color-accent)'><title>Nishi</title></circle>\n<circle cx='483' cy='387' r='15' fill='rgb(230,159,0)'><title>Mojeek</title></circle>\n" |
| 39 | const G_FIX_TAIL: *u8 = "</svg></figure>\n" |
| 40 | const G_LBL_NISHI_OK: *u8 = "<text x='201' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke' font-weight='700'>Nishi</text>\n" |
| 41 | const G_LBL_NISHI_ONMARK: *u8 = "<text x='170' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke' font-weight='700'>Nishi</text>\n" |
| 42 | const G_LBL_MOJEEK_ONMARK: *u8 = "<text x='150' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n" |
| 43 | const G_LBL_MOJEEK_OK: *u8 = "<text x='504' y='391' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n" |
| 44 | const G_LBL_MOJEEK_ONLABEL: *u8 = "<text x='201' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n" |
| 45 | const G_FIX_BYTES: i64 = 2048 |
functions
| 47 | func g_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } |
| 48 | func g_fixture(a: *u8, b: *u8) -> *u8 |
| 54 | func g_q(d: *u8, o: i64) -> i64 { d[o] = G_CH_QUOTE as u8; return o + 1 } |
| 55 | func g_jkey(d: *u8, o: i64, k: *u8, v: i64) -> i64 |
| 60 | func g_json(d: *u8) -> i64 |
| 76 | func g_i64(n: i64) -> *i64 { return sys_mmap(n * CR_I64_BYTES) as *i64 } |
| 77 | func g_setname(names: *u8, i: i64, s: *u8) -> i64 { let slot: *u8 = cr_name_at(names, i); var k: i64 = 0; while s[k] != (0 as u8) { slot[k] = s[k]; k = k + 1 } slot[k] = 0 as u8; return k } calls 1: cr_name_at |
| 79 | func g_scan(fx: *u8, rec: *i64, names: *u8) -> i64 |
| 85 | func g_grade(rec: *i64, names: *u8, n: i64, fhr: *i64, fhb: *i64) -> *i64 |
| 90 | func g_load_font(nas: *u8, laptop: *u8) -> *i64 |
| 96 | func main() -> i64 |