r/programminghorror
•
u/HaskellLisp_green
•
Aug 07 '26
•
1
Python obfuscated anti-pythonic brainfuck interpreter
I tried to do my best to make it unreadable.
638
Upvotes
103
u/ArsenicPolaris Aug 07 '26
Really nice to see a fellow Emacs user like me! How's your pinky finger doing?
11
u/danielcristofani Aug 08 '26
You missed ',' and your '[' code is broken (doesn't skip forward); if you were trying to DeMorgan it for obfuscation in line 20 you need at least another couple "not" in there. Also it does "maximum recursion depth exceeded" pretty quickly.
40
u/MathematicianOk9155 Aug 07 '26
Using enumerate and not using the value it give is just rude
I'm going blind squinting trying to read P vs p
25
u/NaCl-more Aug 07 '26
Here's mine in C i wrote a couple years ago
24
u/funkdefied Aug 07 '26
“Anti-pythonic” you say? With that beautiful list comprehension in line 14?
3
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Aug 07 '26
I guess that means it can't run programs over 30,000 characters.
15
u/HaskellLisp_green Aug 07 '26
https://github.com/dfwdfq/brainfuck-interpreters