code wiki / _hdl_build / nx_nmz_native_gate.nx
nx_nmz_native_gate.nx
buildroot/runtime/_hdl_build/nx_nmz_native_gate.nx
about
nx_nmz_native_gate.nx -- proves .nmz is a SUPERIOR NATIVE format, not just a translation layer (operator). Authors
generated content natively (nx_nmz_author, NO lock-in source) and MEASURES the axes EPUB/MOBI/PDF fundamentally
lack, especially for generated content:
NATIVE -- @kind set, authored from raw generated text (no decoder of any lock-in format involved).
PROVENANCE -- @provenance is a FIRST-CLASS entry readable WITHOUT parsing the manifest; names the generator +
proves origin="original-generated" / "not a translation". (Lock-in formats: no native provenance.)
INTEGRITY -- flip ONE byte of the .nmz -> the content-address (sha256 CID) CHANGES = tamper-evident.
(EPUB/MOBI cannot detect a flipped byte.)
DETERMINISM -- author twice -> BYTE-IDENTICAL .nmz -> same CID = reproducible. (zip formats vary by ts/order.)
CONTENT -- the generated prose round-trips out of the binary-safe canon.
GREEN = people (and we) would choose .nmz natively for generated content because it is genuinely better.
expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_canon_bin.nxnx_uxf_cid.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
| none |
functions
| 17 | func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func gnum(v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(1,"-" as *u8,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48 as u8;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 19 | func gstreq(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 |
| 20 | func ghas(hay: *u8, hl: i64, needle: *u8) -> i64 called by 1: main |
| 27 | func rd(path: *u8, lenp: *i64) -> *u8 { lenp[0]=0; return sys_read_file(path, lenp) } |
| 28 | func cp_bytes(src: *u8, n: i64) -> *u8 { let d: *u8 = sys_mmap(n + 16); var i: i64=0; while i<n { d[i]=src[i]; i=i+1 } return d } |
| 29 | func spawn(path: *u8, a0: *u8, redir: *u8) -> i64 |
| 47 | func main() -> i64 |