code wiki / _hdl_build / nx_role_parts.nx
nx_role_parts.nx
buildroot/runtime/_hdl_build/nx_role_parts.nx
about
nx_role_parts.nx -- X-ORC-006: SHEET MUSIC, extracted (operator: an orchestra works
because everyone reads the SAME score but plays from their own PART). Per beat,
derive knowledge/parts/<owner>.txt for EVERY distinct owner in the queue: their
TODO/NOVEL rows (id, w, gate, title) with the channel route inline when one exists
(the brief-join gene generalized from the tutor seat to every chair). Derived
state: sibling-tmp + renameat per part (no-TRUNC immunity, the reloop lesson).
Durable: parts files + one PARTS row -> knowledge/status/role_parts.log.
Exit 0 = parts derived; exit 1 = unreadable world. argv[1]=queue argv[2]=outdir.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| 11 | const K_MAGIC_1048576: i64 = 1048576 |
| 12 | const K_MAGIC_1048560: i64 = 1048560 |
| 13 | const K_MAGIC_262144: i64 = 262144 |
| 14 | const K_MAGIC_262128: i64 = 262128 |
| 15 | const K_MAGIC_8192: i64 = 8192 |
| 16 | const K_MAGIC_65536: i64 = 65536 |
| 17 | const K_MAGIC_65520: i64 = 65520 |
functions
| 18 | func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 20 | func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 21 | func rp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 22 | func rp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 23 | func rp_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 33 | func rp_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 |
| 48 | func rp_slice_eq(a: *u8, s: i64, e: i64, b: *u8, bs: i64, be: i64) -> i64 |
| 55 | func rp_route(fd: i64, tin: *u8, tn: i64, q: *u8, ida: i64, idb: i64) -> i64 |
| 91 | func rp_part(q: *u8, qn: i64, tin: *u8, tn: i64, outd: *u8, oa: i64, ob: i64) -> i64 |
| 151 | func rp_name_in_csv(q: *u8, oa: i64, ob: i64, sb: *u8, ca: i64, cb: i64) -> i64 |
| 164 | func rp_emit_one(fd: i64, q: *u8, sp: *i64, tin: *u8, tn: i64) -> i64 |
| 178 | func rp_section_part(q: *u8, qn: i64, tin: *u8, tn: i64, outd: *u8, sb: *u8, na: i64, nb: i64, la: i64, lb: i64, ca: i64, cb: i64) -> i64 |
| 230 | func main(argc: i64, argv: *i64) -> i64 |