nx_archive_research.nx source
↩ module page · 54 lines · 4681 B
1// nx_archive_research.nx -- THIN structured TIME-MACHINE / WEB-ARCHIVE research source organ. COMPOSES
2// nx_research_engine (sovereign fetch->extract->bank). Operator 2026-06-29: "browse all the historic
3// page3.com or megastar.co.uk sites day by day as they existed back then with their media ... the wayback
4// machine has some capabilities but some media archival was hit or miss ... same for historic reddit.com."
5// GOAL: a sovereign archive that EXCEEDS the Wayback Machine on (1) media completeness via cross-archive +
6// perceptual recovery, (2) temporal granularity (day-by-day), (3) rendering fidelity, (4) provenance / no-delete.
7// Ground the build on REAL sourced practice -- WARC / Common Crawl, Wayback / Memento, PageRank link-analysis,
8// perceptual-hash reverse-image (TinEye), content-addressed storage -- never assumptions (Rule 4). Banks clean
9// .txt -> knowledge/library/ (nx_library_harvest_v2 indexes, nx_search_cli queries). Canonical fact-dense static
10// pages over sovereign TLS-1.3 fetch. Prefix arc_ keeps this distinct from the existing srch_ corpus.
11// expect_exit: 0 license_tier: ORIGINAL
12import "nx_research_engine.nx"
13const K_MAGIC_8388608: i64 = 8388608
14
15func main() -> i64 {
16 let store: *TrustStore = rf_init()
17 if (store as i64) == 0 { rf_puts("archive: trust store load failed\n" as *u8); return 1 }
18 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- TIME-MACHINE / WEB-ARCHIVE research (Common Crawl + Wayback + media recovery, exceed-vs-Wayback) -> Library\n" as *u8)
19 let cap: i64 = K_MAGIC_8388608
20 let out: *u8 = sys_mmap(cap)
21 var ok: i64 = 0
22
23 rf_section("ARCHIVE FORMATS & CORPORA -- WARC, Common Crawl, Wayback, UK Web Archive (the temporal backbone)" as *u8)
24 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Web_ARChive" as *u8, "arc_warc" as *u8, store, out, cap)
25 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Common_Crawl" as *u8, "arc_commoncrawl" as *u8, store, out, cap)
26 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Wayback_Machine" as *u8, "arc_wayback" as *u8, store, out, cap)
27 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Internet_Archive" as *u8, "arc_internetarchive" as *u8, store, out, cap)
28 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/UK_Web_Archive" as *u8, "arc_ukwebarchive" as *u8, store, out, cap)
29 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Web_archiving" as *u8, "arc_webarchiving" as *u8, store, out, cap)
30 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Heritrix" as *u8, "arc_heritrix" as *u8, store, out, cap)
31
32 rf_section("TEMPORAL ACCESS & PRESERVATION -- Memento time-travel (RFC 7089), digital preservation, OAIS" as *u8)
33 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Memento_Project" as *u8, "arc_memento" as *u8, store, out, cap)
34 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Digital_preservation" as *u8, "arc_digital_preservation" as *u8, store, out, cap)
35 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Open_Archival_Information_System" as *u8, "arc_oais" as *u8, store, out, cap)
36
37 rf_section("LINK-ANALYSIS / AUTHORITY -- PageRank, HITS, link analysis (the web-scale ranking gap)" as *u8)
38 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/PageRank" as *u8, "arc_pagerank" as *u8, store, out, cap)
39 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/HITS_algorithm" as *u8, "arc_hits" as *u8, store, out, cap)
40 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Link_analysis" as *u8, "arc_link_analysis" as *u8, store, out, cap)
41
42 rf_section("MEDIA RECOVERY -- reverse image search (TinEye), perceptual hashing, content-addressed storage" as *u8)
43 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/TinEye" as *u8, "arc_tineye" as *u8, store, out, cap)
44 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Reverse_image_search" as *u8, "arc_reverse_image_search" as *u8, store, out, cap)
45 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Perceptual_hashing" as *u8, "arc_perceptual_hashing" as *u8, store, out, cap)
46 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Content-addressable_storage" as *u8, "arc_content_addressable_storage" as *u8, store, out, cap)
47
48 rf_section("CRAWLING -- web crawler architecture" as *u8)
49 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Web_crawler" as *u8, "arc_web_crawler" as *u8, store, out, cap)
50
51 rf_puts("ARCHIVE BANKED: "); rf_putn(ok); rf_puts(" / 18 (sections preserved, gzip-guarded; run nx_library_harvest_v2 to index, nx_search_cli to query)\n" as *u8)
52 if ok < 1 { return 51 }
53 return 0
54}