code wiki / (root) / nx_reader_rows_tsv.nx

nx_reader_rows_tsv.nx

buildroot/runtime/nx_reader_rows_tsv.nx

3158 B71 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic reader
docsdependenciesstructsconstsfunctions

about

nx_reader_rows_tsv.nx -- dump the first N rows of reader_rows.bin (the real SQuAD q/ctx/gold triples the neural reader trained on) as TSV to stdout: q<TAB>ctx<TAB>gold, one row per line. Tabs/newlines inside the text are replaced with spaces so the TSV is clean for a benchmark harness (the Qwen-as-reader F1 eval). reader_rows.bin format: [magic 8B "NXRR1"] then per row [qlen i64][q][clen i64][ctx][alen i64][gold]. usage: nx_reader_rows_tsv [N] (default N=40) license_tier: ORIGINAL Sovereign: nx_syscalls.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_reader_rows_tsv.nx

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

main sys_openat_rd sys_mmap sys_read sys_close rt_field rt_putc sys_mmap ↻ sys_write rt_putc ↻

structs

none

consts

7const K_MAGIC_16777216: i64 = 16777216
8const K_MAGIC_100000: i64 = 100000

functions

10func rt_putc(c: i64) -> i64 { let b: *u8 = sys_mmap(1); b[0] = c as u8; sys_write(1, b, 1); return 0 }
called by 2: rt_fieldmain calls 2: sys_mmapsys_write
11func rt_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x<0{b[0]=45;sys_write(1,b,1);x=0-x} if x==0{b[0]=48;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0{d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0{b[i]=(48+(y%10)) as u8;y=y/10;i=i-1} sys_write(1,b,d); return 0 }
14func rt_field(p: *u8, n: i64) -> i64
called by 1: main calls 1: rt_putc
27func main(argc: i64, argv: *i64) -> i64