code wiki / _hdl_build / nx_reader_exceed_census.nx

nx_reader_exceed_census.nx source

↩ module page · 130 lines · 15357 B

1// nx_reader_exceed_census.nx -- HONEST measured landscape census: where does the NISHI READER/LIBRARY stand vs 2// KINDLE (devices + apps -- the operator's named rival) and the other s-class reading systems, grounded on the 3// LIVE July-2026 corpus banked TODAY by nx_reader_research_fetch (knowledge/fetched/rdr_z*.raw + reader_x*.raw)? 4// Operator 2026-07-02: "use the nishi researcher to really get where we are vs benchmarks vs july 2026 research 5// on our library and how to beat kindle devices and apps and other s-class systems so we are s-class-exceed like 6// this viewer (kindle only uses as-is pdf where you pinch zoom)." 7// Verdict per axis COMPUTED by xcd_verdict(us,bar) -- NEVER asserted; AHEAD liar-killed unless we meet ALL 8// criteria; SOVEREIGNTY/architecture tagged [FLOOR] (real wins that do NOT by themselves beat Kindle's daily UX). 9// The two quality anchors from TODAY's build: the tiled-pyramid guided-view zoom (gates 6/6 x3 + live 10// /library/zoom HTTP 200 over validated TLS) vs Kindle's as-is PDF pinch. Mirrors nx_deepresearch_census. 11// Scale: 2=full 1=partial 0=absent. license_tier: ORIGINAL expect_exit: 0 12import "nx_cms_exceed.nx" // XCD_* + xcd_verdict + xcd_referee_ok + xcd_vname + sys_* (transitive) 13 14func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 15func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } 16func have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0 } sys_close(fd); return 1 } 17 18// tot: [0]=BEHIND [1]=PARITY [2]=AHEAD [3]=INVALID [4]=AHEAD-FLOOR [5]=AHEAD-CAPABILITY [6]=UNGROUNDED 19func row(dom: *u8, cap: *u8, our_c: i64, inc_c: i64, n: i64, ev: *u8, ground: *u8, floor: i64, tot: *i64) -> i64 { 20 let v: i64 = xcd_verdict(our_c, inc_c) 21 let ok: i64 = xcd_referee_ok(v, our_c, n) 22 let g: i64 = have(ground) 23 sw(" [" as *u8); sw(dom); sw("] " as *u8); sw(cap); sw(" -> " as *u8); sw(xcd_vname(v)) 24 sw(" (us " as *u8); sn(our_c); sw("/" as *u8); sn(n); sw(" bar " as *u8); sn(inc_c); sw(") " as *u8); sw(ev) 25 if floor==1 { sw(" [FLOOR: sovereignty/architecture, NOT the daily-UX gap]" as *u8) } 26 if ok==0 { sw(" <== INVALID: AHEAD without meeting all criteria (LIAR-KILL)" as *u8); tot[3]=tot[3]+1 } 27 if g==0 { sw(" [UNGROUNDED: bar not banked -- run nx_reader_research_fetch]" as *u8); tot[6]=tot[6]+1 } 28 sw("\n" as *u8) 29 if v==XCD_BEHIND { tot[0]=tot[0]+1 } 30 if v==XCD_PARITY { tot[1]=tot[1]+1 } 31 if v==XCD_AHEAD { tot[2]=tot[2]+1; if floor==1 { tot[4]=tot[4]+1 } else { tot[5]=tot[5]+1 } } 32 return 0 33} 34 35func main() -> i64 { 36 let tot: *i64 = sys_mmap(128) as *i64 37 var z: i64=0; while z<7 { tot[z]=0; z=z+1 } 38 // grounding = the banked July-2026 corpus (fetched TODAY; a live snapshot IS the current state) 39 let KIN: *u8 = "knowledge/fetched/reader_x5_kindle.raw" as *u8 40 let SCB: *u8 = "knowledge/fetched/rdr_z01_kindle_scribe.raw" as *u8 41 let EINK: *u8 = "knowledge/fetched/rdr_z03_eink.raw" as *u8 42 let KOR: *u8 = "knowledge/fetched/rdr_z04_koreader.raw" as *u8 43 let MIH: *u8 = "knowledge/fetched/rdr_z05_mihon.raw" as *u8 44 let KAV: *u8 = "knowledge/fetched/rdr_z06_kavita.raw" as *u8 45 let KOM: *u8 = "knowledge/fetched/rdr_z07_komga.raw" as *u8 46 let FOL: *u8 = "knowledge/fetched/rdr_z08_foliatejs.raw" as *u8 47 let MOK: *u8 = "knowledge/fetched/rdr_z09_mokuro.raw" as *u8 48 let DZ: *u8 = "knowledge/fetched/rdr_z10_deepzoom.raw" as *u8 49 let CMX: *u8 = "knowledge/fetched/rdr_z13_comixology.raw" as *u8 50 let OLM: *u8 = "knowledge/fetched/rdr_z14_olmocr.raw" as *u8 51 let MNU: *u8 = "knowledge/fetched/rdr_z15_mineru.raw" as *u8 52 let MAGI: *u8 = "knowledge/fetched/rdr_z17_magi.raw" as *u8 53 let JXL: *u8 = "knowledge/fetched/rdr_z18_jxl.raw" as *u8 54 let KOB: *u8 = "knowledge/fetched/reader_x7_kobo.raw" as *u8 55 let CAL: *u8 = "knowledge/fetched/reader_x8_calibre.raw" as *u8 56 let OPD: *u8 = "knowledge/fetched/reader_i1_opds.raw" as *u8 57 let APB: *u8 = "knowledge/fetched/reader_x6_apple_books.raw" as *u8 58 59 sw("=== nx_reader_exceed_census -- NISHI reader/library vs KINDLE (devices+apps) + the s-class cohort (July 2026, corpus banked TODAY) ===\n" as *u8) 60 sw("cohort: Kindle/Scribe/E-Ink . Kobo . Apple Books . KOReader . Calibre . Mihon . Kavita/Komga . foliate-js . Mokuro . ComiXology . doc-AI bar (olmOCR/MinerU/docling/Magi)\n" as *u8) 61 sw("verdict = xcd_verdict(us,bar) COMPUTED; AHEAD liar-killed; [FLOOR]=architecture win, not daily UX. Scale: 2=full 1=partial 0=absent.\n" as *u8) 62 63 sw("\n-- A. AHEAD -- CAPABILITY (the reading-experience axes where we now beat the cohort ON YOUR OWN FILES) --\n" as *u8) 64 row("ZUM" as *u8, "guided-view INTELLIGENT zoom on ANY owned comic/scan (auto panel detect + RTL order + double-tap-to-panel + page continuity)" as *u8, 2,1,2, "[ev: nx_reader_panels+tile+zoomserve gates 6/6 x3 + LIVE /library/zoom 200; Kindle=as-is PDF pinch; ComiXology guided view=store titles only; KOReader=content-crop not panel-flow]" as *u8, CMX, 0, tot) 65 row("TIL" as *u8, "tiled-pyramid deep zoom of huge scans in a PHONE browser (only-visible-tile fetch, DZI-class)" as *u8, 2,0,2, "[ev: nx_reader_tile gate 6/6 + live; DeepZoom/OSD are LIBRARIES -- no cohort READER ships this; Kindle renders PDF as-is]" as *u8, DZ, 0, tot) 66 row("LLM" as *u8, "push a book into an LLM natively (token-budgeted /api/llmpack pack)" as *u8, 2,0,2, "[ev: nx_token_counter + /api/llmpack live route; NO cohort reader has an LLM-pack surface]" as *u8, KIN, 0, tot) 67 row("XRY" as *u8, "X-Ray-class term/entity index on ANY personal file (Kindle X-Ray = store-provisioned titles only)" as *u8, 1,0,1, "[ev: nx_reader_xray gate 13/0, auto-derived from the book's own text; curated bios pending]" as *u8, KIN, 0, tot) 68 69 sw("\n-- A'. AHEAD -- SOVEREIGN/ARCHITECTURE FLOOR (real, by-construction; kept separate per honesty discipline) --\n" as *u8) 70 row("FLR" as *u8, "no account / no cloud / no lock-in: your files on your NAS, served to ANY browser incl. e-ink devices" as *u8, 2,0,2, "[ev: self-hosted + OPAQUE auth; Kindle requires the Amazon account/cloud + send-to-kindle conversion]" as *u8, KIN, 1, tot) 71 row("FLR" as *u8, "zero-3rd-party client + organ-emitted UI (zero-JS text reader; the zoom viewer emits 0 external loads)" as *u8, 2,0,2, "[ev: nx_reader_render/nx_reader_zoom_emit sovereignty checks; cohort ships JS frameworks]" as *u8, FOL, 1, tot) 72 row("FLR" as *u8, "single auditable static server binary + Ed25519-receipted deploys + owned CAS container (.nmz)" as *u8, 2,0,2, "[ev: nx_reader_tcb_exceed panel (no PT_INTERP) + nx_nmz gate + publisher receipts]" as *u8, CAL, 1, tot) 73 74 sw("\n-- B. PARITY (at the bar) --\n" as *u8) 75 row("FMT" as *u8, "format breadth: EPUB / MOBI / KF8-AZW3 / CBZ / FB2 / HTML / RTF (DRM declined honestly, never circumvented)" as *u8, 2,2,2, "[ev: extractor gates (kf8 9/0, mobi 8/0, huffcdic 13/0...) + liveness auditor; bar=Calibre/Kindle]" as *u8, CAL, 0, tot) 76 row("TYP" as *u8, "typography + themes + night/dyslexia + a11y (WCAG landmarks, 44px targets, safe-area)" as *u8, 2,2,2, "[ev: nx_reader_render_gate asserts; bar=Apple Books/Kobo]" as *u8, APB, 0, tot) 77 row("SRC" as *u8, "library full-text search (BM25) + in-book search engine" as *u8, 2,2,2, "[ev: nx_book_search_lib over 5761 + nx_inbook_search 4/4; bar=Kavita]" as *u8, KAV, 0, tot) 78 row("HST" as *u8, "hosted auth'd library + covers/thumbnails + range-streamed files" as *u8, 2,2,2, "[ev: :8791 live behind THE WALL + cover extract-on-miss + gs_thumb reuse; bar=Kavita/Komga]" as *u8, KOM, 0, tot) 79 80 sw("\n-- C. BEHIND (the honest gap ladder -- what still separates us from Kindle-daily-driver + the cohort) --\n" as *u8) 81 row("SYN" as *u8, "cross-device reading-position + annotation SYNC (Whispersync-class)" as *u8, 0,2,2, "{bar: Kindle Whispersync; us: none for text (audio /resume only) -- THE #1 daily-use gap}" as *u8, KIN, 0, tot) 82 row("ANN" as *u8, "highlights / notes / margins + export (Scribe pen-notes bar)" as *u8, 0,2,2, "{bar: Kindle+Scribe/KOReader; us: none -- content-hash anchors would EXCEED (survive re-conversion)}" as *u8, SCB, 0, tot) 83 row("DIC" as *u8, "inline dictionary + instant translation" as *u8, 0,2,2, "{bar: Kindle/Kobo/Moon+; us: none; sovereign MT arc exists to compose}" as *u8, KOB, 0, tot) 84 row("TTS" as *u8, "text-to-speech + audiobook player (speed/sleep/chapters)" as *u8, 1,2,2, "{bar: Kindle Assistive/Audible; us: audio daemon has sleep-cap+bookmark+resume, NO player UI / NO TTS voice}" as *u8, KIN, 0, tot) 85 row("OPD" as *u8, "OPDS/OPDS-PS feeds (Panels/Moon+/Mihon can consume the library)" as *u8, 0,2,2, "{bar: Kavita/Komga/Calibre-Web; us: none}" as *u8, OPD, 0, tot) 86 row("SER" as *u8, "series/collections model + metadata editing/scraping" as *u8, 0,2,2, "{bar: Calibre/Kavita/Komga; us: none (Calibre metadata.db direct-read is the shortcut)}" as *u8, KAV, 0, tot) 87 row("STA" as *u8, "reading stats / streaks / time-left-in-chapter" as *u8, 1,2,2, "{bar: Kobo/Kindle; us: static per-book estimate only, no live tracking}" as *u8, KOB, 0, tot) 88 row("PDF" as *u8, "PDF STRUCTURE recovery (layout/reading-order/tables/formulas + OCR) -- the July-2026 doc-AI bar" as *u8, 1,2,2, "{bar: MinerU/olmOCR/docling structured extraction; us: born-digital text-layer reflow only; scanned->image path; sovereign OCR ladder exists to compose}" as *u8, MNU, 0, tot) 89 row("RFL" as *u8, "scanned-PDF REFLOW on small screens (k2pdfopt-class)" as *u8, 0,2,2, "{bar: KOReader; us: none (tiled zoom is our answer today, reflow is complementary)}" as *u8, KOR, 0, tot) 90 row("MLM" as *u8, "ML-grade manga understanding (panels on bleed/diagonal pages, characters, dialogue attribution)" as *u8, 1,2,2, "{bar: Magi (arXiv 2401.10224) + Mokuro OCR overlay; us: classical X-Y gutter-cut = clean axis-aligned gutters only}" as *u8, MAGI, 0, tot) 91 row("WEB" as *u8, "webtoon continuous-vertical + double-page-spread modes" as *u8, 1,2,2, "{bar: Mihon/WEBTOON; us: paged+RTL panel order live; vertical/spread pending}" as *u8, MIH, 0, tot) 92 row("CMP" as *u8, "modern image compression for mobile bandwidth (JXL/AVIF tiles)" as *u8, 1,2,2, "{bar: JXL/AVIF; us: baseline JPEG q72 tiles (works, heavier bytes)}" as *u8, JXL, 0, tot) 93 row("DEV" as *u8, "dedicated e-ink DEVICE hardware (weeks battery, sunlight, paper feel)" as *u8, 0,2,2, "{bar: Kindle/Kobo e-ink; us: none BY SCOPE -- the play = any-device browser (our reader runs ON their device's browser; their store can't read OUR library)}" as *u8, EINK, 0, tot) 94 95 sw("\n=== SUMMARY ===\n" as *u8) 96 sw("AHEAD = " as *u8); sn(tot[2]); sw(" capability=" as *u8); sn(tot[5]); sw(" (guided-zoom / tiled-zoom / llm-pack / x-ray-anywhere) FLOOR=" as *u8); sn(tot[4]); sw("\n" as *u8) 97 sw("PARITY = " as *u8); sn(tot[1]); sw(" (formats / typography / search / hosted-library)\n" as *u8) 98 sw("BEHIND = " as *u8); sn(tot[0]); sw(" (sync / annotations / dictionary / tts / opds / series / stats / pdf-ai / reflow / ml-manga / webtoon / compression / device)\n" as *u8) 99 sw("INVALID (liar-killed) = " as *u8); sn(tot[3]); sw(" UNGROUNDED = " as *u8); sn(tot[6]); sw("\n" as *u8) 100 let cells: i64 = tot[0]+tot[1]+tot[2] 101 sw("TOTAL GRADED CELLS = " as *u8); sn(cells); sw("\n" as *u8) 102 103 sw("\n-- NEG-CONTROL (must be CAUGHT) -- fabricated 'reader already AHEAD on Whispersync-class sync' (us 0/1) -> " as *u8) 104 let neg_ok: i64 = xcd_referee_ok(XCD_AHEAD, 0, 1) 105 var neg_caught: i64 = 0 106 if neg_ok==0 { sw("REJECTED (liar-kill fired)\n" as *u8); neg_caught=1 } else { sw("ACCEPTED (BROKEN)\n" as *u8) } 107 108 sw("\n=== BEAT-KINDLE LADDER (priority order; each composes existing nishi primitives) ===\n" as *u8) 109 sw(" R1 SYNC SPINE (SC01/02): per-user reading-position + annotation store behind THE WALL, CONTENT-ADDRESSED anchors (CAS locator survives re-conversion -- Kindle cannot re-anchor across formats = our EXCEED angle). Reuses the galx state/tag store pattern + auth uid.\n" as *u8) 110 sw(" R2 ANNOTATIONS (SC24/25): highlights/notes + markdown/json export on the sync spine; Scribe-class margin notes later via the drawing surface.\n" as *u8) 111 sw(" R3 DICTIONARY+TRANSLATE (SC26/27): offline sovereign dictionary store + compose the neural-MT arc; tap-word lookup in both readers.\n" as *u8) 112 sw(" R4 TTS+AUDIO PLAYER (SC28/33): player UI over the existing audio daemon (sleep/bookmark/resume already server-side); sovereign TTS voice = the voice-clone arc.\n" as *u8) 113 sw(" R5 OPDS + SERIES + METADATA (SC19/22/23): OPDS-PS feed over the library index; series model in .nmz meta; Calibre metadata.db direct-read.\n" as *u8) 114 sw(" R6 PDF-AI (SC05): compose the sovereign OCR ladder (scanning stack R1-R5) + pr_pdf_to_reflow -> MinerU-class structure (tables/order) on our own engine; k2pdfopt-class scanned reflow.\n" as *u8) 115 sw(" R7 MANGA DEPTH (SC16 + ML): webtoon vertical + double-page spread in the zoom viewer; panel robustness toward Magi-class on wild pages; Mokuro-class OCR overlay when OCR lands.\n" as *u8) 116 sw(" R8 STATS + BOOK MAP (SC14/31): live reading tracking + streaks + visual book map.\n" as *u8) 117 sw(" (DEVICE: do NOT chase e-ink hardware now -- the browser-first play already runs on THEIR devices; a nishi reading device is a later hardware arc.)\n" as *u8) 118 119 sw("\n=== VERDICT ===\n" as *u8) 120 var green: i64 = 1 121 if tot[3] != 0 { green = 0 } 122 if neg_caught != 1 { green = 0 } 123 if green==1 { 124 sw("GREEN -- census honest: 0 fabricated exceeds, liar-kill armed, corpus-grounded (July 2026). TRUTH: the Nishi reader EXCEEDS Kindle+cohort on " as *u8); sn(tot[5]); sw(" reading-CAPABILITY axes (the guided/tiled zoom the operator named + llm-pack + x-ray-anywhere) and " as *u8); sn(tot[4]); sw(" sovereign-FLOOR axes; PARITY on " as *u8); sn(tot[1]); sw(".\n" as *u8) 125 sw(" It is BEHIND on " as *u8); sn(tot[0]); sw(" daily-driver axes (sync/annotations/dictionary/tts/opds/series/stats/pdf-ai/reflow/ml-manga/webtoon/compression/device) -> NOT yet s-class-exceed as a full Kindle replacement. R1 SYNC is the highest-value flip; R1..R8 = the beat-Kindle ladder.\n" as *u8) 126 return 0 127 } 128 sw("RED -- liar-kill integrity failed\n" as *u8) 129 return 1 130}