Skip to content

Refactor/textbook optimize#29

Merged
splch merged 2 commits intomainfrom
refactor/textbook-optimize
Mar 18, 2026
Merged

Refactor/textbook optimize#29
splch merged 2 commits intomainfrom
refactor/textbook-optimize

Conversation

@splch
Copy link
Copy Markdown
Owner

@splch splch commented Mar 18, 2026

No description provided.

splch added 2 commits March 18, 2026 12:15
- Use //go:embed for all generator assets, eliminating fragile disk
  paths and copyFile/copyDir helpers
- Generate index.html from chapters.json template instead of
  maintaining a 131-line hardcoded duplicate
- Inline all JS (11 files, 430 lines) into layout.html as a single
  script block (~170 lines), deleting the gen/js/ directory entirely
- Fix exercise grading: use getProbabilities() for exact statevector
  comparison instead of always reporting "Correct!"
- Remove encoding/json from WASM code with manual marshalers,
  eliminating the reflect package and shrinking the binary by ~380 KB
- Add -trimpath and wasm-opt to the build pipeline for further size
  reduction
- Add WASM preload hint for faster perceived page load
- Remove dead code: progress.js, HTML front-matter, stripFrontMatter()
- Add generator tests for roman(), markCurrent(), and full generate()

Net: -440 lines, +318 lines across 26 files changed.
Regenerate chapters 1-6 and add chapters 7-42, covering the full
curriculum from classical computation through quantum algorithms,
error correction, information theory, and frontiers. Each chapter
includes interactive QASM sandboxes, simulations with sliders,
graded exercises, predict-observe-explain modules, and spaced-
repetition flashcards powered by the Goqu WASM runtime.

Add chapter-prompt.md as a generation reference for the HTML format,
component templates, QASM gate reference, and quality guidelines.
@splch splch merged commit a401ce3 into main Mar 18, 2026
6 checks passed
@splch splch deleted the refactor/textbook-optimize branch March 18, 2026 21:46
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.37%. Comparing base (9ad6629) to head (674ccfc).
⚠️ Report is 3 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   71.82%   72.37%   +0.55%     
==========================================
  Files         157      157              
  Lines       16708    16686      -22     
==========================================
+ Hits        12001    12077      +76     
+ Misses       3796     3685     -111     
- Partials      911      924      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants