code wiki / (root) / nx_world_grade.nx

nx_world_grade.nx

buildroot/runtime/nx_world_grade.nx

8518 B224 linesdepth 6pulls 33 transitivereach 0 importersview sourcekind orphan librarytopic world
docsdependenciesstructsconstsfunctions

about

nx_world_grade.nx -- GRADE A LIVE nx_wasm_craft WORLD WITH nx_world_quality_grader. The gap this closes, measured 2026-09-01: nx_world_quality_grader.nx had shipped on 2026-05-16 and had NEVER BEEN BUILT, and even once built it takes a heightmap ARRAY in process and has no argv -- so it could not be pointed at any world that actually exists. The published /world/beach page had no referee at all. This organ is the missing arm: it runs the SAME engine source the page wasm is compiled from (nx_wasm_craft as a lib, which nx_world_snap already does natively) and hands the grader the real terrain. NO DUPLICATE RULER IS CREATED HERE. The terrain comes from the engine own mob_ground, the verdict comes from the shipped grader, and this file only composes the two and prints. usage: nx_world_grade <identity_v> <seed> [ticks] identity_v 2 + seed 20260728 IS the served beach: sites/nishifamily/world/beach.html carries const NXV=2 and ex.init_v(BigInt(NXV),BigInt(20260728)). exit: 0 graded | 2 usage SCOPE, DECLARED SO THE NUMBER CANNOT BE OVER-READ: the heightmap axes are measured from the live world; BIOME_COHERENCE and FEATURE_VARIETY are NOT supplied, so the grader abstains on them (score 0, verdict MARGINAL) and the grade therefore CANNOT reach S by construction. That ceiling is printed beside the grade rather than left for the reader to discover. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_wasm_craft.nx nx_world_quality_grader.nx nx_world_grade.nx

imports: nx_wasm_craft.nxnx_world_quality_grader.nx

imported by: nobody (leaf or entry point)

structs

none

consts

26const WGD_PAD: i64 = 4096 // the slack nx_world_snap also leaves past CRAFT_TOTAL
27const WGD_ARGC_MIN: i64 = 3 // program + identity + seed
28const WGD_ARGC_TICKS: i64 = 4
29const WGD_EXIT_USAGE: i64 = 2
30const WGD_NUMBUF: i64 = 32
31const WGD_TICK_MS: i64 = 16 // the engine frame budget nx_world_snap ticks with
32const WGD_ASCII_ZERO: i64 = 48
33const WGD_ASCII_NINE: i64 = 57
34const WGD_ASCII_MINUS: i64 = 45
35const WGD_TEN: i64 = 10
36const WGD_PERMIL: i64 = 1000

functions

38func wgd_slen(s: *u8) -> i64
44func wgd_puts(s: *u8) -> i64
49func wgd_putn(v: i64) -> i64
78func wgd_row(label: *u8, val: i64) -> i64
87func wgd_axis(label: *u8, q: i64) -> i64
100func wgd_grade_word(g: i64) -> *u8
110func wgd_refine_word(r: i64) -> *u8
124func wgd_num(s: *u8) -> i64
143func main(argc: i64, argv: *i64) -> i64