code wiki / _hdl_build / nx_analyst_html.nx

nx_analyst_html.nx

buildroot/runtime/_hdl_build/nx_analyst_html.nx

13988 B249 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind tooltopic analyst
docsdependenciesstructsconstsfunctions

about

nx_analyst_html.nx -- the HUMAN LAYER (AN11): sovereign NishiLang -> HTML report. The operator's law: grow the sophistication AND make it easier for a person to understand. Everything below is regenerated from the DATA (ac_vs_pc_v2.led + ac_markets.cmp + evidence_ledger.tsv) -- the page is a VIEW, never a second source of truth. Static HTML+CSS only (JS-last-mile doctrine: no hand-authored app logic). Deterministic: same inputs -> byte-identical page, proven by double-generation hash compare. Output: knowledge/analyst_report.html. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_ledger_data.nx nx_market_cmp.nx nx_sha256.nx nx_syscalls.nx nx_analyst_html.nx

imports: nx_ledger_data.nxnx_market_cmp.nxnx_sha256.nxnx_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_mmap ah_generate sys_mmap ↻ ld_parse_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ld_parse ld_alloc sys_mmap ↻ ld_line_end ld_line ld_skip sys_mmap ↻ ld_ints sys_mmap ↻ ld_int sg_valid ld_eval sys_mmap ↻ ld_strict_kinds sys_mmap ↻ an_is_leaf ld_node_support sys_mmap ↻ ld_class_best sg_score_permil sg_has_opposed an_closure_fails an_is_leaf ↻ an_children_sum an_closure_ppm an_narrative_admitted an_traced_cents an_is_leaf ↻

structs

none

consts

11const AH_MAGIC_4000: i64 = 4000
13const AH_CAP: i64 = 1048576

functions

15func ah_s(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){buf[off+i]=s[i];i=i+1} return off+i }
16func ah_n(buf: *u8, off: i64, v: i64) -> i64
called by 2: ah_usdah_pct calls 1: sys_mmap
29func ah_usd(buf: *u8, off: i64, cents: i64) -> i64
called by 2: ah_barah_generate calls 2: ah_sah_n
34func ah_pct(buf: *u8, off: i64, permil: i64) -> i64
called by 2: ah_barah_generate calls 2: ah_nah_s
42func ah_bar(buf: *u8, off: i64, label: *u8, cents: i64, permil: i64, cls: *u8) -> i64
called by 1: ah_generate calls 3: ah_sah_pctah_usd
56func ah_mkt_label(i: i64) -> *u8
called by 1: ah_generate
64func ah_generate(buf: *u8) -> i64
175func ah_write(path: *u8, buf: *u8, n: i64) -> i64
188func ah_wf(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 }
called by 1: main calls 1: sys_write
189func ah_wnf(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 }
called by 1: main calls 2: sys_mmapsys_write
191func ah_has(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main
205func main() -> i64