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.
Metadata
Release files for heartbreak-code 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| heartbreak_code-0.0.4.tar.gz | 35.6 kB | Without provenance | Details for heartbreak_code-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| heartbreak_code-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for heartbreak_code-0.0.4-py3-none-any.whl |
Total release size: 75.8 kB
Release files / heartbreak_code-0.0.4.tar.gz
| Download URL | heartbreak_code-0.0.4.tar.gz |
|---|---|
| Size | 35.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
062bbcecd122919578971f99ee62fea34ac7f98040982afb67857cb40fa3e687
|
|
BLAKE2b-256 checksum How to use checksums |
3cf4f44c0a84519004c91358287b9bdee690baf4eb8fa82e12b9bcac2d6b054b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|
Release files / heartbreak_code-0.0.4-py3-none-any.whl
| Download URL | heartbreak_code-0.0.4-py3-none-any.whl |
|---|---|
| Size | 40.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63485a4023ae0f52ac7d2b209effa7796641983f7e16b93f34274c2022f9d9e6
|
|
BLAKE2b-256 checksum How to use checksums |
13e3f87ee2b77c1f1f82fc03966d261ae7d923ba8b7169a2b5d037098443e349
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|
Security for heartbreak-code 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.