A Python project.
Project description
HeartbreakCode
Turn your emotional baggage into executable code.
Welcome to HeartbreakCode, the world's first esoteric programming language inspired by the raw, lyrical honesty of artists like Taylor Swift and Olivia Rodrigo. Here, you don't just write programs—you write anthems of love, loss, and logic.
HeartbreakCode is a fully-featured, interpreted programming language where the syntax is a tribute to pop music's most iconic storytellers. We've swapped out cold, impersonal keywords for the passionate, dramatic phrases that define a generation's anthems.
This project is a significant technical undertaking involving a custom-built lexer, parser, and runtime environment, all created from the ground up. It's an exploration of how we can bridge the gap between creative expression and computational thinking, making code more relatable, fun, and a little more theatrical.
Key Features
- Lyrical & Expressive Syntax: Write code that reads like a pop song. Assign variables with
The story of us is.... - Lyrical Conditional Logic: Implement conditional branching using
Would've, Could've, Should'veforif,else if, andelseblocks. - Reusable 'Verses' (Functions): Define and call functions (Verses) using
Define Verse 'Chorus': ... End VerseandPerform 'Chorus'. - Themed Object-Oriented System: 'Albums' and 'Records': Define 'Albums' as classes and create 'Records' as instances.
- Structured Error Handling: 'This is me trying...': Implement try/catch/finally error handling with lyrical themes.
- "The Vault": A File System API: Interact with the local file system using built-in 'Verses' like
Read The LetterandWrite In The Diary. - "Tell Me Why": Interactive Debugging: Pause program execution at any point with
Tell Me Whyto inspect variable states. - The Record Label: A Lyrical Package Manager: Discover, distribute, and install third-party HeartbreakCode 'Albums' (libraries).
- The Setlist: A Web Server Micro-framework: Build lightweight, interactive web applications and APIs.
Installation
You can install HeartbreakCode directly from PyPI:
pip install heartbreak-code
Usage
Once installed, you can run HeartbreakCode programs.
-
Create a new file with the
.hbc(HeartbreakCode) extension, e.g.,my_song.hbc:# my_song.hbc The story of us is my_variable 1989 Would've my_variable is 1989 Speak Now: Speak Now: 'It was a good year!' End Verse -
Run your HeartbreakCode program from the command line:
heartbreak-code run my_song.hbc
Contribute
We welcome contributions! Check out our GitHub repository for more details on how to contribute to the project.
License
HeartbreakCode is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file heartbreak_code-0.0.3.tar.gz.
File metadata
- Download URL: heartbreak_code-0.0.3.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e11fe2906a3ece3ec5c5816a272728262202af82cec5ccd9c2528ae4273be296
|
|
| MD5 |
ef8b9f58eb3ee630277baf3ca6f17846
|
|
| BLAKE2b-256 |
af89b72f8277c163739493e8a8fede0a2811f1f87be4cc0484cb0664a9d3851a
|
File details
Details for the file heartbreak_code-0.0.3-py3-none-any.whl.
File metadata
- Download URL: heartbreak_code-0.0.3-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48486dd8ec1c60c4841a0ae7f109529730ac8bc87d49566a1779da70b14cd1e3
|
|
| MD5 |
3cacb64af374feb20b7886c85d392102
|
|
| BLAKE2b-256 |
e76e209ca45ecd09c824704d31d10a3f77e01e25e8969a76516cea8d204ba1f9
|