Poetic Source is a platform that celebrates the intersection of programming and poetry. Each piece in the collection strives to combine programming concepts and poetic form, demonstrating how technical precision and artistic beauty can complement each other.
The collection showcases various poetic forms:
- Ghazals: Rhyming couplets
- Haikus: 5-7-5 syllables
- Koans: Paradoxical puzzles
- Rubaʿi: Rhyming quatrains
- Tankas: 5-7-5-7-7 syllables
- Free Verse
Available in multiple programming languages:
- Modern Synthesis: Swift, Go, JavaScript
- Natural Flow: Python, Ruby, Kotlin
- Structured Elegance: ALGOL 68, Ada, Java
- Visual Expression: APL, Befunge
- System Dialogues: C, C++, Objective-C
- Symbolic Patterns: Lisp, SQL
Each poem includes:
- Composition notes explaining poetic structure and writing choices
- Technical explanations of programming concepts
- Philosophical insights exploring deeper connections
- Node.js (v16 or higher)
- npm
- Clone the repository:
git clone https://github.com/chamarapaul/poetic-source.git
cd poetic-source
- Install dependencies:
npm install
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
poetic-source/
├── src/
│ ├── components/
│ ├── hooks/
│ ├── lib/
│ ├── pages/
│ └── styles/
├── poems/ # Markdown files containing poems
└── scripts/
npm test
npm test:watch # Run tests in watch mode
As a contributor to Poetic Source, you have the opportunity to explore the creative possibilities that emerge when we treat code as a poetic medium:
- Experiment with different programming languages, poetic forms, and computer science concepts
- Use programming and syntax constraints to create meaning and beauty
- Discover new ways to express ideas through code
If you'd like to add your own code poetry:
-
Fork the repository
-
Create a new branch (
git checkout -b feature/new-poem
) -
Create a new markdown file in the appropriate language directory under
poems/
using this frontmatter template:
---
id: "kebab-case-unique-id"
title: "Your Poem Title"
author: "'Your Name'|'Chatbot Name'"
date: "YYYY-MM-DDTHH:MM:SSZ"
form: "ghazal|haiku|koan|rubai|tanka|freeverse"
language: "ada|algol68|apl|befunge|c|cpp|go|java|javascript|kotlin|lisp|objectivec|python|ruby|sql|swift"
tags:
- kebab-case-tag
- another-tag
preview: "Brief description of your poem (max 250 characters)"
notes:
composition: "Notes about the poetic composition"
technical: "Technical explanation of the code"
philosophical: "Deeper meaning and interpretation"
---
Your code poem here...
- Ensure your poem follows these guidelines:
- Must be placed in the correct language directory (
poems/[language]/
) - Must generally follow the syntax rules in the chosen language
- Must follow the constraints of the chosen poetic form
- Should include meaningful comments that contribute to the poetry
- Should explore deeper meanings in computer science concepts
- Validate your poem (
npm run validate-poems
). This will check:
- Required frontmatter fields
- Valid field formats (dates, IDs, tags)
- Directory structure
- Language and form validity
- Commit your changes (
git commit -am 'Add new poem'
) - Push to the branch (
git push origin feature/new-poem
) - Create a Pull Request
- Run validation before submitting to ensure your poem meets the requirements
- Consider using language and form constraints to enhance both the code and poetic aspects
Pull requests will be checked for poem validation and poetic form adherence.
Built with:
- Next.js - React framework with Typescript
- Gray Matter - Markdown processing and frontmatter parsing
- Prism React Renderer - Syntax highlighting
- shad/ui components - UI Components
- Lucide React - Icons
- Tailwind CSS - Styling
- Jest - Testing framework
- Chalk - Terminal styling for scripts
TBD
- Inspired by a love of code and poetry
- Built with assistance from Claude AI - AI collaboration in code poem generation and site development