code wiki / (root) / nx_learnmine_gate.nx

nx_learnmine_gate.nx

buildroot/runtime/nx_learnmine_gate.nx

14519 B194 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_learnmine_gate.nx -- THE LEARNING-MINING GATE (2026-09-06). An archive.org advancedsearch listing is assembled at runtime under /tmp/nx_learnmine_gate/ from bytes the gate writes itself (quotes, escapes, a unicode escape, an array-valued description and subject, a pipe and a newline inside a value, an item with no date and no downloads, a description longer than the announced head) and digested through the lib: the item count, the census by media type, newest and oldest dates, decoded and sanitised fields, the subject table ordered by count, the truncation announcement; then the refusals by name (an unclosed object, a listing without docs, an absent file) and the command through the ladder. usage: nx_learnmine_gate (no args) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_learnmine_lib.nx nx_learnmine_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_learnmine_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mkdir sys_mmap ↻ lg_build_listing lg_b lg_k lg_q lg_b ↻ lm_cat lg_b ↻ lm_cat ↻ lg_comma lg_b ↻ lg_kv lg_k ↻ lg_q ↻ lg_q ↻ gv_check gv_puts sys_write ↻ gv_check_eq gv_check ↻ gv_puts ↻ gv_num

structs

none

consts

14const LG_DIR: *u8 = "/tmp/nx_learnmine_gate"
15const LG_GOOD: *u8 = "/tmp/nx_learnmine_gate/listing.json"
16const LG_BAD: *u8 = "/tmp/nx_learnmine_gate/unclosed.json"
17const LG_NODOCS: *u8 = "/tmp/nx_learnmine_gate/nodocs.json"
18const LG_ABSENT: *u8 = "/tmp/nx_learnmine_gate/absent.json"
19const LG_ELF_LIVE: *u8 = "./nx_learnmine.elf"
20const LG_ELF_STAGE: *u8 = "./nx_learnmine.sov.elf.new"
21const LG_ELF_BUILD: *u8 = "buildroot/_build/nx_learnmine.sov.elf"
22const LG_DIR_MODE: i64 = 493
23const LG_FILE_MODE: i64 = 420
24const LG_CAP: i64 = 65536
25const LG_ITEMS: i64 = 4
26const LG_LONG_DESC: i64 = 300
27const LG_Q: i64 = 34
28const LG_BS: i64 = 92
29const LG_ID1: *u8 = "anime-nyan-mmd-physics-2025"

functions

31func lg_write_file(path: *u8, b: *u8, n: i64) -> i64
39func lg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
41func lg_b(buf: *u8, o: i64, c: i64) -> i64 { buf[o] = c as u8; return o + 1 }
42func lg_q(buf: *u8, o: i64, s: *u8) -> i64 { var p: i64 = lg_b(buf, o, LG_Q); p = lm_cat(buf, p, s); return lg_b(buf, p, LG_Q) }
43func lg_k(buf: *u8, o: i64, key: *u8) -> i64 { var p: i64 = lg_q(buf, o, key); return lg_b(buf, p, 58) }
called by 3: lg_kvlg_build_listingmain calls 2: lg_qlg_b
44func lg_kv(buf: *u8, o: i64, key: *u8, val: *u8) -> i64 { var p: i64 = lg_k(buf, o, key); return lg_q(buf, p, val) }
called by 1: lg_build_listing calls 2: lg_klg_q
45func lg_comma(buf: *u8, o: i64) -> i64 { return lg_b(buf, o, 44) }
called by 1: lg_build_listing calls 1: lg_b
47func lg_build_listing(buf: *u8, long: i64) -> i64
99func main(argc: i64, argv: *i64) -> i64