● Chapter 12 is done — just ci green at 62 exercises, all validated against plgc 0.3.0 (every solution passes, #13

Merged
navicore merged 1 commit from chapter12 into main 2026-06-23 14:26:59 +00:00
Owner

every starter parses), fmt + clippy clean, hints leak nothing.

What landed — 12-types, a guard → dispatch arc

Built to dodge the trap chapter 11 first fell into: not eight isolated "does this test work?" demos, but each
type test earning a real job, with the without-it failure shown in prose.

  • 01-bound (var/nonvar) — coalesce/3, the or-else pattern. The hook: "has this variable been given a value yet?"
    is a question = cannot ask, because unifying with an unbound var always succeeds and binds it. The guards only
    look.
  • 02-safe-sum (number) — sum just the numbers in a mixed list. The motivation is concrete because I probed it:
    unguarded is doesn't fail on a stray atom, it crashes the query (type_error(evaluable, foo), exit 3). The guard
    makes a fussy op total over untrusted data.
  • 03-split-num (integer/float) — partition a numeric list by subtype, since number/1 lumps 3 and 3.0 together.
    The filtering shape from ch11, routing into two buckets.
  • 04-kind (atom/number/is_list/compound) — the capstone, and the real lesson: the shape tests overlap (every
    list is also compound; [] is both atom and is_list), so classification isn't a partition — you impose one by
    ordering an if-then-else chain. The prose carries the overlap table; the []-is-an-atom gotcha falls out of
    putting atom before is_list.

All eight builtins appear in a solution, so the coverage-check invariant holds. Docs updated: ROADMAP (62, new
row), README (new row), and the expansion design doc (12 ✓ with a full design note).

Two things I noticed but left alone as out of scope for this chapter — flagging, not acting:

  • The ROADMAP/expansion-doc prose still says plgc 0.1.0; installed is 0.3.0. Several version mentions would need
    a sweep.
  • The expansion doc's chapter-11 note calls functor/3 construct-mode "broken on plgc 0.1.0." That may have been
    fixed by 0.3.0 — worth a re-probe before chapter 13/16 leans on the claim. Happy to check either if you want.
every starter parses), fmt + clippy clean, hints leak nothing. What landed — 12-types, a guard → dispatch arc Built to dodge the trap chapter 11 first fell into: not eight isolated "does this test work?" demos, but each type test earning a real job, with the without-it failure shown in prose. - 01-bound (var/nonvar) — coalesce/3, the or-else pattern. The hook: "has this variable been given a value yet?" is a question = cannot ask, because unifying with an unbound var always succeeds and binds it. The guards only look. - 02-safe-sum (number) — sum just the numbers in a mixed list. The motivation is concrete because I probed it: unguarded is doesn't fail on a stray atom, it crashes the query (type_error(evaluable, foo), exit 3). The guard makes a fussy op total over untrusted data. - 03-split-num (integer/float) — partition a numeric list by subtype, since number/1 lumps 3 and 3.0 together. The filtering shape from ch11, routing into two buckets. - 04-kind (atom/number/is_list/compound) — the capstone, and the real lesson: the shape tests overlap (every list is also compound; [] is both atom and is_list), so classification isn't a partition — you impose one by ordering an if-then-else chain. The prose carries the overlap table; the []-is-an-atom gotcha falls out of putting atom before is_list. All eight builtins appear in a solution, so the coverage-check invariant holds. Docs updated: ROADMAP (62, new row), README (new row), and the expansion design doc (12 ✓ with a full design note). Two things I noticed but left alone as out of scope for this chapter — flagging, not acting: - The ROADMAP/expansion-doc prose still says plgc 0.1.0; installed is 0.3.0. Several version mentions would need a sweep. - The expansion doc's chapter-11 note calls functor/3 construct-mode "broken on plgc 0.1.0." That may have been fixed by 0.3.0 — worth a re-probe before chapter 13/16 leans on the claim. Happy to check either if you want.
● Chapter 12 is done — just ci green at 62 exercises, all validated against plgc 0.3.0 (every solution passes,
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 59s
47800c1a3d
every starter parses), fmt + clippy clean, hints leak nothing.

  What landed — 12-types, a guard → dispatch arc

  Built to dodge the trap chapter 11 first fell into: not eight isolated "does this test work?" demos, but each
  type test earning a real job, with the without-it failure shown in prose.

  - 01-bound (var/nonvar) — coalesce/3, the or-else pattern. The hook: "has this variable been given a value yet?"
  is a question = cannot ask, because unifying with an unbound var always succeeds and binds it. The guards only
  look.
  - 02-safe-sum (number) — sum just the numbers in a mixed list. The motivation is concrete because I probed it:
  unguarded is doesn't fail on a stray atom, it crashes the query (type_error(evaluable, foo), exit 3). The guard
  makes a fussy op total over untrusted data.
  - 03-split-num (integer/float) — partition a numeric list by subtype, since number/1 lumps 3 and 3.0 together.
  The filtering shape from ch11, routing into two buckets.
  - 04-kind (atom/number/is_list/compound) — the capstone, and the real lesson: the shape tests overlap (every
  list is also compound; [] is both atom and is_list), so classification isn't a partition — you impose one by
  ordering an if-then-else chain. The prose carries the overlap table; the []-is-an-atom gotcha falls out of
  putting atom before is_list.

  All eight builtins appear in a solution, so the coverage-check invariant holds. Docs updated: ROADMAP (62, new
  row), README (new row), and the expansion design doc (12 ✓ with a full design note).

  Two things I noticed but left alone as out of scope for this chapter — flagging, not acting:
  - The ROADMAP/expansion-doc prose still says plgc 0.1.0; installed is 0.3.0. Several version mentions would need
  a sweep.
  - The expansion doc's chapter-11 note calls functor/3 construct-mode "broken on plgc 0.1.0." That may have been
  fixed by 0.3.0 — worth a re-probe before chapter 13/16 leans on the claim. Happy to check either if you want.
navicore deleted branch chapter12 2026-06-23 14:26:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/loglings!13
No description provided.