code wiki / (root) / nx_swcompare_matrix.nx

nx_swcompare_matrix.nx source

↩ module page · 289 lines · 21124 B

1// nx_swcompare_matrix.nx -- GENERIC, data-driven, liar-killed SoftwareCompare MATRIX generator. Reads 2// knowledge/compare/<domain>.matrix (label|organ|symbol|exceed|c1|c2|c3|c4|note + @title/@sub/@cols directives), 3// MEASURES each Nishi cell by requiring the implementing symbol to EXIST in the real organ source on disk (no 4// self-grading), and emits a head-to-head SoftwareCompare page (Nishi + 4 named competitors). Retires the 5// per-domain bespoke nx_swcompare_<domain> matrix organs: a new comparison = one .matrix data file, ZERO code. 6// Two modes: no html arg = console census + liar-kill gate (exit 0/1); "html" = emit the page to stdout. 7// NOTE: no '#' or '!' in string literals (nx_cc lexer trap) -> rgb() colors + DOCTYPE '!' emitted as a byte. 8// license_tier: ORIGINAL expect_exit: 0 9import "nx_syscalls.nx" 10const K_MAGIC_262144: i64 = 262144 11const K_MAGIC_20480: i64 = 20480 12const K_MAGIC_20479: i64 = 20479 13 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 } 16func wn(fd: i64, v: i64) -> i64 { 17 var m: i64 = v; if m < 0 { w(fd, "-" as *u8); m = 0 - m } 18 let t: *u8 = sys_mmap(24); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } 19 while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } 20 let o: *u8 = sys_mmap(24); var i: i64 = 0; while i < k { o[i] = t[k-1-i]; i = i + 1 } sys_write(fd, o, k); return 0 21} 22func wj(fd: i64, s: *u8) -> i64 { 23 var i: i64 = 0 24 while s[i] != (0 as u8) { let c: i64 = s[i] as i64 25 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) } } } 26 i = i + 1 } 27 return 0 28} 29func wq(fd: i64) -> i64 { wc(fd, 34); return 0 } 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 } 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 } 32 33func c_read(path: *u8, buf: *u8, cap: i64) -> i64 { 34 let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 - 1 } 35 var tot: i64 = 0 36 while tot < cap { let r: i64 = sys_read(fd, (buf as i64 + tot) as *u8, cap - tot); if r <= 0 { break } tot = tot + r } 37 sys_close(fd); return tot 38} 39func c_has(buf: *u8, n: i64, needle: *u8) -> i64 { 40 var i: i64 = 0 41 while i < n { var k: i64 = 0; var hit: i64 = 1 42 while needle[k] != (0 as u8) { if i + k >= n { hit = 0; k = 0 - 1; break } if buf[i+k] != needle[k] { hit = 0; break } k = k + 1 } 43 if hit == 1 { if k > 0 { return 1 } } i = i + 1 } 44 return 0 45} 46func c_file_has(path: *u8, needle: *u8, buf: *u8, cap: i64) -> i64 { 47 let n: i64 = c_read(path, buf, cap); if n <= 0 { return 0 } 48 return c_has(buf, n, needle) 49} 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 } 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 } 52func atoi(s: *u8) -> i64 { 53 var v: i64 = 0; var i: i64 = 0 54 while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c < 48 { break } if c > 57 { break } v = v * 10 + (c - 48); i = i + 1 } 55 return v 56} 57func splitpipe(s: *u8, fld: *i64, maxf: i64) -> i64 { 58 var c: i64 = 1; fld[0] = s as i64; var i: i64 = 0 59 while s[i] != (0 as u8) { if s[i] == (124 as u8) { s[i] = 0 as u8; if c < maxf { fld[c] = (s as i64) + i + 1; c = c + 1 } } i = i + 1 } 60 return c 61} 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 } 63 64func td_badge(fd: i64, code: i64) -> i64 { 65 if code == 1 { w(fd, "<td class='b y'>Yes</td>" as *u8); return 0 } 66 if code == 3 { w(fd, "<td class='b p'>Part</td>" as *u8); return 0 } 67 if code == 2 { w(fd, "<td class='b ex'>Best</td>" as *u8); return 0 } 68 w(fd, "<td class='b n'>No</td>" as *u8); return 0 69} 70func nishi_td(fd: i64, code: i64) -> i64 { 71 if code == 2 { w(fd, "<td class='b nc ex'>Best</td>" as *u8); return 0 } 72 if code == 1 { w(fd, "<td class='b nc y'>Yes</td>" as *u8); return 0 } 73 if code == 3 { w(fd, "<td class='b nc p'>Part</td>" as *u8); return 0 } 74 w(fd, "<td class='b nc n'>No</td>" as *u8); return 0 75} 76func con_row(label: *u8, ns: i64) -> i64 { 77 w(1, " [" as *u8) 78 if ns == 2 { w(1, "EXCEEDS" as *u8) } else { if ns == 1 { w(1, "PRESENT" as *u8) } else { if ns == 3 { w(1, "PARTIAL" as *u8) } else { w(1, "ABSENT " as *u8) } } } 79 w(1, "] " as *u8); w(1, label); w(1, "\n" as *u8); return 0 80} 81 82func main(argc: i64, argv: *i64) -> i64 { 83 if argc < 2 { w(1, "usage: nx_swcompare_matrix <domain> [html]\n" as *u8); sys_exit(1); return 1 } 84 let domain: *u8 = argv[1] as *u8 85 let cap: i64 = K_MAGIC_262144 86 let buf: *u8 = sys_mmap(cap) 87 let buf2: *u8 = sys_mmap(cap) 88 let pathb: *u8 = sys_mmap(512) 89 var o: i64 = scopy(pathb, 0, "knowledge/compare/" as *u8) 90 o = scopy(pathb, o, domain); o = scopy(pathb, o, ".matrix" as *u8); pathb[o] = 0 as u8 91 let n: i64 = c_read(pathb, buf, cap) 92 if n <= 0 { w(1, "MATRIX FILE MISSING: " as *u8); w(1, pathb); w(1, "\n" as *u8); sys_exit(1); return 1 } 93 94 let MAXR: i64 = 64 95 let rf: *i64 = sys_mmap(MAXR * 16 * 8) as *i64 96 let rnishi: *i64 = sys_mmap(MAXR * 8) as *i64 97 let rexceed: *i64 = sys_mmap(MAXR * 8) as *i64 98 let cf: *i64 = sys_mmap(8 * 8) as *i64 99 let fld: *i64 = sys_mmap(24 * 8) as *i64 100 var ncol: i64 = 0 101 var title: *u8 = "Comparison" as *u8 102 var sub: *u8 = 0 as *u8 103 var verdict: *u8 = 0 as *u8 104 var rown: i64 = 0 105 106 var p: i64 = 0 107 while p < n { 108 var e: i64 = p 109 while e < n { if buf[e] == (10 as u8) { break } e = e + 1 } 110 buf[e] = 0 as u8 111 let line: *u8 = (buf as i64 + p) as *u8 112 p = e + 1 113 if line[0] == (0 as u8) { } else { if line[0] == (35 as u8) { } else { 114 if line[0] == (64 as u8) { 115 if starts(line, "@title " as *u8) == 1 { title = (line as i64 + 7) as *u8 } else { 116 if starts(line, "@sub " as *u8) == 1 { sub = (line as i64 + 5) as *u8 } else { 117 if starts(line, "@verdict " as *u8) == 1 { verdict = (line as i64 + 9) as *u8 } else { 118 if starts(line, "@cols " as *u8) == 1 { ncol = splitpipe((line as i64 + 6) as *u8, cf, 6) } } } } 119 } else { 120 let cnt: i64 = splitpipe(line, fld, 24) 121 if cnt >= 9 { if rown < MAXR { 122 var k: i64 = 0 123 while k < 9 { rf[rown*16 + k] = fld[k]; k = k + 1 } 124 let organ: *u8 = fld[1] as *u8 125 let sym: *u8 = fld[2] as *u8 126 var present: i64 = 0 127 if streq(sym, "_ABSENT_" as *u8) == 1 { present = 0 } else { present = c_file_has(organ, sym, buf2, cap) } 128 let exc: i64 = atoi(fld[3] as *u8) 129 var nish: i64 = 0 130 if present == 1 { if exc == 1 { nish = 2 } else { nish = 1 } } else { nish = 0 } 131 rnishi[rown] = nish; rexceed[rown] = exc; rown = rown + 1 132 } } 133 } } } 134 } 135 136 var present_c: i64 = 0; var exceeds_c: i64 = 0; var absent_c: i64 = 0; var exflags: i64 = 0 137 var r: i64 = 0 138 while r < rown { 139 if rexceed[r] == 1 { exflags = exflags + 1 } 140 if rnishi[r] == 2 { exceeds_c = exceeds_c + 1 } else { if rnishi[r] == 1 { present_c = present_c + 1 } else { absent_c = absent_c + 1 } } 141 r = r + 1 142 } 143 let total: i64 = rown 144 var coverage: i64 = 0 145 if total > 0 { coverage = ((present_c + exceeds_c) * 1000) / total } 146 var neg: i64 = 0 147 if rown > 0 { neg = c_file_has(rf[1] as *u8, "zzznope_symbol_xyz" as *u8, buf2, cap) } 148 149 var html: i64 = 0 150 var jsonmode: i64 = 0 151 if argc >= 3 { if streq(argv[2] as *u8, "html" as *u8) == 1 { html = 1 } } 152 if argc >= 3 { if streq(argv[2] as *u8, "json" as *u8) == 1 { jsonmode = 1 } } 153 154 if jsonmode == 1 { 155 wc(1, 123) 156 kv_n(1, "v" as *u8, 1); wc(1, 44) 157 kv_s(1, "api" as *u8, "nishi-compare" as *u8); wc(1, 44) 158 kv_n(1, "generated_unix" as *u8, sys_now_realtime_sec()); wc(1, 44) 159 kv_s(1, "domain" as *u8, domain); wc(1, 44) 160 kv_s(1, "kind" as *u8, "matrix" as *u8); wc(1, 44) 161 kv_s(1, "title" as *u8, title); wc(1, 44) 162 if (sub as i64) != 0 { kv_s(1, "subtitle" as *u8, sub); wc(1, 44) } 163 wq(1); w(1, "competitors" as *u8); wq(1); wc(1, 58); wc(1, 91) 164 var cj: i64 = 0 165 while cj < ncol { if cj > 0 { wc(1, 44) } wq(1); wj(1, cf[cj] as *u8); wq(1); cj = cj + 1 } 166 wc(1, 93); wc(1, 44) 167 wq(1); w(1, "axes" as *u8); wq(1); wc(1, 58); wc(1, 91) 168 var rj: i64 = 0 169 while rj < rown { 170 if rj > 0 { wc(1, 44) } 171 wc(1, 123) 172 kv_s(1, "label" as *u8, rf[rj*16 + 0] as *u8); wc(1, 44) 173 kv_n(1, "nishi" as *u8, rnishi[rj]); wc(1, 44) 174 kv_n(1, "exceed" as *u8, rexceed[rj]); wc(1, 44) 175 wq(1); w(1, "cells" as *u8); wq(1); wc(1, 58); wc(1, 91) 176 var ij: i64 = 0 177 while ij < 4 { if ij > 0 { wc(1, 44) } wn(1, atoi(rf[rj*16 + 4 + ij] as *u8)); ij = ij + 1 } 178 wc(1, 93); wc(1, 44) 179 kv_s(1, "note" as *u8, rf[rj*16 + 8] as *u8) 180 wc(1, 125) 181 rj = rj + 1 182 } 183 wc(1, 93); wc(1, 44) 184 wq(1); w(1, "tally" as *u8); wq(1); wc(1, 58); wc(1, 123) 185 kv_n(1, "coverage" as *u8, coverage); wc(1, 44); kv_n(1, "exceeds" as *u8, exceeds_c); wc(1, 44) 186 kv_n(1, "present" as *u8, present_c); wc(1, 44); kv_n(1, "absent" as *u8, absent_c); wc(1, 44); kv_n(1, "total" as *u8, total) 187 wc(1, 125); wc(1, 44) 188 kv_s(1, "codes" as *u8, "0=No 1=Yes 2=Best 3=Part" as *u8); wc(1, 44) 189 kv_s(1, "measurement" as *u8, "nishi cells verified by implementing-symbol on disk; competitor cells are documented capability presence" as *u8) 190 wc(1, 125); wc(1, 10) 191 sys_exit(0); return 0 192 } 193 194 if html == 1 { 195 // shared site chrome (nav + footer) from nx_site_chrome; graceful fallback to minimal nav if absent. 196 let hdrbuf: *u8 = sys_mmap(K_MAGIC_20480) 197 var hdn: i64 = c_read("knowledge/site/chrome_header.html" as *u8, hdrbuf, K_MAGIC_20479) 198 if hdn < 0 { hdn = 0 } 199 hdrbuf[hdn] = 0 as u8 200 let ftbuf: *u8 = sys_mmap(K_MAGIC_20480) 201 var ftn: i64 = c_read("knowledge/site/chrome_footer.html" as *u8, ftbuf, K_MAGIC_20479) 202 if ftn < 0 { ftn = 0 } 203 ftbuf[ftn] = 0 as u8 204 w(1, "<" as *u8); wc(1, 33); w(1, "DOCTYPE html>\n<html lang=\"en\"><head><meta charset='utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'>\n" as *u8) 205 w(1, "<title>Nishi vs the Field -- " as *u8); w(1, title); w(1, "</title>\n<style>\n" as *u8) 206 w(1, ":root{--nx-color-bg:rgb(255,255,255);--nx-color-fg:rgb(22,22,34);--nx-color-accent:rgb(42,77,143);--bg:var(--nx-color-bg);--fg:var(--nx-color-fg);--ac:var(--nx-color-accent);--y:rgb(26,127,55);--p:rgb(178,106,0);--n:rgb(179,38,30);--ex:rgb(130,80,223);--line:rgb(227,227,234);--soft:rgb(246,247,251)}\n" as *u8) 207 w(1, "*{box-sizing:border-box}body{background:var(--bg);font-family:-apple-system,Segoe UI,Roboto,sans-serif;max-width:1080px;margin:0 auto;padding:0 clamp(14px,4vw,20px) 5vh;color:var(--fg);line-height:1.6;font-size:clamp(15px,0.6vw + 13px,17px)}\n" as *u8) 208 w(1, "h1{font-size:clamp(1.6rem,4vw,2rem);margin:0 0 4px;background:linear-gradient(90deg,var(--ac),var(--ex));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}.sub{color:rgb(102,102,102);font-size:clamp(.95rem,2vw,1.05rem);margin:0 0 4px}.crumb{font-size:.85rem;margin-bottom:18px}a{color:var(--ac)}\n" as *u8) 209 w(1, ".skip-link{position:absolute;left:-999px;top:0;background:var(--ac);color:rgb(255,255,255);padding:12px 16px;z-index:9;border-radius:0 0 8px 0}.skip-link:focus{left:0}\n" as *u8) 210 w(1, ".hd{background:linear-gradient(90deg,var(--ac),rgb(9,58,136));border-radius:0 0 12px 12px;margin:0 0 20px}.hd nav{display:flex;gap:8px;flex-wrap:wrap;padding:8px 14px}.hd a{color:rgb(255,255,255);text-decoration:none;padding:10px 12px;border-radius:8px;font-weight:600;min-height:44px;display:inline-flex;align-items:center}.hd a:hover{background:rgba(255,255,255,0.16)}\n" as *u8) 211 w(1, ".meth{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin:20px 0;font-size:.9rem;color:rgb(51,51,51)}\n" as *u8) 212 w(1, ".wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;box-shadow:0 1px 3px rgba(16,20,28,0.08)}table{border-collapse:collapse;width:100%;min-width:860px;font-size:.93rem}\n" as *u8) 213 w(1, "th,td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--line)}thead th{background:var(--soft);font-weight:600}tr:hover td{background:rgba(42,77,143,0.06)}\n" as *u8) 214 w(1, "td.b{text-align:center;font-weight:600}td.b.y{color:var(--y)}td.b.p{color:var(--p)}td.b.n{color:var(--n)}td.b.ex{color:var(--ex)}td.nc{background:rgb(238,243,255)}.cat{font-weight:600}.note{color:rgb(119,119,119);font-size:.83rem}\n" as *u8) 215 w(1, "th.nishi{color:var(--ac)}.tally{margin:20px 0;font-size:1.02rem}.badge{display:inline-block;padding:2px 8px;border-radius:20px;background:var(--soft);margin-right:6px;font-size:.85rem}\n" as *u8) 216 w(1, ".verdict{background:var(--soft);border-left:4px solid var(--ac);padding:12px 18px;border-radius:0 10px 10px 0;margin:18px 0}.foot{margin-top:28px;color:rgb(136,136,136);font-size:.78rem;border-top:1px solid var(--line);padding-top:14px}\n" as *u8) 217 w(1, ":focus-visible{outline:3px solid var(--ac);outline-offset:2px}main>*{animation:rise .5s ease both}main>*:nth-child(2){animation-delay:.05s}main>*:nth-child(3){animation-delay:.1s}main>*:nth-child(4){animation-delay:.15s}@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.wrap,.verdict{animation:rise linear both;animation-timeline:view();animation-range:entry 0% cover 22%}@media(prefers-reduced-motion:reduce){main>*,.wrap,.verdict{animation:none}}\n" as *u8) 218 w(1, "@media(prefers-color-scheme:dark){:root{--nx-color-bg:rgb(15,15,20);--nx-color-fg:rgb(230,230,238);--line:rgb(38,38,47);--soft:rgb(23,23,31)}td.nc{background:rgb(20,26,43)}}\n" as *u8) 219 w(1, "</style></head><body>\n" as *u8) 220 w(1, "<a class='skip-link' href='" as *u8); wc(1, 35); w(1, "main'>Skip to content</a>\n" as *u8) 221 if hdn > 0 { w(1, hdrbuf) } else { w(1, "<header class='hd'><nav><a href='/'>Nishi Family</a><a href='/compare'>Compare</a></nav></header>" as *u8) } 222 w(1, "<main id='main'>\n" as *u8) 223 w(1, "<p class='crumb'><a href='/'>Nishi Family</a> &rsaquo; <a href='/compare'>Compare</a> &rsaquo; " as *u8); w(1, title); w(1, "</p>\n" as *u8) 224 w(1, "<h1>Nishi vs the Field</h1>\n<p class='sub'>" as *u8); w(1, title); w(1, " &mdash; mechanically measured, liar-killed, sovereign.</p>\n" as *u8) 225 if (sub as i64) != 0 { w(1, "<p class='sub' style='font-size:.9rem'>" as *u8); w(1, sub); w(1, "</p>\n" as *u8) } 226 w(1, "<div class='meth'><b>How this is scored.</b> Every <b>Nishi</b> cell is <b>measured</b>: the generator reads the real organ source on disk and requires the implementing symbol to exist (no self-grading). Competitor cells record <b>documented capability presence</b>. <b>Best</b>=leads this axis, <b>Yes</b>=present, <b>Part</b>=partial, <b>No</b>=absent. This is capability <b>presence, not depth or scale</b>: the majors lead on index size and neural ranking. Nishi's genuine exceeds are the sovereignty / neutrality / determinism axes.</div>\n" as *u8) 227 w(1, "<h2 style='font-size:clamp(1.05rem,2.5vw,1.25rem);margin:24px 0 10px'>Feature matrix</h2>\n" as *u8) 228 w(1, "<div class='wrap'><table><thead><tr><th>Capability</th><th class='nishi'>Nishi</th>" as *u8) 229 var ci: i64 = 0 230 while ci < ncol { w(1, "<th>" as *u8); w(1, cf[ci] as *u8); w(1, "</th>" as *u8); ci = ci + 1 } 231 w(1, "<th>Notes</th></tr></thead><tbody>\n" as *u8) 232 var rr: i64 = 0 233 while rr < rown { 234 w(1, "<tr><td class='cat'>" as *u8); w(1, rf[rr*16 + 0] as *u8); w(1, "</td>" as *u8) 235 nishi_td(1, rnishi[rr]) 236 td_badge(1, atoi(rf[rr*16 + 4] as *u8)); td_badge(1, atoi(rf[rr*16 + 5] as *u8)); td_badge(1, atoi(rf[rr*16 + 6] as *u8)); td_badge(1, atoi(rf[rr*16 + 7] as *u8)) 237 w(1, "<td class='note'>" as *u8); w(1, rf[rr*16 + 8] as *u8); w(1, "</td></tr>\n" as *u8) 238 rr = rr + 1 239 } 240 w(1, "</tbody></table></div>\n" as *u8) 241 w(1, "<div class='tally'><span class='badge'>coverage " as *u8); wn(1, coverage); w(1, "/1000</span><span class='badge'>EXCEEDS " as *u8); wn(1, exceeds_c) 242 w(1, "</span><span class='badge'>PRESENT " as *u8); wn(1, present_c); w(1, "</span><span class='badge'>ABSENT " as *u8); wn(1, absent_c); w(1, "</span></div>\n" as *u8) 243 // evidence affordance: only when knowledge/compare/<domain>.gates exists (this domain has executable proofs) 244 let gpath: *u8 = sys_mmap(256) 245 var go: i64 = 0 246 let gp1: *u8 = "knowledge/compare/" 247 var gi: i64 = 0 248 while gp1[gi] != (0 as u8) { gpath[go] = gp1[gi]; go = go + 1; gi = gi + 1 } 249 var gd: i64 = 0 250 while domain[gd] != (0 as u8) { gpath[go] = domain[gd]; go = go + 1; gd = gd + 1 } 251 let gp2: *u8 = ".gates" 252 var gj: i64 = 0 253 while gp2[gj] != (0 as u8) { gpath[go] = gp2[gj]; go = go + 1; gj = gj + 1 } 254 gpath[go] = 0 as u8 255 let gfd: i64 = sys_openat_rd(gpath) 256 if gfd >= 0 { 257 sys_close(gfd) 258 w(1, "<div class='meth' style='border-left:4px solid var(--y)'><b>Evidence for every claim.</b> This is not an opinion matrix: each capability we mark present is <b>grounded in real source</b> and proven by a <b>live-forked gate</b>. See the autonomously-generated <a href='/compare/" as *u8); w(1, domain); w(1, "/evidence'><b>evidence page &rarr;</b></a> (per-axis source lines + executed self-test verdicts) or the machine-readable <a href='/compare/" as *u8); w(1, domain); w(1, "/evidence.json'>evidence.json</a>.</div>\n" as *u8) 259 } 260 if (verdict as i64) != 0 { 261 w(1, "<div class='verdict'><b>Honest verdict.</b> " as *u8); w(1, verdict); w(1, "</div>\n" as *u8) 262 } else { 263 w(1, "<div class='verdict'><b>Honest verdict.</b> Nishi has broad, sovereign search-engine presence &mdash; a real organ behind every core ranking and crawl axis, built bits-up in one language. It is <b>not</b> yet a scale or neural-ranking rival: the majors lead on index size (billions to trillions vs a Common-Crawl-seeded slice) and trained rerankers. Nishi's genuine <b>exceeds</b> are structural &mdash; owning the whole stack, neutrality by construction, and a zero-JS integer-deterministic result page. The climb is a bigger index and a trained reranker.</div>\n" as *u8) 264 } 265 w(1, "<p class='foot'>Generated by nx_swcompare_matrix (sovereign NishiLang organ) from knowledge/compare/" as *u8); w(1, domain); w(1, ".matrix &mdash; every Nishi cell verified against real organ source on disk. Zero JS, zero trackers.</p>\n" as *u8) 266 w(1, "</main>\n" as *u8) 267 if ftn > 0 { w(1, ftbuf) } 268 w(1, "</body></html>\n" as *u8) 269 sys_exit(0); return 0 270 } 271 272 w(1, "=== NX-SWCOMPARE-MATRIX domain=" as *u8); w(1, domain); w(1, " -- Nishi MEASURED vs 4 competitors ===\n" as *u8) 273 w(1, " title=" as *u8); w(1, title); w(1, " rows=" as *u8); wn(1, rown); w(1, " cols=" as *u8); wn(1, ncol); w(1, "\n" as *u8) 274 var rc: i64 = 0 275 while rc < rown { con_row(rf[rc*16 + 0] as *u8, rnishi[rc]); rc = rc + 1 } 276 w(1, " TALLY: EXCEEDS=" as *u8); wn(1, exceeds_c); w(1, " PRESENT=" as *u8); wn(1, present_c); w(1, " ABSENT=" as *u8); wn(1, absent_c); w(1, " coverage=" as *u8); wn(1, coverage); w(1, "/1000\n" as *u8) 277 278 let liar_corpus: i64 = (rown >= 8) as i64 279 let liar_neg: i64 = (neg == 0) as i64 280 let liar_present: i64 = (present_c >= 5) as i64 281 let liar_exbound: i64 = (exceeds_c <= exflags) as i64 282 let liar_cols: i64 = (ncol == 4) as i64 283 w(1, " LIAR-KILL: rows>=8=" as *u8); wn(1, liar_corpus); w(1, " neg-control-zero=" as *u8); wn(1, liar_neg) 284 w(1, " present>=5=" as *u8); wn(1, liar_present); w(1, " exceeds<=flags=" as *u8); wn(1, liar_exbound); w(1, " cols==4=" as *u8); wn(1, liar_cols); w(1, "\n" as *u8) 285 let ok: i64 = liar_corpus & liar_neg & liar_present & liar_exbound & liar_cols 286 w(1, "NX-SWCOMPARE-MATRIX domain=" as *u8); w(1, domain); w(1, " coverage=" as *u8); wn(1, coverage); w(1, "/1000 verdict=" as *u8) 287 if ok == 1 { w(1, "MEASURED-HONEST (liar-killed)\n" as *u8); sys_exit(0); return 0 } 288 w(1, "RED (a check failed)\n" as *u8); sys_exit(1); return 1 289}