code wiki / (root) / nx_swcompare_gapmap.nx

nx_swcompare_gapmap.nx

buildroot/runtime/nx_swcompare_gapmap.nx

22652 B330 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_gapmap.nx -- the GENERATIVE gap-finder of Nishi Compare, DOMAIN-PARAMETERIZED. Given a <domain>, it reads knowledge/compare/<domain>.q (to learn the researcher-banked frontier corpus file names) + knowledge/ compare/<domain>.axes (label|organ-path|symbol|frontier-keywords, plus an optional "@title <text>" line) -> for each axis measures OUR presence (symbol on disk, mechanical) x FRONTIER MOMENTUM (keyword count over the banked 2024-2026 corpus) -> classifies OPPORTUNITY (absent+hot = where to test/research), COVERED (present), dormant. A NEW domain = a new .q + .axes pair; ZERO new code. Modes: `nx_swcompare_gapmap <domain>` = console + liar-kill (gate); `nx_swcompare_gapmap <domain> html` = emit the /compare/<domain>/frontier page. NOTE: no '#'/'!' in string literals (nx_cc trap). license_tier: ORIGINAL expect_exit:0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_swcompare_gapmap.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 sys_mmap streq pj3 load_corpus_from_q c_read sys_openat_rd sys_read sys_close sys_mmap ↻ pj3 ↻ load_append sys_openat_rd ↻ sys_read ↻ sys_close ↻ c_read ↻ c_file_has c_read ↻ c_has c_count wc sys_mmap ↻ sys_write w sys_write ↻ wn w ↻ sys_mmap ↻ sys_write ↻ wj wc ↻ sys_exit

structs

none

consts

10const K_MAGIC_262144: i64 = 262144
11const K_MAGIC_4194304: i64 = 4194304
12const K_MAGIC_65536: i64 = 65536
13const K_MAGIC_4096: i64 = 4096
14const K_MAGIC_1024: i64 = 1024
15const K_MAGIC_2048: i64 = 2048
16const K_MAGIC_3072: i64 = 3072
17const K_MAGIC_100000: i64 = 100000

functions

19func 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 }
called by 2: wnmain calls 1: sys_write
20func 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 2: wjmain calls 2: sys_mmapsys_write
21func wn(fd: i64, v: i64) -> i64
called by 1: main calls 3: wsys_mmapsys_write
27func 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
28func wj(fd: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c == 34 { wc(fd, 92); wc(fd, 34) } else { if c == 92 { wc(fd, 92); wc(fd, 92) } else { if c < 32 { wc(fd, 32) } else { wc(fd, c) } } } i = i + 1 } return 0 }
called by 1: main calls 1: wc
29func pj3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64
36func c_read(path: *u8, buf: *u8, cap: i64) -> i64
42func c_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: c_file_has
49func c_file_has(path: *u8, needle: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 2: c_readc_has
53func c_count(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main
64func load_append(dst: *u8, off: i64, cap: i64, path: *u8) -> i64
71func load_corpus_from_q(FRONT: *u8, fcap: i64, qpath: *u8, qb: *u8, qcap: i64) -> i64
called by 1: main calls 4: c_readsys_mmappj3load_append
95func main(argc: i64, argv: *i64) -> i64