Repository navigation
Commit c4dd363
Show the prose readers were missing, fix the run loop, and stop loading third-party scripts (#44)
* Allow permanent quality waivers and make hello-world's permanent
The hello-world waiver's reason (a first example is intentionally tiny)
cannot lapse, but its 2026-12-01 expiry would have failed make verify on
every pull request. A waiver may now set permanent = true instead of
expires; the two are mutually exclusive and permanent must be the boolean.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Stop the scoring heuristic crediting print() and name tokens
The criterion heuristic awarded accuracy for containing print( and
practical usefulness for identifiers such as Ada, price, or config.
Neither can be observed from page text, so the credit is withheld and
the two criteria only penalise metasyntactic names. The heuristic only
bounds curated scores from above; the largest curated-minus-heuristic
gap moves from 0.3 to 0.5 against a 1.5 limit, so no page changes state.
The rubric snapshot also prints permanent waivers correctly.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Remove forward references from early pages and reorder three pages
Pages before functions no longer define functions, classes, or handlers:
booleans, operators, none, object-lifecycle, iterator-vs-iterable,
sentinel-iteration, advanced-match-patterns, and unpacking are rewritten
with constructs already taught, and point at the later page with an
inline link where a later idea is named. The @ operator demo moves from
operators to operator-overloading as a Vector dot product.
Manifest order: guard-clauses and exceptions now follow functions (so
try is taught before the signature pages, properties, descriptors,
context-managers, and metaclasses use it), and sentinel-iteration
follows while-loops, which it contrasts itself with.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Render example intros, harden the runner, self-host the editor, and fix HTTP edges
Reader-facing:
- Example pages now render the intro paragraphs every source file has; they
were parsed and then dropped.
- Journey pages render inline code instead of literal backticks.
- Figures keep readable labels on phones: they fill the banner and scroll
sideways rather than shrinking below 72% of their intrinsic width.
- Home hero, About and privacy wording match what the site does.
Runner and editor:
- Tracebacks show only the learner's frames, with source lines.
- exit()/sys.exit() end the program instead of returning HTTP 500, stderr is
captured, and input() explains why it is unavailable.
- Pages that teach something the sandbox lacks say so when Run fails.
- The editor gains undo history, auto-indent, Tab indentation, bracket
matching and Ctrl/Cmd+Enter to run.
- CodeMirror and Shiki are bundled from pinned npm packages; esm.sh is gone
from the pages and from the CSP.
HTTP:
- HEAD is answered for every page, trailing-slash URLs redirect, cache hits
are re-stamped with the intended browser lifetime, and the Turnstile
clearance cookie is bound to the client address.
- /llms.txt and /examples/<slug>.md are served.
Search indexes page prose and code and knows everyday synonyms.
make runtime-examples-test runs every program in the real sandbox.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Check editor keys, phone figure labels and third-party requests in the browser gate
The pending-download test now holds the self-hosted editor and highlighter
bundles instead of esm.sh requests.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Lead generics with PEP 695 syntax and use Python 3.13 features where they fit
- generics-and-typevar: type parameter syntax first, TypeVar as the legacy
spelling, plus 3.13 type parameter defaults.
- dataclasses: copy.replace(); typed-dicts: ReadOnly; warnings:
warnings.deprecated.
- The inline-link check ignores code spans, so `first[T](items)` is not
mistaken for a link.
All four pages were run in the local Worker sandbox.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Add a files and pathlib example
Teaches Path joining, whole-file and line-by-line text I/O, directory
listing and the missing-file boundary inside a temporary directory. The
program was run in the local Worker sandbox and matches its expected
output. Adds the page's figure, registry scores, journey placement and
social card.
Social cards were re-rasterised because every figure's SVG now carries its
intrinsic width for the phone layout.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Test runner, rendering and HTTP behaviour; document the changes
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Let the sandbox sweep wait out dev Worker reloads; correct privacy wording
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Let the sandbox sweep wait out dev Worker reloads
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Drop an unused lint suppression in the sandbox sweep
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
* Finish the forward-reference pass, fit social-card text, drop the Atom feed
- constants and strings no longer use for loops, f-strings or
comprehensions before those pages; assignment-expressions moves after
while-loops, since its examples use both loop forms.
- Social cards are rasterised with whatever fonts the machine has, so a
fixed font size let the Comprehensions title run into its figure and three
journey summaries run into the brand line. Each card now fits its eyebrow,
title and summary in the rendering browser, and the rasteriser refuses to
write a card whose text still does not fit.
- The strategy doc drops the Atom feed and records why.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4DAa9EdQbgyvwGUWyEBAc
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 866c8aa commit c4dd363
211 files changed
Lines changed: 3790 additions & 975 deletions
File tree
- docs
- public
- og
- prototyping
- scripts
- src
- example_sources
- templates
- tests
- web
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
12 | 24 | | |
13 | 25 | | |
| |||
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
21 | 38 | | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
25 | 42 | | |
26 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
27 | 49 | | |
28 | 50 | | |
29 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | | - | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| |||
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
98 | 109 | | |
99 | 110 | | |
100 | 111 | | |
| |||
121 | 132 | | |
122 | 133 | | |
123 | 134 | | |
124 | | - | |
| 135 | + | |
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | | - | |
| 192 | + | |
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| |||
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
232 | | - | |
233 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
234 | 240 | | |
235 | 241 | | |
236 | 242 | | |
| |||
0 commit comments