code wiki / _hdl_build / nx_text_recall.nx
nx_text_recall.nx
buildroot/runtime/_hdl_build/nx_text_recall.nx
about
nx_text_recall.nx -- SOVEREIGN render-coverage grader (operator doctrine 2026-07-29: "grow native
capabilities from the first byte up"; a borrowed ruler is a borrowed conclusion).
Replaces the Windows.Media.Ocr dependency for the question OCR was ALWAYS a proxy for: "did the
page's text actually get rendered?" -- answered from OUR OWN layout tree instead of a bitmap:
GROUND TRUTH = every TEXT box the parser produced (the page's words, as we understood them)
RENDERED = those with a real painted rect (h>0 and w>0)
Reports permille + the first missed runs BY NAME. Immune to the OCR cliffs that distorted three
decisions this week (sub-14px legibility, crop-window shifts, wrap-alignment blindness), fully
deterministic, and fast enough to run every leg.
usage: nx_text_recall <file.html> [width] [vec]
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_browser_render.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
| 14 | func tr_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 15 | func tr_n(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{tr_w("-" as *u8);m=0-m} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 16 | func tr_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; var go: i64=1; while go==1 { let c: i64=s[i]&0xff; if c>=48 { if c<=57 { v=v*10+(c-48); i=i+1 } else { go=0 } } else { go=0 } } return v } called by 1: main |
| 19 | func tr_words(src: *u8, off: i64, len: i64) -> i64 called by 1: main |
| 36 | func main(argc: i64, argv: *i64) -> i64 |