code wiki / (root) / nx_swcompare_matrix.nx

nx_swcompare_matrix.nx

buildroot/runtime/nx_swcompare_matrix.nx

21124 B289 linesdepth 2pulls 2 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|c1|c2|c3|c4|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 + 4 named competitors). 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 1 imports · 0 importers

nx_syscalls.nx nx_swcompare_matrix.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main w sys_write sys_exit sys_mmap scopy c_read sys_openat_rd sys_read sys_close starts splitpipe streq c_file_has c_read ↻ c_has atoi wc sys_mmap ↻ sys_write ↻ kv_n wq wc ↻ w ↻ wc ↻ wn w ↻ sys_mmap ↻ sys_write ↻ kv_s wq ↻ w ↻ wc ↻ wj wc ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real wq ↻ wj ↻

structs

none

consts

10const K_MAGIC_262144: i64 = 262144
11const K_MAGIC_20480: i64 = 20480
12const K_MAGIC_20479: i64 = 20479

functions

14func w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
15func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 }
called by 5: wjwqkv_skv_nmain calls 2: sys_mmapsys_write
16func wn(fd: i64, v: i64) -> i64
called by 2: kv_nmain calls 3: wsys_mmapsys_write
22func wj(fd: i64, s: *u8) -> i64
called by 2: kv_smain calls 1: wc
29func wq(fd: i64) -> i64 { wc(fd, 34); return 0 }
called by 3: kv_skv_nmain calls 1: wc
30func kv_s(fd: i64, key: *u8, val: *u8) -> i64 { wq(fd); w(fd, key); wq(fd); wc(fd, 58); wq(fd); wj(fd, val); wq(fd); return 0 }
called by 1: main calls 4: wqwwcwj
31func kv_n(fd: i64, key: *u8, v: i64) -> i64 { wq(fd); w(fd, key); wq(fd); wc(fd, 58); wn(fd, v); return 0 }
called by 1: main calls 4: wqwwcwn
33func c_read(path: *u8, buf: *u8, cap: i64) -> i64
39func c_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: c_file_has
46func c_file_has(path: *u8, needle: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 2: c_readc_has
50func streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 1: main
51func starts(s: *u8, pfx: *u8) -> i64 { var i: i64 = 0; while pfx[i] != (0 as u8) { if s[i] != pfx[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
52func atoi(s: *u8) -> i64
called by 1: main
57func splitpipe(s: *u8, fld: *i64, maxf: i64) -> i64
called by 1: main
62func scopy(dst: *u8, doff: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[doff+i] = src[i]; i = i + 1 } return doff + i }
called by 1: main
64func td_badge(fd: i64, code: i64) -> i64
called by 1: main calls 1: w
70func nishi_td(fd: i64, code: i64) -> i64
called by 1: main calls 1: w
76func con_row(label: *u8, ns: i64) -> i64
called by 1: main calls 1: w
82func main(argc: i64, argv: *i64) -> i64