code wiki / _hdl_build / nx_uigen_sota_research_fetch.nx
nx_uigen_sota_research_fetch.nx source
↩ module page · 96 lines · 6193 B
1// nx_uigen_sota_research_fetch.nx -- SOVEREIGN research round: AUTONOMOUS UI-GENERATION STATE OF THE ART for
2// WEBSITES + APPS, 2025/26 (operator 2026-07-11: "get beyond bluehost and wix and all the other site[builders]
3// and see what 25/26 ui gen for websites and apps ... at or beyond ... glm 5.2 levels"). The banked uib_*.raw
4// corpus covers AI-gen tech (v0/GLM/react/a11y/tailwind) but NOT the named competitors -- this closes that gap:
5// the SITE BUILDERS (Wix/Bluehost/Webflow/Squarespace/Framer/GoDaddy), the AI-NATIVE GENERATORS (v0/Bolt/
6// Lovable/Builder), APP + low-code builders (FlutterFlow/Bubble/OutSystems/Retool), and the BENCHMARKS the
7// field scores on (Design2Code paper, Chatbot/WebDev Arena) + procedural generation (the L3 design-grammar rung).
8// Own TLS + Mozilla CA, idempotent have-skip. Saves knowledge/fetched/uigss_*.raw so the corpus COMPOUNDS.
9// expect_exit: 0 license_tier: ORIGINAL
10import "nx_syscalls.nx"
11import "nx_x509_trust_store.nx"
12import "nx_trust_store_load_from_certdata.nx"
13import "nx_https_fetch_follow.nx"
14const K_MAGIC_4194304: i64 = 4194304
15const K_MAGIC_8388608: i64 = 8388608
16
17func jf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
18func jf_putn(v: i64) -> i64 {
19 if v == 0 { sys_write(1, "0" as *u8, 1); return 0 }
20 var m: i64 = v
21 if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m }
22 let d: *u8 = sys_mmap(24)
23 var k: i64 = 0
24 while m > 0 { d[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }
25 let o: *u8 = sys_mmap(24)
26 var q: i64 = k - 1
27 var x: i64 = 0
28 while q >= 0 { o[x] = d[q]; x = x + 1; q = q - 1 }
29 sys_write(1, o, x)
30 return 0
31}
32func have_file(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
33func fetch_save(url: *u8, opath: *u8, store: *TrustStore, out: *u8, cap: i64) -> i64 {
34 if have_file(opath) == 1 { jf_puts(opath); jf_puts(" [have-skip]\n" as *u8); return 1 }
35 let status: *i64 = sys_mmap(8) as *i64
36 let n: i64 = nx_https_fetch_follow(url, store, out, cap, 6, status)
37 jf_puts(url)
38 jf_puts(" status=" as *u8)
39 jf_putn(status[0])
40 jf_puts(" bytes=" as *u8)
41 jf_putn(n)
42 if n <= 0 { jf_puts(" FETCH-FAIL\n" as *u8); return 0 }
43 var gz: i64 = 0
44 if n >= 2 { if out[0] == 0x1f as u8 { if out[1] == 0x8b as u8 { gz = 1 } } }
45 if gz == 1 { jf_puts(" [GZIP-skip]\n" as *u8); return 0 }
46 let fd: i64 = sys_openat_wr(opath, 0x1a4)
47 if fd < 0 { jf_puts(" SAVE-FAIL\n" as *u8); return 0 }
48 sys_write(fd, out, n)
49 sys_close(fd)
50 jf_puts(" SAVED\n" as *u8)
51 return 1
52}
53
54func main() -> i64 {
55 let r: i64 = nx_trust_store_load_from_certdata("data/mozilla_certdata.txt" as *u8, 512, K_MAGIC_4194304)
56 if r <= 0 { jf_puts("UIGEN-SOTA: certdata load failed\n" as *u8); return 1 }
57 let store: *TrustStore = r as *TrustStore
58 jf_puts("CA roots=" as *u8)
59 jf_putn(trust_store_count(store))
60 jf_puts("\n" as *u8)
61 let cap: i64 = K_MAGIC_8388608
62 let out: *u8 = sys_mmap(cap)
63 var ok: i64 = 0
64
65 jf_puts("== THE SITE BUILDERS (what to get BEYOND -- Wix/Bluehost/Webflow/Squarespace/Framer/GoDaddy) ==\n" as *u8)
66 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Wix.com" as *u8, "knowledge/fetched/uigss_wix.raw" as *u8, store, out, cap)
67 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Squarespace" as *u8, "knowledge/fetched/uigss_squarespace.raw" as *u8, store, out, cap)
68 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Webflow" as *u8, "knowledge/fetched/uigss_webflow.raw" as *u8, store, out, cap)
69 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Bluehost" as *u8, "knowledge/fetched/uigss_bluehost.raw" as *u8, store, out, cap)
70 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Framer_(company)" as *u8, "knowledge/fetched/uigss_framer.raw" as *u8, store, out, cap)
71 ok = ok + fetch_save("https://en.wikipedia.org/wiki/GoDaddy" as *u8, "knowledge/fetched/uigss_godaddy.raw" as *u8, store, out, cap)
72
73 jf_puts("== THE AI-NATIVE GENERATORS (the frontier -- v0/Bolt/Lovable/Builder, the operator's 'at/beyond glm 5.2') ==\n" as *u8)
74 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Vercel" as *u8, "knowledge/fetched/uigss_vercel.raw" as *u8, store, out, cap)
75 ok = ok + fetch_save("https://bolt.new/" as *u8, "knowledge/fetched/uigss_bolt.raw" as *u8, store, out, cap)
76 ok = ok + fetch_save("https://lovable.dev/" as *u8, "knowledge/fetched/uigss_lovable.raw" as *u8, store, out, cap)
77 ok = ok + fetch_save("https://www.builder.io/" as *u8, "knowledge/fetched/uigss_builderio.raw" as *u8, store, out, cap)
78
79 jf_puts("== APP + LOW-CODE BUILDERS (the 'apps' half -- FlutterFlow/Bubble/OutSystems/Retool) ==\n" as *u8)
80 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Bubble_(programming_language)" as *u8, "knowledge/fetched/uigss_bubble.raw" as *u8, store, out, cap)
81 ok = ok + fetch_save("https://en.wikipedia.org/wiki/OutSystems" as *u8, "knowledge/fetched/uigss_outsystems.raw" as *u8, store, out, cap)
82 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Low-code_development_platform" as *u8, "knowledge/fetched/uigss_lowcode.raw" as *u8, store, out, cap)
83
84 jf_puts("== THE BENCHMARKS THE FIELD SCORES ON + the generative method for L3 ==\n" as *u8)
85 ok = ok + fetch_save("https://arxiv.org/abs/2403.03163" as *u8, "knowledge/fetched/uigss_design2code.raw" as *u8, store, out, cap)
86 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Chatbot_Arena" as *u8, "knowledge/fetched/uigss_arena.raw" as *u8, store, out, cap)
87 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Procedural_generation" as *u8, "knowledge/fetched/uigss_procgen.raw" as *u8, store, out, cap)
88 ok = ok + fetch_save("https://en.wikipedia.org/wiki/Generative_design" as *u8, "knowledge/fetched/uigss_gendesign.raw" as *u8, store, out, cap)
89
90 jf_puts("UIGEN-SOTA research round: ok=" as *u8)
91 jf_putn(ok)
92 jf_puts("/18\n" as *u8)
93 if ok >= 11 { jf_puts("=== GREEN: 25/26 UI-gen landscape corpus banked (>=11/18) ===\n" as *u8); return 0 }
94 jf_puts("=== RED: too few sources banked ===\n" as *u8)
95 return 1
96}