7 characters in base32 (35 bits) is enough to count the milliseconds in a year.

So I could theoretically make a timestamp that looks like:


That's pretty usable for autogenerated urls, don't you think?

(These fun facts brought to you by thinking about pleromas new flake id system and ideas seen on rustodon's issue tracker)

#SocialWeb #CrazyIdea


@zatnosk oh hey I like that

The only potential issue is if you've got multiple machines or threads using the same system in which case you'll want at least one randomly generated character at the end to minimize potential conflicts

@zatnosk although... hrm I'm not sure what degree of time precision you need for expected loads

@InspectorCaracal yeah, but this is just the timestamp. Pleromas flake id's use 64bit timestamp + 48 bit worker id + 16 bit counter

I'm thinking add 5 characters with the rest of that, then you have 25 bits to share between workers ids and counter. I think that'll probably be enough for a small system (like a fediverse instance with <10k users.)

Sign in to participate in the conversation
Toot Planet

Welcome to the Planet! We're a small but unrestrictive community and customized Mastodon server.

We welcome anyone who wants to come join and whatever language you speak! Especially if you're a creative type, queer, a nerdy enthusiast of Something, you'll feel right at home, but we're proud to be a friendly and welcoming community.

We also have certain features that don't exist on most mastodon servers, such as being able to post to only other members of the Planet.