8 ms·
Show HN: UUIDs that are Shakespearean, grammatically correct sentences
- Kevin605 6y agoInteresting project! However, an online demo will be nice to have.
- dogdot 6y agohttps://npm.runkit.com/uuid-readable https://npm.runkit.com/uuid-readable
- ponker 6y agoYou're going to have to copy and paste these anyway (no chance in hell of remembering them) so don't see what they get you over an UUID.
- kristopolous 6y agoDoesn't even pass the easy to say test, which would be useful
- debdut 6y agoWell, cause it's Shakespeare, I will try to create simple non Shakespearean versions
- kristopolous 6y agoTry using Gilbert and Sullivan, they're pretty fun. Example from Thepsis: ALL. Goodness gracious How audacious Earth is spacious Why come here? Our impeding Their proceeding Were good breeding That is clear. DIA. Jupiter, hear my plea. Upon the mount if they light. There'll be an end of me. I won't be seen by daylight. AP. Tartarus is the place These scoundrels you should send to-- Should they behold my face. My influence there's an end to. If that's not your thing try Tennessee Williams or Arthur Miller. Gilbert and Sullivan are all public domain so that's nice. You could also go dramatically the other way and use flytings for your corpus: https://en.m.wikipedia.org/wiki/Flyting https://en.m.wikipedia.org/wiki/Flyting There's probably clever ways to get the right entropy from their body of work while not turning it into word salad, best of luck.
- debdut 6y agoI will surely try if I find time, thank you very much
- innocenat 6y agoIt probably help with recognition. You probably won't remember if you have seen 'b7b05951-c3d3-4a7f-b65b-122e7d2543d4' before, but you are likely to remember that you have seen 'Cathleen d Dieball the Monolith of Alderson reflects Arly Arnie Keenan and 18 large ants' before (based on the chance that there are no similar uuid) And if also give you something to read in your head when you see it. "Oh, you mean the 18 ants object?"
- ponker 6y agoHmm, good point. We do refer to UUIDs at the office with things like "Look at the F6A request."
- sneak 6y agoUnless the collision is adversarial. There is a tool that brute forces the generation of SSH server key fingerprints to make the beginning and end look like the one you’re trying to spoof, so someone who knows the first or last few bytes would likely be fooled. The point of the UUID is that it’s got enough entropy to be unique. If you start reducing it to smaller slices of its entropy, it isn’t a UUID anymore. I think projects like this that try to make high entropy things appear more human-manageable do more harm than good.
- phaemon 6y agoThat doesn't make any sense. There's no such thing as an adversarial collision for UUIDs. They're not hashes and don't have any security at all. If you want to use someone else's UUID, you just can! > If you start reducing it to smaller slices of its entropy Which it doesn't, as has been explained in the comments already several times.
- innocenat 6y agoWell, of course. Doesn't change the fact that it allow easier recognition, but you need to double-check it. (Not sure why I need to explicitly state that)
- dogma1138 6y agoUUID’s should not be used for “security” they aren’t hashes, or suited to be used as encryption keys or any thing else. They don’t need to be kept secret as part of their trust model. There should never be a situation in which the disclosure of a UUID breaks the trust or security model of your application your design is wrong.
- dutchmartin 6y agoInteresting project. Getting a reading in radio spelling is easy to do. But getting correct sentences out of a random predefined length string is way harder.
- cube00 6y agoInteresting project however clearly I am uncultured swine if these are considered "easy to remember", I wonder if it would work with something more lowbrow. Simpsons anymore?
- debdut 6y agoEasy if someone was reading and quoting Shakespeare, also easier than remembering shortids or uuids
- mercer 6y agosupercalifragilisticexpialidocius is easier to remember than shortids or uuids, but that distincting is meaningless when 1) everyone spells it slightly differently, and 2) who is Mary Poppins? I love projects like these but it's a bit of a stretch to argue that this one is practically useful.
- hedora 6y agoThou currish boil-brained hedge-pig! http://www.pangloss.com/seidel/Shaker/ http://www.pangloss.com/seidel/Shaker/ It only encodes ~18 bits of information per insult, but it’s a good starting point.
- PaulRobinson 6y agoWhy would you want this? The entire point of UUIDs is I can quickly generate them knowing that they will be universally unique, I don’t need to check for their existence anywhere. This dramatically increases the likelihood of collision to the point I can almost certainly guarantee that they won’t be unique in any non-trivial context.
- flingo 6y agoWhere is the entropy going? This still has all eight bytes, from the generated UUID, and looks like it can be converted back into a UUID.
- debdut 6y agoyes, I will add an inversion, it's a bijection
- jackhalford 6y agoThe space of all uuids is larger than the space of all shakespearean uuids. So by definition you can't biject them. You may be able to on able for your subset of uuids in your project, but there is less entropy when using the latter. edit: It seems the shakespearean uuids are longer than uuids so I may be conpletely wrong
- function_seven 6y agoI skimmed the code and it looks like there’s a hole for every pigeon. Space size appears to be equal.
- moondev 6y agoPerhaps some projects are just for fun and not targeted at your specific needs?
- roadbeats 6y ago
- traceroute66 6y agoYawn, why re-invent the wheel ? UUID = --> universally unique <-- identifier Why reduce the entropy just to make it look pretty ? As for the people who say oh, but I can't remember/recognise "e0e93156-c68b-493d-bf31-19048db7dd9e"... Well sure, but git invented that wheel before you. Just use the last 11 characters for local discussions/notes/whatever. Finally, what about people who are non-native/fluent in English ? "e0e93156-c68b-493d-bf31-19048db7dd9e" flows accross borders and languages "Romeo Romeo Where For Art Thou Romeo" could easily be meaningless gibberish for a non-native/fluent English speaker, and also opens up totally un-necessary issues of pronunciation and spelling. There is also the possibility certain words might mean something different in another language. Such as the famous Colgate in Spanish which means "go hang yourself" !
- debdut 6y agoSorry, but information or entropy is not lost, its a bijection, I will soon add the inversion.
- traceroute66 6y agoI'm not claiming to be the world's leading expert on UUIDs but you must be loosing something somewhere ? If its not entropy, you must be opening yourself up to collisions or something ?
- antoinealb 6y agoWhy ? It looks like those ShakespeareIDs (SIDs) are much longer than UUIDs. So I am not sure how you reach the conclusion than the count of possible SIDs is smaller than UUIDs. The author mentions its a bijection, meaning for every UUID you can generate its corresponding SID and vice versa. This, in turn, means there is no higher probability of collision in the SID space than in the UUID one.
- debdut 6y agoTrue
- orf 6y agoI built something like this for Python[1]. To get UUID-like uniqueness requires often way too many words, even if the Shakespearean-style might make this easier to remember (but also increadibly difficult for non-native speakers to understand). For human-id I just went with groups of the 100 most common adjetives, nouns and verbs combined together in roughly the order they would appear in a sentence. The output is nonsenese, of course, but I hope the combination of words understandable to anyone with a basic knowlegde of English might help. 1. https://github.com/orf/human_id https://github.com/orf/human_id
- debdut 6y agoGreat man!
- orf 6y ago> Great man! Why don't you port uuid-readable to python? It creates a meaningful grammatically correct sentence and is a UUID, 128 bits of information I personally don't think the gramatically correct sentence helps here. To me, "may-hold-come-foreign-low-white-cold-team-point-study-others-home-service-body-child" and "Cathleen d Dieball the Monolith of Alderson reflects Arly Arnie Keenan and 18 large ants" Are equally poor representations of a UUID. Typically "human IDs" are useful for quick recognition or transferring over "voice" which neither of these approaches work well with (I'm biased, but IMO the first one is better for transferring over voice due to simpler words). Human IDs shine when you have a comparitively tiny set of "things", like nodes in a cluster or Docker containers, and humans are heavily involved with accessing them. In this case a UUID is overkill but you want the UUID like gaurantees of universal uniqueness combined with more human recognizable identifiers. An ID like "appear-hard-idea-case" is good because it nets you a high number of unique names but is also short enough to remember and speak aloud with a high probability that someone listening to you can type it out, word for word, with no issue. tl;dr - never be in a position to need to have to "speak" or memorize a UUID.
- debdut 6y agoGrammatically correct gives us an edge on remembering. I made this because, I wanted to share secrets for a service, that don't collide and Shakespeare plus grammatically correct sentences are cool while UUIDs and random words are not!
- reallydontask 6y agoWhat is the use case for having to remember UUIDs? I can see how it might speed up writing say, SQL queries if you don't have to look up the UUID but not sure that this warrants the effort of committing this to memory.
- duiker101 6y agothe only use case I can think of is that if you are debugging or doing some sort of data entry/editing it is easier to recognise your UUIDs
- adamcharnock 6y agoIn a recent project I did this using colour. This was an logging/audit interface, where each line may include one or more UUIDs. For each UUID I 1) truncated it, 2) gave it a background colour based on the UUID itself, and 3) prefixed it with an icon for the object type. The overall effect was actually pretty good. One could easily scan the list for the same UUIDs based on the colour, and the icon added clarity as to what was being referred to
- treis 6y agoHuman readable IDs make sense in a lot of places. Like if a customer wants information about their order or looking up a user in a system. It's easier to say and understand words than a long string of letters and numbers.
- formerly_proven 6y agoI think in many instances it would make more sense to still use nominal identifiers, but enrich them with semantic data. For example, instead of invoice #306889086579, use an ID like R2020-06-14951.
- treis 6y agoDoing that loses the benefits of UUIDs. You can get duplicate IDs and they can be guessable.
- throwanem 6y agoYou can get away with calling it "Shakespearean" when UUIDs map to rhyming couplets in iambic pentameter.
- chongli 6y agoAnd with mononymous characters. Shakespeare didn’t use any names as clunky as these!
- kieckerjan 6y agoIf I had the stamina to learn Shakespeare by heart I would start with the Bard himself, thank you. :-)
- geostyx 6y agoAdded this to my UUID as a Service API! [0] Just add ?readable to any endpoint! Eg. https://uuid.rocks/json?readable https://uuid.rocks/json?readable [0] https://uuid.rocks/ https://uuid.rocks/
- crispyporkbites 6y agoWhat is this for?
- geostyx 6y agoFun, primarily. I also use it in some of my other projects for UUID generation. It's built on Cloudflare Workers so it scales fine and doesn't cost me anything since I use Workers for other projects anyway.
- crispyporkbites 6y agoI mean why would you want to generate a uuid on a remote service?
- geostyx 6y agoMaybe you want a UUID within a shell script, CI/CD pipeline or orchestration framework which has native support for HTTP, but not UUID :)
- bawolff 6y ago>"Drucill Hubert Lewse the Comer of Avera rejoices Fiann Craggy Florie and 5 hard trouts" This is considered shakespearean? Cool idea, but i think the implementation needs some work.
- SwiftyBug 6y agoWhat does it mean for a sentence to be "Shakespearean correct"? Do the generated strings necessarily contain 10 syllables?
- swiftcoder 6y ago> it's impossible to remember 32 random characters in UUID Is it, though? Plenty of folks memorise 16-digit credit card numbers - I've known retail employees who can recite those back after reading them just once. Back when I was a sysadmin, I taught myself to type 25-digit Windows product keys from memory. 32 digits doesn't seem an unreasonable stretch, given time and practice.
- hedora 6y agoStudies show the difficulty increases rapidly after 7-10 digits (which is why phone numbers are 7 digits, not counting area code). Someone memorized 70,000 digits of pi: https://www.guinnessworldrecords.com/world-records/most-pi-places-memorised https://www.guinnessworldrecords.com/world-records/most-pi-p...
- Veen 6y agoIt depends on the person too. I struggle to remember six digits and forget them in hours, but my partner somehow manages to instantly memorize credit card numbers at a glance and retain them for months. I thought she was tricking me at first, but I tested her and its genuine. I guess some people are just gifted with very good memories.
- rconti 6y agoit's difficult to remember sequences with no meaning, but if you can remember them as objects (eg, a product key with combinations of 5 letter+number sequences) it becomes easier.
- jermier 6y agoA little trick to remember long things like a diceware passphrase for example is to develop the muscle memory for it starting with the first three words. When those three words have been ingrained/burned into memory, you add another two words, and over time increase the amount of words until the whole phrase is memorized. It seems obvious, but you would be surprised about how many people try to remember the whole phrase on the spot without developing it in small parts, over time.
- 6y ago
- kej 6y agoThis is a fun project, but for practical purposes I think the PGP Word List [1] would be more useful. It encodes any bytes (UUID or otherwise) as common words from a list chosen for distinct sounds. [1] https://en.wikipedia.org/wiki/PGP_word_list https://en.wikipedia.org/wiki/PGP_word_list
- gertrunde 6y agoThere's also RFC1751 [https://tools.ietf.org/html/rfc1751 https://tools.ietf.org/html/rfc1751]. A slightly different take on the same sort of problem.
- aitchnyu 6y agoI've been ideating about a base-48 (KJNTPBMYRVSH vs AIOU) version of decimal ids. Ids like "sunihuvi" or "panimaso" which are (hopefully) memorable and easy to pronounce with any accent. 5 letters can encode till 254803968. Algorithm wizards, can I get error correction if I dedicate a character for that?