code wiki / _hdl_build / nx_uigen_compete.nx
nx_uigen_compete.nx source
↩ module page · 114 lines · 6694 B
1// nx_uigen_compete.nx -- COMPETITIVE census: Nishi UI-generation vs the 2025/26 field (Wix/Bluehost/Webflow/
2// Squarespace/Framer/GoDaddy + v0/Bolt/Lovable/Builder + GLM 5.2 + Design2Code). Reads uigen_compete.conf.
3// LIAR-KILL: every row's claim is grounded in a sovereign-fetched source (knowledge/fetched/<ground>); no
4// source -> UNGROUNDED. Prints the adversary's honest map: where Nishi LEADS (EXCEED = the moat) vs where it
5// is BEHIND (GAP = the build queue, with the leader named). Refuses "beyond Wix/GLM" where we are behind.
6// expect_exit: 0 license_tier: ORIGINAL
7import "nx_syscalls.nx"
8const K_MAGIC_262144: i64 = 262144
9const K_MAGIC_1024: i64 = 1024
10
11func cp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
12func cn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 }
13func cseq(buf: *u8, off: i64, len: i64, lit: *u8) -> i64 { var i: i64=0; while i<len { if lit[i]==(0 as u8) { return 0 } if buf[off+i]!=lit[i] { return 0 } i=i+1 } if lit[len]!=(0 as u8) { return 0 } return 1 }
14func cwr(buf: *u8, off: i64, len: i64) -> i64 { sys_write(1, (((buf as i64)+off) as *u8), len); return 0 }
15// split a line [ls,le) on TAB into offs/lens (<=6 fields). returns nf.
16func splitrow(buf: *u8, ls: i64, le: i64, offs: *i64, lens: *i64) -> i64 {
17 var nf: i64=0; var fs: i64=ls; var i: i64=ls
18 while i<=le { var cut: i64=0; if i==le { cut=1 } else { if buf[i]==(9 as u8) { cut=1 } } if cut==1 { if nf<6 { offs[nf]=fs; lens[nf]=i-fs; nf=nf+1 } fs=i+1 } i=i+1 }
19 return nf
20}
21func statcode(buf: *u8, o: i64, l: i64) -> i64 {
22 if cseq(buf,o,l,"HAVE" as *u8)==1 { return 1 }
23 if cseq(buf,o,l,"PARTIAL" as *u8)==1 { return 2 }
24 if cseq(buf,o,l,"GAP" as *u8)==1 { return 3 }
25 if cseq(buf,o,l,"EXCEED" as *u8)==1 { return 4 }
26 return 0
27}
28
29// print rows whose status == want, as " <capability> -> leader: <leader>\n <note>"
30func print_status(buf: *u8, n: i64, want: i64) -> i64 {
31 let offs: *i64 = sys_mmap(64) as *i64; let lens: *i64 = sys_mmap(64) as *i64
32 var ls: i64=0
33 while ls<n {
34 var le: i64=ls; var eol: i64=0
35 while eol==0 { if le>=n { eol=1 } else { if buf[le]==(10 as u8) { eol=1 } else { le=le+1 } } }
36 if le>ls { if buf[ls]!=(35 as u8) {
37 let nf: i64=splitrow(buf,ls,le,offs,lens)
38 if nf>=5 {
39 if statcode(buf,offs[1],lens[1])==want {
40 cp(" " as *u8); cwr(buf,offs[0],lens[0]); cp(" -> leader: " as *u8); cwr(buf,offs[2],lens[2]); cp("\n " as *u8); cwr(buf,offs[4],lens[4]); cp("\n" as *u8)
41 }
42 }
43 } }
44 ls=le+1
45 }
46 return 0
47}
48
49func main() -> i64 {
50 let cap: i64=K_MAGIC_262144; let buf: *u8=sys_mmap(cap)
51 let fd: i64=sys_openat_rd("knowledge/registry/uigen_compete.conf" as *u8)
52 if fd<0 { cp("cannot open uigen_compete.conf\n" as *u8); sys_exit(1); return 1 }
53 var n: i64=0; var r: i64=1
54 while r>0 { if n>=cap { r=0 } else { r=sys_read(fd,(((buf as i64)+n) as *u8),cap-n); if r>0 { n=n+r } } }
55 sys_close(fd)
56
57 cp("=== NX-UIGEN-COMPETE -- Nishi UI-generation vs the 2025/26 field (beyond Bluehost/Wix, at/beyond GLM 5.2) ===\n" as *u8)
58 cp("Grounded in the sovereign-fetched landscape (uigss_*.raw). Each capability liar-killed against a real source.\n\n" as *u8)
59
60 // pass 1: tally + liar-kill
61 let offs: *i64=sys_mmap(64) as *i64; let lens: *i64=sys_mmap(64) as *i64
62 var have: i64=0; var part: i64=0; var gap: i64=0; var exc: i64=0; var ung: i64=0; var rows: i64=0
63 var ls: i64=0
64 while ls<n {
65 var le: i64=ls; var eol: i64=0
66 while eol==0 { if le>=n { eol=1 } else { if buf[le]==(10 as u8) { eol=1 } else { le=le+1 } } }
67 if le>ls { if buf[ls]!=(35 as u8) {
68 let nf: i64=splitrow(buf,ls,le,offs,lens)
69 if nf>=5 {
70 rows=rows+1
71 let st: i64=statcode(buf,offs[1],lens[1])
72 if st==1 { have=have+1 } if st==2 { part=part+1 } if st==3 { gap=gap+1 } if st==4 { exc=exc+1 }
73 // liar-kill ground: knowledge/fetched/<ground>
74 let gp: *u8=sys_mmap(K_MAGIC_1024); var q: i64=0; let pre: *u8="knowledge/fetched/" as *u8
75 var pj: i64=0; while pre[pj]!=(0 as u8){gp[q]=pre[pj];q=q+1;pj=pj+1}
76 var gj: i64=0; while gj<lens[3] { gp[q]=buf[offs[3]+gj]; q=q+1; gj=gj+1 } gp[q]=0 as u8
77 let gfd: i64=sys_openat_rd(gp)
78 if gfd<0 { ung=ung+1; cp(" [UNGROUNDED] " as *u8); cwr(buf,offs[0],lens[0]); cp(" -> missing " as *u8); cp(gp); cp("\n" as *u8) } else { sys_close(gfd) }
79 }
80 } }
81 ls=le+1
82 }
83
84 cp("-- CAPABILITIES=" as *u8); cn(rows); cp(" Nishi: EXCEED=" as *u8); cn(exc); cp(" HAVE=" as *u8); cn(have); cp(" PARTIAL=" as *u8); cn(part); cp(" GAP=" as *u8); cn(gap); cp(" LIAR-KILL: " as *u8); cn(ung); cp(" ungrounded\n\n" as *u8)
85
86 cp("== WHERE NISHI LEADS THE FIELD (EXCEED -- the moat, measured) ==\n" as *u8)
87 print_status(buf, n, 4)
88 cp("\n== TABLE STAKES NISHI HAS (HAVE) ==\n" as *u8)
89 print_status(buf, n, 1)
90 cp("\n== BEHIND THE FIELD -- THE BUILD QUEUE (GAP, leader named) ==\n" as *u8)
91 print_status(buf, n, 3)
92 cp("\n== PARTIAL (climbing -- L1/L2 landed here) ==\n" as *u8)
93 print_status(buf, n, 2)
94
95 cp("\n=== ADVERSARY VERDICT ===\n" as *u8)
96 cp("Nishi is genuinely BEYOND the field on " as *u8); cn(exc); cp(" axes: accessibility, code-ownership, determinism, no-third-party --\n" as *u8)
97 cp("a real sovereign moat the whole builder+LLM field lacks. But on the CORE GENERATIVE axes (prompt-to-site,\n" as *u8)
98 cp("prompt-to-app, screenshot-to-code, iterative-refine, LEARNED generation) Nishi is BEHIND Wix/v0/Lovable/GLM 5.2.\n" as *u8)
99 cp("HONEST: 'at/beyond GLM 5.2' is TRUE on the moat, FALSE on generation today. The " as *u8); cn(gap); cp(" GAPs = the build queue;\n" as *u8)
100 cp("Roadmap L3 (design-grammar) then L4 (learned model) is how the generative gap closes. No overclaim.\n\n" as *u8)
101
102 var ok: i64=1
103 if ung!=0 { ok=0 }
104 if rows<10 { ok=0 }
105 if exc<1 { ok=0 }
106 if gap<1 { ok=0 }
107 if ok==1 {
108 cp("=== UIGEN-COMPETE verdict=GREEN: competitive map grounded (" as *u8); cn(rows); cp(" caps, 0 ungrounded), moat + build-queue named honestly.\n" as *u8)
109 sys_exit(0); return 0
110 }
111 cp("=== UIGEN-COMPETE verdict=RED (ungrounded or degenerate split)\n" as *u8)
112 sys_exit(1)
113 return 1
114}