top | item 42345501

(no title)

zaken | 1 year 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)?

discuss

order

savef|1 year ago

The 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#...

Dylan16807|1 year ago

If 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.

MBCook|1 year ago

But 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?

Dylan16807|1 year ago

Looks 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.

ajsfoux234|1 year ago

The 4 indicates UUIDv4.

If you were looking for the biggest hexadecimal UUID, find one with f instead of 9.

shreddit|1 year ago

Because the 4 is always “4”, it denotes the version (uuid v4)