nx_grove.nx
buildroot/runtime/nx_grove.nx
about
nx_grove.nx -- patient multi-generational capital substrate.
Per META-CARDINAL feedback-regenerative-stewardship-doctrine-captain-moroni:
the substrate model that lets a 50-year forest or a 100-year ecosystem-
restoration project be financed and sustained, when conventional
discount-rate finance would call it worthless. REFUSES the conventional
5-10% discount rate that makes 100-year forests' NPV approach zero.
V1 ships sealed enum of capital classes + per-class discount-rate
override + multi-generation contribution tracking + steward succession.
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_grove_test.nx
structs
| 39 | struct NxGroveContribution |
| 50 | struct NxGrove |
consts
| 17 | const NX_GR_KIND_ENDOWMENT_PRINCIPAL: nx_int = 0 // never spent; only yield |
| 18 | const NX_GR_KIND_LAND_TRUST: nx_int = 1 |
| 19 | const NX_GR_KIND_CONSERVATION_EASEMENT: nx_int = 2 |
| 20 | const NX_GR_KIND_GENERATION_SKIPPING: nx_int = 3 // trust crossing generations |
| 21 | const NX_GR_KIND_INDIGENOUS_STEWARDSHIP: nx_int = 4 |
| 22 | const NX_GR_KIND_COMMUNITY_LAND_TRUST: nx_int = 5 |
| 23 | const NX_GR_KIND_LABOR_INKIND: nx_int = 6 // volunteer hours |
| 24 | const NX_GR_KIND_TEK_CONTRIBUTION: nx_int = 7 // traditional knowledge |
| 25 | const NX_GR_KIND_N: nx_int = 8 |
| 29 | const NX_GR_V_OK: nx_int = 0 |
| 30 | const NX_GR_V_ERR_INVALID_KIND: nx_int = 1 |
| 31 | const NX_GR_V_REFUSED_SHORT_HORIZON: nx_int = 2 // <5 year horizon refused |
| 32 | const NX_GR_V_REFUSED_EXTRACTION: nx_int = 3 // discount rate too high |
| 33 | const NX_GR_V_NULL: nx_int = 4 |
| 34 | const NX_GR_V_INVALID: nx_int = 5 |
| 35 | const NX_GR_V_N: nx_int = 6 |
| 48 | const NX_GR_CON_BYTES: nx_int = 40 |
| 60 | const NX_GR_BYTES: nx_int = 48 |
functions
| 62 | func nx_gr_kind_is_valid(k: nx_int) -> nx_int |
| 68 | func nx_gr_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 74 | func nx_gr_kind_is_in_perpetuity(k: nx_int) -> nx_int called by 1: main |
| 83 | func nx_gr_kind_is_in_kind(k: nx_int) -> nx_int called by 1: main |
| 89 | func nx_gr_new(grove_id: nx_int, |
| 111 | func _gr_contrib_at(g: *NxGrove, idx: nx_int) -> *NxGroveContribution |
| 118 | func nx_gr_add_contribution(g: *NxGrove, |
| 142 | func nx_gr_total_units_by_kind(g: *NxGrove, kind: nx_int) -> nx_size |
| 154 | func nx_gr_longest_horizon_years(g: *NxGrove) -> nx_int |
| 166 | func nx_gr_count_by_kind(g: *NxGrove, kind: nx_int) -> nx_int |