3 ms·
Ask PG: Why are HN usernames inconsistently case-sensitive?
Why are HN usernames case-sensitive in some places but not others?
I ran across this because I am "Gertig" on HN but wish my name showed up as "gertig". A simple mistake made by signing up on an iPad which case corrected me without me realizing it, and not rectifiable since you cannot edit your username.
I recently tried browsing to news.ycombinator.com/user?id=gertig but the page says "No such user." So then I decided to try to create a new account as "gertig" but got an error saying that username already exists.
Just curious as to why the url doesn't redirect or handle gertig as Gertig if the username is considered to be the same name.
- MrDunham 14y agoJust had a similar problem. Forgot PW, logged in as MrDunham and mrdunham (also returns lower case) - no 'pw reset'. Tried again later, magic reset pw came up.
- Gertig 14y agoHadn't thought about this one but it makes sense it would be the same issue.
- deleted 14y ago[deleted]
- Someone 14y agoI doubt HN implements it, but this explanation would make sense: to prevent people from easily masquerading as other users, the system forbids the existence of user names that are too similar to each other (e.g. in edit distance) Ideally, 'too similar' would use some smart metric that knows that a l looks like an I or a 1, an O like a 0, etc. It certainly should disregard letter casing, as humans are good at ignoring it, too. You would still have to enter your exact username, though, as your username with a few changes could be closer to another username. For example, is Gertug a double typo for gertig or for GerdaG?
- brudgers 14y ago[I am not an ARC expert] Symbols in many lisp dialects are case insensitive and user names are almost certainly symbols. In Common Lisp [and I'm not an expert in it either]:* > (eql Gertig gertig) T >(symbol-value gertig) "Gertig" >(symbol-value Gertig) "Gertig" The API query may do something equivalent to: >(get-symbol-having-value "Gertig") GERTIG >(get-symbol-having-value "gertig") NIL Of course, I'm pulling this completely out of my ass just because it's interesting to think about. Somebody more familiar with the code base will have no trouble recognizing that. *Since Scheme, from which Arc, is derived is also case insensitive, I suspect the Arc is: > (is Gertig gertig) t However, case insensitivity is not explicitly covered in the Arc tutorial. http://ycombinator.com/arc/tut.txt http://ycombinator.com/arc/tut.txt