News for hackers. Stuff that matters.
Re:Type-safe, K-sortable, globally unique identifier inspire... by ajkjk on Wednesday June 28, 2023 @01:27PM (#36509670)
Unrelated, but this links to "Crockford's alphabet", https://www.crockford.com/base32.html , which is a base-32 system that includes all alphanumeric characters except I and L (which are confusable with 1), O (which is confusable with 0), and U (????). The page says the reason for excluding U is "accidental obscenity'. What the heck is it talking about?
Re:Type-safe, K-sortable, globally unique identifier inspire... by pavlov on Wednesday June 28, 2023 @01:38PM (#36509845)
True Latinists find the letter U vulgar to the point of obscenity because it didn’t exist in Cicero’s time.
Re:Type-safe, K-sortable, globally unique identifier inspire... by oleganza on Wednesday June 28, 2023 @03:39PM (#36511541)
Trve Latinists wovld appreciate yovr point.
Re:Type-safe, K-sortable, globally unique identifier inspire... by littlestymaar on Wednesday June 28, 2023 @05:27PM (#36512843)
Gotcha, there was no “W” in the Latin alphabet either ;)
Re:Type-safe, K-sortable, globally unique identifier inspire... by jszymborski on Wednesday June 28, 2023 @01:31PM (#36509719)
FUCK
Re:Type-safe, K-sortable, globally unique identifier inspire... by Racing0461 on Wednesday June 28, 2023 @01:32PM (#36509749)
yep, youtube video ids has/had? same issue where it would have things like fag/f4g etc in it.

eg: google "allinurl:fag site:youtube.com"

Re:Type-safe, K-sortable, globally unique identifier inspire... by stronglikedan on Wednesday June 28, 2023 @01:46PM (#36509947)
You can prevent any obscenity, O and 0 confusion, and I and L confusion, just by excluding vowels. If someone interprets "f4g" in an offensive way, then they have bigger issues than can be dealt with in software.
Re:Type-safe, K-sortable, globally unique identifier inspire... by arcticbull on Wednesday June 28, 2023 @02:06PM (#36510260)
There was that time Delta generated an "H8GAYS" PNR. [1] Pretty sure that's valid Crockford encoding too :) however, to your point, it does rely on 'A'. "H8G4YS" would likely still offend someone out there, though, given the kerfuffle in [1].

[1] https://newsfeed.time.com/2013/12/17/delta-airlines-is-very-...

Re:Type-safe, K-sortable, globally unique identifier inspire... by kortex on Wednesday June 28, 2023 @03:27PM (#36511367)
> But as White points out, it’s a bit surprising that Delta didn’t block this particular combination as a possibility. “I’m sure they removed many four-letter words that would be seen as offensive,” he tells the Post. “I’m surprised that ‘gays’ and ‘H8’ weren’t blocked as well.”

Oh sweet summer child (meaning Jeff White, not OP/GP). As someone who has implemented a censorship/filtering list, this is a UX problem on the same level of decideability as the halting problem. You can spend boundless time curating a list to flag/grawlix every possible string that would offend even the most prudish of prudes, and some would still get through. Such as the superficially benign "EATTHE"

https://www.dailymail.co.uk/news/article-2039662/Virginia-dr...

Re:Type-safe, K-sortable, globally unique identifier inspire... by taosx on Wednesday June 28, 2023 @02:00PM (#36510168)
Why we care about obscenity in pseudo-random ids and url?
Re:Type-safe, K-sortable, globally unique identifier inspire... by whimsicalism on Wednesday June 28, 2023 @02:42PM (#36510698)
anglo morals
Re:Type-safe, K-sortable, globally unique identifier inspire... by Racing0461 on Wednesday June 28, 2023 @11:59PM (#36516160)
i don't, the people that can start a **storm on twitter/tumblr causing your stock to drop 10% does.
Re:Type-safe, K-sortable, globally unique identifier inspire... by MR4D on Wednesday June 28, 2023 @03:22PM (#36511295)
Obscenities change with language. That’s why every language has them.

Even programming language have them. For instance, Basic has GOTO.

/j

Re:Type-safe, K-sortable, globally unique identifier inspire... by ZeroClickOk on Wednesday June 28, 2023 @06:55PM (#36513816)
and javascript has type coercion
Re:Type-safe, K-sortable, globally unique identifier inspire... by oleganza on Wednesday June 28, 2023 @03:41PM (#36511555)
The problem is not being offended per se, but having your user id accidentally become "user_123fuck567" — that's akin to having a vulgar license plate on your car's forehead. People don't appreciate how lucky they sometimes are.
Re:Type-safe, K-sortable, globally unique identifier inspire... by nephanth on Wednesday June 28, 2023 @07:04PM (#36513909)
Are those supposed to be user- facing though?
Re:Type-safe, K-sortable, globally unique identifier inspire... by lolinder on Wednesday June 28, 2023 @08:45PM (#36514877)
Using Stripe-style prefixing is most useful if they are—it makes interacting with customer support easier because everyone is on the same page about what this ID identifies.
Re:Type-safe, K-sortable, globally unique identifier inspire... by programmarchy on Wednesday June 28, 2023 @01:31PM (#36509730)
Yeah, wtf?
Re:Type-safe, K-sortable, globally unique identifier inspire... by atonse on Thursday June 29, 2023 @03:19AM (#36517415)
Obviously by “wtf” you must mean “why the face?” Right? Right?? :-)
Re:Type-safe, K-sortable, globally unique identifier inspire... by theptip on Wednesday June 28, 2023 @01:58PM (#36510148)
Re:Type-safe, K-sortable, globally unique identifier inspire... by pizzapill on Wednesday June 28, 2023 @02:36PM (#36510627)
E-Mail accounts seem the worst. Just lets write letters again, if you need a pencil I recommend penisland.net
Re:Type-safe, K-sortable, globally unique identifier inspire... by TedDoesntTalk on Thursday June 29, 2023 @12:14AM (#36516226)
Penis mean “tail” in Latin.
Re:Type-safe, K-sortable, globally unique identifier inspire... by pizzapill on Thursday June 29, 2023 @05:14AM (#36518145)
As they say Your pen is Our business!
Re:Type-safe, K-sortable, globally unique identifier inspire... by programmarchy on Wednesday June 28, 2023 @02:01PM (#36510184)
There's enough comedic content in this article for several Silicon Valley episodes.
Re:Type-safe, K-sortable, globally unique identifier inspire... by hinkley on Wednesday June 28, 2023 @02:09PM (#36510296)
A coworker and I came up with basically this same set about 4 years before Crockford. We were trying to solve the url slug problem, and they were long enough that we felt 5 bits per byte would reduce transcription annoyances.

In the end I think we had a couple of characters to spare, and so, sitting by ourselves because everyone else had gone home for the day, we ranked swear words by how offensive they were to prioritize removal of a few extra letters. Then I convinced him that slurs were a bigger problem so we focused on that, which got rid of the letter n, instead of u

tggr is just cute, n**r is an uncomfortable conversation with multiple HR teams (we were B2B)

I'm a bit fuzzy now on what our ultimate character set was, because typically you're talking [a-z][0-9], an there are a lot of symbols you can't use in urls and some that are difficult to dictate. My recollection is that we eliminated both 0, l, and 1, but I think we relied on transcription happening either from all caps or all lowercase. 0o are not a problem. Nor are 1L.

Re:Type-safe, K-sortable, globally unique identifier inspire... by hinkley on Wednesday June 28, 2023 @03:41PM (#36511560)
Other comments are jogging my memory. I think we went case sensitive (62 characters -> 30 spares), eliminated aA4, eE3, iI1l oO0 (maybe Q), uU, which is 16 characters, 14 to go. Remove the remaining 7 numbers (once you remove most for leetspeak what's the point of the rest?), nN, yY. That leaves 2 left and I can't recall what we did with those. Maybe kK or rR.

Y is pretty versatile for pissing people off.

Re:Type-safe, K-sortable, globally unique identifier inspire... by codeulike on Wednesday June 28, 2023 @03:06PM (#36511059)
If I and O are already excluded and you also exclude U that removes a lot of potential rude looking three letter combinations like *** and *** and *** and also the four letter ones like **** and **** and the dreaded ****. Of course because you have A then **** is still a possibility but very very unlikely
Re:Type-safe, K-sortable, globally unique identifier inspire... by titanomachy on Wednesday June 28, 2023 @03:39PM (#36511533)
Wow I didn't know HN even had obscenity filters, and I've been here for many years.

Guess that's a credit to the general civility of the community.

Re:Type-safe, K-sortable, globally unique identifier inspire... by rbera on Wednesday June 28, 2023 @03:45PM (#36511620)
That explains it, I was very confused by what I assumed was self-censoring, since the comment didn’t actually clarify anything. I wish there was an accepted way to disambiguate asterisks from server side filters.
Re:Type-safe, K-sortable, globally unique identifier inspire... by macintux on Wednesday June 28, 2023 @03:50PM (#36511656)
I assumed this was a riff on the classic bash.org transcript.

http://www.bash.org/?244321

Re:Type-safe, K-sortable, globally unique identifier inspire... by Aeolun on Wednesday June 28, 2023 @07:47PM (#36514371)
But we know there are no server side filters here. At least I never had any profanity censored by anything other than the Mk 1 brain.
Re:Type-safe, K-sortable, globally unique identifier inspire... by taberiand on Wednesday June 28, 2023 @04:28PM (#36512132)
No obscenity filters, but there is a pretty good password filter I hear. For example, my password 'hunter2' will be all **** to you
Re:Type-safe, K-sortable, globally unique identifier inspire... by 9dev on Wednesday June 28, 2023 @04:34PM (#36512217)
Isn’t it nice how some traditions do stick around. It’s been a while, Cthon98!
Re:Type-safe, K-sortable, globally unique identifier inspire... by redler on Wednesday June 28, 2023 @08:51PM (#36514930)
Sadly, this is one of those things that, soon, if not now, only the olds will know about.
Re:Type-safe, K-sortable, globally unique identifier inspire... by astrospective on Wednesday June 28, 2023 @10:31PM (#36515634)
Like telling people asking for game cheats to use Alt-F4.
Re:Type-safe, K-sortable, globally unique identifier inspire... by AceJohnny2 on Wednesday June 28, 2023 @04:30PM (#36512156)
you accidentally the whole thing
Re:Type-safe, K-sortable, globally unique identifier inspire... by EGreg on Thursday June 29, 2023 @01:53AM (#36516841)
I think the point
Re:Type-safe, K-sortable, globally unique identifier inspire... by kibwen on Wednesday June 28, 2023 @03:31PM (#36511423)
> The page says the reason for excluding U is "accidental obscenity'.

Crockford is being cheeky. To make a nice base32 alphabet out of non-confusable alphanumeric characters you only need to exclude O, I, and L. This leaves you with 33 characters still, so you need to remove one more, and it doesn't matter which one you remove, so you might as well pick an arbitrary reason for the last character that gets removed (and it's not the worst reason, if your goal is to use these as user-readable IDs, although obviously it's not even remotely bulletproof).

Re:Type-safe, K-sortable, globally unique identifier inspire... by pluijzer on Wednesday June 28, 2023 @04:44PM (#36512328)
You could argue that U can be confused with V.
Re:Type-safe, K-sortable, globally unique identifier inspire... by mtlmtlmtlmtl on Wednesday June 28, 2023 @05:26PM (#36512829)
A vaguely related historical tangent is that V and U used to be just two ways of writing the same letter in Early Modern English. Which I imagine is why W is named as "double U" in speaking.
Re:Type-safe, K-sortable, globally unique identifier inspire... by jabbany on Wednesday June 28, 2023 @06:20PM (#36513444)
This is also interesting since in French (and I think Spanish?) W is (correctly) called "double V"
Re:Type-safe, K-sortable, globally unique identifier inspire... by namtab00 on Wednesday June 28, 2023 @07:32PM (#36514211)
In Romanian and Italian too.
Re:Type-safe, K-sortable, globally unique identifier inspire... by mtlmtlmtlmtl on Thursday June 29, 2023 @03:50AM (#36517629)
Same thing in Norwegian. But W is also not really a part of Norwegian orthography, it's just kind of there in the alphabet anyway. Only useful for names and maybe a couple loanwords.
Re:Type-safe, K-sortable, globally unique identifier inspire... by EGreg on Thursday June 29, 2023 @01:51AM (#36516832)
Same with B and V, P and F, SS and Z, etc.

It is why PH is F, for instance.

Re:Type-safe, K-sortable, globally unique identifier inspire... by TRiG_Ireland on Thursday June 29, 2023 @05:44AM (#36518343)
That is indeed why w is named "double u" in English (and "double v" in French. And why it's a vowel in Welsh.

See more from jan Misali: https://www.youtube.com/watch?v=sg2j7mZ9-2Y

Re:Type-safe, K-sortable, globally unique identifier inspire... by dmurray on Wednesday June 28, 2023 @06:09PM (#36513329)
5 and S seems more likely.
Re:Type-safe, K-sortable, globally unique identifier inspire... by quickthrower2 on Wednesday June 28, 2023 @06:45PM (#36513715)
Fvck!
Re:Type-safe, K-sortable, globally unique identifier inspire... by quickthrower2 on Wednesday June 28, 2023 @06:48PM (#36513742)
U is a fairly new letter anyway.
Re:Type-safe, K-sortable, globally unique identifier inspire... by dolmen on Thursday June 29, 2023 @05:00AM (#36518056)
This assumes that english is the only relevant language regarding curse words. Which is quite biased.
Re:Type-safe, K-sortable, globally unique identifier inspire... by deanmen on Wednesday June 28, 2023 @04:18PM (#36512002)
The F word has a U in it. Sure you could just say FVCK
Re:Type-safe, K-sortable, globally unique identifier inspire... by bongobingo1 on Thursday June 29, 2023 @01:10AM (#36516550)
Or Fwck if you doubly mean it.
Re:Type-safe, K-sortable, globally unique identifier inspire... by Zamicol on Wednesday June 28, 2023 @04:28PM (#36512130)
There's more!

- base 58 - Satoshi's/Bitcoin's https://en.wikipedia.org/wiki/Binary-to-text_encoding#Base58

- "base62" - Keybase's saltpack https://github.com/keybase/saltpack

- The famous "Adobe 85" - https://en.wikipedia.org/wiki/Ascii85

- basE91 - https://base91.sourceforge.net

At work we defined several new "bases" for QR code. IMHO, it is an under applied area of computer science.

Re:Type-safe, K-sortable, globally unique identifier inspire... by avgcorrection on Wednesday June 28, 2023 @06:14PM (#36513395)
> The page says the reason for excluding U is "accidental obscenity'. What the heck is it talking about?

Because he’s an American?