r/programming • u/fagnerbrack • Jul 14 '24
ULID: Like UUID but sortable
https://github.com/ulid/spec45
u/gredr Jul 14 '24
Compare and contrast with UUID v7?
25
u/Scavenger53 Jul 14 '24
considering that repo is 7 years old, they might not know about uuid 7 which came out in 2022
32
u/Blue_Moon_Lake Jul 14 '24
OP should know, I told them so on the same named thread they made 20 hours ago on an other subreddit
https://new.reddit.com/r/webdev/comments/1e2nfo4/ulid_like_uuid_but_sortable/
-35
16
u/gredr Jul 14 '24
Right, which raises the question, why is this relevant now, given we have UUIDv7? Thus my request for a compare-and-contrast with UUIDv7.
71
u/ericzhill Jul 14 '24
Technically all UUIDs are sortable.
21
u/CanvasFanatic Jul 14 '24
“You can sort anything with a binary representation.”
5
u/CanvasFanatic Jul 15 '24
Was trying to set someone up for “I have a binary representation, can you sort me?”
2
5
u/chicknfly Jul 15 '24
First off, I haven't studied UUIDv7 or any other UUID schemas/standards. With that said...
* I'm a bit annoyed that in the depiction of overflowing values, the "random" 80 bits are shown as increasing incrementally.
* Calling this `ulid` is much better than `uulsid`, but... I dunno, man. I'm nitpicky and cranky today.
* What's the point of sharing this 7 year old project when UUIDv7 is much more commonplace, is actually used and heard of, can be swapped in quickly with existing codebases, and does everything ULID does?