Add the library page, and pin core with sized types and the library
core 477dffe brings pseudo's sized types (INT8..UINT64, FLOAT32), exact numerical built-ins, USE IEEE, and USE for pplus-library, its new submodule: 16 routines checked at every level. - #/library (src/ui/library.ts): every routine by module with a count of how its checks ended; a routine's page shows its pseudo, cases and results, every check with its detail, each reference implementation with its note, tolerance and source, the Dafny proof and the sources. - Open in the Bridge: a routine opens as the problem lib:<id> (src/core/library.ts), its first case as the call, so it can be stepped through; the problem menu names it. - Library in the site nav; README, docs/app.md and AGENTS.md updated. - Two Quarto examples expected "X_BAR returned 3" for a FLOAT result; core now prints it in its type, 3.0. Gate: site 113 pass; core 332 pass; library-check no failing check. Manual check: #/library lists 16 routines with chips; a routine's page shows numbered pseudo, cases, checks; Open in the Bridge steps through NeedlemanWunschScore; no console errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FgvbRdoEheAHqsRmr2WuKZ
This commit is contained in:
14 files changed
+280
-13
No files matched your search
@@ -82,6 +82,10 @@ A student can save the state of their work under a name and come back to any sav
|
||||
- **A problem that changed under saved edits** shows a banner with **See the new version**: your edits become the version "My edits, before the problem changed" and the problem opens as it is now.
|
||||
- **Between browsers:** Share → Download writes the state and, with a checkbox (on by default), its versions; Open… puts them in the right list and never overwrites a version that has the same id. A share link carries only the current state.
|
||||
|
||||
### The library
|
||||
|
||||
**Library** (`#/library`, `src/ui/library.ts`) lists every routine of pplus-library, as core's registry holds it (`#core/library/registry.js`, generated from the submodule `core/library`), grouped by module, each with a count of how its checks ended. A routine's page (`#/library/md.LennardJones`) shows the routine's pseudo, its cases with the results the pseudo gives, every check with its detail (cases, prover, fuzzer, generated Mojo, each reference implementation per way of running it, the proof), each reference's source with its note and tolerance, the Dafny proof, and the sources of the method. **Open in the Bridge** opens the routine as a problem with the id `lib:<module>.<Name>` (`src/core/library.ts`): its pseudo in the pseudo pane and its first case as the call, so it can be stepped through, which a program that only USEs it never does (a run steps over library routines; core's [docs/library.md](../core/docs/library.md)). Edits are saved per routine, like a problem's.
|
||||
|
||||
### With Quarto
|
||||
|
||||
`#/quarto` (`src/ui/quarto.ts`, linked from the nav, the footer, and a section of the home page that shows one shortcode beside the stepper it makes) is a gallery of the Quarto extension's shortcodes ([quarto/README.md](../quarto/README.md)). Each card shows what an author writes (the shortcode, and every program file it names, in tabs) and what the reader gets, drawn when the card scrolls into view by the same code `quarto render` runs: `renderStatic` for the rendered views and the machine, this app's own `#/embed/...` route in an iframe for the live ones. The cards can be filtered by kind (rendered with the page, the machine, live, text); one machine card has a menu of every `pplus-hw-<view>` and draws the one chosen. `#/quarto#<shortcode>` scrolls to a card, `#/quarto#setup` to the set-up steps. The page loads the extension's `pplus.css` and `pplus.js` from the site (`scripts/assemble.sh` copies the extension into `site/`), so the steppers and "make it live" behave exactly as on a Quarto page. The shortcodes, their options and the sample programs come from `src/quarto/shortcodes.ts` and `galleryFiles()`; `tests/quarto-gallery.test.mjs` renders every sample and holds each program in it to its header lines.
|
||||
|
||||
Reference in new issue
Block a user