code wiki / (root) / nx_paper_beat.nx

nx_paper_beat.nx

buildroot/runtime/nx_paper_beat.nx

9083 B201 linesdepth 25pulls 156 transitivereach 0 importersview sourcekind tooltopic paper
docsdependenciesstructsconstsfunctions

about

nx_paper_beat.nx -- THE NATIVE-LIBRARY CONVERSION BEAT (operator 2026-08-13: no third-party formats; papers native to Nishi from the first bit). Walks a fetched CVF listing, and for each paper: fetch its ABSTRACT PAGE over our own TLS (rf_fetch_bank, ~6KB each) -> convert to NXPAP2 via the promoted nx_paper_native -> emit its reader view. BOUNDED and RESUMABLE by construction: <limit> papers per run and a cursor file holding the next index, so a run is a paced slice, never a hammer on the host (the resource-excellence law) and never a restart from zero. Composes, never re-implements: the fetch is the researcher's proven lane, the conversion is the promoted organ, this owns only the WALK + the CURSOR. 2026-08-14 -- FILE READS NO LONGER CARRY A CAP. This organ used to read the listing through its own hand-rolled pb_read with a fixed 4 MiB ceiling, which silently short-read any bigger listing: a caller could not tell a 4 MiB page from a 4 MiB-capped 9 MiB page, and CVPR 2026 day 3 came back at EXACTLY 4,194,304 B for that reason. The estate's own sys_read_file has sized its buffer from the file (lseek END) since 2026-07-15; this organ was hand-rolling a capped reader beside it. Worse, the ONE constant was doing DOUBLE DUTY as a file-read ceiling and a network-buffer reserve -- two unrelated quantities that can never be tuned together. File reads now compose sys_read_file and cannot truncate; the only remaining bound is the network reserve below, which is named for exactly what it is. nx_paper_beat <listing.raw> <limit> <cursor-file> [name-prefix] Announces converted/skipped/failed + the new cursor. exit 0 ok | 1 io | 2 usage | 3 refuse. license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_research_fetch_ext.nx nx_paper_beat.nx

imports: nx_syscalls.nxnx_research_fetch_ext.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main pb_puts sys_write pb_len sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close pb_len ↻ pb_int pb_find pb_len ↻ pb_app

structs

none

consts

26const PB_MAGIC_1024: i64 = 1024
32const PB_FETCH_RESERVE: i64 = 8388608
33const PB_NATIVE: *u8 = "/volume1/homes/elderwesto/nishihost/nx_paper_native.elf"

functions

35func pb_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: pb_putspb_findmain
36func pb_puts(s: *u8) -> i64 { sys_write(1, s, pb_len(s)); return 0 }
called by 1: main calls 2: sys_writepb_len
37func pb_num(v: i64) -> i64
49func pb_app(d: *u8, off: i64, s: *u8) -> i64
called by 1: main
55func pb_appn(d: *u8, off: i64, src: *u8, a: i64, b: i64) -> i64
61func pb_appnum(d: *u8, off: i64, v: i64) -> i64
calls 1: sys_mmap
71func pb_find(src: *u8, a: i64, b: i64, pat: *u8) -> i64
called by 1: main calls 1: pb_len
84func pb_int(s: *u8, n: i64) -> i64
called by 1: main
94func pb_run3(a1: *u8, a2: *u8, a3: *u8) -> i64
116func main(argc: i64, argv: *i64) -> i64