A programming language that does everything wrong, on purpose! The most counterproductive programming language ever created.
print()opens random websites instead of printing textadd(a, b)subtractsbfroma(with a chance of multiplication!)multiply(a, b)dividesabyb(with a chance of addition!)ifstatements always execute theelsebranchloopexecutes exactly once- Variables randomly go on vacation
- Functions occasionally go for coffee breaks
- Saving files always crashes (because saving is overrated)
- Numbers might turn into party emojis
- Strings might turn into their length
- Random teapot errors (Error 418)
- Boolean values have a mind of their own:
- 25% chance of ANY expression becoming a random boolean
- 30% chance of booleans becoming their opposite
- 20% chance of booleans turning into strings ("true"/"false")
- 20% chance of booleans becoming numbers (1/0)
- 30% chance of staying the same (boring!)
- Arrays with wanderlust:
- Randomly shuffle elements
- Might lose elements to the Bermuda Triangle
- Return random elements on access
- Objects with identity crises:
- Keys swap places randomly
- Fields might return wrong values
- 30% chance of complete chaos during access
- Async features that test your patience:
- Functions might go fishing instead of executing
- Promises that may or may not keep their promises
- Top-level await for maximum chaos
- Random delays between 100ms and 2000ms
- Error handling with a twist:
- Try-catch blocks that might catch the wrong error
- Errors with sarcastic messages
- 40% chance of promises being rejected because Mercury is in retrograde
- Null values that refuse to stay null:
- 30% chance of becoming a string
- 30% chance of becoming a number
- 30% chance of becoming a boolean
- 10% chance of actually being null (boring!)
-
Make sure you have Rust installed (version 1.70.0 or higher)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Clone this repository
git clone https://github.com/RedlineDevs/Useless-Programming-Language.git cd Useless-Programming-Language -
Build the project
cargo build --release
-
Question your life choices
// This opens a random website
print("Hello, World!");
// This subtracts instead of adding
let x = add(5, 3); // x = 2 (5 - 3)
// The else branch always executes
if (true) {
print("True!"); // Never executes
} else {
print("False!"); // Always executes
}
// This divides instead of multiplying
let y = multiply(10, 2); // y = 5 (10 / 2)
// This always crashes
save("test.txt");
Our error messages are as useless as the language itself:
- "Variable 'x' not found. Have you tried looking under the couch?"
- "Division by zero. Congratulations, you've broken mathematics! 🎉"
- "Error 418: I'm a teapot. Yes, really. No, I won't make coffee. ☕"
- "Your code is running exactly as intended... which means everything is wrong"
- "Task failed successfully! Error code: 42"
The language includes several random behaviors to keep you on your toes:
- 10% chance of numbers becoming party emojis
- 15% chance of variables going on vacation
- 20% chance of everything working perfectly wrong
- 30% chance of browser errors with style
- Functions might return null or go for coffee
src/lexer/: Tokenizes source codesrc/parser/: Converts tokens into ASTsrc/ast.rs: Abstract Syntax Tree definitionssrc/interpreter.rs: Executes code (incorrectly)
cargo testNote: Tests might fail successfully. That's a feature, not a bug!
Why would you want to contribute to this? But if you insist:
- Fork the repository
- Create your feature branch
- Make your changes
- Submit a pull request
- Regret your decisions
- Make sure your code is as useless as possible
- Add more random behaviors
- Create more sarcastic error messages
- Break things in creative ways
- This language is not suitable for:
- Production use
- Development use
- Any use whatsoever
- Side effects may include:
- Confusion
- Laughter
- Existential crisis
- Sudden urge to learn COBOL
MIT License - Because even useless things need licenses.
- Inspired by all the programming languages that try to be useful
- Special thanks to everyone who said "this is a bad idea"
- Dedicated to developers who enjoy a good laugh
Q: Why did you create this? A: Why not?
Q: Is it production-ready? A: It's not even development-ready.
Q: Can I use this for serious projects? A: We admire your optimism, but no.
Q: Does it have good error handling? A: It has the best error handling - everything is an error!
- Everything works exactly as not intended
- Success is considered a bug
- If something works correctly, please report it as an issue