code wiki / _hdl_build / nx_library_harvest.nx
nx_library_harvest.nx
buildroot/runtime/_hdl_build/nx_library_harvest.nx
about
nx_library_harvest.nx -- ASSIGNMENT D (tutored): turn the team's DARK knowledge into a persistent, searchable
index. The Researcher's deep-research output (knowledge/research/*.md) was never indexed -- invisible to the
team's own search. This harvest reads those docs, combines them into a line-oriented corpus, builds the
inverted index (nx_inv_build_from_jsonl tokenizes each line), and PERSISTS it (nx_inv_save) so the team builds
once and queries forever. Proof: a term that exists ONLY in the dark research (not the old 52-line Library)
becomes searchable from the on-disk index. Composes the team's own primitives -- Claude tutored the doc-reader
composition (the novel rung), the team owns the index + persistence + syscalls. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_search_inverted_persist.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
| none |
functions
| 10 | func hv_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 11 | func hv_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; 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 } called by 1: main |
| 15 | func harvest_combine(paths: *i64, n: i64, out_path: *u8) -> i64 |
| 36 | func hv_query(idx: *NxInvIndex, term: *u8, tlen: i64) -> i64 |
| 43 | func main() -> i64 |