code wiki / (root) / nx_infinigen_page.nx

nx_infinigen_page.nx

buildroot/runtime/nx_infinigen_page.nx

24134 B549 linesdepth 6pulls 32 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_infinigen_page.nx -- THE PROCGEN VALIDATION SURFACE (/infinigen, operator 2026-08-27: "give us a nishifamily.com/infinigen ui so i can validate you are generating procgen and not cheating with hand crafting"). The proof this page publishes is MECHANICAL, not narrative: 1. it IMPORTS the shipping engine and REGENERATES every recipe world in-process at emit time -- every number below is measured from freshly generated voxels, never transcribed; 2. every world is generated TWICE into two arenas and the voxel-fold fingerprints must be EQUAL (same seed + same rows = the identical world, every time) or the emit REFUSES; 3. the effective generation parameters print with PROVENANCE per row -- identity default vs recipe override vs derived -- read back from the spec table the generator consumed; 4. the served world pages carry ZERO voxel data (each world materializes in the visitor's browser from the seed + the rows shown here), and beach-vs-isle is the standing seed experiment: ONE identity, two seeds, two different measured worlds. House law: this page is EMITTED from data (knowledge/world_recipes.conf + the engine). Recipe parsing here is a scoped 4-field TSV read; the full parser (gpe_recipes_load) lives in nx_game_page_emit and is deliberately NOT imported: that lib is a sibling lane's actively edited file and this organ needs name/vnum/seed/title/spec only. Declared imprecision. usage: nx_infinigen_page (runs from nishihost cwd like every registered tool) exit: 0 SHIPPED | 5 page-fault (too small / determinism REFUSED) | 6 deploy | 7 readback | 8 recipe-malformed-or-unreadable license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_wasm_craft.nx nx_infinigen_page.nx

imports: nx_syscalls.nxnx_wasm_craft.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ip_say sys_write ↻ ip_len ip_parse ip_sep ip_int ip_sayn sys_mmap ↻ sys_write ↻ ip_put ip_ch ip_world sys_mmap ↻ ip_gen sys_mmap ↻ ip_sep ↻ ip_int ↻

structs

none

consts

24const IP_TMP: *u8 = "sites/nishifamily/infinigen.html.stage"
25const IP_OUT: *u8 = "sites/nishifamily/infinigen.html"
26const IP_CONF: *u8 = "knowledge/world_recipes.conf"
27const IP_MODE: i64 = 0x1a4
31const IP_MIN_PAGE: i64 = 6000
32const IP_MAXW: i64 = 12 // recipe rows rendered at most; the conf carries 5-6 and a
34const IP_OBUF: i64 = 1048576 // page build buffer: one comfortable power-of-two page arena
35const IP_ARENA_PAD: i64 = 4096 // arena tail slack, the craft gate's own arena idiom
38const IP_CKMOD: i64 = 999999937

functions

40func ip_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ip_sayip_find
41func ip_say(s: *u8) -> i64 { sys_write(1, s, ip_len(s)); return 0 }
called by 2: ip_worldmain calls 2: sys_writeip_len
42func ip_sayn(v: i64) -> i64
called by 2: ip_worldmain calls 2: sys_mmapsys_write
55func ip_put(out: *u8, p: i64, s: *u8) -> i64
61func ip_ch(out: *u8, p: i64, c: i64) -> i64 { out[p] = c as u8; return p + 1 }
called by 3: ip_numip_putescmain
62func ip_num(out: *u8, p: i64, v: i64) -> i64
called by 3: ip_pnameip_worldmain calls 2: ip_chsys_mmap
74func ip_putw(out: *u8, p: i64, buf: *u8, a: i64, b: i64) -> i64
called by 1: ip_world
81func ip_putesc(out: *u8, p: i64, buf: *u8, a: i64, b: i64) -> i64
called by 2: ip_worldmain calls 2: ip_putip_ch
93func ip_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: ip_len
109func ip_sep(buf: *u8, a: i64, b: i64, c: i64) -> i64
called by 2: ip_parseip_gen
120func ip_int(buf: *u8, a: i64, b: i64) -> i64
called by 2: ip_parseip_gen
143func ip_parse(buf: *u8, n: i64, R: *i64) -> i64
called by 1: main calls 2: ip_sepip_int
185func ip_gen(vnum: i64, seed: i64, buf: *u8, sa: i64, sb: i64, OV: *i64) -> i64
called by 1: ip_world calls 3: sys_mmapip_sepip_int
217func ip_cksum(base: i64) -> i64
called by 1: ip_world
238func ip_census(base: i64, C: *i64) -> i64
called by 1: ip_world calls 3: en_counten_geten_nth
332func ip_pname(out: *u8, p: i64, ix: i64) -> i64
called by 1: ip_world calls 2: ip_putip_num
370func ip_world(out: *u8, p0: i64, cf: *u8, R: *i64, w: i64, S: *i64) -> i64
466func main() -> i64