code wiki / (root) / nx_swcompare_matrix_ladder_test_20260907.nx

nx_swcompare_matrix_ladder_test_20260907.nx

buildroot/runtime/nx_swcompare_matrix_ladder_test_20260907.nx

129951 B1634 linesdepth 11pulls 56 transitivereach 0 importersview sourcekind tooltopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_matrix.nx -- GENERIC, data-driven, liar-killed SoftwareCompare MATRIX generator. Reads knowledge/compare/<domain>.matrix (label|organ|symbol|exceed|ONE CELL PER @cols ENTRY|note + @title/@sub/@cols directives), MEASURES each Nishi cell by requiring the implementing symbol to EXIST in the real organ source on disk (no self-grading), and emits a head-to-head SoftwareCompare page (Nishi + N named competitors, N = the @cols count, bounded only by SWC_ROW_STRIDE). Retires the per-domain bespoke nx_swcompare_<domain> matrix organs: a new comparison = one .matrix data file, ZERO code. Two modes: no html arg = console census + liar-kill gate (exit 0/1); "html" = emit the page to stdout. NOTE: no '#' or '!' in string literals (nx_cc lexer trap) -> rgb() colors + DOCTYPE '!' emitted as a byte. license_tier: ORIGINAL expect_exit: 0

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_tool_run.nx nx_comparetree_lib.nx nx_compare_ladder_isolated_lib.nx nx_catalog_lib.nx nx_swcompare_sota_lib.nx nx_evprofile_lib.nx nx_swcompare_matrix_ladder_tes

imports: nx_syscalls.nxnx_tool_run.nxnx_comparetree_lib.nxnx_compare_ladder_isolated_lib.nxnx_catalog_lib.nxnx_swcompare_sota_lib.nxnx_evprofile_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_exit sys_mmap nxa_die sys_write sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ ct_compare_read_published ct_read_2dir sys_mmap ↻ ct_build_path ct_cat ct_read sys_openat_rd sys_read sys_close ct_pick ct_first_published ct_second_published ct_swap_tree ct_first_published ↻ ct_second_published ↻ sl_new sys_mmap ↻ sl_load sys_mmap ↻ scopy sys_openat_rd ↻ sys_close ↻ c_read

structs

none

consts

36const K_MAGIC_5381: i64 = 5381
42const GAL_PROBE_CAP: i64 = 16384 // a probe's stdout reserve (kkfacts decode measures ~1.5KB); brim announces
43const GAL_PROBE_AV: i64 = 6 // elf + up to 3 spec tokens + artifact path + NUL
44const K_MAGIC_262144: i64 = 262144
45const K_MAGIC_20480: i64 = 20480
46const K_MAGIC_20479: i64 = 20479
53const SWC_ROW_STRIDE: i64 = 16
54const SWC_ROW_FIXED: i64 = 5
74const MXH_MAX: i64 = 64 // distinct class tokens; the ladder has 10 verdicts plus GATE: variants, and an overflow is COUNTED, never silent
254const RP_HDR: *u8 = "<h2 id='refs'>References</h2>\n<div class='meth'><b>Beyond a link list.</b> Every reference below resolves twice &mdash; the publisher's copy and, where banked, the estate's own <b>non-rottable library mirror</b> with a <b>content pin</b> &mdash; and carries its <b>evidence class</b> plus the exact claim on this page it grounds. Keyed marks like <span class='cite'>[key]</span> in the matrix notes jump here. A dash means honestly absent, never assumed.</div>\n<ol class='refs'>\n" as *u8
313const GAL_KIND_IMG: i64 = 1
314const GAL_KIND_VIDEO: i64 = 2
315const GAL_KIND_AUDIO: i64 = 3
316const GAL_KIND_TEXT: i64 = 4
317const GAL_TEXT_PREVIEW: i64 = 2048 // bytes of a text artifact shown inline; the whole file stays one click away
318const GAL_NSFW_PREFIX: *u8 = "nsfw:" as *u8
365const GAL_IMG_EXTRA: *u8 = "loading='lazy'" as *u8
619const RANK_READ_CAP: i64 = 65536
706const EVB_PATH_CAP: i64 = 512
707const EVB_SECS_PER_DAY: i64 = 86400
708const EVB_SECS_PER_HOUR: i64 = 3600
710const EVB_SCROLL_OPEN: *u8 = "<div style='overflow-x:auto'>"

functions

75func mx_tokclass_len(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if s[i] == (32 as u8) { return i } i = i + 1 } return i }
called by 2: mx_tokclass_eqmain
76func mx_tokclass_eq(a: *u8, b: *u8) -> i64
called by 1: main calls 1: mx_tokclass_len
86func atoi(s: *u8) -> i64
called by 2: pc_stripmain
103func swc_src_hash(b: *u8, n: i64) -> i64
called by 1: main
114func mark(fd: i64, code: i64) -> i64
called by 2: mark_tdmain
125func mark_td(fd: i64, name: *u8, code: i64, nishi: i64) -> i64
called by 1: main calls 1: mark
141func pc_pts(code: i64) -> i64 { if code == 2 { return 3 } if code == 1 { return 2 } if code == 3 { return 1 } return 0 }
called by 1: pc_strip
142func pc_strip(fd: i64, nishi: i64, exceed: i64, iswatch: i64, adopt: i64, rem: *u8, cf: *i64, ncol: i64, rf: *i64, rr: i64) -> i64
called by 1: main calls 2: pc_ptsatoi
202func dstate_REMOVED_SEE_LIB(fd: i64, id: *u8, ds: *u8, dn: i64) -> i64
261func gp_probe(dom: *u8, file: *u8) -> i64
273func wesc(fd: i64, b: *u8, n: i64) -> i64
284func gal_probe_run(probe: *u8, dom: *u8, file: *u8, pbuf: *u8, plen: *i64) -> i64
319func gal_kind_code(k: *u8) -> i64
called by 1: gal_pass
327func gal_kind_name(c: i64) -> *u8
called by 2: gal_htmlgal_json
336func gal_attr(fd: i64, s: *u8) -> i64
called by 1: gal_html
348func gal_text_preview(fd: i64, dom: *u8, file: *u8) -> i64
371func gal_text(fd: i64, s: *u8) -> i64
called by 1: gal_html calls 2: sys_mmapia_esc_text
380func gal_html(fld: *i64, count: i64, dom: *u8, probe: *u8, kind: i64, gated: i64) -> i64
444func gal_json(fld: *i64, count: i64, dom: *u8, probe: *u8, kind: i64, gated: i64) -> i64
467func gal_pass(path: *u8, buf: *u8, cap: i64, mode: i64, dom: *u8) -> i64
511func plan_pass_PRELIFT_UNREACHABLE(path: *u8, buf: *u8, cap: i64, phase: i64) -> i64
601func con_row(label: *u8, ns: i64) -> i64
623func rank_pass(dom: *u8, cap: i64) -> i64
714func evb_remedy(fired: i64, name: *u8, remedy: *u8) -> i64
721func evb_pair(label: *u8, a: i64, b: i64) -> i64
726func evb_one(label: *u8, a: i64) -> i64
734func evb_word(label: *u8, word: *u8) -> i64
752func evb_bite(f: *i64) -> i64
770func ev_pass(dom: *u8) -> i64
894func main(argc: i64, argv: *i64) -> i64