Hq(-
Jump to navigation
Jump to search
Hq(- is a derivative of HQ9+ but weak.
- H prints "hi god"
- q prints the program's source code's first character's ascii value.
- ( prints the last line of 99 Bottles of beer.
- - adds ¹/∞ or in other words, zero
Yep. Basically does every BAD example program
Interpreter
Here is an interpreter written in Python 3.
try: f = open("code.hq") code = f.read() f.close() except FileNotFoundError: print("Error: file 'code.hq' does not exist") exit(1) acc = 0 for c in code: if c == "H": print("hi god") elif c == "q": print(ord(code[0])) elif c == "(": print("No bottles of beer on the wall.") elif c == "-": acc += 0
Examples
Output the meaning of life
*q
XKCD Random Number
�q
Replace �
with \x04
.