ProgrammerHumor

gamblingWithLain

gamblingWithLain
https://i.redd.it/71sq0g98oldf1.jpeg
Reddit

Discussion

KyxeMusic
:py::rust:

Honestly if you put Windows on a Raspberry Pi you deserve this

2 days ago
iamdestroyerofworlds

All I see is a badly written adware removal script.

Line 4 should clearly not be there.

2 days ago
legendLC

Windows is not so bad,

... it is the baddest

2 days ago
xonxtas
:py::cp::j:

I guess, apart from the fact that the path string is invalid, there's another little problem. From the official Python docs:

os.remove(path, \, dir_fd=None)
Remove (delete) the file 
path. If path* is a directory, an OSError is raised.

2 days ago
neo-raver
:cp::py::rust:

Not to mention something like “invalid escape sequence \W” would be thrown, since the backslashes are not escaped

2 days ago
xonxtas
:py::cp::j:

Yes, exactly. That's also what I meant by the path string being invalid.

1 day ago
neo-raver
:cp::py::rust:

I thought that might be a part of what you’d said, definitely a more elegant way to put it!

1 day ago
GoddammitDontShootMe
:c::cp::asm:

Oh. I was wondering what was invalid about it. So "C:/Windows/System32" or "C:\\Windows\\System32"?

20 hours ago
xonxtas
:py::cp::j:

yes both would work, and also using r"C:\Windows\System32" would work as well.

9 hours ago
GoddammitDontShootMe
:c::cp::asm:

I guess if you ran it as the SYSTEM user, it would make Windows unbootable? Assuming you used the correct method to remove a directory tree.

18 hours ago
Septem_151
:py::ts::bash::j:

This code isn’t valid the path backslashes mess it up. \W and \S. Also doesn’t work if not on Windows. Also what’s the pi for?

2 days ago
cheerycheshire
:py:

Invalid escape sequences work in python. In the past they silently worked, for several versions now they emit SyntaxWarning: invalid escape sequence "\W".

So this code actually works (just with warnings) because both \W and \S are not real escape sequences...

But if it was user folder? C:\Users\... - \U is valid, but "s" is not valid continuation. So it throws as exception instead: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \UXXXXXXXX escape

I've seen people not escape paths with silently working escape sequences. Like a folder/file starting with t, so it was \t in the path...

2 days ago
Septem_151
:py::ts::bash::j:

Interesting!

2 days ago
The-Rizztoffen
:p:

Running Windows on ARM

2 days ago
Disastrous-Olive-677

To be sure I would've used %WINDIR%\system32

2 days ago
TheMunakas

\s is invalid and will error out.

2 days ago
Disastrous-Olive-677

We could always use ole reliable \

Edit: wrong slahes

2 days ago
GermanyBerlin1945
:unity:

This way it won't work. Although there is another way to actually do it, I don't remember it

2 days ago
RiceBroad4552
:s:

What is "C:\Windows\System32"?

Is it somehow important? My computer doesn't have it and runs just fine.

2 days ago
echtemendel

it has "windows" in it, so maybe a part of X11? 🤔

2 days ago
RiceBroad4552
:s:

It has "System32" in it, which is likely referencing ancient 32-bit machines. So must be very old.

As I've never seen it, maybe some parts of X10?

2 days ago
JetScootr
:asm::c::ftn::bash::snoo_feelsgoodman:

Ah...good old snark from when Linux was a challenger on the desktop.

(PS: You also need to ask what that "C:" is for on the filesystem name)

2 days ago
gregorydgraham

Don’t run Linux, still can’t find System32 in the Finder 🤷‍♂️

2 days ago
ilmalocchio

Lol "I can't find it in the Finder" is top-tier Mac user

1 day ago
Mars_Bear2552
:cp:

linux is more a challenger now than possibly ever before.

2 days ago
JetScootr
:asm::c::ftn::bash::snoo_feelsgoodman:

Whether Linux is a challenger was never up to Linux - Microsoft has always been a monopolistic criminal. (Yes - criminal - Federal judgement against them, ordered to divest, set aside by Bush the younger.)

2 days ago
RiceBroad4552
:s:

How could I know that's a "filesystem name"? It doesn't even use path separators.

2 days ago
RiceBroad4552
:s:

"Was" a challenger? Now I'm confused.

Linux is the only usable desktop system right now which doesn't contain spyware and doesn't break with every update.

2 days ago
JetScootr
:asm::c::ftn::bash::snoo_feelsgoodman:

Yes, it's better. Superior in every way that matters except one - it's not being pushed by a monopolistic anticompetitive company that sees its customers as cows to be milked. Any more (in the US, anyway) that's the only thing that determines who gets control of the market.

2 days ago
GreatScottGatsby
:asm:

"Doesn't break with every update" look who is calling the kettle black.

1 day ago
RiceBroad4552
:s:

I have some Debian install around which got Updates since 15 years and never broke. Not even once.

The machine I'm writing this on will soon also get by its third Debian stable release, while it's on the Testing branch (a perpetual beta!) where it gets daily updates. It broke in the last 5.5 years almost once with some update, but I'd prevented this by waiting a few weeks until packages got again more stable on Testing. So it also never broken so far!

Should I now link some of the news after any macOS or Windows "release"?

Both system break with every update! Every time! They break in such severe way that the system can't be even recovered quite often. Apple is best in this: They managed to even break mouse and keyboard function with updates in the past. Of course besides all the other "normal" breakage, where stuff just randomly stops working with every update.

1 day ago
Regular-Group4223

If lain still existed, would she use linux?

2 days ago
30SecondsToOrgasm

Swap RasPi memory card for Linux-image

2 days ago
Alex_NinjaDev

If reality is just code, then deletion is just... freedom. Lain probably

2 days ago
Fedepovero_02

A few months ago I was skimming through my professor's c++ code and found a delete os instruction. After a brief heart attack and trying to figure out what he was trying to do, it turned out he initialized a pointer to an ostream object, which he called "os", and then he diligently deallocated it in the destructor of the class that the code was implementing

2 days ago
gaijinx69

Everyone just pointing out that code doesn't work, and here I am just enjoying the Lain reference, nice one OP

1 day ago
PinkSwayy

She smiled and suddenly I’m ready to roll a d6 for my life savings system32.

2 days ago
Froschleim
:py:

actually it's a d7 since the boundaries of random.randint() are inclusive

1 day ago
enderfx

How many variations of this bad, old, overused joke are we going to see?

This is so far the cringiest one

2 days ago
echtemendel

this subreddit is about 99% recycled lame jokes

2 days ago
worstikus

Is this some Windows problem I'm too Arch to understand?

2 days ago