TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

8 点作者 Gertig大约 12 年前
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 条评论

MrDunham大约 12 年前
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 未加载
brudgers大约 12 年前
[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>
Someone大约 12 年前
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?