r/programminghorror • u/abigail3141 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • May 14 '26
Python one liner, 1500 characters It is evolving
42
Upvotes
r/programminghorror • u/abigail3141 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • May 14 '26
11
u/Minecraft_Lets_Play May 14 '26
That is the mother of one liners
5
u/abigail3141 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” May 14 '26
First one's the one-liner (~1500 characters) with line wrap to fit the screenshot.
The second one includes testing and drafting code as well.
If you want to copy or scroll the code, here goes:
This is a sort of follow up to an old post of mine about my habit of python one-liners. I've found a strategy to store and retrieve variables from within the one-liner, further extending the possibilities.
In case you're wondering what it does, it's parsing some data from a third-party API for a video game(a space sim called Elite: Dangerous, it's searching for potentially undiscovered h-mass systems)
5
u/W00GA May 14 '26
ummmmmm
yeah,
jesus
4
u/Sexy_Koala_Juice May 14 '26
Best horror i've seen in a while, this fucking sucks holy shit
4
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” May 14 '26
I only sort of tried to makes sense of the last one. This one, absolutely not.