WTF Bites
-
@Zerosquare I first read "the dom"... Which is :notwrong:
-
Not sure how to capture a screenshot gif without installing something, but this web UI is doing a dance because it resizing itself is triggering it resizing itself.
-
Not sure how to capture a screenshot gif
-
java.io.FileNotFoundException: /some/file/path (File exists)
That's what happens when someone designs themselves in the corner with checked exceptions and excessive specificity.
@Zerosquare said in WTF Bites:
Isn't that what happens when you try to rename an existing file or create a directory, and the new name is already used by an existing file?
In POSIX no.
rename
replaces the target atomically when both source and target are files and returnsEISDIR
(“Is a directory”) if the target is a directory andENOTDIR
(“Not a directory”) if trying to rename directory over file.EEXISTS
is returned fromlink
andopen
withO_CREAT|O_EXCL
and I am not sure how those could be invoked from Java (neither is available from standard C library, the POSIX interface must be used).In Windows rename does not replace, so it probably can return this, but the forward slashes suggest a POSIXy system.
-
-
java.io.FileNotFoundException: /some/file/path (File exists)
That's what happens when someone designs themselves in the corner with checked exceptions and excessive specificity.
@Zerosquare said in WTF Bites:
Isn't that what happens when you try to rename an existing file or create a directory, and the new name is already used by an existing file?
In POSIX no.
rename
replaces the target atomically when both source and target are files and returnsEISDIR
(“Is a directory”) if the target is a directory andENOTDIR
(“Not a directory”) if trying to rename directory over file.EEXISTS
is returned fromlink
andopen
withO_CREAT|O_EXCL
and I am not sure how those could be invoked from Java (neither is available from standard C library, the POSIX interface must be used).Easy: StandardOpenOption.CREATE_NEW
it does, however, correctly interpret the error and throws java.nio.file.FileAlreadyExistsExceptionI am pretty sure I have already seen the FileNotFoundException, but can't remember where... I think it was either in docker (layer fs does some crazy shenanigans sometimes) or it involved file locking.
-
15 99
Boy, I would be pissed.
Indeed. Since my exams rarely go above 60 points this means that you have to be literally perfect to get a 15 grade. The previous installation at least allowed for one calculation error or spelling error.
I could of course artificially inflate the points I'm giving by simply doubling everything but, seriously?
-
java.io.FileNotFoundException: /some/file/path (File exists)
Filed under: FileFoundException
File exists, we know it, we just couldn't find it anywhere!
-
@Kamil-Podlesak said in WTF Bites:
java.io.FileNotFoundException: /some/file/path (File exists)
That's what happens when someone designs themselves in the corner with checked exceptions and excessive specificity.
@Zerosquare said in WTF Bites:
Isn't that what happens when you try to rename an existing file or create a directory, and the new name is already used by an existing file?
In POSIX no.
rename
replaces the target atomically when both source and target are files and returnsEISDIR
(“Is a directory”) if the target is a directory andENOTDIR
(“Not a directory”) if trying to rename directory over file.EEXISTS
is returned fromlink
andopen
withO_CREAT|O_EXCL
and I am not sure how those could be invoked from Java (neither is available from standard C library, the POSIX interface must be used).Easy: StandardOpenOption.CREATE_NEW
it does, however, correctly interpret the error and throws java.nio.file.FileAlreadyExistsExceptionIt might also be thrown by some library that initially declared it will throw only
FileNotFoundException
instead of more genericIOException
and then shoehorned the additional errors that could be generated by more recent implementation into the declared exception.I am pretty sure I have already seen the FileNotFoundException, but can't remember where... I think it was either in docker (layer fs does some crazy shenanigans sometimes) or it involved file locking.
The overlayfs might do something weird, but it still makes little sense for it to return this error from function that normally doesn't return it. And locking shouldn't either—unless you mean some utility for using lockfiles, in which case the above makes sense.
-
15 99
Boy, I would be pissed.
Indeed. Since my exams rarely go above 60 points this means that you have to be literally perfect to get a 15 grade. The previous installation at least allowed for one calculation error or spelling error.
In Poland, it's customary that you have to score literally above the maximum to get the highest grade. As you may suspect, usually it's impossible to earn more than maximum, so most often nobody gets the highest grade. The exception is the big hour-long tests (you get about 3 of those each semester for each subject), where being absolutely perfect suffices.
-
@Rhywden I think we largely had a 40-60-80% or occasionally 50-70-90% steps (I think that was the case before university, but for sure after). The grades were fail (< 40%), pass (40-60), good (60-80) and very good (80+%).
I've come to prefer these rather rough scales. It's a bit more forgiving when correcting (2-3 points on a 60 point scale won't make that much difference in the general case), and nobody cares about specific grades below passing anyway.
Other than a handful of exceptions, there were no perfect scores. Most exams were set up such that if you got a 80+% score, you had a pretty good idea of the material (and, perhaps more importantly, demonstrated that you could tackle new-ish problems by yourself).
-
@cvi Yeah, but we have, for historical reasons, these hyper-fine scales. From which the results are then taken as gospel and subjected to various mathematical methods they absolutely should not be applied to (averages, after all, kind of demand a zero point and equidistant grades).
It's probably the usual thinking that merely having a scale with more significant digits automatically yields a more accurate result.
-
Been banging my head against the desk trying to figure out what's going wrong with my angular tests. The problem is that Observables made from literal values in service stubs (e.g.,
of([...some stuff...])
resolve immediately instead of in their normal asynchronous fashion when they're the result of some call back to the server, so some things were happening before other things were initialized as they should have been.
-
@Zerosquare said in WTF Bites:
Proctorio
Is that the spanish word for proctologist?
At least, they seem to want to crawl into students' butts.
-
Status/WTF nibble: You know you're doing something gnarly when you have to put this in your CI control script:
sudo /opt/X11/lib/X11/xinit/privileged_startx.d/10-tmpdirs
(It works, and means I don't have to reboot the VM after installing a virtual framebuffer, but was really annoying to discover!)
-
In Windows rename does not replace, so it probably can return this, but the forward slashes suggest a POSIXy system
It's a Windows FS mounted in a CentOS VirtualBox VM as a "shared folder"
-
@boomzilla
.pipe( delay(1) )
?But really, it looks like your tests identified a race condition. Finding bugs is the point of tests.
-
In Windows rename does not replace, so it probably can return this, but the forward slashes suggest a POSIXy system
It's a Windows FS mounted in a CentOS VirtualBox VM as a "shared folder"
Ah, that's fully expected to behave in unexpected ways.
-
(It works, and means I don't have to reboot the VM after installing a virtual framebuffer, but was really annoying to discover!)
Also, I now have the CI doing full GUI test runs on all our supported platforms (Windows, macOS and Linux), instead of just checking whether the code compiles. That's a lot more rigorous. And means that maybe we'll try to fix the tests, or perhaps I'm just hoping…
-
@boomzilla
.pipe( delay(1) )
?But really, it looks like your tests identified a race condition. Finding bugs is the point of tests.
Ah! Yeah, plus some
await
ing in the test.I mean...the race condition was that the line after the call to the service method wasn't executed before the observable subscription resolved, which is pretty much guaranteed in an actual normal asynchronous browser environment where there's an http call happening. At least, AIUI.
-
@boomzilla said in WTF Bites:
@boomzilla
.pipe( delay(1) )
?But really, it looks like your tests identified a race condition. Finding bugs is the point of tests.
Ah! Yeah, plus some
await
ing in the test.Actually,
of(1,2,3, asyncScheduler)
is the correct way I think.
-
@boomzilla said in WTF Bites:
@boomzilla
.pipe( delay(1) )
?But really, it looks like your tests identified a race condition. Finding bugs is the point of tests.
Ah! Yeah, plus some
await
ing in the test.Actually,
of(1,2,3, asyncScheduler)
is the correct way I think.I'm being told that's deprecated. This seems to be the new hotness:
scheduled<Foo>( of( foo ), asyncScheduler )
-
@Tsaukpaetra said in WTF Bites:
Not sure how to capture a screenshot gif
without installing something
Literally the next three words.
There's a whole bullshit audit process for installing programs on this machine.
-
@error Set your monitor on a wooden table and record with your phone
-
@boomzilla said in WTF Bites:
I'm being told that's deprecated. This seems to be the new hotness:
Ah, yes, JavaScript infrastructure is very CADT.
-
@Tsaukpaetra said in WTF Bites:
Not sure how to capture a screenshot gif
without installing something
Literally the next three words.
There's a whole bullshit audit process for installing programs on this machine.
Actually, VClip is a standalone exe? I think I can swing that.
-
Not sure how to capture a screenshot gif without installing something, but this web UI is doing a dance because it resizing itself is triggering it resizing itself.
VClip FTW.
-
-
-
@boomzilla said in WTF Bites:
Been banging my head against the desk trying to figure out what's going wrong with my angular tests. The problem is that Observables made from literal values in service stubs (e.g.,
of([...some stuff...])
resolve immediately instead of in their normal asynchronous fashion when they're the result of some call back to the server, so some things were happening before other things were initialized as they should have been.ISTR reading through a heated debate on the standards track for Observables whether they should always emit asynchronously. Some people were very concerned about the performance implications.
-
@boomzilla said in WTF Bites:
Been banging my head against the desk trying to figure out what's going wrong with my angular tests. The problem is that Observables made from literal values in service stubs (e.g.,
of([...some stuff...])
resolve immediately instead of in their normal asynchronous fashion when they're the result of some call back to the server, so some things were happening before other things were initialized as they should have been.ISTR reading through a heated debate on the standards track for Observables whether they should always emit asynchronously. Some people were very concerned about the performance implications.
It seems less surprising to me that they'd always be asynchronous but I guess I can see the utility in not doing that if you don't have to. The performance implications are way beyond my knowledge of such things running in a browser, and anyways, my main usage of them is requesting stuff from the server where network and DB round trips completely dominate the real world performance.
-
@error Run it on one of those newfangled 320Hz screens, optimize the program so that each cycle takes one frame, and call it temporal anti-aliasing. Problem solved.
-
@boomzilla said in WTF Bites:
@boomzilla said in WTF Bites:
Been banging my head against the desk trying to figure out what's going wrong with my angular tests. The problem is that Observables made from literal values in service stubs (e.g.,
of([...some stuff...])
resolve immediately instead of in their normal asynchronous fashion when they're the result of some call back to the server, so some things were happening before other things were initialized as they should have been.ISTR reading through a heated debate on the standards track for Observables whether they should always emit asynchronously. Some people were very concerned about the performance implications.
It seems less surprising to me that they'd always be asynchronous but I guess I can see the utility in not doing that if you don't have to. The performance implications are way beyond my knowledge of such things running in a browser, and anyways, my main usage of them is requesting stuff from the server where network and DB round trips completely dominate the real world performance.
Not so heated as I remember, but is still an Open issue in discussion. (This is for the standardized version, hopefully eventually just a built-in feature of the language [operators would probably stay in userland].)
-
@boomzilla said in WTF Bites:
@boomzilla said in WTF Bites:
@boomzilla
.pipe( delay(1) )
?But really, it looks like your tests identified a race condition. Finding bugs is the point of tests.
Ah! Yeah, plus some
await
ing in the test.Actually,
of(1,2,3, asyncScheduler)
is the correct way I think.I'm being told that's deprecated. This seems to be the new hotness:
scheduled<Foo>( of( foo ), asyncScheduler )
Alternatively, you can
observeOn( asyncScheduler )
in your consuming code, so it doesn't matter if you receive an async or a sync observable from your data source. I'd say this is even better.
-
-
The weebs have infiltrated Microsoft.
-
-
My WTF of the day: So I had to switch one of our amazon EC2 instances to a different image (Debian 10, not debian 9) so that it could install a particular package. But now, when I try to start it up,
apt-get update
(using the default-configured sources) can't connect to anything, while all the rest of the debian 9 ones, using the same package sources (except stretch instead of buster, but that shouldn't break anything because it can't even find the server) can connect just fine, no complaints.And even more of a ? When I ssh into the instance and run it manually...it works just fine, no complaints. All I can think of is that the startup process for debian 10 is so much faster than debian 9 that it comes up and starts looking for updates before the VPC (virtual network thing) is active. Which would be a total WTF and no clue how to fix it.
-
@Benjamin-Hall said in WTF Bites:
Which would be a total WTF and no clue how to fix it.
In theory, you fix it by saying that the system updates require the whole network stack to be there including the virtual network stuff. There's a way to specify dependencies in the startup order, which can be of varying degrees of critical-ness (such as you can't bring up some services until the NAS has been mounted, which requires the virtual networking to be stable, etc.).
…
I never managed got any of that working when I did admin of these things.
-
@Benjamin-Hall said in WTF Bites:
Which would be a total WTF and no clue how to fix it.
In theory, you fix it by saying that the system updates require the whole network stack to be there including the virtual network stuff. There's a way to specify dependencies in the startup order, which can be of varying degrees of critical-ness (such as you can't bring up some services until the NAS has been mounted, which requires the virtual networking to be stable, etc.).
…
I never managed got any of that working when I did admin of these things.
Yeah. But it boggles the mind that the VPC/security groups wouldn't be up yet...when they're the very first thing the template puts up and resolve basically instantaneously. There's got to be something else...or maybe I'm just cursed.
Doesn't help my cycle time that testing any little change requires taking down the whole stack, re-launching it, and then waiting 5-10 minutes for the instances to finally decide they're stable enough for the load balancers to kick in.
-
@HardwareGeek said in WTF Bites:
TIL things I did not want to know.
Isn't that the point of that site?
-
@Benjamin-Hall said in WTF Bites:
when I try to start it up, apt-get update (using the default-configured sources) can't connect to anything
That's something Amazon set up? Or even someone in your company?
Because Debian does not try to update at boot. It has
unattended-upgrades
that apply updates at runtime, but then for some you have to reboot anyway. So installing them during start-up is the wrong time, because some things have already started and loaded the old libraries. And not everything can be restarted without reboot.@Benjamin-Hall said in WTF Bites:
All I can think of is that the startup process for debian 10 is so much faster than debian 9 that it comes up and starts looking for updates before the VPC (virtual network thing) is active.
[…]
But it boggles the mind that the VPC/security groups wouldn't be up yet...when they're the very first thing the template puts up and resolve basically instantaneously.It's systemd, isn't it? So it's fully parallel only restricted by the configured dependencies. With no way to check whether service X actually uses anything provided by service Y it forgets to depend on. Hooray for conditions and their great potential.
[…] There's a way to specify dependencies in the startup order, which can be of varying degrees of critical-ness (such as you can't bring up some services until the NAS has been mounted, which requires the virtual networking to be stable, etc.).
…
I never managed got any of that working when I did admin of these things.
Systemd is -compliant. The ‘wants’ and ‘requires’ do not imply ordering, just that the other thing also has to be started, so you also have to add an
After
declaration. And unlike the ‘wants’ and ‘requires’ that can be configured by creating appropriate symlinks (possibly using thesystemctl
subcommands), I don't see any way to add anAfter
other than editing the unit file.
-
I don't see any way to add an
After
other than editing the unit file.Some versions allow you to drop in a snippet. Note that Lennert Poettering will call you a moron and say you're and Kay Sievers will shut down any attempts to get help, but they do that every day of the week that ends in "tag", so I'm sure you can handle it.
-
@TwelveBaud I looks like nobody won't even call you a moron – it's actually described in the upstream manual page too.
-
No, @TwelveBaud is right: you'll be called a moron. Because Lennart Poettering is the Jeff Atwood of the Linux world, and
systemd
is his Discourse.
-
@Zerosquare But he had to accept the feature, didn't he?
Besides, I thought that title belonged to Tuomo Valkonen¹
Update: ok, I concede, Lennart deserves it more:
-
@Benjamin-Hall said in WTF Bites:
Which would be a total WTF and no clue how to fix it.
In theory, you fix it by saying that the system updates require the whole network stack to be there including the virtual network stuff.
In practice, you
sleep 10
.
-
@Bulb in this case, I'm using cloud formation, which has a "once the instance starts, run these scripts" block. And I need to install packages so that our system-orchestration software (which handles making sure each server has the right pieces and credentials) can run.
So this is all userland scripts, as if run from a terminal once the system is up and the boot process is over.
Oh, and I'm doing apt-get update, not upgrade. Just getting an up-to-date package list, not changing any installed packages.
-
@Benjamin-Hall said in WTF Bites:
So this is all userland scripts, as if run from a terminal once the system is up and the boot process is over.
… so it should be the same as if you logged in with ssh immediately after it boots? And yet it works from manual ssh and not the automatic one… Ok, that's a .
-
I like how systemd will tell you you need to
daemon-reload
but it won't do it for you.