The world's most romantic programming language - where every program is a love story!
Explore our beautiful documentation site with installation guides, API reference, and 20+ fun examples!
CoupleScript is a fun, relationship-themed programming language that uses marriage and love metaphors to make programming more enjoyable and relatable. Built completely from scratch with no dependencies on existing languages!
# Your first love story in code! 💕
marry husband "Alex"
marry wife "Emma"
remember "Meet our lovely couple: " + husband + " and " + wife
argue love:
remember "They lived happily ever after! 🎉"
anniversary year in couple[1, 2, 3, 4, 5]:
remember "Year " + year + ": Still in love! 💖"
makeup:
remember "Every relationship has its challenges... 💪"
- 💝 Completely Independent - No Python, C, or JavaScript dependencies
- 🎭 Relationship-Themed Keywords -
marry,propose,accept,argue,makeup,remember - 🔧 Self-Hosting - Compiler written in CoupleScript itself!
- ⚡ Fast - Assembly-based virtual machine
- 🌍 Cross-Platform - Windows, Linux, macOS, Docker
- 📚 Educational - Learn programming through romantic metaphors
- 🎮 Interactive REPL - Live coding environment
- 🐳 Docker Ready - Run anywhere with Docker support
- 💖 Fun - Makes programming enjoyable for everyone!
marry- Variable declaration/assignmentdivorce- Variable deletionpropose- Function definitionaccept- Function callargue- Conditional statements (if)makeup- Else clauseremember- Print/outputforget- Clear/resetpromise- Return statementanniversary- Loopseparate- Breaktogether- Block grouping
love- Boolean truehate- Boolean falseheart- Numberswords- Stringscouple- Arrays/Listsmemory- Objects/Dictionaries
# Variable declaration
marry name "Alice"
marry age 25
# Function definition
propose greet(person):
remember "Hello, " + person + "!"
# Function call
accept greet(name)
# Conditional logic
argue age > 18:
remember "Adult"
makeup:
remember "Minor"
# Loops
anniversary i in couple[1, 2, 3, 4, 5]:
remember i
Windows:
- Install NASM assembler
- Install Visual Studio Build Tools or use WSL
Linux/Mac:
# Ubuntu/Debian
sudo apt-get install build-essential nasm
# macOS
xcode-select --install # Optional: brew install nasmAll Platforms:
# 1. Clone the repository
git clone https://github.com/rahul05ranjan/couple-script.git
cd couple-script
# 2. Build CoupleScript
make all
# 3. Start coding in love!
# Windows:
couplescript.bat examples/hello.couple # Run a program
couplescript.bat # Interactive mode
# Linux/Mac:
./couplescript examples/hello.couple # Run a program
./couplescript # Interactive modeWindows Alternative:
# Easy Windows build script
build_windows.bat- INSTALLATION.md - Complete setup guide with troubleshooting
- LANGUAGE_REFERENCE.md - Learn the CoupleScript syntax
Option 1: Install Native Tools
- Install NASM - download and add to PATH
- Install Visual Studio Build Tools
- Run:
build_windows.batormake all
Option 2: Use WSL (Recommended for ease)
- Install WSL:
wsl --install(restart required) - In WSL:
sudo apt update && sudo apt install build-essential nasm - In WSL:
make all
Option 3: GitHub Codespaces/Online
- Open this repo in GitHub Codespaces - everything works out of the box!
Option 4: Docker (Easiest - No Dependencies!)
🐳 No installation required! Run CoupleScript instantly with Docker:
# Build and run immediately (one command!)
docker build -t couplescript https://github.com/rahul05ranjan/couple-script.git && docker run -it --rm couplescript
# Or clone and use helper scripts:
git clone https://github.com/rahul05ranjan/couple-script.git
cd couple-script
./docker-run.sh build && ./docker-run.sh run # Linux/Mac
docker-run.bat build && docker-run.bat run # WindowsPerfect for:
- 🎓 Education - No setup hassles for students
- 🧪 Testing - Try CoupleScript without installing anything
- 🌍 Any Platform - Works anywhere Docker runs
- 👥 Teams - Consistent development environment
📖 Complete Docker Guide for advanced usage, development, and deployment
CoupleScript now supports Docker for easy deployment across any platform! Perfect for consistent development environments and cloud deployments.
# Build the image
make docker-build
# Run interactively
make docker-run
# Or use helper scripts:
./docker-run.sh build # Linux/Mac
docker-run.bat build # Windows# Build & run
make docker-build # Build Docker image
make docker-run # Run interactive CoupleScript
make docker-test # Run all tests in Docker
make docker-examples # Run example programs
make docker-dev # Start development environment
make docker-clean # Clean up Docker resources📖 Complete Docker Guide - Detailed Docker usage instructions
See the examples/ directory for sample programs demonstrating various features of CoupleScript.
lexer.couple- Tokenizes CoupleScript source code (written in CoupleScript itself!)parser.couple- Parses tokens into an Abstract Syntax Treevm.couple- Virtual machine that executes CoupleScript bytecodecompiler.couple- Compiles AST to bytecoderuntime.couple- Runtime system and memory managementbootstrap/- Initial bootstrap compiler written in assemblyMakefile- Build system
We love contributions from the community! CoupleScript is all about spreading love through code, and we'd love your help to make it even better. Whether you're a seasoned developer or just starting your coding journey, there are many ways to contribute! 💕
👉 Read our detailed Contributing Guide for complete instructions!
- Found a bug? Open an issue
- Have a romantic feature idea? We'd love to hear it!
- Improve documentation or add more examples
- Add new relationship-themed keywords or functions
- Improve the compiler or virtual machine
- Create fun example programs
- Enhance error messages to be more user-friendly
- Add support for new platforms
- Write tutorials or blog posts
- Create more fun example programs
- Improve installation guides
- Add translations for documentation
CoupleScript includes a comprehensive testing framework designed for the complete language implementation:
The CI pipeline validates project structure and build system:
# CI validation (works now)
make test # Project structure validation
./validate_project.sh # Comprehensive project health check
# Build testing (requires NASM)
make test-build # Validates successful compilation
# Full testing (requires working interpreter)
make test-full # Complete test suite with executionLevel 1 - ✅ Structure Validation (CI Ready)
- ✅ Project structure and file organization
- ✅ CoupleScript syntax validation in examples
- ✅ Documentation completeness
- ✅ Build system configuration
Level 2 - 🔨 Build Validation (NASM Required)
- 🔨 Bootstrap compiler assembly
- 🔨 Virtual machine compilation
- 🔨 Binary artifact creation
Level 3 - 🚀 Runtime Testing (Full Implementation)
- 🚀 Language feature execution
- 🚀 Error handling validation
- 🚀 Performance benchmarking
- 🚀 Cross-platform compatibility
The project includes a complete testing framework ready for when the interpreter is functional:
tests/test_framework.couple- Testing framework written in CoupleScripttests/unit/- Unit tests for language featurestests/integration/- End-to-end integration testsrun_tests.sh/run_tests.bat- Cross-platform test runners
See tests/README.md for detailed testing documentation.
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/couple-script.git
cd couple-script
git remote add upstream https://github.com/rahul05ranjan/couple-script.git# Install dependencies (Linux/macOS)
sudo apt-get install build-essential nasm # Ubuntu/Debian
# or: brew install nasm # macOS
# Build the project
make all
# Test your setup
make test
./couplescript examples/hello.couplegit checkout -b feature/amazing-romantic-feature
# or: git checkout -b fix/some-bug-fix- Write your code with love! 💖
- Follow the existing code style
- Add comments explaining your romantic logic
- Create or update examples if needed
# Build and test
make clean && make all
make test
# Test your specific changes
# Windows:
couplescript.bat your_test_program.couple
# Linux/macOS:
./couplescript your_test_program.couplegit add .
git commit -m "Add amazing romantic feature that makes coding more lovely"git push origin feature/amazing-romantic-featureThen create a Pull Request on GitHub with:
- Clear description of your changes
- Why this makes CoupleScript more romantic/better
- Any testing you've done
- Add new example programs (love poems, date planners, etc.)
- Improve error messages to be more romantic
- Add more relationship-themed built-in functions
- Fix typos in documentation
- Add unit tests for existing features
- Implement new language features (e.g.,
engagementfor constants) - Improve the REPL experience
- Add debugging capabilities
- Create a VS Code extension with syntax highlighting
- Implement more data structures (e.g.,
wedding_guest_list)
- Optimize the virtual machine performance
- Add networking capabilities for "long-distance relationships"
- Create a package manager for CoupleScript libraries
- Implement compilation to native machine code
- Add support for concurrent "relationships" (threading)
- Use relationship metaphors consistently
- Write code that tells a love story
- Comment your code as if explaining to your significant other
- Test thoroughly - we want stable relationships!
- Keep functions small and focused (like perfect date plans)
- Variables:
camelCase(e.g.,myLoveStory,firstDate) - Functions:
snake_casewith romantic names (e.g.,propose_marriage,calculate_love_score) - Constants:
UPPER_CASE(e.g.,ETERNAL_LOVE,MAX_ROMANCE_LEVEL)
# Good: Romantic and clear
marry couple_names couple["Alice", "Bob"]
propose plan_perfect_date(location, activity):
marry date_plan memory[
"location": location,
"activity": activity,
"romance_level": 100
]
promise date_plan
# Comments should be loving and helpful
# This function calculates the compatibility between two people
propose calculate_compatibility(person1, person2):
# Love always finds a way! 💕
promise love
Contributors will be:
- ✨ Added to our Hall of Love (contributors list)
- 💕 Mentioned in release notes
- 🌟 Given special romantic titles based on contributions
- 💖 Invited to help shape the future of CoupleScript
- Discord: Join our romantic coding community (coming soon!)
- GitHub Discussions: Share ideas and get help
- Issues: Report bugs or request features
We're committed to providing a welcoming and inclusive environment. Please:
- Be respectful and kind (like in any good relationship)
- Help others learn and grow
- Embrace diversity and different perspectives
- Keep discussions constructive and romantic! 💕
Remember: In code as in love, every contribution matters! 💖
Ready to contribute? We can't wait to see what romantic features you'll bring to CoupleScript!
MIT License - Feel free to use this for educational purposes or just for fun!