code wiki / _hdl_build / nx_dataeng_compare_page.nx

nx_dataeng_compare_page.nx source

↩ module page · 109 lines · 9685 B

1// nx_dataeng_compare_page.nx -- GENERATOR: the /compare/dataeng page. ★07-10 v2 = COMPOSES THE KIT, NOT hand- 2// rolled CSS. The design/taste now lives in the SYSTEM's canonical shell (nx_sclass_kit content-tier: sk_doc_*/ 3// sk_score_*/sk_dtable_*/sk_drow) -- this page is pure DATA + composition, ZERO inline CSS. So the quality is a 4// TOOL the whole compare fleet can adopt by composing the same kit (fixes OUR tools, not one page). Renders the 5// MEASURED census state (616/1000). Self-verified emission. license_tier: ORIGINAL expect_exit: 0 6import "nx_syscalls.nx" 7import "nx_sclass_kit.nx" 8const K_MAGIC_262144: i64 = 262144 9 10func dc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } 11func dc_has(hay: *u8, n: i64, needle: *u8) -> i64 { 12 var nl: i64 = 0 13 while needle[nl] != (0 as u8) { nl = nl + 1 } 14 var i: i64 = 0 15 while i + nl <= n { var j: i64 = 0; var eq: i64 = 1; while j < nl { if hay[i+j] != needle[j] { eq = 0; break } j = j + 1 } if eq == 1 { return 1 } i = i + 1 } 16 return 0 17} 18func dc_wfile(path: *u8, buf: *u8, n: i64) -> i64 { 19 let fd: i64 = sys_openat_wr(path, 0x1A4) 20 if fd < 0 { return 0 } 21 let wr: i64 = sys_write(fd, buf, n) 22 sys_close(fd) 23 if wr != n { return 0 } 24 return 1 25} 26 27func main() -> i64 { 28 let cap: i64 = K_MAGIC_262144 29 let out: *u8 = sys_mmap(cap) 30 31 // ---- compose the SYSTEM kit's content-tier shell (design lives in the tool, not here) ---- 32 var o: i64 = sk_doc_open(out, 0, "Data Engineering &amp; Analytics - Nishi Compare" as *u8, "Nishi Compare" as *u8, "/compare" as *u8) 33 o = sk_nav_item(out, o, "All comparisons" as *u8, "/compare" as *u8) 34 o = sk_header_close(out, o) 35 o = sk_doc_main(out, o) 36 37 o = sk_doc_h1(out, o, "Data Engineering &amp; Analytics" as *u8, "Nishi's sovereign, integer-exact analytics stack &mdash; measured against dbt, Spark, DuckDB, ClickHouse, Arrow, pandas/Polars, Superset, DataSketches and OpenLineage. Every score is graded by nx_dataeng_sota_census with a liar-kill (each axis opens a real organ); this page is generated from that state, never hand-asserted." as *u8) 38 39 o = sk_score_open(out, o, "616" as *u8, "meet-SOTA / 1000" as *u8) 40 o = sk_stat(out, o, "10" as *u8, "Have" as *u8) 41 o = sk_stat(out, o, "13" as *u8, "Partial" as *u8) 42 o = sk_stat(out, o, "5" as *u8, "Gap" as *u8) 43 o = sk_stat(out, o, "2" as *u8, "Exceed" as *u8) 44 o = sk_score_close(out, o) 45 o = sk_lede(out, o, "30 axes &middot; 0 ungrounded (liar-kill armed). Started this arc at 333 &mdash; the area flagged &quot;toy level&quot;; +283 across 8 gated organs." as *u8) 46 o = sk_callout(out, o, "<strong>The honest read:</strong> real primitives existed but sat unwired. A gated analytics engine was built on them &mdash; point at columns (in-memory or from the sovereign store), get exact or approximate aggregates, a plain-English profile, the relationships between them, trends over time, and query them. Integer-exact means bit-reproducible aggregates &mdash; a determinism edge float tools cannot match." as *u8) 47 48 o = sk_h2(out, o, "The gated analytics stack" as *u8) 49 o = sk_dtable_open(out, o, "Organ" as *u8, "Gate" as *u8, "Capability" as *u8) 50 o = sk_trow(out, o, "<code>nx_dataframe</code>" as *u8, "9/9" as *u8, "exact aggregation: count / sum / min / max / mean / variance / stddev / quantile / filter / GROUP BY / join" as *u8) 51 o = sk_trow(out, o, "<code>nx_dataframe_approx</code>" as *u8, "5/5" as *u8, "HLL distinct + t-digest quantile at scale, measured vs exact truth (HLL 6 permil error)" as *u8) 52 o = sk_trow(out, o, "<code>nx_analyst_data</code>" as *u8, "6/6" as *u8, "profile any column + plain-English read (categorical / id / constant / skew / outliers)" as *u8) 53 o = sk_trow(out, o, "<code>nx_analyst_multi</code>" as *u8, "8/8" as *u8, "Pearson correlation + strength class + key-driver finder" as *u8) 54 o = sk_trow(out, o, "<code>nx_analyst_report</code>" as *u8, "5/5" as *u8, "&quot;analyze this dataset&quot; front door &mdash; composes the whole stack into one report" as *u8) 55 o = sk_trow(out, o, "<code>nx_timeseries</code>" as *u8, "6/6" as *u8, "rolling mean + least-squares trend + growth over time" as *u8) 56 o = sk_trow(out, o, "<code>nx_analyst_store</code>" as *u8, "4/4" as *u8, "runs the whole stack on real stored data &mdash; seg_store scan &rarr; extract &rarr; analyze" as *u8) 57 o = sk_trow(out, o, "<code>nx_query</code>" as *u8, "7/7" as *u8, "query executor: SELECT count/sum/avg/min/max(col) WHERE col op val GROUP BY col, integer-exact" as *u8) 58 o = sk_dtable_close(out, o) 59 60 o = sk_h2(out, o, "Census axes vs SOTA" as *u8) 61 o = sk_dtable_open(out, o, "Axis" as *u8, "Status" as *u8, "Grounding" as *u8) 62 o = sk_drow(out, o, "Aggregation front door" as *u8, "have" as *u8, "HAVE" as *u8, "count/sum/avg/min/max/percentile over a column, integer-exact (nx_dataframe)" as *u8) 63 o = sk_drow(out, o, "Descriptive stats (general)" as *u8, "have" as *u8, "HAVE" as *u8, "mean/var/stddev/quantile over arbitrary columns" as *u8) 64 o = sk_drow(out, o, "Approx analytics at scale" as *u8, "have" as *u8, "HAVE" as *u8, "HLL distinct + t-digest, measured vs exact (killed the unmeasured-claim debt)" as *u8) 65 o = sk_drow(out, o, "Multivariate correlation" as *u8, "have" as *u8, "HAVE" as *u8, "Pearson + key-driver; discovered price~5*size-2*age from data alone" as *u8) 66 o = sk_drow(out, o, "General data analyst" as *u8, "have" as *u8, "HAVE" as *u8, "profile + find patterns + explain a whole dataset (nx_analyst_report)" as *u8) 67 o = sk_drow(out, o, "Stored-data analytics" as *u8, "have" as *u8, "HAVE" as *u8, "the analyst runs on real seg_store records (round-trip proven)" as *u8) 68 o = sk_drow(out, o, "Query engine" as *u8, "partial" as *u8, "PARTIAL" as *u8, "SELECT agg WHERE GROUP BY executor, integer-exact (nx_query 7/7); string-syntax parser = finer gap" as *u8) 69 o = sk_drow(out, o, "Timeseries analytics" as *u8, "partial" as *u8, "PARTIAL" as *u8, "rolling/trend/growth done; resample + seasonality = finer gap" as *u8) 70 o = sk_drow(out, o, "Quantile sketch" as *u8, "partial" as *u8, "PARTIAL" as *u8, "t-digest tail-tight (p99 10 permil) but median coarse; interpolation follow-on" as *u8) 71 o = sk_drow(out, o, "Columnar format" as *u8, "partial" as *u8, "PARTIAL" as *u8, "nx_seg_columnar RLE+dict primitive; unwired to a query layer" as *u8) 72 o = sk_drow(out, o, "Data lineage" as *u8, "partial" as *u8, "PARTIAL" as *u8, "nx_store_lineage: organ-&gt;store PRODUCER/CONSUMER edges (OpenLineage-class)" as *u8) 73 o = sk_drow(out, o, "Data contracts" as *u8, "partial" as *u8, "PARTIAL" as *u8, "nx_seg_schema: Avro-class schema + backward/forward evolution-safety" as *u8) 74 o = sk_drow(out, o, "Transform DAG (dbt-class)" as *u8, "gap" as *u8, "GAP" as *u8, "models + data tests + docs + semantic layer" as *u8) 75 o = sk_drow(out, o, "Vectorized / distributed exec" as *u8, "gap" as *u8, "GAP" as *u8, "batch/vectorized + multi-node (blocked-adjacent: the 1-core threading gap)" as *u8) 76 o = sk_drow(out, o, "BI dashboard" as *u8, "gap" as *u8, "GAP" as *u8, "query-driven interactive dashboards (needs the UI arc)" as *u8) 77 o = sk_drow(out, o, "Arrow interchange" as *u8, "gap" as *u8, "GAP" as *u8, "zero-copy columnar interchange format" as *u8) 78 o = sk_dtable_close(out, o) 79 80 o = sk_h2(out, o, "Sovereign exceeds" as *u8) 81 o = sk_dtable_open(out, o, "Axis" as *u8, "Status" as *u8, "Why beyond mainstream" as *u8) 82 o = sk_drow(out, o, "Integer-exact analytics" as *u8, "exceed" as *u8, "EXCEED" as *u8, "100%-integer aggregates are bit-reproducible; DuckDB/pandas float sums are order-dependent, ours are not" as *u8) 83 o = sk_drow(out, o, "Own-stack, zero deps" as *u8, "exceed" as *u8, "EXCEED" as *u8, "the whole primitive stack (HLL++/t-digest/columnar/store) is sovereign &mdash; no Arrow/DataSketches/JVM" as *u8) 84 o = sk_dtable_close(out, o) 85 86 o = sk_h2(out, o, "Honest remaining gaps" as *u8) 87 o = sk_lede(out, o, "Five GAPs &mdash; a transform-DAG, vectorized + distributed execution (blocked on the 1-core threading gap), a BI dashboard, and Arrow interchange. The next make-it-real step is scaling the stored-data path past the 256-per-key store cap. Every score here is measured and re-runnable." as *u8) 88 89 o = sk_doc_close(out, o, "Generated by <code>nx_dataeng_compare_page</code> composing the sovereign S-class kit &mdash; TLS 1.3, no third-party web server, no external fonts or assets. <a href=\"/compare\">Back to the compare hub</a>" as *u8, "Nishi Compare" as *u8) 90 91 let ok: i64 = dc_wfile("knowledge/staging/dataeng/compare_dataeng.html", out, o) 92 var good: i64 = ok 93 let vbox: *i64 = sys_mmap(8) as *i64 94 vbox[0] = 0 95 let vc: *u8 = sys_read_file("knowledge/staging/dataeng/compare_dataeng.html" as *u8, vbox) 96 if (vc as i64) == 0 { good = 0 } else { 97 if dc_has(vc, vbox[0], "616" as *u8) == 0 { good = 0 } 98 if dc_has(vc, vbox[0], "nx_query" as *u8) == 0 { good = 0 } 99 if dc_has(vc, vbox[0], "var(--nx-color" as *u8) == 0 { good = 0 } 100 if dc_has(vc, vbox[0], "prefers-color-scheme" as *u8) == 0 { good = 0 } 101 if dc_has(vc, vbox[0], "skip-link" as *u8) == 0 { good = 0 } 102 if dc_has(vc, vbox[0], "<main id=" as *u8) == 0 { good = 0 } 103 if dc_has(vc, vbox[0], "chip-have" as *u8) == 0 { good = 0 } 104 } 105 if good == 1 { dc_puts("DATAENG-COMPARE-PAGE verdict=GREEN (composes nx_sclass_kit content-tier)\n" as *u8); sys_exit(0); return 0 } 106 dc_puts("DATAENG-COMPARE-PAGE verdict=RED\n" as *u8) 107 sys_exit(1) 108 return 1 109}