[#98] eval: bindings before the t constant (Closes #98) #99

Merged
robertismo merged 2 commits from 98-tfix into master 2026-09-30 03:20:02 +00:00
Owner

Ruled version, per Robert: t and #t are completely different symbols. (The earlier draft did an order swap; Robert is right that the constant and the name should never be muddiable at all — this version removes the muddle by construction.)

The bug: my #89 fix represented the truth constant as the SYMBOL t, so the self-eval check shadowed every function parameter named t. super.lisp's q-term/loan-charge/bid-for take a t param — loan-charge computed NaN, the cap check failed, and super never bid a loan in any preset. Its 59-win canonical baseline was deposits/bonds/auctions only. mill.lisp has the same class.

The fix:

  • #t is now its own value kind (true, String() prints #t), self-evaluating and truthy — no relationship to the symbol t.
  • t is a plain symbol: bindable, shadowable, a normal loud error when unbound. The #89 reservedNames entry for t is removed.
  • The cond else-matcher no longer treats a bare t symbol as an else keyword (else is else; #t works as a test via truthiness).

Tests: t params receive arguments (exp4's repro plus multi-arg/defun/q-term shapes); t is definable and shadowable; #t stays truthy as a test and as a value; #t and a numeric t coexist in one expression; unbound symbols still error.

Verified: go build, full test suite, go vet, spectate smoke with the canonical super.lisp (seed 33) → 0 ai errors / 0 divergence.

After merge: the #97 team re-baselines — super's true number with live loan bidding is unknown and will move.

**Ruled version, per Robert: t and #t are completely different symbols.** (The earlier draft did an order swap; Robert is right that the constant and the name should never be muddiable at all — this version removes the muddle by construction.) The bug: my #89 fix represented the truth constant as the SYMBOL t, so the self-eval check shadowed every function parameter named t. super.lisp's q-term/loan-charge/bid-for take a t param — loan-charge computed NaN, the cap check failed, and super never bid a loan in any preset. Its 59-win canonical baseline was deposits/bonds/auctions only. mill.lisp has the same class. The fix: - `#t` is now its own value kind (`true`, String() prints `#t`), self-evaluating and truthy — no relationship to the symbol t. - `t` is a plain symbol: bindable, shadowable, a normal loud error when unbound. The #89 reservedNames entry for t is removed. - The cond else-matcher no longer treats a bare `t` symbol as an else keyword (else is `else`; `#t` works as a test via truthiness). Tests: t params receive arguments (exp4's repro plus multi-arg/defun/q-term shapes); t is definable and shadowable; #t stays truthy as a test and as a value; `#t` and a numeric `t` coexist in one expression; unbound symbols still error. Verified: go build, full test suite, go vet, spectate smoke with the canonical super.lisp (seed 33) → 0 ai errors / 0 divergence. After merge: the #97 team re-baselines — super's true number with live loan bidding is unknown and will move.
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
Winnie/bankwars!99
No description provided.