nx_lbclimb.nx
buildroot/runtime/nx_lbclimb.nx
about
nx_lbclimb.nx -- CLI over nx_lbclimb_lib (search R0d, ecosystem EC62, 2026-09-17): the estate answers "what ladder
do we climb to beat the leader" from DATA -- the domain's plan (dated targets, contender rungs, climbboard and
climbgate rows) joined with its leaderboard file (rival rows, the estate's own measured row).
nx_lbclimb <domain> [board] [journal=<path>]
journal=<path> appends ONE row per judged board (lbclimb|epoch|domain|board|target|leader=..|...|VERDICT), built in a
buffer and written with one write, so a daily beat leaves a time spine of where the estate stands against the leader.
Per board: the leader, the estate's score and rank, then every contender toward the board's target in floor order
(the rank its gate reaches, whether that moves the estate's rank, whether it clears the leader), the partition
contenders = gated + ungated + nogate + badfloor, strays and duplicate gates, and the verdict LAST.
exit 0 REACHES | 1 SHORT or BADTARGET | 2 usage | 3 abstain (NOGATES, NOBOARD, no climbboard row, no plan)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 2
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_barfresh_lib.nxnx_ladder_lib.nxnx_leaderboard_lib.nxnx_lbclimb_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const LCC_ARG_DOMAIN: i64 = 1 |
| 19 | const LCC_ARG_BOARD: i64 = 2 |
| 20 | const LCC_EXIT_USAGE: i64 = 2 |
| 21 | const LCC_STDOUT: i64 = 1 |
| 22 | const LCC_NUM_CAP: i64 = 24 |
| 23 | const LCC_BOARD_CAP: i64 = 16 |
| 24 | const LCC_TEN: i64 = 10 |
| 25 | const LCC_LB_SUFFIX: *u8 = ".leaderboard" |
| 26 | const LCC_TITLE_MAX: i64 = 96 |
| 27 | const LCC_JRNL_PFX: *u8 = "journal=" |
| 28 | const LCC_JRNL_PFX_LEN: i64 = 8 |
| 29 | const LCC_ROW_CAP: i64 = 768 |
| 30 | const LCC_MODE_644: i64 = 420 |
| 31 | const LCC_CLOCK_WORDS: i64 = 2 |
| 32 | const LCC_NOFD: i64 = 0 - 1 |
functions
| 34 | func lcc_w(s: *u8) -> i64 { return sys_write(LCC_STDOUT, s, bf_slen(s)) } |
| 35 | func lcc_wn(v: i64) -> i64 |
| 48 | func lcc_wspan(buf: *u8, off: i64, len: i64) -> i64 |
| 53 | func lcc_wscore(v: i64) -> i64 |
| 60 | func lcc_bcat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { if p < LCC_ROW_CAP - 2 { d[p] = s[i]; p = p + 1 } i = i + 1 } return p } |
| 61 | func lcc_bspan(d: *u8, o: i64, buf: *u8, off: i64, len: i64) -> i64 { var i: i64 = 0; var p: i64 = o; while i < len { if p < LCC_ROW_CAP - 2 { d[p] = buf[off + i]; p = p + 1 } i = i + 1 } return p } called by 1: lcc_board |
| 62 | func lcc_bnum(d: *u8, o: i64, v: i64) -> i64 |
| 73 | func lcc_bscore(d: *u8, o: i64, v: i64) -> i64 |
| 81 | func lcc_read_lb(dom: *u8, lenp: *i64) -> *u8 |
| 92 | func lcc_gate_line(pbuf: *u8, pn: i64, k: *i64, q: i64, erank: i64, leader: i64) -> i64 |
| 128 | func lcc_board(dom: *u8, pbuf: *u8, pn: i64, lbuf: *u8, ln: i64, b: *i64, bi: i64, jfd: i64) -> i64 |
| 217 | func main(argc: i64, argv: *i64) -> i64 |