TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask PG: Why are HN usernames inconsistently case-sensitive?

8 pointsby Gertigabout 12 years ago
Why are HN usernames case-sensitive in some places but not others?<p>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.<p>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.<p>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.

3 comments

MrDunhamabout 12 years ago
Just 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.
评论 #5488727 未加载
brudgersabout 12 years 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]:*<p><pre><code> &#62; (eql Gertig gertig) T &#62;(symbol-value gertig) "Gertig" &#62;(symbol-value Gertig) "Gertig" </code></pre> The API query may do something equivalent to:<p><pre><code> &#62;(get-symbol-having-value "Gertig") GERTIG &#62;(get-symbol-having-value "gertig") NIL </code></pre> 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.<p>*Since Scheme, from which Arc, is derived is also case insensitive, I suspect the Arc is:<p><pre><code> &#62; (is Gertig gertig) t</code></pre> However, case insensitivity is not explicitly covered in the Arc tutorial. <a href="http://ycombinator.com/arc/tut.txt" rel="nofollow">http://ycombinator.com/arc/tut.txt</a>
Someoneabout 12 years ago
I 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)<p>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.<p>It certainly should disregard letter casing, as humans are good at ignoring it, too.<p>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?