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)?
Every V4 UUID
191–200 of 381 posts
Re: Every V4 UUID
#192I 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)?
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…
Re: Every V4 UUID
#193I found the Pi UUID: 185e45bc-750b-43d7-91ee-314159265358
Re: Every V4 UUID
#194Re: Every V4 UUID
#195I looked for deadbeef-f00d-f00d-deadbeef** but did not find it. Search is just on active page, that gets ever longer?
deadbeef-f00d-f00d-deadbeef isn't a valid UUID v4 Aside from missing a grouping in the middle, you need the version and variant bits, ie: XXXXXXXX-XXXX-4XXX-VXXX-XXXXXXXXXXXX where V is 8, 9, A, or B searching for deadbeef-f00d-400d-a00d-deadbeef does return the expected matches
Re: Every V4 UUID
#196Earlier quoted context omitted.
Awesome - this will be my new coding interview question
Agreed. Everyone love puzzles that are worthy of an entire section in a blogpost for their interview questions, rather than stuff actually relevant to the job.
To facilitate full-text search I created a langchain application in python, hosted on kubernetes, that takes your search query and generates synonymous UUIDs via GPT o1-preview before handing over to opensearch.
Opensearch returns another set of UUIDs, which I look up in my postgres database: “SELECT uuid FROM uuids WHERE id IN (…uuid_ids)”
Re: Every V4 UUID
#197I 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)?
Re: Every V4 UUID
#198Earlier quoted context omitted.
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…
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.