That can’t remove a directory.
More believable for a Linux OS
Submitted 11 months ago by nifty@lemmy.world to programmer_humor@programming.dev
https://lemmy.world/pictrs/image/5bf8b513-67a8-4876-9e18-7164f1e0cbd4.jpeg
Comments
csm10495@sh.itjust.works 11 months ago
mox@lemmy.sdf.org 11 months ago
Perfectly safe on Windows, too. The remove() function doesn’t work on directories.
aodhsishaj@lemmy.world 11 months ago
Remove-Item -LiteralPath "C:" -Force -Recurse
okamiueru@lemmy.world 11 months ago
I’m curious. Does anyone like PowerShell, and the syntax you end up with?
Matriks404@lemmy.world 11 months ago
And Windows nowadays have like dozen of different security measures that stop you from removing critical system components. It is not like in Windows 95 days, that OS allowed you to remove kernel by just typing a single command.
bhamlin@lemmy.world 11 months ago
And much like Windows, everything dangerous is done better elsewhere.
philomory@lemm.ee 11 months ago
Wow, a Lain meme was not something I was expecting.
I should watch that show again sometime, I still have the DVDs somewhere I think.
xmunk@sh.itjust.works 11 months ago
“And you don’t seem to understand…”
Tesla@lemmy.world 11 months ago
A shame you seemed an honest man…
GluWu@lemm.ee 11 months ago
Fuck off, I know what I’m doing.
Omg someone please help how did I get this far they’re going to realize I’m stupid when they fire me everything will collapse because it’s all in a single excel file I need to figure out how to live in a tent in the woods and hunt and forage
rimjob_rainer@discuss.tchncs.de 11 months ago
Thought I’m on lainchan for a minute
random9@lemmy.world 11 months ago
isn’t
randint
range inclusive? thusrandom.randint(0, 6) == 1
has a 1 in 7 chance, not 1 in 6. Most revolvers, assuming this is emulating russian roulette, have 6 cylinders, not 7.nifty@lemmy.world 11 months ago
You’re right. I didn’t make this, but maybe the creator was accounting for the round in the chamber? I don’t guns, so no clue.
random9@lemmy.world 11 months ago
Revolvers don’t have the concept of one-in-the-chamber, only semi-auto pistols do, and you can’t play russian roulette with semi-autos :P (well you could, but 99% of the time, barring unexpected jams, the first person to go would lose)
Anyway I’m guessing it’s a bug :) - as the saying goes “no code is too short to be bug-free”
Redkey@programming.dev 11 months ago
Oh hell, you gave me a PTSD flashback!
It’s the late 90s. My mother suddenly discovers File Explorer on her refurbished commodity Wintel box and decides that all this messy clutter has to go. Never mind that the drive was 80% empty when delivered and I didn’t expect her to come close to filling it before it was replaced. Fortunately I had already backed up everything that looked important or interesting.
One day she calls from the office, “I don’t need this ‘Windows’ any more, do I?”
“What? Wait! Don’t do anything!” I walk in and she’s got C:/Windows highlighted and the cursor is hovering over “Delete”.
“I already have Windows installed on this computer, so I don’t need this any more, do I?” Spoken more as a statement than a question. It took several minutes of forced calm explanation to get her to accept that this “Windows” directory WAS the Windows that’s installed on the machine. She still wasn’t happy that she could see it in File Explorer, though. So untidy!
Asudox@lemmy.world 11 months ago
Let’s all love lain.
bjorney@lemmy.ca 11 months ago
OSError: File or directory not found “C:WindowsSystem32”
joyjoy@lemm.ee 11 months ago
You call that russian roulette? This is real russian roulette. Dying is a 1/6 probability.
librecat@lemmy.basedcount.com 11 months ago
I love this, except for
i
i hatei
.saroh@lemmy.world 11 months ago
And maybe the fact that you have to continue until the gun actually fires :|
problematicPanther@lemmy.world 11 months ago
but it’s easier than thinking of a useful variable name.
finestnothing@lemmy.world 11 months ago
I always use i because I’m too lazy to type out iterator when I’m making my garbage spaghetti code that will support infrastructure for years
winky9827b@lemmy.world 11 months ago
You forgot the switch.