code wiki / (root) / nx_learnmine.nx

nx_learnmine.nx

buildroot/runtime/nx_learnmine.nx

5932 B106 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_learnmine.nx -- THE LEARNING-MINING COMMAND (operator 2026-09-06: farm creators and archives for videos, transcripts and how-to text as supporting guides for the /compare rungs). Rung 1: digest an archive.org advancedsearch listing (output=json, mirrored by nx_research_fetch) into item rows and a census, so a seat reads two hundred rows instead of a quarter-megabyte. usage: nx_learnmine items <listing.json> [max] one ITEM row per item (idx, identifier, mediatype, date, downloads, title, subjects) and a DESC row per described item (full length announced, head shown) nx_learnmine subjects <listing.json> [top] the subject frequency table, count descending (a FLOOR when the table filled) nx_learnmine census <listing.json> the summary line only rows are pipe-separated and every field is sanitised (a pipe in the source becomes a slash, a newline a space), so a row is one line and the summary is LAST. exits: 0 digested (GREEN) - 2 usage - 3 refused by name (UNREADABLE, NO-DOCS, MALFORMED, CAPACITY). Nothing here fetches: the bytes come from the provenance-journalled mirror. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_learnmine_lib.nx nx_learnmine.nx

imports: nx_syscalls.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 ln_usage ln_puts sys_write lm_len lm_streq 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_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ln_puts ↻ ln_kv ln_puts ↻ lm_parse_listing sys_mmap ↻ lm_value lm_find lm_len ↻ lm_skip_ws sys_mmap ↻ lm_str sys_mmap ↻

structs

none

consts

15const LN_EXIT_OK: i64 = 0
16const LN_EXIT_USAGE: i64 = 2
17const LN_EXIT_REFUSED: i64 = 3
18const LN_MAX_ITEMS: i64 = 4096
19const LN_DEFAULT_TOP: i64 = 40
20const LN_VERB_ITEMS: *u8 = "items"
21const LN_VERB_SUBJECTS: *u8 = "subjects"
22const LN_VERB_CENSUS: *u8 = "census"

functions

24func ln_puts(s: *u8) -> i64 { sys_write(1, s, lm_len(s)); return 0 }
25func ln_putn(v: i64) -> i64 { let t: *u8 = sys_mmap(32); let e: i64 = lm_putd(t, 0, v); sys_write(1, t, e); return 0 }
called by 2: ln_kvnmain calls 3: sys_mmaplm_putdsys_write
26func ln_kv(k: *u8, v: *u8) -> i64 { ln_puts(" " as *u8); ln_puts(k); ln_puts("=" as *u8); ln_puts(v); return 0 }
called by 2: ln_summarymain calls 1: ln_puts
27func ln_kvn(k: *u8, v: i64) -> i64 { ln_puts(" " as *u8); ln_puts(k); ln_puts("=" as *u8); ln_putn(v); return 0 }
called by 2: ln_summarymain calls 2: ln_putsln_putn
28func ln_sep() -> i64 { ln_puts("|" as *u8); return 0 }
called by 1: main calls 1: ln_puts
29func ln_usage() -> i64
called by 1: main calls 1: ln_puts
33func ln_summary(lst: *i64) -> i64
called by 1: main calls 3: ln_putsln_kvnln_kv
44func main(argc: i64, argv: *i64) -> i64