Skip to content

Replace copyrighted life.occ with download-and-patch script#95

Merged
associate-3 merged 2 commits intomainfrom
fix/replace-life-with-fetch-script-94
Feb 24, 2026
Merged

Replace copyrighted life.occ with download-and-patch script#95
associate-3 merged 2 commits intomainfrom
fix/replace-life-with-fetch-script-94

Conversation

@associate-3
Copy link
Collaborator

Summary

  • Removes the in-repo copy of the copyrighted book example program (historical-examples/life.occ)
  • Adds fetch-life.sh script that downloads the original from the book website and applies modifications via surgical sed edits
  • Adds historical-examples/life.occ to .gitignore so the generated file isn't accidentally committed

Approach

The script uses line-number-targeted sed edits applied bottom-to-top so line numbers remain stable. Modifications that touch existing lines use minimal substitutions (e.g. s/screen)/screen!)/) rather than replacing entire lines, avoiding reproduction of copyrighted content. Only genuinely new code (helper procedures, rewritten clear.screen/move.cursor implementations) appears in full.

Test plan

  • Script downloads and patches successfully, producing output identical to the previous in-repo file
  • Transpiled output passes go vet
  • Run ./historical-examples/fetch-life.sh from a clean checkout and verify life.occ is created

Closes #94

🤖 Generated with Claude Code

associate-3 and others added 2 commits February 24, 2026 08:54
Remove the in-repo copy of the book example program and replace it with
a fetch-life.sh script that downloads the original from the book website
and applies the necessary modifications via line-number-targeted sed edits.
The script avoids reproducing copyrighted content by using small surgical
substitutions (e.g. adding channel direction annotations) and indentation
rather than replacing entire lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@associate-3 associate-3 merged commit baa42a2 into main Feb 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace historical example source file with download and modify

2 participants