code wiki / _hdl_build / nx_cascade.nx

nx_cascade.nx

buildroot/runtime/_hdl_build/nx_cascade.nx

1366 B17 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic cascade
docsdependenciesstructsconstsfunctions

about

nx_cascade.nx -- LIB: the EVOLVING second-life CASCADE marketplace. When a part is replaced with a better one (the evolving regime), it still has remaining life -- instead of scrapping it, it CASCADES down tiers (wealthy / data center -> middle class -> poor / schools / non-profits) with government help. Each tier uses the remaining life, pays a declining price (the bottom free, gov+non-profit subsidized), so the FULL life is used (near-zero waste) and the per-year hardware/energy cost DECLINES as it cascades, while the top tier keeps upgrading -- a win-win-win. (The solar-panel roof-cascade idea: the wealthy pass down to the middle pass down to the poor.) never-brick #26: pure arithmetic, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_cascade.nx nx_cascade_gate.nx

imports: nx_syscalls.nx

imported by: nx_cascade_gate.nx

structs

none

consts

none

functions

11func casc_total_years(years: *i64, n: i64) -> i64 { var s: i64=0; var i: i64=0; while i<n { s=s+years[i]; i=i+1 } return s }
called by 1: main
14func casc_util_permil(used: i64, full: i64) -> i64 { if full<=0 { return 0 } return used*1000/full }
called by 1: main
17func casc_annual_cost(price: i64, years: i64) -> i64 { if years<=0 { return 0 } return price/years }
called by 1: main