Originally Posted by
james
.... random blabbering ....
I just discovered another reason I love UNIX.
There is a set of ASCII character that are legitimate to use in standard UNIX file names.
0 - 9 (digit glyphs : 10)
a - z (lower case glyphs : 26)
A - Z (upper case glyphs : 26)
-_. (dash, underscore and dot : 3)
Because the space character crept into the scene with Win95 file naming extensions and cross-platform file system translation, Linux knows how to "deal with" a space in a file name, but it BUSTS the idea of a "token" as a file name.
Count it up!
There are EXACTLY 65 unique glyphs!
So what?
That's 64 plus the dot.
64 is 2 to the 6th; exactly what you can count with 6 bits.
So a file name can be a perfect hash; a bijective function.
Each glyph is a 6 bit number, leaving the dot as the name dot extension separator.
So a file name of 8 characters could be a hash of a 48 bit number and that hash could be translated back to exactly one 48 bit value.
That's plenty of room for a UNIX time value!
That's a count of every second (except for added leap seconds) since midnight, January 1, 1970; the beginning of The Epoch!
Somehow I don't think this was pure coincidence.
James.