Skip to main content

A Python project.

Project description

HeartbreakCode 💔

Turn your emotional baggage into executable code.

License: MIT

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've for if, else if, and else blocks.
  • Reusable 'Verses' (Functions): Define and call functions (Verses) using Define Verse 'Chorus': ... End Verse and Perform '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 Letter and Write In The Diary.
  • "Tell Me Why": Interactive Debugging: Pause program execution at any point with Tell Me Why to 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.

  1. 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
    
  2. 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

heartbreak_code-0.0.2.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heartbreak_code-0.0.2-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file heartbreak_code-0.0.2.tar.gz.

File metadata

  • Download URL: heartbreak_code-0.0.2.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for heartbreak_code-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ce980654da83352606a37c7d4848645a5861386043d8e2d864e39165f6cdd937
MD5 2897b891903b0ca60ac88a9f7ecf3783
BLAKE2b-256 58ed1a736699636452318d6aee6053e183410a2f3ecf707ee64e3b9b465e4096

See more details on using hashes here.

File details

Details for the file heartbreak_code-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for heartbreak_code-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee1c0aae474fb76dbc93fc688e86f4bf4a888360e66ca60c952bd5c399261a16
MD5 800e8578511c12c0ad72ab26be3ec076
BLAKE2b-256 40c8a765328937a7f51b142ff8470e17b4f13b9e2059b20263552b511b9cd68d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page