About the bug:
There is a system call
stat(2) in Posix, which
returns a struct stat as a result. Part of that data structure is a field
st_ino, which contains the inode number of that file. That number is a
integer types to represent that number, so node.js has been falsely
converting it to a float, which can hold 53 bits of precision.
So on certain file systems, 2048 different files will be munged together, which is extremely bad.
Possible solutions are obvious: Use a string or use two 32-bit numbers to hold full precision values.
I cannot for the life of me stand the coddly approach to teaching of Julia Evans (check out her writeups at her blog), but apparently what she does and how she does it is necessary and appropriate for people growing up in a programming environment like this. Well, I’m ok with that if it prevents mindsets and bugs like the one above.