WTF Bites
-
@hungrier I'm currently dealing with the annoyance of having it mark a line of my code as a "possible null dereference". The line looks like this:
Foo.Bar.Baz();
where
Foo
is definitely not null butBar
could be in principle.Baz()
is avoid
function and it's also not a problem if it's not executed at that point, the program will simply try again later.But if I try to use the new method of stating: "Yes, I know it might be null but if it isn't try to execute the function" like
Foo.Bar?.Baz()
I get a compiler error instead of a warning.And wrapping the whole thing in
if(Foo.Bar is not null) {
also does not make it go away. Gah.
-
@Rhywden That's annoying. It should be intelligent enough to figure out the null check, I've seen it work before. Just like it usually acknowledges the presence of "await", or the fact that some reference from some namespace is actually in scope. In my case I think it's just because .razor components sometimes make it freak out for no apparent reason.
But also, it seems like
Foo.Bar?.Baz()
should work, as the compiler is usually rock-solid, and doesn't care that Visual Studio has its head up its ass. UnlessBar
is non-nullable, in which case the whole problem is VS's anatomical/geographical misunderstanding
-
@Gribnit All I want is for the IDE to see that "await" is right there
Whether the feature works is a different question from whether it's a good idea. Maybe it's your color scheme, I surely didn't see it. Or maybe your future is returning a future? Does
await await ...
work?
-
Thanks Visual Studio, very cool
Did you type the await after the function call?
Perhaps they should have awaited for you to finish typing.
-
@hungrier My "favourite" VS annoyance is when I'm missing a reference and it correctly suggests adding it, but then it takes forever to actually do it.
Or, like just yesterday, it fails because it would be a circular reference, but it doesn't tell me that.
Actually, scratch that. With VS2022 there is a new favourite annoyance: it can't seem to be able to remember I want tabs for indentation, going as far as changing tabs to spaces in lines that are not the ones I'm editing. Dude, don't mess with the following lines until I've finished typing; specially when all I'm doing is typing a freaking #if or #region. Don't complain about mixed indentation that you caused.
-
Did you type the await after the function call?
Perhaps they should have awaited for you to finish typing.They're not going to look again at what you've () typed until you have fixed that very important message that they've popped up.
(The IDE front end and the language server are disagreeing on the exact state of the world due to asynchronicity resulting in the messages saying that you've typed in that area and that there is an error crossing over.)
-
Thanks Visual Studio, very cool
Did you type the await after the function call?
Perhaps they should have awaited for you to finish typing.I was working with different parts of the code and didn't even touch that line
-
@Zecc Sometimes, seemingly without any rhyme or reason, it will drop an inline RenderFragment (e.g.
return @<div>blah</div>;
) down to the next line, and/or drop the semicolon at the end down to its own line. It never does this when I'm actually writing that line, but when I'm doing something else it will sometimes auto-unformat just that one part. And whenever it happens, it'll keep doing it to the same line of code, but again at random times.
-
Automatic format on paste in turned off. Without any text selected I press Ctrl+C, Ctrl+V in quick succession.
Expected result: line is duplicated exactly, including indentation.
Actual result: line is duplicated exactly, including indentation.
Okay, I should have specified that it shouldn't have changed the indentation in the original line before copying
Fake edit: I've checked and format on paste was turned on for XML files after all. But it was also set to use spaces, not tabs, so why did it change from spaces to tabs?
-
it can't seem to be able to remember I want tabs for indentation
It's trying to help you. Don't you know that tabs violate MVC principles?
-
-
@hungrier A common typo. The keys are like right next to each other.
-
Thanks Visual Studio, very cool
Did you type the await after the function call?
Perhaps they should have awaited for you to finish typing.I was working with different parts of the code and didn't even touch that line
So you're admitting that you never added an
await
, then.
-
So you're admitting that you never added an await, then.
Indeed, he did not; one was already present but VS can't read.
-
According to Hitman 2, 12 < 9, as I did not get this challenge completed despite fulfilling the requirements.
I think a 133% completion is pretty damn completed persionally!
(A forum search did give me a fix that worked: redo the poison kill challenge and I got it.)
-
So you're admitting that you never added an await, then.
Indeed, he did not; one was already present but VS can't read.
… which is the more surprising as it is supposed to use the actual compiler front-end for the parsing. So, yeah, .
-
did not get this challenge completed despite fulfilling the requirements
Of course not! You're too good. Nobody likes overachievers
-
I run chromium in my work VM. Whenever I start it up, there's one tab that will refuse to load. Even refreshing won't work. Even if it was just looking at a static file on my drive. It's always whichever tab was active when it was shut down.
-
@boomzilla sounds like your employer needs to get better spyware, it's not okay to be crashing your processes like that
-
From Udemy:
Illustrations with meaning
Some moments aren't easily captured in words or photos. Our imaginative illustration style helps us turn more complicated ideas into something clear and intuitive.
There's more to the picture, but I wanted to focus on this guy apparently trying to do a jndi exploit on a disinterested woman
-
@hungrier I hate that style of „imaginative illustrations” where people are 2.5m tall with huge legs and shrunken heads.
-
@hungrier the one just below,
isn't any better.
-
@hungrier I hate that style of „imaginative illustrations” where people are 2.5m tall with huge legs and shrunken heads.
-
I just received a "ticket closed" notification from a company that we have not done anything with for at least 5 years. Someone is really getting caught up on their backlog.
-
I don't think I want to know why these exist:
Bonus points for the constant name getting out of sync with the constant value, and for using language and country codes interchangably.
-
@error serves it right for not having a sane Set type.
-
I don't think I want to know why these exist:
Bonus points for the constant name getting out of sync with the constant value, and for using language and country codes interchangably.
Also, there are two
es
languages. I wonder if that affects the code (I would not be surprised).
-
@error serves it right for not having a sane Set type.
Imagine if you could write
Set.of("en-us", "zh-cn", "ja-jp", ...)
or even pull that information from a useful location…
-
@dkf but that's more typing
-
Status: ServiceHow!!!!!
So, there's a workflow that waits for an Approval Request to be approved (or rejected) before moving on in the flow. This is accomplished by creating and watching the approvers list on the request item that needs approving. Logical.
What's not logical is that if I replace the approver (because they are not going to be available before the ticket is auto-cancelled, for example), the workflow treats that as the approvers approving!
In other words, I need to add the replacement approver first, then delete the original approver, otherwise the workflow will go "Oh? Looks like everyone approved it!" in the middle of the half-completed action of replace-list-of-approvers-with-one-different-one.
Today is off to a good start. Let's see how many people call out today...
-
@Tsaukpaetra said in WTF Bites:
What's not logical is that if I replace the approver (because they are not going to be available before the ticket is auto-cancelled, for example), the workflow treats that as the approvers approving!
In other words, I need to add the replacement approver first, then delete the original approver, otherwise the workflow will go "Oh? Looks like everyone approved it!" in the middle of the half-completed action of replace-list-of-approvers-with-one-different-one.So if you remove the only approver, resulting in there temporarily being 0 outstanding approvers it doesn't wait for all 0 people to approve it?
Shocker.
-
@loopback0 said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
What's not logical is that if I replace the approver (because they are not going to be available before the ticket is auto-cancelled, for example), the workflow treats that as the approvers approving!
In other words, I need to add the replacement approver first, then delete the original approver, otherwise the workflow will go "Oh? Looks like everyone approved it!" in the middle of the half-completed action of replace-list-of-approvers-with-one-different-one.So if you remove the only approver, resulting in there temporarily being 0 approvers it doesn't wait for all 0 people to approve it?
Shocker.No, I add another approver while at the same time removing the original, same step in one screen.
Implementation details processing removals before additions is not my concern. It shouldn't even apply workflow actions in the middle of what is supposed to be an atomic action.
-
Why the hell can't they support ED25519 after all those years it's been the recommended kind.
-
@Tsaukpaetra said in WTF Bites:
Implementation details processing removals before additions is not my concern
Sounds like it
-
@loopback0 said in WTF Bites:
@Tsaukpaetra said in WTF Bites:
Implementation details processing removals before additions is not my concern
Sounds like it
I simply commented the ticket "System dun fucked up. Don't schedule this until it's actually approved. Probably going to be rejected anyways as we don't support Linux on the VPN or whatshityou."
-
@Tsaukpaetra said in WTF Bites:
Implementation details processing removals
Oh! And apparently it sent out the "Request has been approved by XXX" message (where XXX is the now-deleted approver)!
I don't know how you can fuck this up like that, but...
-
TL;DR: if you bought games on Humble you'd like to keep and you're not using Windows, download them now.
-
@Zerosquare said in WTF Bites:
TL;DR: if you bought games on Humble you'd like to keep and you're not using Windows, download them now.
Every game I've ever bought from Humble has just been the key which gets redeemed with Steam etc anyway.
-
@Tsaukpaetra said in WTF Bites:
Status: ServiceHow!!!!!
I'm not sure if this is how you meant it, but it's how I read it anyway.
-
@Tsaukpaetra said in WTF Bites:
Implementation details processing removals before additions is not my concern.
It's just something that's been injected on you.
-
@Zerosquare Hold on, receiving a message from a future metaverse...
The number of launchers to actual programs today exceeded the Launcher Event Horizon. The industry is irreversibly collapsing. If you're hearing this message, maybe it is not too l...
Keep up the good work!
-
Why the hell can't they support ED25519 after all those years it's been the recommended kind.
They're being environmentally conscious. RSA takes much less energy to crack.
-
@Applied-Mediocrity said in WTF Bites:
@Zerosquare Hold on, receiving a message from a future metaverse...
The number of launchers to actual programs today exceeded the Launcher Event Horizon. The industry is irreversibly collapsing. If you're hearing this message, maybe it is not too l...
Keep up the good work!
Does that mean they reached a point where it is no longer profitable to program anything other than launchers?
-
@PleegWat That is indeed what I meant (inspired by the Shoe Event Horizon of H2G2).
-
@dkf but that's more typing
Yeah, I mean, if the only accesses against a regex consisting only of alternations are full matches, that's already semantically equivalent to sets even. So wtf, the fancy JS runtime can't do optimization?
-
Why the hell can't they support ED25519 after all those years it's been the recommended kind.
They're being environmentally conscious. RSA takes much less energy to crack.
TBF I suspect they use some Java or .нет ssh server instead of openssh and it probably didn't see much updates in the last 15 or so years – TeamCity (buildserver @ work) has the same problem, but in that case it's a key TC uses to log into things, so it's specially generated for it anyway.
-
Why the hell can't they support ED25519 after all those years it's been the recommended kind.
Both Palantir and the NSA agree.
-
The following C++ code (defining a lambda expression and capturing two local variables) works.
int w = size.first; int h = size.second; auto action = [=] { setSize(w, h); };
Trying to use structured bindings to reduce verbosity
auto [w, h] = size; auto action = [=] { setSize(w, h); };
should be semantically equivalent. But it gives an error message (clang only, not in gcc):
error: reference to local binding 'w' declared in enclosing function 'foo'
.
Yes, so what? Why's that an error?What's worse, according to SO, this is apparently intentionally broken:
If a lambda-expression [...] captures a structured binding (explicitly or implicitly), the program is ill-formed.
And of course with this hack it works again:
auto [w, h] = size; auto action = [w=w, h=h, this] { setSize(w, h); };
-
@topspin Wow. Hadn't looked into structured bindings that much before, but after briefly reading up, that's ... impressively fucked up.
But, I guess, the conclusion is that the two variants in your example really are not the same. Annoying.
-
WTF of my day: an email I received from my city utilities department (which handles my water, which is atrociously expensive ($85/month, of which about 10 is actual usage cost and the rest is various fees)):
In mid-March 2022, the City of Townsville will be updating our billing software. The bill itself will look the same, as well as the payment website. However, if you pay online, you will need to re-register your account starting in mid-March, as well as re-enroll in auto-pay if you’re currently enrolled with a debit/credit card.
Migrations? What are those? Nah, just make everyone re-register and re-set up auto-pay. For something that happens once a month.