WTF Bites
-
@LaoC I'm not going to dig deep enough into this to really understand it (there are regexps in there, who'd be crazy enough to do that???), but I like their suggested manual fix:
From a quick look, the old one was recognising e.g. 2014, 1914, 98, 04, 15 as dates (presumably expanding 98 as 1998, 04 and 15 as 2004 and 2015), so it failed with e.g.
20
(2020, not recognised). The new one will now correctly recognise 20 as 2020, yay! But it will not recognise30
as 2030, so they've just managed to push the bug out for the next 10 years. Nice."Oh well, in 10 years' time I'll be long gone, so who cares?"
(There is a saying for that in French, coming from one of La Fontaine's Fables about a trickster who claims that he can teach the king's donkey to speak in 10 years. When asked what will happen when he fails at the end of the 10 years, he says "by then, the king, the donkey or myself [implied: will have died]"...)
-
@remi It's a speed-up loop. Just sell the same fix again in 10 years.
-
((?<=^|[\s#,"=\(\[\|\{])(?:1[0123456]|9)\d{8}|^@[\da-fA-F]{16,24})(?:\.?(\d{1,6}))?(?![\d\(])
What could possibly go wrong?
This: XML, Y2K reloaded, and a temporary fix for date "parsing"
Bingo!- What the hell generates 2-digit years these days. I
thoughthoped everybody switched to 4 digts around Y2K. - There are two issues mentioned there, but nothing explains the reasons for the second one (which is that Unix timestamps won't work after 2020-09-13T12:26:39Z a.k.a. @1599999999)
- What the hell generates 2-digit years these days. I
-
Unix timestamps won't work after 2020-09-13T12:26:39Z a.k.a. @1599999999
Wait.... why not?
-
@Tsaukpaetra Because the linked page says so (in splunk, not everywhere). I have no idea why.
-
@Tsaukpaetra said in WTF Bites:
Unix timestamps won't work after 2020-09-13T12:26:39Z a.k.a. @1599999999
Wait.... why not?
(?:1[0123456]|9)\d{8}
, I assume. That would match numbers between 900 million inclusive and 1600 million exclusive.
-
@PleegWat Oh, right. Why the eFf, though? It's just a number. Why the hell are they artificially limiting the range like this?
-
((?<=^|[\s#,"=\(\[\|\{])(?:1[0123456]|9)\d{8}|^@[\da-fA-F]{16,24})(?:\.?(\d{1,6}))?(?![\d\(])
What could possibly go wrong?
This: XML, Y2K reloaded, and a temporary fix for date "parsing"
Bingo!My reaction:
?:1
?:\
Filed under: I need a haircut
-
Status: they closed a ticket that's still not resolved. Classy.
I guess I'll just create another ticket.
-
@Tsaukpaetra Who's this Anthony fellow and what's his problem?
-
@Applied-Mediocrity said in WTF Bites:
@Tsaukpaetra Who's this Anthony fellow and what's his problem?
He's kind of like a super-hero for upvotes.
-
@remi It's a speed-up loop. Just sell the same fix again in 10 years.
In 3, actually. The other half fixes
<text><![CDATA[((?<=^|[\s#,"=([|{])(?:1[0123456]|9)\d{8}|^@[\da-fA-F]{16,24})(?:.?(\d{1,6}))?(?![\d(])]]></text>
which only extends it from @1599999999 = 2020-09-13T12:26:39Z to @1699999999 = 2023-11-14T22:13:19Z, or 3 years and 2 months.
-
@Tsaukpaetra said in WTF Bites:
@Tsaukpaetra
My first guess: the getter doesn't get called andvm.Status
is assignedCloudVMStatus.Stopped
directly.Easy enough to determine by setting breakpoints I suppose...
Edit: Yes, seems you are correct. Whelp, easy enough to separate into two statements.
You could also make one of the setters set both, or make a separate
.SetBothStatuses
method
-
@anonymous234 said in WTF Bites:
"I can't write to the firmware until they change the
magentacyan ink cartridge?"FTFM.
That's the most nefarious part of the hack: The thing says the magenta cartridge is low, but it's actually the cyan.
-
True-ish story that I told a long time ago (in the garage, but nothing garagey in that post): https://what.thedailywtf.com/post/1332449
@what.thedailywtf.com said
Access Denied
You seem to have stumbled upon a page that you do not have access to.
-
@BernieTheBernie don't take my word for it, but I think the error might be caused by you not having access to that page.
-
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
-
@LaoC I'm not going to dig deep enough into this to really understand it (there are regexps in there, who'd be crazy enough to do that???), but I like their suggested manual fix:
[...]
The new one will now correctly recognise 20 as 2020, yay! But it will not recognise30
as 2030, so they've just managed to push the bug out for the next 10 years. Nice.Exactly, hence "temporary fix". Probably nobody set themselves an alarm in early 2029 either so the bug can be "rediscovered" and hastily fixed™ the last weeks of the decade again.
"Oh well, in 10 years' time I'll be long gone, so who cares?"
Let's just pretend someone will have come up with a way to replace that XML abomination, too, and along the way fixed the regex shit. Right?
-
- There are two issues mentioned there, but nothing explains the reasons for the second one (which is that Unix timestamps won't work after 2020-09-13T12:26:39Z a.k.a. @1599999999)
Or what the hell their business with 24-character hex strings is in this context.
-
Let's just pretend someone will have come up with a way to replace that XML abomination, too, and along the way fixed the regex shit. Right?
I can almost picture that... "fuck this code, it's so ugly we should rewrite it entirely, but we don't have time, so I'll just put a temporary fix so that it breaks again one day and hopefully by that time we'll manage to rewrite it properly". Some kind of passive-aggressive developer's response to an urgent bug.
Of course, it's much more likely that what would then happen is indeed:
Probably nobody set themselves an alarm in early 2029 either so the bug can be "rediscovered" and hastily fixed™ the last weeks of the decade again.
-
Yesterday, I merged a PR that fixed a special kind of bug in the code: it did the right thing, but for completely wrong reasons. The reported issue was that the error condition is handled like it should, except it doesn't tell anyone the error happened.
-
Exactly, hence "temporary fix". Probably nobody set themselves an alarm in early 2029 either so the bug can be "rediscovered" and hastily fixed™ the last weeks of the decade again.
You should set yourself an alarm to extend the hack in early 2029.
-
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
-
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
Why? Would I waste even more time for wtf then?
-
@BernieTheBernie said in WTF Bites:
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
Why? Would I waste even more time for wtf then?
More time, and a lot more sanity.
-
@BernieTheBernie All your wildest dreams will come true, you'll get millions from your dead relative who's a prince of a foreign country, and you'll add inches to that special part, xdjhgjdxh
-
@BernieTheBernie said in WTF Bites:
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
Why? Would I waste even more time for wtf then?
More time, and a lot more sanity.
It's lots of fun, as long as you don't value sanity too highly.
-
What is this? What repair, never mind problem, are you talking about? Who called you?!
-
@BernieTheBernie said in WTF Bites:
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
Why? Would I waste even more time for wtf then?
More time, and a lot more sanity.
It's lots of fun, as long as you don't value sanity too highly.
And block (ignore) many of the threads.
-
@BernieTheBernie said in WTF Bites:
@pie_flavor said in WTF Bites:
@BernieTheBernie You can't see the Garage unless you join the Trolleybus Garage Mechanics group.
Pro-Tip: Don't!
Why? Would I waste even more time for wtf then?
More time, and a lot more sanity.
It's lots of fun, as long as you don't value sanity too highly.
And block (ignore) many of the threads.
I find most of them tolerable or amusing. But I'm not vested in what's being trolled about in most.
-
@BernieTheBernie All your wildest dreams will come true, you'll get millions from your dead relative who's a prince of a foreign country, and you'll add inches to that special part, xdjhgjdxh
-
What is this? What repair, never mind problem, are you talking about? Who called you?!
Have you ever seen Brazil?
-
@Applied-Mediocrity said in WTF Bites:
@Tsaukpaetra Who's this Anthony fellow and what's his problem?
Have you literally never googled my name?
-
@Tsaukpaetra said in WTF Bites:
Have you literally never googled my name?
I wanted to but then I was afraid of what I would find
-
@Tsaukpaetra said in WTF Bites:
Have you literally never googled my name?
Onstly? This was the first time I immediately did. And I wasn't disappointed.
-
@Applied-Mediocrity said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
Have you literally never googled my name?
Onstly? This was the first time I immediately did. And I wasn't disappointed.
Oh? What were you appointed with? I'm now curious...
-
@Tsaukpaetra I didn't find much and therefore I've nothing to be disappointed of
Perhaps my Goog Fu is weak. Perhaps you're not doing that exhibitionism stuff well enough.
-
Status: I must have been tired or something.
It's a countdown that counts up.
-
@Zerosquare said in WTF Bites:
What is this? What repair, never mind problem, are you talking about? Who called you?!
Have you ever seen Brazil?
Nope. So:
-
@topspin
Oh come on! It is the reference video for waxing!
-
@Zerosquare said in WTF Bites:
What is this? What repair, never mind problem, are you talking about? Who called you?!
Have you ever seen Brazil?
Nope. So:
-
@Tsaukpaetra as well as using ++ purely for its expression effect and not caring about the side effect.
-
-
@pie_flavor Pretty sure he intended to use the side effect too, but didn't realize it was pointless in that context (since
Max
will overwrite it anyway).
-
@TwelveBaud said in WTF Bites:
@pie_flavor Pretty sure he intended to use the side effect too, but didn't realize it was pointless in that context (since
Max
will overwrite it anyway).Yeah, the entire thing is... Not right.
Especially since elsewhere it does decrement.
-
@levicki said in WTF Bites:
Isn't
++Var
pre-incrementing before being passed to Max?That was the intent and the observed behaviour anyways.
-
@Tsaukpaetra said in WTF Bites:
@pie_flavor said in WTF Bites:
the side effect.
What side effect?
The side effect of
++x
is to increment the operandx
. If you just want to get "the next value after x", you can simply writex + 1
.Another way to look at it is that
stallCountdown = ... ++stallCountdown ...;
modifies the same variable twice within the same statement, which is a code smell.
-
-
which is a code smell
Depends on the language. In some it is a bug.
...which may cause nasal demons, even.
-
@ixvedeusi said in WTF Bites:
...which may cause nasal demons, even.
I am rather surprised I haven't seen any yet. The codebase I am working with now has plenty of summoning portals for them and the one I worked before had quite a few as well, but all I'm seeing is plenty of crashes and some weird misbehaviour.