code wiki / _hdl_build / nx_overnight.nx
nx_overnight.nx
buildroot/runtime/_hdl_build/nx_overnight.nx
about
nx_overnight.nx -- UNSUPERVISED overnight runner: the team mines a large search space in
chunks, beat after beat, banking what it finds and JOURNALING every beat to a log the
operator + Claude review in the morning. Resource-bounded (a parallel pool of K workers,
each a fork whose RAM is reclaimed on exit) so it runs all night without growing. Each beat
also EXEC-VERIFIES a sample, so any correctness regression is logged as an ISSUE to address.
The operator kicks it off (background it / loop the binary); Claude reads the journal next
day to critique + build the team up. license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_mulchain_deep.nxnx_superopt_emit.nxnx_engineer_crash.nxnx_syscalls.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
| 13 | const K_MAGIC_8192: i64 = 8192 |
| 14 | const K_MAGIC_20000: i64 = 20000 |
functions
| 16 | func ov_shared(size: i64) -> *u8 { let r: i64 = __syscall(SYS_MMAP, 0, size, 3, 0x21, 0 - 1, 0); return r as *u8 } called by 1: ov_main |
| 23 | func ov_work(c: i64) -> i64 { let op: *i64 = sys_mmap(8*20) as *i64; let a: *i64 = sys_mmap(8*20) as *i64; let b: *i64 = sys_mmap(8*20) as *i64; return mc_cost_select(c, 5, 3, op, a, b) } |
| 26 | func ov_ingest(lo: i64, hi: i64, K: i64, bank: *u8) -> i64 |
| 45 | func ov_verify(c: i64) -> i64 |
| 57 | func ov_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 58 | func ov_puts(s: *u8) -> i64 { sys_write(1, s, ov_slen(s)); return 0 } |
| 59 | func ov_pn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 } |
| 62 | func ov_jline(buf: *u8, s: *u8) -> i64 { var n: i64 = 0; var oi: i64 = 0; while buf[oi] != (0 as u8) { oi = oi + 1 } while s[n] != (0 as u8) { buf[oi] = s[n]; oi = oi + 1; n = n + 1 } buf[oi] = 0 as u8; return 0 } |
| 63 | func ov_jnum(buf: *u8, v: i64) -> i64 { var oi: i64 = 0; while buf[oi] != (0 as u8) { oi = oi + 1 } let t: *u8 = sys_mmap(28); var m: i64=v; var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var z: i64=0; while z<k {buf[oi]=t[k-1-z]; oi=oi+1; z=z+1} buf[oi]=0 as u8; return 0 } |
| 65 | func ov_jrec(beat: i64, lo: i64, hi: i64, chainwin: i64, imulwin: i64, vok: i64) -> i64 |
| 82 | func ov_esc(typ: *u8, detail: *u8, a: i64, b: i64) -> i64 |
| 93 | func ov_main(r: *i64) -> i64 |
| 140 | func main() -> i64 |