nx_help.nx
buildroot/runtime/nx_help.nx
about
nx_help.nx -- substrate-native S-class help / search engine.
User mandate 2026-05-13: 'this should allow nishilang to have its
own native search engine of itself a true s class help'.
Single entry point that unifies search across:
- nx_jargon terminology + cross-discipline aliases
- nx_qed_db theorem entries with verify_status
- nx_question_genealogy why-chains
- (queued) theorem cards from THEOREM_CATALOG
Sealed result kinds; tier-appropriate answers; no external network;
no AI hallucination. Every result cites a primary source from
nishi-library/seeds/formal_math/.
genealogy_id: knuth_taocp + dewey_decimal + library_science
lineage_id: unified_search + faceted_query
axioms: NX_AX_LOGIC_IDENTITY (a result IS its content)
dependencies 5 imports · 1 importers
imports: syscalls.nxnx_axioms.nxnx_jargon.nxnx_qed_db.nxnx_question_genealogy.nx
imported by: nx_help_test.nx
structs
| 42 | struct HelpResult |
consts
| 34 | const NX_HELP_KIND_NONE: i64 = 0 |
| 35 | const NX_HELP_KIND_JARGON_DEFINITION: i64 = 1 |
| 36 | const NX_HELP_KIND_THEOREM_CARD: i64 = 2 |
| 37 | const NX_HELP_KIND_QUESTION_NARRATIVE: i64 = 3 |
| 38 | const NX_HELP_KIND_AMBIGUOUS: i64 = 4 // multiple matches |
| 51 | const NX_HELP_RESULT_BYTES: i64 = 48 |
functions
| 53 | func nx_help_result_alloc() -> *HelpResult called by 1: main |
| 73 | func nx_help_str_starts_with(haystack: *u8, needle: *u8) -> i64 called by 1: nx_help_search_qg |
| 85 | func nx_help_search_jargon(jd: *JargonDb, query: *u8, |
| 99 | func nx_help_search_qed(qd: *QedDb, query: *u8, |
| 121 | func nx_help_search_qg(qt: *QuestionTree, query: *u8, |
| 139 | func nx_help_query(jd: *JargonDb, qd: *QedDb, qt: *QuestionTree, |
| 172 | func hp_putc(fd: i64, c: i64) -> i64 called by 1: hp_i64 |
| 179 | func hp_str(fd: i64, s: *u8, n: i64) -> i64 called by 1: nx_help_emit_result |
| 184 | func hp_strz(fd: i64, s: *u8) -> i64 called by 1: nx_help_emit_result |
| 191 | func hp_i64(fd: i64, n: i64) -> i64 |
| 215 | func nx_help_emit_result(fd: i64, r: *HelpResult, query: *u8) -> i64 |