Personal WTF Act: Successfully reinvented the wheel on processing incoming XML. No, not the XML parser itself, the step after that.
Posts made by PleegWat
-
RE: WTF Bites
-
RE: The Official Status Thread
@hungrier said in The Official Status Thread:
Supposedly there's going to be a visible aurora
tonightat this time of day, at this time of year, in this part of the country, localized entirely within the far north but visible from the Northern US and CanadaNaked eye or long-exposure photograph? They repeatedly tried to trick us with that last winter.
This is practically guaranteed to not be visible here because we're too far north and it's mid may so it doesn't get dark enough.
-
RE: D&D thread
@Tsaukpaetra Thanks, I needed that. I had unexpected visitors and I did not break down.
-
RE: Hacking News
@Carnage Yes, there will be state actors monitoring the VPNs exit side. This concerns the coffee shop wifi you are connecting to, which is an entirely different kind of hacker. Might be as innocent as the coffee shop owner blocking porn sites. Might not be.
-
RE: Mobile for CH and DE?
@robo2 said in Mobile for CH and DE?:
@cvi said in Mobile for CH and DE?:
you don't get cross border roaming by default
But some/many providers do give it anyway. At least, that my () provider did the last few times I crossed .
These things do change over time and position on Switzerland may have changed since the UK left the EU, or with EU requiring free roaming to other EU members. For extra these kinds of changes may not affect existing contracts.
-
RE: Mobile for CH and DE?
@lolwhat Can't speak on German providers, but be aware that cell services in the EU use (or historically used) different frequency bands than in the US. Ensure your phone is compatible.
-
RE: Hacking News
@PleegWat Making note: CVE-2024-3661. Look up on some internal systems tomorrow.
-
RE: Hacking News
@boomzilla VPN attacks which require connecting to a hostile VPN concentrator? Isn't that an other side of the airtight hatchway problem?
-
RE: Azure bites
@BernieTheBernie The date field traditionally shown by email clients is set by the initial sender; if the date of the 3 May report is indeed 4 May 10:04, then it was microsoft who sent it late. If the date on the initial email is older, you can open up the raw email and check the dates on the received headers (note those timestamps are human-readable and will likely not be in a consistent timezone).
-
RE: Things that remind you of WDTWTF members
@Arantor I've done some maintenance work on a php-based avatar generator checks watch almost 20 years ago. This doesn't sound difficult but emoji's are small enough to begin with that scaling them down is going to be full of edge cases.
-
RE: Nope, you eat it
@blek What did that poor drumstick do to them? And what did they do to it in return?
-
RE: WTF is happening with Windows 10? And nothing else
@accalia I read once that standard 101/102 key keyboards have a key which, when pressed, results in 5 separate events being sent. Possibly the pause key, otherwise something in the same row. I can't check because I've got an n-key-rollover keyboard and that at least has a separate scancode for it.
-
RE: TIL (about the Dark Arts of HTML)
@Arantor said in TIL (about the Dark Arts of HTML):
*laughs in PHP*
We have it these days so that mandatory arguments can’t come after optional ones, that if you want to accept null you can expressly indicate this in the type hint, and that you can even call a function with parameters out of order as long as you respect the required parameters and name your args.
Legal PHP:
function myfunc(int $a, string $b) { … }myfunc(b: "thing", a: 3);
I've done that in pl/sql in the past. Function with 20 or so boolean arguments, all defaulting to false, and typical usage required at most one or two to be set to true.
-
RE: WTF Bites
@Gern_Blaanston said in WTF Bites:
Windows:
reg query <KeyName> /v <ValueName>If it successfully finds the registry key/value that you are looking for, it returns %errorlevel% = 0
If the registry key/value does not exist, it returns %errorlevel% = 1
Wait ... what? Isn't this backwards from the way everything else works? Isn't it supposed to be 0 for failure and 1 for success?
Fuxcking Microsoft. Consistently Inconsistent.
Well, yes. This allows signalling one kind of success and 255 kinds of failure.
In C, this can cause trouble with different return types. If you're returning the number of items read, or a linked list of those items, the return value on error tends to be
0
orNULL
. Which immediately turns 'no elements available to read' into an error condition. -
RE: TIL (about the Dark Arts of HTML)
@dkf But is there a difference between explicitly passing undefined and not passing anything at all?
-
RE: WTF Bites
@Gern_Blaanston said in WTF Bites:
Windows:
reg query <KeyName> /v <ValueName>If it successfully finds the registry key/value that you are looking for, it returns %errorlevel% = 0
If the registry key/value does not exist, it returns %errorlevel% = 1
Wait ... what? Isn't this backwards from the way everything else works? Isn't it supposed to be 0 for failure and 1 for success?
Fuxcking Microsoft. Consistently Inconsistent.
Well, yes. This allows signalling one kind of success and 255 kinds of failure.
-
RE: Fun with maps
@Bulb Where applicable, it would not give them a penalty compared to last names which do not have gendered forms.
-
RE: The Official Status Thread
@dkf Meanwhile in NL they can update their design fast enough that they produce special 'double heads' in the succession year.
-
RE: The Official Funny Stuff Thread™
@topspin said in The Official Funny Stuff Thread™:
Thing is if you add the unlit letter (a B, as far as I can tell) it doesn't get much better.
-
RE: The Cat Status Thread
@error said in The Cat Status Thread:
“Greebo had spent an irritating two minutes in that box. Technically, a cat locked in a box may be alive or it may be dead. You never know until you look. In fact, the mere act of opening the box will determine the state of the cat, although in this case there were three determinate states the cat could be in: these being Alive, Dead, and Bloody Furious.”
― Terry Pratchett, Lords and Ladies -
RE: Things that remind you of WDTWTF members
@Watson said in Things that remind you of WDTWTF members:
@PleegWat said in Things that remind you of WDTWTF members:
@loopback0 What do you mean Monday tomorrow. It can't be Monday tomorrow. I've been shopping today, and I never go shopping Sundays. Ergo it cannot be Monday tomorrow.
So you won't be prepared for Monday tomorrow. QED.
Quite. It's much too nice weather out to be dealing work.
-
RE: Things that remind you of WDTWTF members
@loopback0 What do you mean Monday tomorrow. It can't be Monday tomorrow. I've been shopping today, and I never go shopping Sundays. Ergo it cannot be Monday tomorrow.
-
RE: The Official Funny Stuff Thread™
@dangeRuss said in The Official Funny Stuff Thread™:
Reminds me of a book I read where the process of obtaining a sufficiently detailed scan destroyed the biological brain.
-
RE: D&D thread
@Mason_Wheeler Looks like someone is confusing handegg and football.
-
RE: The Official Status Thread
@Tsaukpaetra One of the few things worse than selling raid1 as a backup solution is selling raid0 as a backup solution.
-
RE: The Official Status Thread
@Benjamin-Hall I recommend turning your notification volume up (or down) and catching some extra winks.
Is this home office or do they force you to come in?
-
RE: Driving Anti-Patterns - Necro Edition
@Zerosquare PSA: The obligation to clean up after your dog is not, in fact, limited to dogs.
-
RE: Travel WTFs
@Carnage Why choose between rail and ferry if you can use both at the same time?
-
RE: Quotes Out of Context
@Arantor said in Quotes Out of Context:
@Zerosquare said in Quotes Out of Context:
Well, while he's doing that, at least he's not doing PHP
*foot tapping with increasing urgency*
I can quit any time I want
But you can never leave?
-
RE: WTF Bites
@BernieTheBernie said in WTF Bites:
Hifi - no that's not a misspelled WiFi - can have its s, too.
And here I was expecting a gold-plated cable story.
-
RE: Quotes Out of Context
@Bulb said in Quotes Out of Context:
Bricks/tiles look better, of course.
Because of their irregularity, bricks or tiles promote driving at slower speeds. You might claim the same effect on asphalt with potholes, but we don't design our roads for having potholes.
I also know some roads which are asphalt, but have had a brick pattern pressed into them for the same effect.
-
RE: Driving Anti-Patterns - Necro Edition
@remi said in Driving Anti-Patterns - Necro Edition:
Such as whether an helicopter (generating its own noise) would be able to detect by flying above a congested highway which proportion of cars have their engine stopped. And that's probably the saner of those tangents.
Directional microphones are a thing. For this purpose, I suspect a 3-dimensional array of microphones and some signal analysis logic should be able to solve the problem.
-
RE: Programming Memes Thread
@TimeBandit said in Programming Memes Thread:
@dkf said in Programming Memes Thread:
you're downloading the whole Internet...
That's a shitload of porn
The internet is really really great
-
RE: Driving Anti-Patterns - Necro Edition
@remi said in Driving Anti-Patterns - Necro Edition:
the intersection a couple of miles ahead (!) that causes the congestion in the first place
Or behind you. Shockwave propagation is fun.
-
RE: The Official Funny Stuff Thread™
@Watson said in The Official Funny Stuff Thread™:
@PleegWat said in The Official Funny Stuff Thread™:
But when presented with 018 it appears to parse it to (decimal) 1 and discard the rest of the literal without printing a diagnostic at any error level, which is bad.
>php -a Interactive shell php > echo (017=='017') ? 'true' : 'false'; false php > echo (018=='018') ? 'true' : 'false'; PHP Parse error: Invalid numeric literal in php shell code on line 1 php >
?
Must be a version thing. I tested on a work box running an ancient version of PHP and I forgot they've been tightening up their game since 5.x
-
RE: The Official Funny Stuff Thread™
@dkf said in The Official Funny Stuff Thread™:
@topspin I'm looking for a meaning for the
0w0
prefix.wexagesimal.
-
RE: The Official Status Thread
Status: I can't believe they brought me to counting the exact number of times my shell script requires a new process (subshell or external program) to be started.
The answer, in the common (second run) case, in just over 300 non-empy non-comment lines of script, is 9.
-
RE: The Official Funny Stuff Thread™
@Arantor said in The Official Funny Stuff Thread™:
@PleegWat said in The Official Funny Stuff Thread™:
Quite. In any sane language line 1 would be a syntax error.
It is in PHP for example. PHP also supports 0o17 syntax (similar to 0x17 for hex)
Woe on you for making me check.
It parses the
0
prefix as octal, which is the only correct behaviour (even if0o
is the preferred prefix). But when presented with018
it appears to parse it to (decimal)1
and discard the rest of the literal without printing a diagnostic at any error level, which is bad. Then again, we're talking about PHP, so the above remark about sane languages applies.Have a relatively sane language for comparison:
$ for i in `seq 10 19`; do printf '%s: %d\n' 0$i 0$i; done 010: 8 011: 9 012: 10 013: 11 014: 12 015: 13 016: 14 017: 15 bash: printf: 018: invalid octal number 018: 1 bash: printf: 019: invalid octal number 019: 1
-
RE: The Official Funny Stuff Thread™
@Carnage said in The Official Funny Stuff Thread™:
Quite. In any sane language line 1 would be a syntax error.
-
RE: I, ChatGPT
@Gern_Blaanston Whenever you see an image, first thing, count the fingers.
I've also heard count the nipples but I don't think that applies here
-
RE: Fun with maps
@loopback0 And then they'd been in Edinburgh/Geneva (Cross out what is not appropriate). Why would they do that to themselves?
-
RE: The unofficial offical bad pun of the day thread
@Tsaukpaetra said in The unofficial offical bad pun of the day thread:
@Benjamin-Hall said in The unofficial offical bad pun of the day thread:
@Mason_Wheeler err 2b not found
Mount options invalid, try
fsck
and mount again?Dunno, it looks fine, but what is its personality like?
-
RE: The bad jokes topic 🐴🍹👨
@Gern_Blaanston said in The bad jokes topic 🐴🍹👨:
11/11/11
Ah, crazy day.
(proceeds to be unable to find an English-language source for that)