WTF Bites
-
So I checked and map doesn't return a list in Python 3. It did in Python 2.
Instead it returns an iterable map object.That is perhaps the most clever way to give meaning to
map
's otherwise obsolete life! Iterators/generators need much less memory if all you want is to parse/process the input as you read it, no need to uselist
to convert it to list then. So now I should change my stance toUse
map
or use list comprehension but letlist(map())
die in
-
@dse Don't forget that python has iterator comprehensions too!
-
On the other hand ASCIIZ strings have exactly 1 byte overhead no matter how long they are.
But can't contain a NUL byte within them, meaning that if you're going to handle binary data you're SOL unless you use an encoding scheme to hide the details (and that approach puts paid to “simpler”).
-
@dkf Strings are strings, not binary data.
-
@Bulb That's an artificial distinction that you're drawing in your head.
-
Installed MySQL on CentOS7. Umm... what is my root user password? There was no prompt to enter a new one, I can't login with no password...
Google, google...
WTF!? Seriously!?
That's the official way to install the most popular db on the most popular linux server distro? Search through logs for the generated password?
Jesus Christ. CentOS is such garbage.
-
-
@cartman82 CentOS is just Red Hat Enterprise Linux with a different logo, and Red Hat's entire business model appears to be "Make a crappy OS so everyone using it has to pay us for support."
-
-
@TimeBandit said in WTF Bites:
The real is not using MariaDB
I don't need the administrative headache. I can use that for my own projects. If it's someone else's project, I give them the default. Let them handle it from there.
-
@cartman82 said in WTF Bites:
I don't need the administrative headache.
Not sure what headache you are talking about. I use exactly the same tools with it (phpmyadmin, etc), nobody knows it's not MySQL.
But yeah, the fact that you have to grep the log for the root password is a
On Debian, you get prompted for the password.
-
@TimeBandit said in WTF Bites:
Not sure what headache you are talking about.
Not sure either. It is a drop-in replacement.
@TimeBandit said in WTF Bites:
On Debian, you get prompted for the password.
The newer versions have even better trick: local root is authorized as database root via unix domain socket credential passing, so there is no additional password involved. It might be mariadb-only thing though.
-
Not sure either. It is a drop-in replacement.
Exactly. I've replaced MySQL with MariaDB on production servers doing the following
- uninstall MySQL
- install MariaDB
Voilà ! All databases are still there, nothing to change on the website, etc.
-
@cartman82 By the Unix Philosophy™ that's a perfect solution.
-
@anonymous234 said in WTF Bites:
@cartman82 By the Unix Philosophy™ that's a perfect solution.
By the Debian Philosophy™, this is the perfect solution:
-
@TimeBandit said in WTF Bites:
Not sure what headache you are talking about.
There are subtle differences and basically sanity fixes on the maria side. Nothing major, but I just don't want to think about it.
-
@cartman82 that and the version numbers start from 10 in recent versions to indicate the break from MySQL.
-
@cartman82 that and the version numbers start from 10 in recent versions to indicate the break from MySQL.
Which means you better switch now than wait later when there is more difference between the two.
-
WTF of the day:
Microsoft releases a new version of the Microsoft Malicious Software Removal Tool every month. After you download the tool, the tool runs one time to check your computer for infection by specific prevalent malicious software (including Blaster, Sasser, and Mydoom) and helps remove any infection it finds.
Microsoft has been releasing this tool monthly for 11 years now. Blaster, Sasser and MyDoom are all older than that and I frankly doubt they work on Windows 10. Not to mention that Windows 10 comes with Windows Defender (which you can't even turn off), which should incorporate this functionality.
-
I though the Excel 3D renderer was the best bit of abuse I've seen of a spreadsheet. This one definitely takes the cake as a true abomination:
-
@anonymous234 said in WTF Bites:
Sasser
Man that brings back memories... a friend of mine lost the end of his fanfic after I accidentally infected him with Sasser back in high school...
-
@Cursorkeys But Excel is the best application platform there is!
(Google is failing me, I can't find that thread where someone argued that)
-
@Yamikuronue said in WTF Bites:
fanfic
The sentence is so much better if you assume that's rhyming slang.
-
@TimeBandit said in WTF Bites:
Which means you better switch now than wait later when MySQL gets to version 10 and breaks your dependency chain
Versioning is hard.
-
@anonymous234 said in WTF Bites:
@cartman82 By the Unix Philosophy™ that's a perfect solution.
UNIX PHILOSOPHY SAY PROGRAM ONLY DO ONE THING. DO MORE THINGS IS BAD. MAN USE PIPE IF NEED MORE
-
-
@Cursorkeys said in WTF Bites:
I though the Excel 3D renderer was the best bit of abuse I've seen of a spreadsheet. This one definitely takes the cake as a true abomination:
El Reg said:
This project, by one Tristan Calderbank, is pretty special.
Yes, special is definitely the right euphemism to use for this.
-
God dammit Microsoft, your service's been down half the time for the last 3 days. You're not amateurs.
-
@anonymous234 said in WTF Bites:
God dammit Microsoft, your service's been down half the time for the last 3 days. You're not amateurs.
You are obviously wrong.
-
I just found this in our codebase (heavily anonymized of course but this is the core WTF):
BOOL validateFirmwareVersion(uint32_t fw) { return fw >= 0; }
-
-
@JazzyJosh there isn't really a reason why you can't do that if it makes sense in your program
-
@JazzyJosh How else would you suggest to construct a
GameOver
-object? Makes total sense to but the whole game into the constructor, so that it only finishes when the player rage-quits.
-
@Yamikuronue said in WTF Bites:
after I accidentally infected him with Sasser back in high school...
This is why safe file transfer education is necessary, people!
-
@Yamikuronue said in WTF Bites:
after I accidentally infected him with Sasser back in high school...
This is why safe file transfer education is necessary, people!
Yeah! Wear protection fools!
-
-
@groo There is a HUGE difference between "Can't do that, invalid syntax" and "should I alias
ls
todd if=/dev/random of=/etc/sda
"You're violating the whole idea of a constructor.
-
Anyone remember this story?
That's exactly how YouTube's video manager paginates when you use the filter option: just removes videos on the current page that don't match the filter. Want to see the rest? Go to the next page.
-
-
@ben_lubar said in WTF Bites:
C string
Protip: never ever google that.
Knowing what that is, I think you forgot a couple words: "at work". Elsewhere? Well, that's different.
-
@ben_lubar said in WTF Bites:
C string
Protip: never ever google that.
Knowing what that is, I think you forgot a couple words: "at work". Elsewhere? Well, that's different.
Other things you shouldn't google at work: (to save you some time, these are all Google shopping search results with tiny photos of women in bikinis)
Curiously, these look safe, at least for the first few pages:
https://www.google.com/search?q=PHP+string&tbm=shopAlso, while I was Googling, I found this: i®™
-
@ben_lubar said in WTF Bites:
Curiously, these look safe, at least for the first few pages:
You have a strange idea of "safe". I've seen what PHP has done to @arantor's life, and I'll have none of it!
-
@Dreikin what's not safe about a byte array?
Strings are probably the least fucked up thing in PHP.
-
@ben_lubar said in WTF Bites:
Also, while I was Googling, I found this: i®™
this one is awesome
A 3 bit boolean variables. If bit 0 is set, the value is False. If bit 1 is set, the value is True. If bit 2 is set, the value is 14.
-
$ git merge
-
@ben_lubar Is there a site that displays git merges as abstract art? Because if not, it should.
-
Crosspost because this. I was just so pissed and stunned in that moment to consider what the proper thread for it is:
@Onyx said in The Official Status Thread:
@Onyx I give up...
WHY? WHY DOES EVERYTHING HAVE TO BE FUCKING SOCIAL? I JUST WANT MY FUCKING DRIVERS AUTO FUCKING UPDATING!
GET
OFF MY LAWNOUT OF MY BASEMENT!
-
@Onyx I installed that thing a while ago and it didn't have that screen. I guess they've "enhanced" it since then.
-
-
@bb36e I clicked on it today because there was a yellow exclamation mark next to it. Whether that update is a few days old or fresh out of bullshit factory I can't say for sure.