8 ms·
I tried to find the biggest UUID and if I got it right, it's 99999999-9999-4999-9999-999999999999 (note the 4 in the 3rd block) I'm curious why it's not 9999
by zaken 2y ago
I tried to find the biggest UUID and if I got it right, it's
99999999-9999-4999-9999-999999999999
(note the 4 in the 3rd block)
I'm curious why it's not 99999999-9999-9999-9999-999999999999 (all 9s)?
- savef 2y agoThe values are hexidecimal, so all "9s" isn't the biggest UUID, but all "f's". Specifically, I think: `ffffffff-ffff-4fff-bfff-ffffffffffff`. The "4" in the 3rd block is the only permitted value as these UUIDs are using the GUIDv4 format. I'm not sure what's going on in the 4th block, but the references and linked RFC in the Wikipedia article might reveal more details: https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) https://en.wikipedia.org/wiki/Universally_unique_identifier#...
- Dylan16807 2y agoIf you're going by hex, the biggest UUID is entirely f's, 32 of them. It's defined specially and doesn't have version or variant.
- savef 2y agoI see what you mean, but I was going by the definition of "UUID" used on everyuuid.com. The UUID of 32 "f's" isn't in the list.
- deleted 2y ago[deleted]
- MBCook 2y agoBut if it’s all Fs, that means you have the sign bit set, so it’s not the largest. It’s the smallest that’s less than zero right?
- shreddit 2y agoBecause the 4 is always “4”, it denotes the version (uuid v4)
- ajsfoux234 2y agoThe 4 indicates UUIDv4. If you were looking for the biggest hexadecimal UUID, find one with f instead of 9.
- Dylan16807 2y agoLooks like it only generates v4 UUIDs, which is a bit of a ripoff. Also you'll find that the first character of the 4th block is forced to be 8, 9, a, or b. That's true of standard UUIDs of any version.
- dmlittle 2y agoIt depend on the UUID version you're using. Version 4 (Random) will always have that value be 4 as per RFC 9562. So 99999999-9999-9999-9999-999999999999 is a valid UUID but not a valid UUID v4. If you wanted to be pedantic the website should have been named https://everyuuidv4.com/ https://everyuuidv4.com/ https://datatracker.ietf.org/doc/html/rfc9562 https://datatracker.ietf.org/doc/html/rfc9562
- saagarjha 2y agoThe last line of https://xkcd.com/566/ https://xkcd.com/566/, except it's UUID formats.
- Dylan16807 2y agoAre you suggesting we should never have made the random one, and stuck with mac address plus timestamp forever?
- saagarjha 2y agoI actually believe we shouldn't have made any of them
- Dylan16807 2y agoOh okay. That's a pretty different suggestion from the comic. Would you suggest random 128 bit numbers, then? Otherwise it's hard to see what else would serve the same role without being UUID in a trenchcoat. And having identifiers is important.
- saagarjha 2y agoYeah I would really like if UUID was just 128 bits of randomness and nothing else. The whole version thing sucks, and my point (which you are right in that the ordering is a little off) is that UUIDv4 is the only good one and the rest basically should not exist. UUIDv4 itself is ruined by the fact that it needs to have a version embedded in it because the other ones exist.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]