uuidformattester Tool #16
Replies: 17 comments
-
I'm still open to the idea. Just not sure if I have the energy to argue with everyone about it, lol. Prior discussions had a lot of varying opinions. In general I still think that an alternate text encoding that had the following properties could be standardized:
My review of this earlier led to Crockford Base 32 (https://www.crockford.com/base32.html) as the encoding I was in support of. But there are a lot of tradeoffs and things to consider, and no matter what is chosen there are (understandably) bound to be some people pissed off because their particular favorite encoding was not selected or something that doesn't fit their most pressing use case. That's part of the fun and excitement of pushing something like this through. |
Beta Was this translation helpful? Give feedback.
-
Agreed, this eliminates most things base64 and up (unless we use emoji, which have a url safe representation, but still). And there is no point in doing base16 or lower as then it would be equal or worse than current UUID
This is doable for Base32 and Base58 as they allow custom alphabets, and the alphabet can be setup in a way that sorts equally.
This is doable also, most major libraries (including mine for Dart) need to handle UUIDs without dashes. Which then just makes it so we handle different bases based on some information
Also valid, and not hard to do.
Sure, but one of the many use cases is the interoperability between systems, mostly for being parsable and such by many libraries and languages.
Also agreed. 1 is fine, but then you will get arguments on which 1 we want. We can take a page from Crypto, where addresses have a prefix that is always constant for a chain. In this case we can use 1 or 2 bytes to denote the base, and variant. Maybe 1 byte and use the bits inside for flags. Base is self explanatory. 32, 58, etc. variant can be used to denote alphabet differences. Like Base64URL vs Base64. We can use 6 bits for base, and 2 bits for variant. Or 5 and 3. Something like that. That's an implementation detail.
That's fair. It is where I think a flexible prefix can help. Especially for Base32 that has multiple alphabets (I also maintain the Base32 library for Dart, so I'm familiar) I genuinely think Base58 with a carefully ordered alphabet could give us the best results. Gets it down to 22 characters. Maybe 23 if we have that prefix. Much nicer than the Not to mention the default alphabet is numbers, uppercase, lowercase, so it should sort fine. |
Beta Was this translation helpful? Give feedback.
-
I think I'm going to create a small page where I can show the various outputs and such so we can better visualize |
Beta Was this translation helpful? Give feedback.
-
What do you think about standardizing UUID color highlighting (with/without DB index, for light/dark theme), graphical representation (identicons, emoticons), short hash representation? |
Beta Was this translation helpful? Give feedback.
-
I think that the special data type "UUID with short format output" is much better than the prefix. Using this data type eliminates the need to parse the UUID with the prefix every time. The UUID data type in PostgreSQL can be used as an example. |
Beta Was this translation helpful? Give feedback.
-
That makes sense of we choose 1 way of doing it. If we allow customization, how will we know its emoji, Base32, Base58, or Base62? Especially if we can't rely on the length of the string. |
Beta Was this translation helpful? Give feedback.
-
Ya, that sounds fine to me. But i feel those are for a different discussion/ticket. |
Beta Was this translation helpful? Give feedback.
-
See #6 |
Beta Was this translation helpful? Give feedback.
-
I am working on the webpage, but this is an initial result below. It is sortable if you use a sortable UUID (v6 or v7) for B32(crockford), B58, and B62 |
Beta Was this translation helpful? Give feedback.
-
Here you go guys, have fun: https://uuidformattester.yuli.dev/ Let me know if you want more encodings (emoji?) or if there are issues. |
Beta Was this translation helpful? Give feedback.
-
Great discussions so far. Sorry I am late to the party here but yes, this is still on my TODO. Going to do a bit of cleanup to the issue tracker, files and README so pardon the commits. |
Beta Was this translation helpful? Give feedback.
-
Just know i can build custom encodings, with any prefixes and such as needed. So if anyone had a request, let me know |
Beta Was this translation helpful? Give feedback.
-
@daegalus, can you check the new TRADEOFF.md doc and use the starting UUID Binary/Integer representations in your code to force the encoding output from that common starting point? I would like somebody sanity check my own outputs that are in the table. Here is what I did in the event one is incorrect:
Edit: I kept padding to illustrate it. I updated the tradeoff doc with a note that, depending on the algo, padding may be disabled. |
Beta Was this translation helpful? Give feedback.
-
@kyzer-davis I have added onload entries. 2 entries 1 for each base32 variant listed. You can go see them on the page. I also verified base62 with dcode.fr, and that matches. Hopefully that helps validate the code. |
Beta Was this translation helpful? Give feedback.
-
Took me a second to understand but you meant this: That looks great! Could you add data
Then if you can add Base64 to the table in a similar display to Base32 that would be awesome. The only other items I saw in past discussions that I need to verify, from that common starting point, for the tradeoff table are below: If you want to take a stab at the 5 remaining items for your script that will help sanity check my work (and give us some nice implementation feedback). The NCNAME ones can go in the Base32/Base64 cells abut 36/48/52 likely need columns... which means your app may need to go fullwidth for the table content :) |
Beta Was this translation helpful? Give feedback.
-
Ya, give me a few days. I just moved to a new country (14hr flight, jetlag, 2 young kids, etc). So I need a bit to recover |
Beta Was this translation helpful? Give feedback.
-
I have updated the tool to include 36/48/52/64 and added improved formatting. NCName is a bit trickier, so I will get to that a bit later, since it has extra algorithm changes. |
Beta Was this translation helpful? Give feedback.
-
@kyzer-davis @bradleypeabody
Are we still considering this? I know you guys just got off making 9562 a reality (big congratulations on that), but was curious if this was a thing we were still pursuing as it's something I'm very interested in.
Beta Was this translation helpful? Give feedback.
All reactions