code wiki / (root) / nx_sov_census_run.nx

nx_sov_census_run.nx source

↩ module page · 75 lines · 3352 B

1// nx_sov_census_run.nx -- run the sovereignty census on the live nishi-library. 2// Reads the library source DIRECTLY via sys_read_file (no shell), names every 3// 3rd-party axis + its sovereign Nishi replacement = the S-class-exceed worklist. 4// Built + run by the WOMB. 5 6import "nx_syscalls.nx" 7import "nx_runtime.nx" 8import "nx_sov_census.nx" 9 10func socr_puts(s: *u8) -> i64 { 11 return sys_write(1, s, uxg_len(s)) 12} 13 14func socr_axis(name: *u8, sov: i64, thirdparty: *u8, replacement: *u8) -> i64 { 15 socr_puts(name) 16 if sov == 1 { 17 socr_puts(" : SOVEREIGN\n" as *u8) 18 } else { 19 socr_puts(" : 3RD-PARTY (" as *u8) 20 socr_puts(thirdparty) 21 socr_puts(") -> build: " as *u8) 22 socr_puts(replacement) 23 socr_puts("\n" as *u8) 24 } 25 return 0 26} 27 28func socr_read(path: *u8, lenout: *i64) -> *u8 { 29 lenout[0] = 0 30 return sys_read_file(path, lenout) 31} 32 33func main() -> i64 { 34 let L: *i64 = sys_mmap(8) as *i64 35 36 let cat: *u8 = socr_read("/home/elderwesto/nishi-library/nishilib/catalog.py" as *u8, L) 37 var db: i64 = 0 38 if (cat as i64) != 0 { db = soc_db_sov(cat, L[0]) } 39 40 let rnd: *u8 = socr_read("/home/elderwesto/nishi-library/nishilib/render.py" as *u8, L) 41 var http: i64 = 0 42 var pdf: i64 = 0 43 if (rnd as i64) != 0 { http = soc_http_sov(rnd, L[0]); pdf = soc_pdf_sov(rnd, L[0]) } 44 45 let mdl: *u8 = socr_read("/home/elderwesto/nishi-library/nishilib/models.py" as *u8, L) 46 var val: i64 = 0 47 if (mdl as i64) != 0 { val = soc_validation_sov(mdl, L[0]) } 48 49 let idx: *u8 = socr_read("/home/elderwesto/nishi-library/nishilib/web/index.html" as *u8, L) 50 var map: i64 = 0 51 if (idx as i64) != 0 { map = soc_map_sov(idx, L[0]) } 52 53 let rt: i64 = soc_runtime_sov(0) 54 55 socr_puts("=== nx_sov_census :: nishi-library distance to S-class-EXCEED sovereignty ===\n" as *u8) 56 socr_axis(" data store " as *u8, db, "sqlite3" as *u8, "nx_seg_store + nx_hash_index (O(1) sovereign store)" as *u8) 57 socr_axis(" http client" as *u8, http, "httpx/urllib" as *u8, "sovereign TLS-1.3 client / nx_http_probe" as *u8) 58 socr_axis(" validation " as *u8, val, "pydantic" as *u8, "sovereign .nx structs + boundary checks" as *u8) 59 socr_axis(" pdf render " as *u8, pdf, "docling/grobid" as *u8, "sovereign render organ (JATS/HTML pipeline)" as *u8) 60 socr_axis(" web map " as *u8, map, "leaflet.js" as *u8, "sovereign tile/vector map organ" as *u8) 61 socr_axis(" runtime " as *u8, rt, "python+js" as *u8, "the .nx language (nx_cc -> nxasm, no gcc)" as *u8) 62 socr_puts(" ----------------------------------------\n" as *u8) 63 socr_puts(" SOVEREIGNTY = " as *u8) 64 print_i64(soc_permil(db, http, val, pdf, map, rt)) 65 socr_puts(" / 1000 permil (honest, gaps-first: the library is 3rd-party-built = the worklist)\n\n" as *u8) 66 67 let g: *u8 = socr_read("/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_uxcx_grade.nx" as *u8, L) 68 var gdb: i64 = 1 69 var ghttp: i64 = 1 70 if (g as i64) != 0 { gdb = soc_db_sov(g, L[0]); ghttp = soc_http_sov(g, L[0]) } 71 socr_puts(" CONTRAST: nx_uxcx_grade.nx (the grader we built) sovereignty = " as *u8) 72 print_i64(soc_permil(gdb, ghttp, 1, 1, 1, 1)) 73 socr_puts(" / 1000 (sovereign .nx, no 3rd-party = S-class). The TOOL is there; the LIBRARY is the climb.\n" as *u8) 74 return 0 75}