code wiki / _hdl_build / nx_critic_kernel.nx
nx_critic_kernel.nx
buildroot/runtime/_hdl_build/nx_critic_kernel.nx
about
nx_critic_kernel.nx -- the SOVEREIGN, DOMAIN-AGNOSTIC, self-growing CRITIC KERNEL (operator 2026-07-04:
"the critic needs to intelligently grow with your tutoring so this whole thing becomes state of the art not
just for [photoreal] but audio and industrial design and all kinds of projects"). ONE kernel; every domain
plugs in AXES; every axis is held under the epistemic Nishi Critic ([[nx_critic]]) and -- crucially -- CANNOT
be trusted (LAW) until it SURVIVES A RED-TEAM: the tutor supplies a GOOD sample AND an ADVERSARY the axis
must reject. The kernel RUNS the red-team and only marks the axis red-teamed if it DISCRIMINATES; a gameable
axis (adversary not rejected) is caught and queued for the tutor -- so the critic grows intelligently, never
self-flatters, and generalizes to visuals + audio + design + anything.
PROOF: 3 real domains (VISUAL structure / AUDIO periodicity / DESIGN symmetry), each with a real measurement
+ a real adversary, all graded by the SAME kernel; PLUS one deliberately WEAK axis (design "detail=variance",
which noise games) that the kernel CATCHES and refuses to bless. license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_critic.nxnx_itrig.nxnx_sdfrender.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
| 17 | const K_MAGIC_4096: i64 = 4096 |
| 18 | const K_MAGIC_20000: i64 = 20000 |
| 19 | const K_MAGIC_1024: i64 = 1024 |
| 20 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 21 | const K_MAGIC_40503: i64 = 40503 |
| 22 | const K_MAGIC_8191: i64 = 8191 |
functions
| 24 | func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 25 | func pn(v: i64) -> i64 |
| 37 | func kc(v: i64) -> i64 { if v < 0 { return 0 } if v > 1000 { return 1000 } return v } |
| 38 | func kabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 39 | func klum(g: i64) -> i64 { return ((g & 255) + ((g >> 8) & 255) + ((g >> 16) & 255)) / 3 } called by 1: our_fine_detail |
| 40 | func kfg(g: i64) -> i64 { let r: i64 = g & 255; let b: i64 = (g >> 16) & 255; if r >= b { return 1 } return 0 } called by 1: our_fine_detail |
| 42 | func our_fine_detail(fb: *i64, w: i64, h: i64) -> i64 |
| 63 | func m_vis_structure(lum: *i64) -> i64 |
| 85 | func m_aud_periodicity(s: *i64, n: i64, lag: i64) -> i64 |
| 95 | func m_des_symmetry(hgt: *i64, n: i64) -> i64 |
| 103 | func m_des_variance(hgt: *i64, n: i64) -> i64 |
| 114 | func kernel_redteam(good: i64, adv: i64) -> i64 |
| 118 | func statusname(s: i64) -> *u8 called by 1: grade_axis |
| 126 | func grade_axis(dom: *u8, ax: *u8, good: i64, adv: i64) -> i64 |
| 143 | func main() -> i64 |