Dumb BittyFish9+♥︎
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
Dumb BittyFish9+♥︎ is esoteric programming language which have many languages in one
Language overview
Dumb BittyFish9+♥︎ combines Dumbascii, BittyLang, Deadfish, HQ9+, and t a b, adding commands ♥︎ and ♡, with optional Dumbascii-2
Why name is "Dumb BittyFish9+♥︎"?
Shorter: Dumbascii, t a b (i cant bold whitespace), BittyLang, DeadFish, HQ9+, and ♥︎.
Dumb+ +Bitty+Fish+9%2B+♥︎=Dumb BittyFish9+♥︎ (Dumb_BittyFish9%2B%E2%99%A5%EF%B8%8E)
Commands
Command | Description |
---|---|
(whitespace)
|
t a b's increment |
(\t)
|
t a b's output as ASCII |
.
|
BittyLang's output as ASCII |
+
|
HQ9+'s, Dumbascii's, BittyLang's increment |
-
|
Dumbascii's, BittyLang's Decrement |
o
|
Deadfish's output |
s
|
Deadfish's squaring |
i
|
Deadfish's increment |
d
|
Deadfish's Decrement |
h
|
Deadfish's halt |
9
|
HQ9+'s song about 99 bootles of the beer |
Q
|
HQ9+'s quine |
♥︎
|
Dumb BittyFish9+♥︎'s output random ascii character (with codes 0-127) |
♡
|
Dumb BittyFish9+♥︎'s output random ascii character (with codes 0-255) |
Implementations
Dumb BittyFish9+♥︎ has only one implementation.
Python (written by AI)
# Dumb BittyFish9+♥︎ — simple interpreter (Python 3) # Reads a program from stdin (single line) and executes commands according to the spec. import sys import random def print_99_bottles(): for n in range(99, 0, -1): bottle = "bottle" if n == 1 else "bottles" nextn = n - 1 nextbottle = "bottle" if nextn == 1 else "bottles" nextn_str = str(nextn) if nextn != 0 else "no more" sys.stdout.write(f"{n} {bottle} of beer on the wall, {n} {bottle} of beer.\n") sys.stdout.write(f"Take one down and pass it around, {nextn_str} {nextbottle} of beer on the wall.\n\n") sys.stdout.write("No more bottles of beer on the wall, no more bottles of beer.\n") sys.stdout.write("Go to the store and buy some more, 99 bottles of beer on the wall.\n") def run(program): acc = 0 # Keep the original program string so Q can print it (quine-like) src = program i = 0 while i < len(program): ch = program[i] # Deadfish commands if ch == 'i' or ch == '+': # '+' is also increment (HQ9+/Dumbascii/BittyLang) acc += 1 elif ch == 'd' or ch == '-': acc -= 1 elif ch == 's': acc = acc * acc elif ch == 'o': # Deadfish: output numeric value print(acc) elif ch == 'h': # halt break # HQ9+ style / other commands elif ch == 'H': # Hello, world! (HQ9+ canonical) print("Hello, world!") elif ch == 'Q': # quine: print source print(src) elif ch == '9': print_99_bottles() # BittyLang / Dumbascii outputs elif ch == '.': # output as ASCII character (BittyLang) try: sys.stdout.write(chr(acc % 256)) except (ValueError, OverflowError): sys.stdout.write('?') elif ch == 'A': # alternate ascii output (kept for compatibility) try: sys.stdout.write(chr(acc % 256)) except (ValueError, OverflowError): sys.stdout.write('?') elif ch == '\t': # tab: t a b's output-as-ASCII per wiki try: sys.stdout.write(chr(acc % 256)) except (ValueError, OverflowError): sys.stdout.write('?') elif ch == ' ': # space: t a b's increment (whitespace increments) acc += 1 # Extra helpers from user’s original draft elif ch == 'v': # v — newline sys.stdout.write('\n') elif ch == 'N': # print numeric value (duplicate of 'o' but kept) print(acc) # Dumb BittyFish9+♥︎ additions: random ascii elif ch == '♥' or ch == '\u2665' or ch == '\u2665\uFE0E': # solid heart + variation r = random.randint(0, 127) try: sys.stdout.write(chr(r)) except Exception: sys.stdout.write('?') elif ch == '♡' or ch == '\u2661': # hollow heart r = random.randint(0, 255) try: sys.stdout.write(chr(r)) except Exception: sys.stdout.write('?') # Ignore all unknown symbols (behavior of many esolang interpreters) # (if needed — could print an error or raise exception instead) i += 1 # After Deadfish commands: if ACC becomes -1 or 256 -> reset to 0 # (this is the canonical Deadfish behavior) if acc == -1 or acc == 256: acc = 0 if __name__ == "__main__": try: program = input() # read the program (single line) except EOFError: program = "" run(program)
Examples
- Feel free to add your own example!
Hello, World!
Code who outputting "Hello, world!" looks as
H
Where H output it.
XKCD Random Number
There is more than one example for the output "4"! Possible examples are provided below.
XKCD Random Number using deadfish
iiso
Outputting "4" using deadfish commands. Two "i" makes number 2, "s" makes it 4, and "o" output it
XKCD Random Number using all (maybe) languages
+ s.