Repository navigation
Read long constant lists in place: Bad Apple builds again - #71
Merged
Merged
Conversation
TrigScript 4.0's own backend refused probes/bad-apple.ts: "arrays and stacks of 657478 cells, past the 65536". A read-only list whose values have more than 6 bits between them was laid out as cell triggers, 72 bytes a value, and a video's brushes for the fog are hundreds of thousands of 18-bit words. A list longer than 16,384 values is now read where it is, a dword a value and a trigger a bit, whatever its width. The gate of step 16 had not built bad-apple (its video was not on the disk), which is how it slipped through. In the lifted game all 5,216 frames light exactly their cover, 31k conditions and actions a frame on average and 94.5k at the most (151k before, through cells); game-check clean. The probe is the showcase map now: no units (build-fixture's new NO_BASES=1), the board lit as pictures so the rows below it stay never seen, a curtain into and out of the video, and the song and video credited in the map's description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U79fdupFuMLxYQmMJtffPN
This was referenced Oct 26, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TrigScript 4.0's own backend refused
probes/bad-apple.ts:A list known when the script is built whose values have more than 6 bits between them was laid out as cell triggers, 72 bytes a value. A video's brushes for the fog are hundreds of thousands of 18-bit words, so any script that plays a real video through
fog.playwas refused. The step 16 gate listed bad-apple as "not built here" (its video was not on the disk), which is how it got through.The fix (
compiler/backend/emit.ts): a list longer than 16,384 values is read where it is, whatever its width — a dword a value, a trigger a bit (Bad Apple's words: 18). Shorter lists are laid out as before.Checked
tests/own-build.test.ts: a 70,000-value, 20-bit list built and walked as the game walks it; fails without the fix. Full suite: 1,360 passed.game-check: 0 accesses ending the game, 0 ignored.probes/halftone.ts, the other probe the gate did not build, builds.Also
probes/bad-apple.tsis now the showcase map for the YouTube recording: no units, the board lit as build-time pictures so the rows below it stay never seen (black), a curtain into and out of the video, credits.scripts/build-fixture.mts:NO_BASES=1places no base or troops at the start locations.probes/lib/bad-apple-map.mts: the description credits the song and the video.docs/v4-plan.md: the gate table says bad-apple and halftone build.🤖 Generated with Claude Code
https://claude.ai/code/session_01U79fdupFuMLxYQmMJtffPN