code wiki / (root) / nx_learnmine_lib.nx

nx_learnmine_lib.nx

buildroot/runtime/nx_learnmine_lib.nx

17977 B435 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_learnmine_lib.nx -- LEARNING MINING: third-party how-to material as SUPPORTING GUIDES for the /compare rungs (operator 2026-09-06: farm archive.org, YouTube, Vimeo, DeviantArt and the rest for videos, transcripts and text that power the development rungs, so the boards carry third-party feedback and reference frames, not only the seat's own judgement). The evidence law is the operator's: a workflow video is a LIAR-KILLER (it proves the field can do the thing and shows how) or a REFERENCE FRAME (what the result looks like in that month); it is NEVER an oracle, and its month is its bar. This lib is the FIRST rung of the lane: the archive.org advancedsearch listing (output=json) of one creator or query, parsed from its own bytes into item rows and a census (media types, years, subjects) so a seat reads a 200-row digest instead of a quarter-megabyte of JSON. Every later rung (item files, subtitle mirrors through nx_srt and nx_webvtt, the YouTube caption track, the guide rows on <dom>.guides) composes this table; nothing here fetches -- the bytes come from nx_research_fetch under provenance, and the organ only reads what was mirrored. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_learnmine_lib.nx nx_learnmine.nx nx_learnmine_gate.nx

imports: nx_syscalls.nx

imported by: nx_learnmine.nxnx_learnmine_gate.nx

structs

none

consts

14const LM_QUOTE: i64 = 34
15const LM_BACKSLASH: i64 = 92
16const LM_LBRACE: i64 = 123
17const LM_RBRACE: i64 = 125
18const LM_LBRACKET: i64 = 91
19const LM_RBRACKET: i64 = 93
20const LM_COLON: i64 = 58
21const LM_COMMA: i64 = 44
22const LM_SPACE: i64 = 32
23const LM_NL: i64 = 10
24const LM_TAB: i64 = 9
25const LM_CR: i64 = 13
26const LM_PIPE: i64 = 124
27const LM_SLASH: i64 = 47
28const LM_SEMI: i64 = 59
29const LM_QMARK: i64 = 63
30const LM_UTF8_1: i64 = 128
31const LM_UTF8_2: i64 = 2048
32const LM_SURROGATE_LO: i64 = 55296
33const LM_SURROGATE_HI: i64 = 57344
34const LM_DATE_LEN: i64 = 10
35const LM_DESC_HEAD: i64 = 240
36const LM_FIELD_CAP: i64 = 65536
37const LM_SUBJ_CAP: i64 = 4096
38const LM_KEY_DOCS: *u8 = "\"docs\":"
39const LM_KEY_NUMFOUND: *u8 = "\"numFound\":"
40const LM_KEY_ID: *u8 = "\"identifier\":"
41const LM_KEY_TYPE: *u8 = "\"mediatype\":"
42const LM_KEY_DATE: *u8 = "\"date\":"
43const LM_KEY_TITLE: *u8 = "\"title\":"
44const LM_KEY_DESC: *u8 = "\"description\":"
45const LM_KEY_SUBJECT: *u8 = "\"subject\":"
46const LM_KEY_DOWNLOADS: *u8 = "\"downloads\":"
47const LM_TYPE_MOVIES: *u8 = "movies"
48const LM_TYPE_TEXTS: *u8 = "texts"
49const LM_TYPE_AUDIO: *u8 = "audio"
50const LM_TYPE_IMAGE: *u8 = "image"
51const LM_DASH: *u8 = "-"
53const LM_I_ID: i64 = 0
54const LM_I_TYPE: i64 = 1
55const LM_I_DATE: i64 = 2
56const LM_I_TITLE: i64 = 3
57const LM_I_DOWNLOADS: i64 = 4
58const LM_I_SUBJECTS: i64 = 5
59const LM_I_DESC: i64 = 6
60const LM_I_DESC_LEN: i64 = 7
61const LM_I_SLOTS: i64 = 8
63const LM_L_ITEMS: i64 = 0
64const LM_L_NUMFOUND: i64 = 1
65const LM_L_MOVIES: i64 = 2
66const LM_L_TEXTS: i64 = 3
67const LM_L_AUDIO: i64 = 4
68const LM_L_IMAGE: i64 = 5
69const LM_L_OTHER: i64 = 6
70const LM_L_NEWEST: i64 = 7
71const LM_L_OLDEST: i64 = 8
72const LM_L_TRUNCATED_DESCS: i64 = 9
73const LM_L_DOWNLOADS: i64 = 10
74const LM_L_SLOTS: i64 = 12
76const LM_OK: i64 = 0
77const LM_ERR_UNREADABLE: i64 = 0 - 1
78const LM_ERR_NO_DOCS: i64 = 0 - 2
79const LM_ERR_MALFORMED: i64 = 0 - 3
80const LM_ERR_CAPACITY: i64 = 0 - 4

functions

82func lm_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
83func lm_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
84func lm_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o + i] = s[i]; i = i + 1 } return o + i }
85func lm_dup(s: *u8, n: i64) -> *u8 { let d: *u8 = sys_mmap(n + 1); var i: i64 = 0; while i < n { d[i] = s[i]; i = i + 1 } d[n] = 0 as u8; return d }
86func lm_putd(d: *u8, o: i64, v: i64) -> i64
called by 1: ln_putn calls 1: sys_mmap
97func lm_err_name(e: i64) -> *u8
called by 1: main
106func lm_find(b: *u8, from: i64, end: i64, key: *u8) -> i64
called by 2: lm_valuelm_parse_listing calls 1: lm_len
117func lm_skip_ws(b: *u8, p: i64, end: i64) -> i64
131func lm_hexval(c: i64) -> i64
called by 1: lm_str
138func lm_put_cp(out: *u8, o: i64, cp: i64) -> i64
called by 1: lm_str
148func lm_row_byte(c: i64) -> i64
called by 1: lm_str
158func lm_str(b: *u8, p: i64, end: i64, out: *u8, cap: i64, outlen: *i64) -> i64
206func lm_value(b: *u8, s: i64, e: i64, key: *u8, out: *u8, cap: i64, sep: i64) -> i64
260func lm_atoi(s: *u8) -> i64
271func lm_obj_end(b: *u8, s: i64, end: i64) -> i64
called by 1: lm_parse_listing
290func lm_date_cmp(a: *u8, c: *u8) -> i64
called by 1: lm_parse_listing
302func lm_parse_listing(b: *u8, n: i64, items: *i64, cap: i64, lst: *i64) -> i64
384func lm_subjects(items: *i64, n: i64, subj: *i64, counts: *i64, cap: i64, full: *i64) -> i64
called by 2: mainmain calls 3: sys_mmaplm_streqlm_dup