A polite emotional programming language interpreter
Project description
Moody , beg to compile your code! (or don't and watch the compiler cry)
*Moody is a playful, tone-sensitive programming language that only compiles your code if you’re polite enough. It supports basic control structures, recursion, and even enforces good manners through tone analysis.
✅ Features
- Custom syntax influenced by JavaScript and Python.
- Mood-based keywords: Good, Neutral, Bad — each affects your "tone score".
- Will refuse to compile if you're rude, impolite, or forget to say
thanks. - Supports:
- Variable declarations (
let,const) - Functions (
beg def myFunc() { ... }) - Conditionals (
listen if) - Loops (
plead while) - Recursion
- Polite
returnstatements (request) - Tone-based printing (
humblyRequest,send,handover)
- Variable declarations (
- Interactive Interpreter:
python moody.py -i
💬 Tone Keywords
Good (Boosts score, required):
begprettyPleasepleadrequest→ becomesreturnthankshumblyRequest→ use before calling functions
Limit: 2 uses per keyword.
Neutral (No impact, but limited):
heysuplistenyobtwproceedsend→ `return' but neutral
Limit: 1 use per keyword.
Bad (Reduces tone score):
youBetterdarethreatensubmitnowhandover→returnreturn but aggressive
Limit: 5 uses per keyword.
❗ Tone Rules
Your MoodyLang code must:
- Use at least 3 good keywords.
- Maintain a minimum tone score of 6.
- Include a
thanksbefore finishing (Sort of like a return 0 in C++, don't use a semicolon in a thanks statement).
Violating these will result in:
FixYourAttitudeErrorCompilerIsCryingErrorGratitudeException
Multiple errors can occur simultaneously.
📄 Example: Polite Search
beg def linearSearch(n) {
yo let i = 0;
plead while (i < len(arr)) {
listen if (arr[i] == n) {
request i;
}
plead i = i + 1;
}
beg request -1;
}
hey const arr = [1, 2, 3, 4];
humblyRequest print(linearSearch(3));
thanks
Project details
Release history Release notifications | RSS feed
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 moodylang-0.1.0.tar.gz.
File metadata
- Download URL: moodylang-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
943b2a6a8d1e498281d91a14fe29a955ebb20d75dbe3060f5b7e7eea9eebb558
|
|
| MD5 |
2ab2e6e1c53aa935bbf71faa46345757
|
|
| BLAKE2b-256 |
d7aba1cd68f59e9967d945cf86b6e1d4470c2d14b1ac6b92ca2b29c4fc4ff0da
|
File details
Details for the file moodylang-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moodylang-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f169ca9df0ffb125746ac28ed74995d04c8aaf16b8c8b40699c7b1648403bc2
|
|
| MD5 |
0f9ee7554b00f5e87a9468975265960e
|
|
| BLAKE2b-256 |
a16776f847db5cedba5bc900be8997623c44ac83e108619847beb13246fd3fa6
|