We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Painful HQ9+
Jump to navigation
Jump to search
| Designed by | User:acidbytes.h |
|---|---|
| Appeared in | 2026 |
| Computational class | If HQ9+ is Turing-complete, then sure |
| Reference implementation | Implemented |
Painful HQ9+ is an implementation of HQ9+ that causes mental pain. One character commands? Oh, no! Over 60 character commands? Oh, yes!
Examples
Hello World!
lEtsseEThosetwowORdsInPRogramMing;[######~~~FAtAl=========ErROr]
Quine
I-WoNDER-whaT-this-QUIne-cOUld-pOSsiBly-Be-usED-fOr¿¡;[######~~~FAtAl=========ErROr]
99 Bottles Of Beer
9876543210§UPErCaLIfrAGilIStICeXpiALIDOCioUsSsSs;[######~~~FAtAl=========ErROr]
Incrementer
jusT_TypE_Out----THe{DanG;ProgRAmS......YerselF};[######~~~FAtAl=========ErROr]
Implementation
import std.stdio;
import std.file;
import std.string;
void main(string[] args) {
string source = readText(args.length > 1 ? args[1] : "pAINFUlhELlOwOrlDQuINe99bottlesoFbEeRonTHewaLL.d");
int accumulator = 0;
foreach (string line; source.splitLines()) {
string c = line.strip();
if (c == "lEtsseEThosetwowORdsInPRogramMing;[######~~~FAtAl=========ErROr]") writeln("Hello, world!"); // HOW PAI-AI-AIN-FUL CAN I BE?
else if (c == "I-WoNDER-whaT-this-QUIne-cOUld-pOSsiBly-Be-usED-fOr¿¡;[######~~~FAtAl=========ErROr]") writeln(source);
else if (c == "9876543210§UPErCaLIfrAGilIStICeXpiALIDOCioUsSsSs;[######~~~FAtAl=========ErROr]") {
for (int i = 99; i > 0; i--) {
writefln("%d bottles of beer on the wall, %d bottles of beer.", i, i);
writefln("Take one down and pass it around, %d bottles of beer on the wall.", i - 1);
}
}
else if (c == "jusT_TypE_Out----THe{DanG;ProgRAmS......YerselF};[######~~~FAtAl=========ErROr]") accumulator ++;
}
}
Why wouldn't you code in this?
See also
External resources
- Still confused? Well, look at the actual HQ9+ page. Please.
- Or, look at its variations, HQ9++, HQ9+- and most importantly, HQ9funge.
Creator's notes
Note that you should NEVER use this language on a daily basis. It will cause brain damage.