HN Hall of Fame Weekly email

Mtime comparison considered harmful

apenwarr.ca Essays & writing Essays & articles Software engineering Candidate
Screenshot of apenwarr.ca captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
7
submitters
6
observed span
2018–2022
peak thread · 62 comments
120 pts
latest 20+ return · 2022-09-11
67 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

In Ninja I sorta stumbled through some of the same issues described here. I eventually realized that the interesting question is "does this output file reflect the state of all the inputs" and not anything in particular about mtimes, and that"inputs" includes not only the contents of the input files, but also the executables and command lines used to produce the output. If you squint, mtime/inode etc. behave like a weak content signature of the input. And once you have…

evmar·120-point thread·

> Random side note: on MacOS, the kernel does know all the filenames of a hardlink, because hardlinks are secretly implemented as fancy symlink-like data structures. Note that the link is outdated and refers to HFS+. HFS+ originated in classic Mac OS and originally didn't support hard links at all, so they had to be added after the fact [1] using a hacky format based on a hidden directory. APFS has a cleaner design, but it still tracks the list…

comex·84-point thread·

Weird that there is such detailed technical information alongside this statement: > 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…

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
281

reference only — not used in Hall rules or ranking

Total comments
154

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2018-11-13Mtime comparison considered harmfulbretthoerner40
2018-11-14Mtime comparison considered harmfulash10
2018-11-17Mtime comparison considered harmfulFirst breakout · Best threadpanic12059
2020-03-28Mtime Comparison Considered Harmfulpcr91030340
2020-04-01Mtime Comparison Considered Harmfulpcr91030310
2020-09-28Mtime Comparison Considered Harmful (2018)ingve8462
2022-09-11Mtime comparison considered harmful (2018)Latest 20+ point returnalex_hirner6733