WTF Bites
-
@boomzilla said in WTF Bites:
Do they not understand that they're destroying useful information? Do they not know how to pass the inner exception?
Those two seem like good bets.
-
@Kamil-Podlesak said in WTF Bites:
PS: the most common superclass is
Throwable
, so the author definitely loses some points there.If you're catching
Error
in Java then you're probablyIf you're throwing
Error
(and aren't the runtime) then you are a sinner.
-
Looks like Microsoft not only has exponential-time algorithms for Windows update, but now for their compilers too.
Updating third party dependencies from Eigen 3.3.x to 3.4. After fixing a compiler error by a cow-orker about some code that should've never compiled but did, and now stopped compiling, I thought all is good and threw it at the build server. Compiling on windows basically "did not finish", the release mode builds got stuck forever.
Investigating, I manually compiled one of the files that seemed stuck and it took 2 hours to compile. For comparison, g++ on linux takes 7s with -O0 and 12s with -O2. You could complain that that's slow, but at least it finishes.I google for the problem. There's a bug on the Eigen issue tracker, but they say there's little they can do about it except remove the inline specifiers so the optimizer doesn't commit sudoku. Since Eigen is a very template heavy library supposed to compile down to reasonably performant machine code, inlining is crucial.
Also found a bug on the microsoft developer community site:
Thanks for your feedback. After our investigation, this is not a bug. It’s by design. Please see the comment by Pratap Chandar [MSFT] for details.
A factor 500 performance regression is by design? You fuckers!
-
@topspin it might be by design, but that’s no defence, it just means the design is stupid and still valid for criticism.
I keep seeing “working as designed” or “working as intended” for things that clearly aren’t, but the drones keep saying it in the hopes it will eventually become true.
-
@dkf Let ye who is without sin throw the first error.
-
A factor 500 performance regression is by design? You fuckers!
Reminds me of a bug in a version of LLVM (I want to say 3.9 but I can't be sure) with very heavily inlined code, much more heavily inlined than you'd normally see in C++. The problem was that some junior coder had committed a change that made iteration through the collection of basic blocks in a function into an O(N2) algorithm. This is because inlining generates very large numbers of basic blocks in some circumstances, especially those that you encounter with some styles of implementing a compiler; the optimizer will get rid of almost all of them a few steps later (via stuff like precondition propagation and dead code removal). When you have a lot of them and an algorithm in that area gets Schlemieled, it's more than unfortunate. The bug was fixed in the next release of LLVM. (Types don't tell you whether code is correct; they're indicative at best.)
Has MSVC been hit by the same sort of goof? I don't know, but it's such an easy thing for someone to screw up if they don't know that it's vital to be careful, and if you're just building ordinary C++ code where the inline depth is low (and so the basic block count not too large) then you're unlikely to see things as other than a small increase in build time (possibly within the variation of the overall time due to other things going on). But the "Closed Not A Bug" is indicative of a serious fault in the communications channel between users and compiler developers; bad performance is a bug, and a serious one.
-
@topspin VS is the one compiler that I have ICE:ed with template+constexpr stuff in recent times. Not surprised they would pull something like this.
I wonder if their change fixes some of the ICE:s ... that would explain why they don't want to revert it.
-
takes 7s
You could complain that that's slow,
that's fucking blazing fast!
-
@boomzilla said in WTF Bites:
You mean gripe besides the fact it discards the stack trace (by not setting the inner exception)
I wonder what sort of cluelessness this is.
The "A little knowledge is a dangerous" kind.
Did they do this on purpose because they hate Java's famous multi-layered stack traces?
As far as I can tell, no. Just herpaderp because someone said something they misunderstood sometime.
Do they not understand that they're destroying useful information?
They do so on purpose elsewhere, but here I'm not sure.
Do they not know how to pass the inner exception?
They might not be aware of what it's actually doing.The rest is dumb but this is actively harmful.
The reason they use Objects.nonNull is becuse apparently java is going to remove the == operator, and presumably others as well. That the javadoc for Objects says it's specifically for use with streams and similar is something they completely ignore, even when told and shown so.
-
apparently java is going to remove the == operator
Oh, really? We're still on Java 8 so I haven't really bothered keeping up with whatever version they're up to now. That would be...hugely painful. Have they been asking Apple about ways to break backwards compatibility?
-
@boomzilla said in WTF Bites:
apparently java is going to remove the == operator
Oh, really? We're still on Java 8 so I haven't really bothered keeping up with whatever version they're up to now. That would be...hugely painful. Have they been asking Apple about ways to break backwards compatibility?
Nah, that is just the senior dev misunderstanding something he heard someone say at a conference somewhere. Java is definitely not doing that. If anything they seem to be moving towards using operators more with project loom.
-
Has MSVC been hit by the same sort of goof? I don't know, but it's such an easy thing for someone to screw up if they don't know that it's vital to be careful, and if you're just building ordinary C++ code where the inline depth is low (and so the basic block count not too large) then you're unlikely to see things as other than a small increase in build time (possibly within the variation of the overall time due to other things going on). But the "Closed Not A Bug" is indicative of a serious fault in the communications channel between users and compiler developers; bad performance is a bug, and a serious one.
The thing is, as far as I know they're dog-fooding, i.e. they're building all of Windows etc. with their compiler. They have enough code that they should hit all kinds of problems with different projects and coding styles. It'd be surprising for them to not notice anything.
Also, I assume what this means is the drone reported the problem to their liaison on the compiler team to investigate, who told them there's no immediate fix. So the drone closed-not-a-bug, but I assume they're working on it internally for some future major release.
-
@topspin VS is the one compiler that I have ICE:ed with template+constexpr stuff in recent times. Not surprised they would pull something like this.
I wonder if their change fixes some of the ICE:s ... that would explain why they don't want to revert it.
Yeah I guess you can still get it to ICE with cutting-edge crazyness and constevalinitexprfloof, but it's much better than it used to be. In a former job, a coworker used to regularly get it to ICE just by writing code that's stupid / ugly, but still simple.
At least nowadays it getsfor
scope correct.
-
There's a bug on the Eigen issue tracker, but they say there's little they can do about it except remove the inline specifiers so the optimizer doesn't commit sudoku.
MSC++ still considers the
inline
specifiers in the optimizer? IIRC gcc stopped doing it aeons ago and just always goes with its own guess when to inline.
-
Is Cloudflare borked again ?
500
s all over the place. Someone might have to pitch in a couple bucks for a new thread at this rate.
-
@kazitor Yep, its API services as of about twenty minutes ago.
-
They’re saying it’s fixed and monitoring the results but damn, son, isn’t that why we built this fangled decentralised thing in the first place?
-
The thing is, as far as I know they're dog-fooding, i.e. they're building all of Windows etc. with their compiler.
The thing is if it's a Sclemieled iterator in something like looping, you probably won't see it in most C++ code where you'd have probably no more than a few hundred basic blocks in a realized function (during the early stages of optimization; they get pruned hard later on). In a language like Rust, you get tens of thousands of basic blocks.
It's possible that the Sclemieling is due to having some kind of correctness requirement that forces them to restart the iteration if they alter anything, and might explain why they're not keen to roll back.
-
IIRC gcc stopped doing it aeons ago and just always goes with its own guess when to inline.
gcc pays attention to
static inline
(provided you don't take the address of it); that tells the compiler that it really really knows exactly everywhere a function is used and can get aggressive about its inlining. Without thatstatic
, yes,inline
is just a hint (albeit quite a strong one). Don't know if that applies in C++ mode.
-
@Bulb I think somebody recently mentioned that it's used as a weak hint when making inlining decisions. (I would also guess that it depends on the context where it's used; there are a bunch of places where you can't just get rid of
inline
and still build the program.) But mostly it's the "multiple (identical) definitions are OK" keyword, like everywhere else.
-
There's a bug on the Eigen issue tracker, but they say there's little they can do about it except remove the inline specifiers so the optimizer doesn't commit sudoku.
MSC++ still considers the
inline
specifiers in the optimizer? IIRC gcc stopped doing it aeons ago and just always goes with its own guess when to inline.It doesn't,
inline
is just a linkage specifier. But since the library really wants that stuff to be inlined for performance reason, it uses__forceinline
.
I haven't run my own tests yet to determine if I can accept the performance hit or have to revert to a previous library version, and frankly I don't have time for that right now. I'll probably revert back.
-
-
@Zerosquare said in WTF Bites:
I'll probably revert back.
Will you do the needful as well?
IDGI. Did my sentence structure sound Indian or what?
-
@topspin Since you're asking, "I'll revert back to you" instead of "reply" or "get back" is considered here a stereotypical Indian response. You're using it in a different sense, but a combination of "revert" and "back" in close proximity is enough to trigger the pattern detection.
-
@aitap there are only two groups of people I’ve ever heard use “revert back” instead of reply - overly uppity legal folks who think that making things lender’s problem is their job (it isn’t), and Indian techies doing the needful.
I’m sure other groups might use it but these are the only two in my corporate experience.
-
Fucking Outlook Web:
Translate message to: German | Never translate from: English
The
goggleslinks, they do nothing!Inspect source:
-
-
@Kamil-Podlesak said in WTF Bites:
PS: the most common superclass is
Throwable
, so the author definitely loses some points there.If you're catching
Error
in Java then you're probablyIf you're throwing
Error
(and aren't the runtime) then you are a sinner.But if you're rethrowing
Error
, you're merely in a hell of your own creation.
-
They’re saying it’s fixed and monitoring the results but damn, son, isn’t that why we built this fangled decentralised thing in the first place?
It's Web 2.3.0!
-
(and the stack trace is kept)
(except for data exceptions)
Yeah, I guess I could fix that too.. But
-
-
@topspin Can you set it up to automatically translate? If yes, can you set it up to automatically translate english to german, and then set it up to automatically translate german to english?
-
@cvi Considering how well Microsoft’s translation works, that’d be .
Heck, even their articles that are human translated instead of machine translated are utter .
-
From the Inner JSON archives:
A certain Samsung REST API is authenticated with a JSON Web Token. After decoding it looks like this (username and uid replaced):{ "sub": "myusername", "expired": 1655841613697, "created": 1655839813697, "authority": "Content Read Authority,Content Write Authority,Content Manage Authority,Content Schedule Read Authority,Content Schedule Write Authority,Content Schedule Manage Authority,Device Read Authority,Device Write Authority,User Read Authority,User Write Authority,User Approval Authority,Server Setup Manage Authority", "viewAuthority": "{\"CONTENT_PLAYLIST_RULESET\":{\"READ\":true,\"CREATE\":true,\"LOCK\":true,\"MANAGE\":true,\"ADDELEMENT\":true,\"CONTENTUPLOAD\":true},\"SCHEDULE\":{\"READ\":true,\"CREATE\":true,\"MANAGE\":true},\"USER\":{\"READ\":true,\"CREATE\":true,\"MANAGE\":true},\"DEVICE\":{\"READ\":true,\"CONTROL\":true,\"CREATE\":true,\"MANAGE\":true,\"APPROVAL\":true,\"MOVE\":true,\"DELETE\":true,\"CUSTOMIZE\":true,\"SW_UPDATE\":true,\"SECURITY\":true},\"ETC\":{\"SERVER_SETUP_MANAGE\":true,\"STATISTICS\":false,\"STATISTICS_MANAGE\":true},\"RULEMANAGER\":{\"STORE_MANAGER\":true,\"HQ_MANAGER\":true},\"INSIGHT\":{\"READ\":true,\"MANAGE\":true}}", "exp": 1655841613, "jti": "f368f513-5e7d-48a1-8e39-a2613b84fd1c" }
There's even inner CSV in JSON.
-
@boomzilla said in WTF Bites:
You mean gripe besides the fact it discards the stack trace (by not setting the inner exception)
I wonder what sort of cluelessness this is. Did they do this on purpose because they hate Java's famous multi-layered stack traces? Do they not understand that they're destroying useful information? Do they not know how to pass the inner exception?
The rest is dumb but this is actively harmful.
A former workplace liked to log.error(e.getmessage()). I’m still in their WhatsApp. It took them a week to track a null pointer once.
I wish we could get more detail from the logs.
we need more detailed logs messages.One year earlier.
PR looks fine. I’ll tick it when you add the exception to the catch clauses’ logging.
but the stack traces just clutter up the logs.
you won’t see them most of the time because of json magic DataDog does and good luck to you with your first null pointer without them.I always thought I would end up as Jamie McDonald by this stage of my career not a voice of reason.
-
@boomzilla said in WTF Bites:
apparently java is going to remove the == operator
Oh, really? We're still on Java 8 so I haven't really bothered keeping up with whatever version they're up to now. That would be...hugely painful. Have they been asking Apple about ways to break backwards compatibility?
Nah, that is just the senior dev misunderstanding something he heard someone say at a conference somewhere. Java is definitely not doing that. If anything they seem to be moving towards using operators more with project loom.
If loom kills off the reactive library I might actually have something non derogatory to say about Oracle for once.
-
IIRC gcc stopped doing it aeons ago and just always goes with its own guess when to inline.
gcc pays attention to
static inline
(provided you don't take the address of it); that tells the compiler that it really really knows exactly everywhere a function is used and can get aggressive about its inlining.It is not about getting aggressive about inlining, it is just knowing when there are no non-inline calls left and so stand-alone code does not need to be emitted. But that follows just from
static
alone anyway.Without that
static
, yes,inline
is just a hint (albeit quite a strong one). Don't know if that applies in C++ mode.Is it strong? My impression was that it either isn't even a hint any more, or only a fairly weak one (you can force inlining with an attribute if you are certain it is beneficial for specific function and the compiler guesses it wrong). Because a lot of code is quite liberal with
inline
and it often pessimizes things in practice, especially on register-poor architectures like i386.Of course without LTO the compiler can't inline extern functions, so in the end functions that are not declared
inline
often simply cannot be inlined.But in C non-static
inline
functions are a bit of a pain, because of the inconsistency in whatextern inline
means (in gcc it meant the function is extern, i.e. will be found elsewhere, unless inlined, which is consistent with other uses ofextern
(it goes on declarations, not definitions), but then it got standardized the other way around in C99 whereextern inline
means this is the instance that should generate a symbol for non-inline use). In C++ it's easier as thereinline
simply means the linker should just pick one of the possibly multiple instances at its discretion.
-
Shopping at Ikea
-
@Atazhaia Cheerio!
-
It is not about getting aggressive about inlining, it is just knowing when there are no non-inline calls left and so stand-alone code does not need to be emitted. But that follows just from
static
alone anyway.I think it also raises the complexity limit for inlining, which most certainly is an increase in aggression to the point where it will inline unless it has what it thinks is a good reason not to. (Normally, automatic inlining only applies up to certain complexity of function, typically about where you get a non-trivial loop, though this balance has shifted over the years and depends on the optimisation options selected.)
-
Today, in "Hand Meet Foot" (from today's USPS Daily Digest email):
I'm seriously wondering if I'm actually listed in their database more than once...
-
Samsung keeps delivering. To take a screenshot from a device, you need to send the folowing parameters:
filename: MAC address of the device, with colons replaced by dashes + '.jpg'. It must be 'jpg', I checked.
width: width in pixels,
height: height in pixelsIn response, you get base64-encoded PNG, $height pixels wide, and $width pixels high.
How in the world is this company producing functional hardware?
-
Status: yo dawg.....
-
@sebastian-galczynski said in WTF Bites:
How in the world is this company producing functional hardware?
I am guessing that, like every large company, it is really a loose conglomeration of companies that share accounting department. So it is not beyond imagination that the department that designs mobile phone hardware is competent (and so is, apparently, the department that builds transoceanic ships), but the department that writes software is totally messed up.
-
@Bulb the thread on Tizen demonstrated this perfectly adequately.
-
@sebastian-galczynski said in WTF Bites:
How in the world is this company producing functional hardware?
I am guessing that, like every large company, it is really a loose conglomeration of companies that share accounting department. So it is not beyond imagination that the department that designs mobile phone hardware is competent (and so is, apparently, the department that builds transoceanic ships), but the department that writes software is totally messed up.
This is true for every large company, but it's tuned up to eleven in Korea where they even have a special category for that: https://en.wikipedia.org/wiki/Chaebol
(note: Samsung makes about 17% of whole Korean economy)
-
@Kamil-Podlesak The part that's prevalent in Korea, but rare elsewhere, is that those big holdings have completely unrelated businesses in them. Big companies in other parts of the world usually stick to somewhat related businesses.
-
Big companies in other parts of the world usually stick to somewhat related businesses.
It comes and goes in slow phases. Conglomerates were popular up until some time in the 1990s, whereas now it's more common to try to be related thematically. I'm guessing the style will change about a decade or so, when you get people in charge who have had their adult life seeing people doing it in the style and Getting It Wrong™, and so decide to Do Something About It™ for great profit.
The estimate of 40 years is because that's the approximate length of a working career in a lot of the world.
-
the thread on Tizen demonstrated this perfectly adequately.
We received much Enlightenment.
-