code wiki / _hdl_build / nx_eco_graph_forest.nx

nx_eco_graph_forest.nx

buildroot/runtime/_hdl_build/nx_eco_graph_forest.nx

8528 B195 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind tooltopic eco
docsdependenciesstructsconstsfunctions

about

nx_eco_graph_forest.nx -- THE WHOLE TREE. Renders the ENTIRE ecosystem graph (all ~16k organs, all ~42k import edges) as one generational roots-to-god raster: god/roots at the apex, every organ placed by its longest-path-to-god generation, every import edge a ribbon converging upward. NOT a per-organ sample (operator 2026-07-16: "you just sampled not the whole tree") -- this IS the forest. Dense generations render as honest density bands; hubs (high Ca) get size + labels. DEFLATE PNG via nx_png. Usage: nx_eco_graph_forest <store-prefix> <out.png> [width] license_tier: ORIGINAL expect_exit:0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_eco_graph.nx nx_raster2d_lib.nx nx_png.nx nx_eco_graph_forest.nx

imports: nx_syscalls.nxnx_eco_graph.nxnx_raster2d_lib.nxnx_png.nx

imported by: nobody (leaf or entry point)

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

main fow sys_write foslen eg_load sys_mmap sov_get_ints sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 sov_get_copy sys_mmap ↻ ss_get ↻ sys_mmap ↻ fonum sys_mmap ↻ sys_write ↻ r2_fill_rect r2_px r2_char nx_font_5x7_glyph_row r2_px ↻ r2_ribbon_add r2_line_add r2_px_add eg_ca r2_px ↻ r2_fill_disk r2_px ↻ r2_ring

structs

none

consts

11const FO_MAGIC_20000: i64 = 20000
13const FO_LAYH: i64 = 190 // tall bands: the forest needs inter-generation air for 42k edge ribbons
14const FO_DEFW: i64 = 8000

functions

16func foslen(s: *u8) -> i64 { var n:i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: fow
17func fonum(v: i64) -> i64 { let b:*u8=sys_mmap(24); var m:i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t:*u8=sys_mmap(24); 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 j:i64=0; while j<k{b[j]=t[k-1-j];j=j+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
18func fow(s: *u8) -> i64 { sys_write(1, s, foslen(s)); return 0 }
called by 1: main calls 2: sys_writefoslen
20func main(argc: i64, argv: *i64) -> i64