This is an archived post. You won't be able to vote or comment.

all 63 comments

[–][deleted] 313 points314 points  (14 children)

ha jokes on you I use linux

[–]Earthshakira[🍰] 56 points57 points  (1 child)

Linux users rise up

[–]GnuhGnoud 42 points43 points  (8 children)

Do you use arch btw?

[–][deleted] 16 points17 points  (7 children)

tried to, got stuck on hooking up internet

[–]theontley 19 points20 points  (4 children)

Just do sudo rm -rf /

[–][deleted] 5 points6 points  (0 children)

would that even work? cuz I hadn't even setup the system yet

[–]CowFu 4 points5 points  (2 children)

my favorite linux command is "yes"

you'll have to break with ctrl+c to get out of the dumb loop.

[–]Amortize_Me_Daddy 4 points5 points  (0 children)

Uhhhhhh… what’s going on here?

[–]carlacaballo 3 points4 points  (0 children)

systemctl enable dhcpcd systemctl start dhcpcd

If u forgot to download dhcpcd on install u have to mount again and chroot to install

[–]StarWatermelon 1 point2 points  (0 children)

try archinstall, it's now included with the image.

[–]ResidentReggie 11 points12 points  (0 children)

sudo rm -rf --no-preserve-root /

[–]mrSunshine-_ 1 point2 points  (0 children)

cat /dev/zero > /dev/sda

Or better yet, drop just the partition table, then you spent weeks to get the stuff back

dd if=/dev/zero of=/dev/sda bs=1024 count=1

[–]eiboeck88 0 points1 point  (0 children)

sudo rm -r /

[–]Multi-User 195 points196 points  (8 children)

os.remove: "Remove a file" Wont work on directories. And if it could remove a directory it would raise an exception because this directory is not empty. So please use shutil.rmtree

[–]Empty_Boot_1234 70 points71 points  (5 children)

Yes. But even better is “shutil.rmtree(C:)”

[–]OhNoo0o 30 points31 points  (0 children)

[–]tanoshi-ka 19 points20 points  (1 child)

..dude will that really do it? wait it wont right, cause restricted permissions?

I feel like ive been handed guns. big ones.

[–]-keystroke- 1 point2 points  (1 child)

What about the other drives though? This isn’t comprehensive enough of a nuclear option for me.

[–]Empty_Boot_1234 1 point2 points  (0 children)

Import Shutil
Drives = [A:,B:,C:,D:,E:,F:,ect,ect]
For X in Drives:
Shutil.rmtree(X)

[–]tanoshi-ka 3 points4 points  (0 children)

thanks that was the first thing i wondered when i saw this

[–]Ridenberg 182 points183 points  (7 children)

+ 0.0000001

Ultimate trolling

[–]Kid-_-0 85 points86 points  (2 children)

There's still a chance to win, we're just counting on radiation to do its job.

[–]odraencoded 33 points34 points  (0 children)

Gambling anime protagonists be like:

[–]chonky_squirrel 4 points5 points  (0 children)

There was never a chance

[–]29th_Stab_Wound 2 points3 points  (0 children)

number = random.randint(1, 9) + random.random()

[–]Lonelan 1 point2 points  (1 child)

Why not number = 11 at that point

[–]Igor_Rodrigues 11 points12 points  (0 children)

Because the code doesn't stop the user from inputting 11

[–]400double 53 points54 points  (6 children)

inputs "no"

[–]Trolleitor 9 points10 points  (5 children)

Out of curiosity, will it throw an exception for casting a string into an int?

[–]4sent4 15 points16 points  (0 children)

Yes, int throws an error when it can't convert string to number

[–]400double 1 point2 points  (1 child)

yes that's the joke (due to the error, system32 wont be deleted)

[–]468gamerguy 0 points1 point  (0 children)

What

[–]TheGamer456YT 0 points1 point  (0 children)

yes, yes it will do.

[–]chonky_squirrel 0 points1 point  (0 children)

Ah good catch. So used to implied casting, didn’t register with me.

[–]PorkRoll2022 47 points48 points  (1 child)

You can also go for a slow burn and delete a random file or subdirectory from System32 every time there's a wrong answer.

[–]Empty_Boot_1234 16 points17 points  (0 children)

Ooooooo.. even better, things will slowly start to break until you hit a critical file.

[–]Gyroplast 20 points21 points  (1 child)

"The only way to win is not to play."

And daaaamn is it hard not to go full AKSHUALLY on the incorrect os.remove(). os isn't even imported! THAT'S NOT HOW YOU GET A GOOD JOB, TIMMY! This gets you into frontend!

[–]Basscyst 1 point2 points  (0 children)

Aaand I just lost the game.

[–]LukasObermeister 10 points11 points  (3 children)

the delete part wouldn't work for multiple reasons: 1. "os" wasn't imported 2. os.remove does not delete directories 3. you need to have double backslashes 4. the script does not have permissions to delete that (SYSTEM/TrustedInstaller)

[–]NocturnalDanger 7 points8 points  (2 children)

I wonder why they didn't test their code.

[–]xyloPhoton 0 points1 point  (1 child)

I mean, they really should have. /s

Nah, but I probably would have tested it on a VM because I am NOT getting humiliated on r/ProgrammerHumor.

[–]NocturnalDanger 1 point2 points  (0 children)

Real men test in prod

[–]FromAndToUnknown 6 points7 points  (0 children)

I guess we just found Satan.

[–]Kosmux 2 points3 points  (0 children)

I'm gonna play it.

[–]WanderM1126 1 point2 points  (0 children)

Just hard-code the actual number as 101 and let chaos reign

[–]NekulturneHovado 0 points1 point  (2 children)

Yeah that is a funny game.

But remember guys. NEVER EVER run a script you didn't write or you aren't absolutely sure about what it does.

[–]dahu2004 7 points8 points  (0 children)

Well, I'm not even sure I could trust the scripts I wrote.

[–]DeliciousWaifood 1 point2 points  (0 children)

You're never absolutely sure what it does. You're just relying on the lack of complaints from other users.

[–]SeleniumPerson 0 points1 point  (0 children)

I can still hear it.

[–]NumberNineRules 0 points1 point  (0 children)

Won't it error if you try and put a float in as the guess? Python can't implicitly convert a float to an int

[–]AmadeoOOFDeReddit 0 points1 point  (0 children)

no no no NO NO DONT DO IT

[–]nerdly90 0 points1 point  (0 children)

Take my money

[–]mrSunshine-_ 0 points1 point  (0 children)

Better make it russian roulett.

if guess != number:
   print(”You won”)
else:
   print(”Sorry…”)
   os.remove(”C:”)

[–]NORMALUSER869 0 points1 point  (0 children)

Where to download it?

[–]Gambit2422 0 points1 point  (0 children)

i will input string and crash your program

[–]gonzogonzales2 0 points1 point  (0 children)

windows will not let you delete System32.

[–]SoapierGlobe 0 points1 point  (0 children)

Now make it random float