Repository navigation
Run the functional-programming chapter's Racket examples (first half) - #140
Conversation
…mples The chapter typed what each Racket call returns, so nothing checked the values against the code (#131). In the first half of the chapter, up to exr-twice, each fence that defines a function is now a {racket} chunk, and each typed value in an example is a chunk's output instead. The solutions keep their worked reasoning and end with a chunk that runs the same expressions, so a wrong hand calculation shows up beside the right value. The syntax templates in the definitions of define and cond are not runnable, and the evaluation traces are hand rewriting steps, so they stay plain fences. Part of #131. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FWgYrEUFVHj2qKjKncHg77
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Pages now run Racket code at render time (mcs#131), and the reviewer checks each chunk's output by running it. Without racket installed it has to apt-get install it by hand in every review, which the #140 review called out. The reusable workflow's apt-packages input does this once, before the review starts. Claude-Session: https://claude.ai/code/session_01FWgYrEUFVHj2qKjKncHg77 Co-authored-by: Claude <noreply@anthropic.com>
…d-2wtrwq-functional-programming
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🤖 Antigravity agent reportCross-harness review (Gemini 3.8 Flash (Medium) via Antigravity
|
"Applied to $-7$ and to 2" set one number in math and the other in text, in the same phrase. Raised by the cross-harness read of #140. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FWgYrEUFVHj2qKjKncHg77
|
Addressed the nit in the Flash read at 8e2d7d2 in 094f73f: "Applied to Posted by Claude Code (AI agent) --- not written by a human. Generated by Claude Code |
|
Claude finished review — View run I reviewed the one new commit in this round, The change is prose-only and renders the same way as the surrounding The prior round, "Ready for merge" (comment, 2026-11-11T10:32:36Z), still stands. The earlier full chunk-output verification, also "Ready for merge" (comment), isn't affected, because this commit doesn't touch any code chunk. VerdictReady for merge Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "094f73fd19193d9888fc3f1f48e779bc1614b7ef",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "The only new commit changes the bare number 2 to math-typeset 2 in the absolute-value example prose, which renders correctly and introduces no macro or markup problems.",
"holistic_assessment": "The change is a one-line prose consistency fix within the PR's scope, leaves all racket chunks untouched, and does not affect the earlier verified outputs or the stacked dependency."
}Reviewed commit: 094f73f |
🤖 Antigravity agent reportCross-harness re-read (Gemini 3.8 Flash (Medium) via Antigravity
|
Built to branch |
Requested by Ezra · project thread
Important
Stacked on #139, which adds the racket engine. Merge #139 first; this PR's base then moves to
main.Part of #131.
Why
The chapter typed what each Racket call returns, so nothing checked the values against the code.
What changes
In the first half of
chapters/functional-programming.qmd, up toexr-twice:_subfiles/_racket-setup.qmd, which registers the engine;h,ticket-price,absolute,twice,add-three) is a{racket}chunk withcode-fold: false;exm-absolute-valueshows(absolute -7)and(absolute 2)as chunk output instead of typing 7 and 2;exr-evaluate-nested,exr-formula-from-code,exr-ticket-priceandexr-twicekeep their worked reasoningand end with "Racket returns the same values:" and a chunk that runs the same expressions.
The exercises show only definitions, so no chunk output gives away an answer before its solution.
The syntax templates in
def-racket-defineanddef-if-cond((define (f x1 ... xn) body)) are not runnable,and the evaluation traces in
rem-evaluationandexm-substitutionare hand rewriting steps, so they stay plain fences.The prose inside definitions (
def-booleans) still states a value inline; I left definitions alone.The second half is #141, stacked on this one, because the two together exceed the 10-file cap.
Testing
Rendered the chapter to HTML and to revealjs locally with Racket 8.10. Every chunk's output matches the value the prose and solutions state:
(* (+ 1 2) (- 10 4))18,(- 20 (* 3 (+ 1 1)))14,(+ 1 2 3 4)10,(- (* (+ 2 3) 4) 1)19,(h 5)15,(h (h 3))3,ticket-price0, 8, 8, 12,absolute7 and 2,twice16, 48, 12.The local PDF render fails on main too (
\thmundefined in the theorem-counter snippet, with Debian's TeX Live rather than TinyTeX, which this container could not download), so the PDF check is the preview's.Generated by Claude Code