Closed Sjoerd82 closed 1 year ago
@Sjoerd82 I agree with many of your points - but I would suspect that it would be unwise to change so many core principles to reach the aim of a shorter uid within this project - but if you were interested in developing a variant I'd be for it
there's also the .slug()
method that makes it a little shorter for you
I'm open to an alternate slug implementation. I was never thrilled with the one we have.
I have a new implementation of cuid coming that will make it possible to create arbitrary-length cuids.
Fixed in Cuid2. Cuids now support arbitrary lengths.
To support offline clients I'm contemplating converting my table's integer PK's (PostgreSQL 12) to CUID's. I still don't very much enjoy the idea of switching out those short and sweet integers for a larger text string, but I don't seem to have too much choice. But I'd like to keep them as short as possible.
Can the CUID be shorter, given the following constraints:
Would it make sense for this project to offer such a shortened version? You already provide a slug option, how about this variant?
On a sidenote... In the docs it's written that the client fingerprint is based (among other things) on the first chars of the agent string. But that's something with almost no variation between clients: Mozilla, Chrome, etc.. Or am I missing something here?