code wiki / _hdl_build / nx_figures_page.nx

nx_figures_page.nx

buildroot/runtime/_hdl_build/nx_figures_page.nx

9752 B150 linesdepth 10pulls 21 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_figures_page.nx -- IMS Thrust D R2 LIVE page: emit /wiki/figures.html with a NATIVE SVG bar chart inline + working DOWNLOAD links to the SAME dataset in CSV / JSON / TSV. EVERY artifact is computed at render time by the sovereign organs (no hand-typed SVG, no hand-typed data files): - chart_svg (nx_chart) -> the inline <svg> bar chart. - dx_emit_csv/json/tsv (nx_dataset_export) -> the 3 downloadable data files (written to web_assets/). - ims_page (nx_ims_page) -> the walkable typed wiki page (head/nav/walk-furniture/footer). REAL DATASET (not invented): the live wiki's own page-count growth across the IMS rungs (8 -> 12 -> 13 -> 20 -> 21 -> 22 with this page). The chart visualises it; the 3 files let a consumer download it. Output: web_assets/figures.html + web_assets/figures_data.{csv,json,tsv}. Publishing (vpub for the page, nx_aw_push for the 3 data files) is the SEPARATE step nx_figures_publish. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_chart.nx nx_dataset_export.nx nx_ims_page.nx nx_figures_page.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_chart.nxnx_dataset_export.nxnx_ims_page.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 dx_alloc sys_mmap ↻ dx_set_hdr dx_set_cell_z dx_set_cell dx_emit_csv dx_emit_csv_field dx_field_needs_quote dx_emit_json dx_emit_json_str dx_emit_tsv fp_w sys_write sys_exit fp_write sys_mmap ↻ fp_cat sys_openat_wr sys_write ↻ sys_close dx_cell_ptr dx_cell_len chart_svg ch_maxv ch_nice_top vsh_lit vsh_n sys_mmap ↻ sys_mmap ↻ va_axis_left sys_mmap ↻ vs_ticks vs_linear vsh_lit ↻ vsh_n ↻ vs_linear ↻ fp_cat ↻ fp_catn

structs

none

consts

18const FP_MAGIC_16384: i64 = 16384
20const FP_BODYCAP: i64 = 65536
21const FP_MODE_0644: i64 = 0x1a4

functions

23func fp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != 0 as u8 { dst[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 2: fp_writemain
24func fp_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
33func fp_w(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 calls 1: sys_write
39func fp_catn_stdout(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
42func fp_write(name: *u8, buf: *u8, len: i64) -> i64
55func main() -> i64