code wiki / _hdl_build / nx_cdmap_pixjudge_gate.nx
nx_cdmap_pixjudge_gate.nx
buildroot/runtime/_hdl_build/nx_cdmap_pixjudge_gate.nx
about
nx_cdmap_pixjudge_gate.nx -- referee for the position map's PIXEL REFEREE (datavis DV2, 2026-09-15). Hand-built
figures are drawn as ink through the sovereign font engine and the pixel critic is held to what a reader would see:
a pristine figure reads clean; a PLANTED FONT-METRIC DRIFT -- two runs of wide glyphs reserved by the heuristic
width and placed just past that reserve, so the self-grade's boxes are apart while the real ink overlaps -- must be
caught by the pixel ruler AND missed by the box ruler on the same bytes (the DV2 done-rule); a label on ANOTHER
player's mark is a defect while a label on its OWN mark is not; ink that leaves the plot frame is OFF; the agreement
call is bound to the published number both ways; a missing face is a NAMED refusal, never a zero vector; and, when
the live search page is on disk, the served figure's pixel grade is compared with the grade it published (an optional
witness announced through gv_kv, never gv_need, so an absent page cannot SKIP the gate forever on one host).
The face IS the subject's substrate, so its absence is gv_need: without a face nothing here measures anything.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_cdmap_pixjudge_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_FONT_PX: i64 = 13 |
| 17 | const G_EXP_N: i64 = 2 |
| 18 | const G_VB_W: i64 = 760 |
| 19 | const G_VB_H: i64 = 520 |
| 20 | const G_FRAME_X1: i64 = 730 |
| 21 | const G_W_CHARS: i64 = 6 // the drift plant: six W, the widest Latin glyph a sans face carries |
| 22 | const G_DRIFT_A_X: i64 = 100 |
| 23 | const G_DRIFT_GAP: i64 = 2 // label B starts this far past label A's HEURISTIC reserve |
| 24 | const G_JSON_BYTES: i64 = 512 |
| 25 | const G_CH_QUOTE: i64 = 34 |
| 26 | const G_PUB_MM: i64 = 1 |
| 27 | const G_PUB_SPREAD: i64 = 690 |
| 28 | const G_PUB_DEFECTS_WRONG: i64 = 3 |
| 29 | const G_FONT_NAS: *u8 = "knowledge/fonts/LiberationSans-Regular.ttf" |
| 30 | const G_FONT_NAS_BOLD: *u8 = "knowledge/fonts/LiberationSans-Bold.ttf" |
| 31 | const G_FONT_LAPTOP: *u8 = "web_assets/fonts/LiberationSans-Regular.ttf" |
| 32 | const G_FONT_LAPTOP_BOLD: *u8 = "web_assets/fonts/LiberationSans-Bold.ttf" |
| 33 | const G_LIVE_PAGE: *u8 = "sites/nishifamily/compare/search/index.html" |
| 34 | const G_LIVE_API: *u8 = "sites/nishifamily/compare/search/api.json" |
| 35 | const G_BLOCK: *u8 = "readability_cut" |
| 36 | const G_FIX_BYTES: i64 = 2048 |
| 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" |
| 39 | const G_FIX_TAIL: *u8 = "</svg></figure>\n" |
| 40 | const G_MARKS_PRISTINE: *u8 = "<circle cx='180' cy='216' r='15' fill='var(--nx-color-accent)'/>\n<circle cx='483' cy='387' r='15' fill='rgb(230,159,0)'/>\n" |
| 41 | const G_MARKS_FAR: *u8 = "<circle cx='600' cy='100' r='5' fill='rgb(1,1,1)'/>\n<circle cx='650' cy='100' r='5' fill='rgb(1,1,1)'/>\n" |
| 42 | const G_MARK_EDGE: *u8 = "<circle cx='700' cy='216' r='5' fill='rgb(1,1,1)'/>\n" |
| 43 | 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" |
| 44 | 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" |
| 45 | const G_LBL_NISHI_OWNMARK: *u8 = "<text x='170' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke' font-weight='700'>Nishi</text>\n" |
| 46 | const G_LBL_MOJEEK_ONMARK0: *u8 = "<text x='150' y='236' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n" |
| 47 | const G_LBL_EDGE: *u8 = "<text x='700' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Marginalia</text>\n" |
| 48 | const G_DRIFT_A: *u8 = "<text x='100' y='300' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>WWWWWW</text>\n" |
| 49 | const G_DRIFT_B_OPEN: *u8 = "<text x='" |
| 50 | const G_DRIFT_B_CLOSE: *u8 = "' y='300' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>WWWWWW</text>\n" |
| 51 | const G_WWWWWW: *u8 = "WWWWWW" |
| 54 | const G_NOTE_CLEAR: *u8 = "<g class='cdnote'><title>note t1</title><rect x='400' y='100' width='170' height='40' rx='4'/>\n<text x='405' y='114' fill='var(--nx-color-fg)' font-size='11'>a clear note</text>\n<text x='405' y='128' fill='var(--nx-color-fg)' font-size='11'>second line</text>\n</g>\n" |
| 55 | const G_NOTE_ONLABEL: *u8 = "<g class='cdnote'><title>note t2</title><rect x='500' y='378' width='170' height='26' rx='4'/>\n<text x='504' y='391' fill='var(--nx-color-fg)' font-size='11'>Mojeek again</text>\n</g>\n" |
| 56 | const G_NOTE_ONMARK: *u8 = "<g class='cdnote'><title>note t3</title><rect x='148' y='206' width='40' height='26' rx='4'/>\n<text x='152' y='220' fill='var(--nx-color-fg)' font-size='11'>over</text>\n</g>\n" |
| 57 | const G_NOTE_LINES: i64 = 2 |
functions
| 59 | func g_i64(n: i64) -> *i64 { return sys_mmap(n * CRG_I64_BYTES) as *i64 } |
| 60 | func g_fixture(marks: *u8, a: *u8, b: *u8) -> *u8 |
| 66 | func g_fixture_note(marks: *u8, a: *u8, b: *u8, note: *u8) -> *u8 |
| 73 | func g_drift_fixture(bx: i64) -> *u8 |
| 79 | func g_q(d: *u8, o: i64) -> i64 { d[o] = G_CH_QUOTE as u8; return o + 1 } |
| 80 | func g_jkey(d: *u8, o: i64, k: *u8, v: i64) -> i64 |
| 85 | func g_json(d: *u8, defects: i64) -> i64 |
| 97 | func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 99 | func g_judge(fix: *u8, fhr: *i64, fhb: *i64, vec: *i64, recout: *i64) -> i64 |
| 105 | func g_box_grade(fix: *u8, out: *i64) -> i64 |
| 116 | func main(argc: i64, argv: *i64) -> i64 |