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.
A box with balls
Jump to navigation
Jump to search
A box with balls (Abwb for short) is an esolang made by me, User:Hashibami, as a joke around a paradox, the paradox says: "If in a box, there is 10 balls, and every time you take one, you add the current amount of balls in the box, and you do it indefinitely, when you stop, how many balls are in the box?"
Hazel from the future here (2026), THIS IS STUPID! THIS DOESN'T MAKE ANY SENSE!
Commands
Well, in Abwb there are 5 commands:
| Command | In python |
|---|---|
add:balls;
|
box += balls |
remove:balls;
|
box -= balls |
bless:balls;
|
box *= balls |
divide:balls;
|
box /= balls |
watch:;
|
print(box) |
Interpreter for Python
I made this interpreter that you can run code, just change the current code string:
def run(code):
box = 0
lines = code.strip().splitlines()
for line in lines:
line = line.strip()
if line.startswith("add:"):
box += int(line[4:-1])
elif line.startswith("remove:"):
box -= int(line[7:-1])
elif line.startswith("divide:"):
box //= int(line[7:-1])
elif line.startswith("bless:"):
box *= int(line[6:-1])
elif line == "watch:;":
print(box)
else:
print(f"Invalid: {line}")
code = """
add:3;
bless:4;
remove:2;
divide:2;
watch:;
"""
run(code)