cactus
@cactus

UUIDs are neat. y'know, cfbff0d1-9375-5685-968c-48ce8b15ae17 type of shit. if you're like me until a few days ago, all you know about the types of UUID is that v4 is the good one. but why are there other ones? is there a secret better one? why are the dashes asymmetrical? let's take a (roughly paraphrased from wikipedia and probably not quite accurate) look.


iliana
@iliana

some notes on further research i did that's relevant to me and maybe you, the reader of this share?

  • the Internet-Draft linked above has now been moved into the IETF "UUIDREV Working Group", if you want to read the latest draft and have opinions: https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/ https://github.com/ietf-wg-uuidrev/rfc4122bis — looks like it is still actively being worked on which is great.
  • UUIDv7 looks a lot like ULID! but also the ULID spec looks like it has languished a bit, despite a number of requests for clarification etc.
  • the uuid Rust crate starting in 1.2.0 has support for generating UUIDv7. yay! i'm going to go use that now. [edit: ugh they're being responsible and making you pass RUSTFLAGS="--cfg uuid_unstable" until the spec passes i guess. ugh]

You must log in to comment.

in reply to @cactus's post:

YOU WROTE THIS ENTIRE POST JUST SO YOU COULD MAKE THAT JOKE AT THE END 🤣

But also, this is extremely informative! I was considering using UUID to uniquely identify all database content in a CMS engine I'm writing from (almost) scratch for my own website, and this gives me a lot more information, concisely summarized, to digest about them! Thank you!

this was a fun read!

you know, ive always rolled my own identifier format (mostly for shits and giggles), and usually when i do so i get a little voice in my head worried that rolling our own is Bad because UUID is The Standard and probably Knows Better. but now i see that the UUID folk are also just having shits and giggles and all of their formats are fucked up too 😌

I had to dig through a lot of that information for a previous job (a predecessor decided that he could design a better scheme, and somehow, nobody kicked him in the shins to stop him, and I needed to kinda-sorta undo that history and replace his "Peculiar-IDs"), so I can confidently say that this is extremely well done.

in reply to @iliana's post: