code wiki / _hdl_build / nx_research_sovereign_lens.nx

nx_research_sovereign_lens.nx source

↩ module page · 128 lines · 5648 B

1// nx_research_sovereign_lens.nx -- the SOVEREIGNTY LENS over research findings. 2// 3// LAW (operator, absolute): "we build S-class from the hardware rung up, no third 4// party." So when research surfaces a THIRD-PARTY tool (FMOD/Havok/Unity/CUDA/...) 5// the Nishi reading is NEVER "adopt it" -- the tool is a BENCHMARK to EXCEED, and 6// the roadmap rung is "build a sovereign S-class equivalent, hardware rung up." 7// 8// This organ MECHANIZES that law (like the never-brick gate enforces #26): it 9// detects third-party tools named in a claim and emits the sovereign-build 10// directive, so a finding can never be read as "use the third party". Data-driven 11// (tool -> capability table), inspectable. license_tier: ORIGINAL. 12 13import "nx_syscalls.nx" 14import "nx_research_extract.nx" 15 16// ---- third-party tool -> the SOVEREIGN capability we must build instead ---- 17func sl_n() -> i64 { return 30 } 18func sl_tool(i: i64) -> *u8 { 19 if i == 0 { return "FMOD" as *u8 } 20 if i == 1 { return "Wwise" as *u8 } 21 if i == 2 { return "Havok" as *u8 } 22 if i == 3 { return "PhysX" as *u8 } 23 if i == 4 { return "Bullet" as *u8 } 24 if i == 5 { return "Box2D" as *u8 } 25 if i == 6 { return "Scaleform" as *u8 } 26 if i == 7 { return "Unreal" as *u8 } 27 if i == 8 { return "Unity" as *u8 } 28 if i == 9 { return "CryEngine" as *u8 } 29 if i == 10 { return "Godot" as *u8 } 30 if i == 11 { return "DirectX" as *u8 } 31 if i == 12 { return "Direct3D" as *u8 } 32 if i == 13 { return "OpenGL" as *u8 } 33 if i == 14 { return "Vulkan" as *u8 } 34 if i == 15 { return "Metal" as *u8 } 35 if i == 16 { return "CUDA" as *u8 } 36 if i == 17 { return "WebGL" as *u8 } 37 if i == 18 { return "WebGPU" as *u8 } 38 if i == 19 { return "Blender" as *u8 } 39 if i == 20 { return "ZBrush" as *u8 } 40 if i == 21 { return "Maya" as *u8 } 41 if i == 22 { return "Houdini" as *u8 } 42 if i == 23 { return "Substance" as *u8 } 43 if i == 24 { return "Klipper" as *u8 } 44 if i == 25 { return "Moonraker" as *u8 } 45 if i == 26 { return "Cura" as *u8 } 46 if i == 27 { return "KiCad" as *u8 } 47 if i == 28 { return "Siemens" as *u8 } 48 if i == 29 { return "FreeCAD" as *u8 } 49 return 0 as *u8 50} 51func sl_cap(i: i64) -> *u8 { 52 if i == 0 { return "sovereign AUDIO ENGINE" as *u8 } 53 if i == 1 { return "sovereign AUDIO ENGINE" as *u8 } 54 if i == 2 { return "sovereign PHYSICS ENGINE" as *u8 } 55 if i == 3 { return "sovereign PHYSICS ENGINE" as *u8 } 56 if i == 4 { return "sovereign PHYSICS ENGINE" as *u8 } 57 if i == 5 { return "sovereign 2D PHYSICS ENGINE" as *u8 } 58 if i == 6 { return "sovereign UI + VECTOR RENDERER" as *u8 } 59 if i == 7 { return "sovereign GAME ENGINE" as *u8 } 60 if i == 8 { return "sovereign GAME ENGINE" as *u8 } 61 if i == 9 { return "sovereign GAME ENGINE" as *u8 } 62 if i == 10 { return "sovereign GAME ENGINE" as *u8 } 63 if i == 11 { return "sovereign GRAPHICS API" as *u8 } 64 if i == 12 { return "sovereign GRAPHICS API" as *u8 } 65 if i == 13 { return "sovereign GRAPHICS API" as *u8 } 66 if i == 14 { return "sovereign GRAPHICS API" as *u8 } 67 if i == 15 { return "sovereign GRAPHICS API" as *u8 } 68 if i == 16 { return "sovereign GPU COMPUTE" as *u8 } 69 if i == 17 { return "sovereign BROWSER GPU PATH" as *u8 } 70 if i == 18 { return "sovereign BROWSER GPU PATH" as *u8 } 71 if i == 19 { return "sovereign 3D DCC SUITE (model/sculpt/render)" as *u8 } 72 if i == 20 { return "sovereign DIGITAL SCULPTING tool" as *u8 } 73 if i == 21 { return "sovereign 3D ANIMATION SUITE" as *u8 } 74 if i == 22 { return "sovereign PROCEDURAL 3D tool" as *u8 } 75 if i == 23 { return "sovereign TEXTURING + MATERIAL tool" as *u8 } 76 if i == 24 { return "sovereign 3D-PRINTER FIRMWARE (motion + never-brick safety)" as *u8 } 77 if i == 25 { return "sovereign PRINTER API/CONTROL server" as *u8 } 78 if i == 26 { return "sovereign SLICER (STL -> G-code)" as *u8 } 79 if i == 27 { return "sovereign PCB/EDA SUITE (schematic + layout + gerber)" as *u8 } 80 if i == 28 { return "sovereign CAD/PLM SUITE" as *u8 } 81 if i == 29 { return "sovereign PARAMETRIC CAD (solid modeling)" as *u8 } 82 return "sovereign capability" as *u8 83} 84 85// detect a third-party tool anywhere in text[0..n); return tool index | -1 86func sl_detect(text: *u8, n: i64) -> i64 { 87 var i: i64 = 0 88 while i < sl_n() { 89 if re_find(text, n, sl_tool(i)) >= 0 { return i } 90 i = i + 1 91 } 92 return 0 - 1 93} 94 95func sl_app(out: *u8, off: *i64, s: *u8) -> i64 { 96 var i: i64 = 0 97 while s[i] != (0 as u8) { out[off[0]] = s[i]; off[0] = off[0] + 1; i = i + 1 } 98 return 0 99} 100 101// write the sovereign-build directive for tool i into out; return length 102func sl_directive(i: i64, out: *u8) -> i64 { 103 let off: *i64 = (sys_mmap(8)) as *i64 104 off[0] = 0 105 sl_app(out, off, "BUILD " as *u8) 106 sl_app(out, off, sl_cap(i)) 107 sl_app(out, off, " (S-class, hardware rung up) -- benchmark to EXCEED, never adopt: " as *u8) 108 sl_app(out, off, sl_tool(i)) 109 out[off[0]] = 0 as u8 110 return off[0] 111} 112 113// Apply the lens to a claim (subj+obj joined): if it names a third party, write 114// the sovereign-build directive to out and return tool index; else return -1 115// (neutral claim -- a generic concept, kept as-is). 116func nx_sovereign_lens(subj: *u8, obj: *u8, out: *u8) -> i64 { 117 let buf: *u8 = sys_mmap(4096) 118 let off: *i64 = (sys_mmap(8)) as *i64 119 off[0] = 0 120 sl_app(buf, off, subj) 121 sl_app(buf, off, " " as *u8) 122 sl_app(buf, off, obj) 123 buf[off[0]] = 0 as u8 124 let idx: i64 = sl_detect(buf, off[0]) 125 if idx < 0 { return 0 - 1 } 126 sl_directive(idx, out) 127 return idx 128}