nx_swcompare_gapmap.nx
buildroot/runtime/nx_swcompare_gapmap.nx
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
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
structs
| none |
consts
| 10 | const K_MAGIC_100000: i64 = 100000 |
| 69 | const GM_ASCII_UPPER_A: i64 = 65 |
| 70 | const GM_ASCII_UPPER_Z: i64 = 90 |
| 71 | const GM_ASCII_LOWER_A: i64 = 97 |
| 72 | const GM_ASCII_LOWER_Z: i64 = 122 |
| 73 | const GM_ASCII_DIGIT_0: i64 = 48 |
| 74 | const GM_ASCII_DIGIT_9: i64 = 57 |
| 75 | const GM_CASE_DELTA: i64 = 32 |
| 76 | const GM_WHOLE_WORD_MARK: i64 = 36 |
| 77 | const GM_CH_AMP: i64 = 38 |
| 78 | const GM_CH_LT: i64 = 60 |
| 79 | const GM_CH_GT: i64 = 62 |
| 80 | const GM_CH_DQUOTE: i64 = 34 |
| 81 | const GM_CH_SQUOTE: i64 = 39 |
| 82 | const GM_CH_MINUS: i64 = 45 |
| 83 | const GM_DECIMAL: i64 = 10 |
| 84 | const GM_KW_ENTRY_SLACK: i64 = 24 |
| 155 | const GM_LIB_DIR: *u8 = "knowledge/library/" |
| 156 | const GM_LIB_EXT: *u8 = ".txt" |
| 157 | const GM_SEEK_END: i64 = 2 |
| 158 | const GM_PATH_SLACK: i64 = 32 |
functions
| 12 | func 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 } |
| 13 | func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 } |
| 14 | func wn(fd: i64, v: i64) -> i64 |
| 20 | func 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 |
| 21 | func 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 } |
| 22 | func pj3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64 |
| 29 | func c_has(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: c_file_has |
| 40 | func c_file_has(path: *u8, needle: *u8) -> i64 |
| 52 | func c_count(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 85 | func gm_lower(c: i64) -> i64 { if c >= GM_ASCII_UPPER_A { if c <= GM_ASCII_UPPER_Z { return c + GM_CASE_DELTA } } return c } |
| 86 | func gm_is_alnum(c: i64) -> i64 |
| 92 | func c_count_word(buf: *u8, n: i64, needle: *u8) -> i64 |
| 117 | func gm_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } dst[o] = 0 as u8; return o } called by 1: main |
| 119 | func gm_catn(dst: *u8, off: i64, v: i64) -> i64 called by 1: main |
| 133 | func wh(fd: i64, s: *u8) -> i64 |
| 142 | func load_append(dst: *u8, off: i64, cap: i64, path: *u8) -> i64 |
| 159 | func q_walk(qb: *u8, qn: i64, FRONT: *u8, fcap: i64, sizing: i64, stats: *i64) -> i64 |
| 198 | func main(argc: i64, argv: *i64) -> i64 |