Fork me on GitHub

I have a new library for working with it targets clojure, clojurescript, and babashka.

❤️ 16
🎉 8

Thank you for fighting the UUID hegemony!


This is nice! I’ve been using squuids in datomic in datascript and also tried to come up with more efficient encoding (, but ULIDs seem more universal. Hope this catches on


The only thing I don't like about ULIDs is that they are case insensitive which means there are still more than one string representations for most of them. I wish the author had just selected upper or lower


but there probably was a reason

Lyn Headley09:06:11

I too am a passenger on the ulid train. So far it has been a comfy ride.

Lyn Headley10:06:52

I am generating my ulids in postgres using generate_ulid from here - The funny thing is they are treated as uuids by both postgres and clojure. I wonder if I could interop with your library.


Interesting, I'll add a function to convert psuedo-UUIDs to ULIDs; that's easy, but it'll be up to the user to make sure they're using valid ULIDs and not like a UUIDv4 or something. For a more direct interaction with postgres or an sql library some research will be needed.Thanks for the tip

👍 1

@U08BJGV6E That's why I represent them as integers in the library, the string representation has no bearing on sorting 😉


Makes total sense, I just with there was a canonical string representation as well


I'm pretty sure UUIDs are also case-insensitive but I get what you're saying


Yeah they are, so these aren't any worse, I just wish they were stricter in this sense as well. But then that could impact usability from another perspective, I haven't done extensive research 🙂


@UDF1WUJTH I've just push a new release that adds functions to convert to and from UUIDs as well as before and after predicates for filtering by time


I've also worked in js/crypto for more secure RNG in clojurescript

Lyn Headley17:06:55

That is great, now I can put these in my urls!


@UC9NMGHTN Does your library supercedes clj-ulid? I've been using it for a while in an API without any problems.


I think so, it's more spec compliant and has more features. The reason I didn't just update that library is because I didn't want to disturb a library that's 7 years without update and risk breaking things for people.

👍 1
Lyn Headley09:06:43

I am using this! Thank you!

🥂 1
Lyn Headley09:06:38

The representation is so much prettier than that of a uuid

Lyn Headley09:06:08

my urls will be lovely


UUIDv7 I think will be lexicographically sortable