> And anyway, purists might argue that the "content" of a directory doesn't change when the files it points to change; the content is merely a list of filenames and inode numbers, after all, and those stay the same, no matter what happens inside those inodes. Purists make me sad.
Or maybe Unix makes the author sad? You can’t wish the OS into doing something different with directory files when the set of contained files has not changed (but a file was modified) so that these Make troubles could be handled differently.
Am I missing something?
He lost me here. As much as that's a would be cool kinda feature it smacks of a special kind of tunnel vision: what's the point of anything but what you happened to be working on?
Consider how many writes happen on your system. Consider what sliver of a fraction of them even come under mtime scrutiny. The idea is to amplify those writes all the way up the directory hierarchy? For every write? And contend on ever write to /home/?
We already needed a noatime, if it wasn't for make I could imagine a nomtime too.
So we might have a reliable mtime alternative in Linux soon in 2022.
If your name is Dijkstra and it’s 1968 feel free to use the phrase “considered harmful”, otherwise use plain language.
The original title of the letter, as submitted to CACM, was "A Case Against the Goto Statement", but CACM editor Niklaus Wirth changed the title to "Goto Statement Considered Harmful". Regarding this new title, Donald Knuth quipped that "Dr. Goto cheerfully complained that he was always being eliminated."
Reading that same link, Wirth didn’t invent the cliché, either.
The phrase "GOTO considered harmful" was actually used by Niklaus Wirth, not Edsger Dijkstra. Dijkstra had submitted his letter with the title "A Case Against the Goto Statement"; and Wirth, as editor, changed it.
But also, it was already a journalistic cliché outside of computer science before Wirth applied it to Dijkstra's letter.
What's wrong with the usage? It is short and concise.
"Considered harmful" is misleading because the passive voice suggests some kind of general consensus which usually doesn't exist.
It's such a ridiculously inflationary overused meme to the point that it's getting annoying.
There are other contenders: https://news.ycombinator.com/item?id=31836787
(In hindsight, I completely forgot "X shades of Y" in this list)
The issue with the phrase is, that it is hopelessly overused also for things that are purely subjective or way to general.
Since all builds have an mtime of 0 as timestamps are the biggest source of reproducibility issues [2], QML loads outdated cache objects which will then load invalid bytecode at runtime and therefore causing a crash.
Our initial plan was to utilize a hash of the binary [3] which should be IMHO the most straightforward, unlikely to break and future-proof way to solve the problem. The currently suggested implementation's performance could most likely be improved by generating the hash once on startup instead of every time when a QML resource is loaded, but I believe since it's already cached in memory, hashing is not that expensive, binary sizes are usually relatively small and resource loading (of embedded ones) doesn't happen that often, it should be already reasonably fast (real performance test haven't been done yet).
The big challenge will be upstreaming it, once we've proven it to properly work. The current approach has been apparently rejected [4] and was declared to be a downstream issue, which I personally don't agree with, since sooner or later reproducible builds will become the norm and therefore will affect everyone. Current ideas to work around it require individual solutions per distribution/ISV, as this would mean they'd have to come up with domain specific criteria for cache invalidation (as the store path/derivation hash on NixOS) and to maintain a downstream patch for this solution and furthermore wouldn't work for local build processes (e.g. from within an IDE).
Lesson of the day: never use mtimes, they'll bite you in the ass sooner or later!
[1] https://github.com/NixOS/nixpkgs/issues/177720
[2] https://reproducible-builds.org/docs/timestamps/
[3] https://github.com/qt/qtdeclarative/commit/5106afcd76e377a6b...
[4] https://github.com/NixOS/nixpkgs/issues/177720#issuecomment-...
This reads weird to me.
As the author points out, a directory entry (hardlink) is just a filename pointing to an inode. When you first create a file, and there is only one filename for that file, that entry is a hardlink. So in that text the first occurrence of "hardlink" should probably read "the kernel does know all the filenames of an inode".
But then it gets weird. When the author says "hardlinks are suspiciously slow on MacOS", it sounds like they're saying "accessing files is suspiciously slow on MacOS" - because accessing any file in the filesystem goes through hardlinks. All links to a file, including the first, are hardlinks.
Granted, in 2018 HFS+ was still kind of relevant, but even at that point the listed assertions were pretty dodgy.
Not so likely whatever remote target you are looking at has the same blocks and checksum algorithm.
On the upside you can often ask such file systems to take two snapshots and what changed between them. Or to export some kind of differential to transform the original snapshot to the newer snapshot. Both ZFS and Btrfs can do those.
> Linux added an O_NOATIME
!!Con 2016 - How I fixed UNIX atime! With 10 lines of code and feminism!!! By Valerie Aurora https://www.youtube.com/watch?v=fHjsdyN4UK0
(Source: I wrote the patch which added O_NOATIME to the kernel, based on an older patch which didn't get in, see https://lkml.iu.edu/hypermail/linux/kernel/0406.1/0894.html and https://lkml.iu.edu/hypermail/linux/kernel/9811.2/0118.html)
Thank you for posting it.
Not in my experience.