code wiki / (root) / nx_math_page.nx

nx_math_page.nx

buildroot/runtime/nx_math_page.nx

30564 B439 linesdepth 6pulls 15 transitivereach 1 importersview sourcekind tooltopic math
docsdependenciesstructsconstsfunctions

about

nx_math_page.nx -- THE /math SURFACE: a math workbench from the youngest kids to research. OPERATOR, 2026-09-03: "we want to be superior to systems like mathway ... have the alpha ui testing area at nishifamily.com/math and have it fun and easy to use from youngest kids to most advanced mathmaticians with math games and interoprability and all that", and earlier the same day: "a ui for applied math with the ability in nishi lang to do latex and other type emissions so that we can do math in the ui and have it be beautiful and supported by nishi advertsing so schools and universities can advertise as options to show support for our development". EVERY FORMULA ON THIS PAGE IS TYPESET BY nx_mathml_lib AT EMIT TIME. Nothing is hand-written MathML and nothing is an image: the page is the typesetter's own dogfood, so a defect in the converter shows up on the published surface rather than hiding in a test. MathML is rendered NATIVELY by the browser, so this page carries NO script, NO web font, NO tracker and NO third-party runtime of any kind -- which is the standing rule that the oracle stays outside and nothing foreign enters the run path. THE GAMES ARE THE INCUMBENT'S. nx_math_games already carried parity, factors, patterns, pigeonhole, triangle numbers, Hanoi, coin outcomes, Caesar, magic squares and Fibonacci; this page COMPOSES them and computes every displayed answer by CALLING them, so a number shown here is a number the estate really produced rather than a figure typed into a template. HONESTY ABOUT THE BAR. Mathway and its peers solve arbitrary algebra step by step. We do not do that yet, and the page SAYS SO in the same breath as the axes where we are genuinely ahead. A comparison page that hides the rival's strength is an advertisement, not a measurement. license_tier: ORIGINAL

dependencies 6 imports · 1 importers

syscalls.nx nx_mathml_lib.nx nx_math_games.nx nx_solve_steps_lib.nx nx_eqparse_lib.nx nx_result.nx nx_math_page.nx nx_math_serve.nx

imports: syscalls.nxnx_mathml_lib.nxnx_math_games.nxnx_solve_steps_lib.nxnx_eqparse_lib.nxnx_result.nx

imported by: nx_math_serve.nx

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

main mp_render mp_put mp_slen mp_style mp_put ↻ mp_attr mp_put ↻ eq_parse eq_is_digit eq_err_name ss_steps_quadratic ss_row ss_put ss_slen ss_num ss_put ↻ ss_put ↻ ss_end ss_put ↻ nx_isqrt ss_rational ss_gcd ss_num ↻ ss_put ↻ ss_steps_linear ss_row ↻ ss_linear_lhs ss_put ↻ ss_num ↻ ss_put ↻ ss_num ↻ ss_end ↻ ss_rational ↻ mp_worked mp_put ↻ mp_math mp_slen ↻ lm_to_mathml lm_lit

structs

none

consts

33const MP_CAP: i64 = 262144
34const MP_MATH_CAP: i64 = 8192

functions

36func mp_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 3: mp_putmp_mathmain
40func mp_put(b: *u8, off: i64, s: *u8) -> i64
49func mp_num(b: *u8, off: i64, v: i64) -> i64
called by 1: mp_example calls 1: mp_put
71func mp_math(b: *u8, off: i64, latex: *u8, display: i64) -> i64
96func mp_card(b: *u8, off: i64, title: *u8, body: *u8) -> i64
called by 1: mp_render calls 1: mp_put
105func mp_style(b: *u8, off: i64) -> i64
called by 1: mp_render calls 1: mp_put
159func mp_attr(b: *u8, off: i64, s: *u8, n: i64) -> i64
called by 1: mp_render calls 1: mp_put
179func mp_worked(b: *u8, off: i64, title: *u8, steps: *u8, n: i64) -> i64
called by 1: mp_render calls 2: mp_putmp_math
215func mp_example(b: *u8, off: i64, title: *u8, latex: *u8, label: *u8, value: i64) -> i64
called by 1: mp_render calls 3: mp_putmp_mathmp_num
232func mp_render(b: *u8, eq: *u8, eqn: i64) -> i64
401func main(argc: i64, argv: *i64) -> i64