code wiki / _hdl_build / nx_wiki_viz_atlas.nx

nx_wiki_viz_atlas.nx source

↩ module page · 54 lines · 4122 B

1// nx_wiki_viz_atlas.nx -- the STRUCTURED entry point for the Nishi Visualization Suite, built through the 2// wiki page builder (nx_wiki_shell) so it is itself an S-class wiki page: a live index of the navigable charts 3// (genealogy, code-genealogy, + future) so the ecosystem's information is EXPOSED + STRUCTURED on the wiki, 4// not random local files. Emits web_assets/viz_atlas.html -> nishifamily.com/wiki/atlas.html. license_tier: ORIGINAL 5import "nx_syscalls.nx" 6import "nx_wiki_shell.nx" 7 8const VA_OUT: *u8 = "web_assets/viz_atlas.html" 9const VA_CAP: i64 = 131072 10 11func main() -> i64 { 12 let now: i64 = sys_now_realtime_sec() 13 let h: *u8 = sys_mmap(VA_CAP) 14 var w: i64 = 0 15 16 w = sh_head(h, w, "Visualization Atlas" as *u8, "atlas" as *u8) 17 w = sh_nav(h, w, "atlas" as *u8) 18 w = sh_cat(h, w, "<h1>Nishi Visualization Atlas</h1>\n" as *u8) 19 w = sh_cat(h, w, "<p class=\"fresh\">&#10227; Live index generated by <code>nx_wiki_viz_atlas</code> at epoch=" as *u8) 20 w = sh_catn(h, w, now) 21 w = sh_cat(h, w, " &mdash; every chart is a sovereign SVG (no mermaid.js / d3.js), data-driven, navigable.</p>\n" as *u8) 22 w = sh_cat(h, w, "<p class=\"lede\">The ecosystem's information, parseable: each dataset is rendered as a navigable chart you can search, jump through, and zoom &mdash; not a file to open, a page on the wiki.</p>\n" as *u8) 23 24 w = sh_infobox_open(h, w, "Visualization Suite" as *u8) 25 w = sh_infobox_row(h, w, "Engine" as *u8, "nx_mindmap (data-driven, column-configurable)" as *u8) 26 w = sh_infobox_row(h, w, "Output" as *u8, "navigable HTML + inline native SVG, no app-JS" as *u8) 27 w = sh_infobox_row(h, w, "Charts live" as *u8, "2 (genesis + code genealogy)" as *u8) 28 w = sh_infobox_close(h, w) 29 30 w = sh_section(h, w, "charts" as *u8, "The charts (live, navigable)" as *u8) 31 w = sh_cat(h, w, "<ul>\n" as *u8) 32 w = sh_cat(h, w, "<li><a href=\"/wiki/genealogy.html\"><strong>Genesis genealogy</strong></a> &mdash; god &rarr; adam/eve (1/0) &rarr; the fragmentation/unification axes &rarr; the IO endpoint. <strong>83 nodes, color-coded by SOVEREIGNTY</strong> (green=sovereign, red=third-party/locked, amber=building) so you can SEE where the locks are. The hardware-up lineage.</li>\n" as *u8) 33 w = sh_cat(h, w, "<li><a href=\"/wiki/code-genealogy.html\"><strong>Code genealogy</strong></a> &mdash; the GENEALOGIST's lineage ledger: <strong>76 organs</strong>, each with its parents + the <em>why</em> it evolved (the COMPREHENSIBILITY law &mdash; clarity on why things are happening, changing).</li>\n" as *u8) 34 w = sh_cat(h, w, "</ul>\n" as *u8) 35 w = sh_cat(h, w, "<p class=\"why\">Each page: a sidebar index grouped by category &rarr; click any node to jump + highlight it, Ctrl+F to search, scroll/zoom to pan. Self-contained, organ-emitted.</p>\n" as *u8) 36 37 w = sh_section(h, w, "how" as *u8, "How it works (one reusable engine)" as *u8) 38 w = sh_cat(h, w, "<p><code>nx_mindmap &lt;tsv&gt; &lt;out.html&gt; [id parent color label]</code> ingests ANY node/parent TSV (you name the columns), computes a layered tree layout, and emits the navigable page bits-up. The same engine rendered both charts above from two different schemas. Point it at any tree &mdash; the family genealogy, the 1200+ workstreams, the arc-map &mdash; and it parses it into a chart. Next: those datasets, mermaid-in-docs, 3D, and an autonomous re-render pulse.</p>\n" as *u8) 39 40 w = sh_footer(h, w, "atlas" as *u8, now) 41 42 let fd: i64 = sys_openat_wr(VA_OUT, 0x1a4) 43 if fd < 0 { sys_write(2, "FATAL: cannot open viz_atlas.html\n" as *u8, 34); sys_exit(2); return 2 } 44 sys_write(fd, h, w) 45 sys_close(fd) 46 sys_write(1, "[nx_wiki_viz_atlas] wrote viz_atlas.html bytes=" as *u8, 47) 47 let nb: *u8 = sys_mmap(28); var k2: i64 = 0; var m2: i64 = w 48 if m2 == 0 { nb[0] = 48 as u8; k2 = 1 } 49 while m2 > 0 { nb[k2] = (48 + (m2 % 10)) as u8; m2 = m2 / 10; k2 = k2 + 1 } 50 var q: i64 = k2 - 1; while q >= 0 { let o1: *u8 = sys_mmap(1); o1[0] = nb[q]; sys_write(1, o1, 1); q = q - 1 } 51 sys_write(1, "\n" as *u8, 1) 52 sys_exit(0) 53 return 0 54}