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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Linux kernel swear counts

65 点作者 crashoverdrive超过 11 年前

10 条评论

gizmo686超过 11 年前
Its worth looking at the scale of the swear count. Linux has about 16629976 lines of code, and I&#x27;d estimate from the graph that it has about 370* swear words (excluding penguin). If you look at the second graph, that is less then 1 swear in 300000 lines.<p>I checked this on the source tree for 3.8.0. The numbers appear to be inflated by allowing the swear words to be part of other words.<p>For example, &quot;shit&quot; appears in 121 lines, but &quot; shit &quot; only appears in 10 lines. Looking at the offending lines, there is only one swearword that is missed by excluding spaces.<p>&quot;fuck&quot; appears 29 times, all of which are some conjugation of the verb (and some lines have duplicates I&#x27;m not counting).<p>&quot;crap&quot; appears 161 times, 20 of which are part of &quot;scrap&quot;<p>&quot;bastard&quot; appears 17 times, 6 of which go to email addressed hosted at &quot;lazybastard.org&quot; and &quot;you-bastards.com&quot;<p>&quot;penguin&quot; appears 99 times, two of which are jokes.
评论 #6309357 未加载
DarMontou超过 11 年前
I&#x27;m curious about the motivations for coding profanity. I&#x27;ve occasionally included comments like &quot;don&#x27;t f* with this unless you understand x, y, and z&quot; in an attempt to protect fragile sections of code from careless collaborators. Nearly identical comments without profanity seemed ineffective. Within common conversations I know that profanity often carries an implication of violence, usually for the purpose of intimidation. I also find that profanity is frequently used for comedic relief.<p>Hopefully these counts don&#x27;t indicate increasing fragility or violent disagreements within the kernel. Does anyone with kernel experience have any insight into common purposes for kernel profanity?
评论 #6309684 未加载
评论 #6309337 未加载
shaggyfrog超过 11 年前
Can anyone explain the inclusion of &quot;penguin&quot;? I know Tux is the mascot and all, but is it some kind of inside-joke-swear-thing?
评论 #6311001 未加载
foobarbazqux超过 11 年前
I like jwz&#x27;s classic post about swear words in Mozilla:<p><a href="http://www.jwz.org/doc/censorzilla.html" rel="nofollow">http:&#x2F;&#x2F;www.jwz.org&#x2F;doc&#x2F;censorzilla.html</a>
评论 #6310047 未加载
ColinWright超过 11 年前
When this was sumitted some years ago there was some discussion. It might be worth comparing that with the comments here:<p><a href="https://news.ycombinator.com/item?id=850761" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=850761</a><p>It has been submitted a few more times, none with comments:<p><a href="https://news.ycombinator.com/item?id=2070056" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2070056</a><p><a href="https://news.ycombinator.com/item?id=4045103" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4045103</a><p><a href="https://news.ycombinator.com/item?id=6307849" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6307849</a><p>The last of these was just 14 hours ago - the trailing slash defeating the HN dup detector.
m_ram超过 11 年前
A casual search of code in Debian [1] shows that this is not limited to the Linux kernel. Thankfully there&#x27;s no equivalent to the Parents Television Council [2] or Focus on the Family [3] for open source projects.<p>[1] <a href="http://codesearch.debian.net/search?q=fuck" rel="nofollow">http:&#x2F;&#x2F;codesearch.debian.net&#x2F;search?q=fuck</a><p>[2] <a href="https://en.wikipedia.org/wiki/Parent%27s_Television_Council" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Parent%27s_Television_Council</a><p>[3] <a href="https://en.wikipedia.org/wiki/Focus_on_the_Family" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Focus_on_the_Family</a>
aylons超过 11 年前
I wonder what caused the peak of shit just before 3.0.9, and what reversed it.<p>The spike just before 3.2.17 must be a glitch, but if it isn&#x27;t, it&#x27;s very intriguing.
评论 #6308864 未加载
forkrulassail超过 11 年前
I love how penguin is halfway between bastard and crap, I&#x27;ll update my swear word dictionary.
NAFV_P超过 11 年前
There is an area around 2.4.36.5 where the fall and rise of &quot;fuck&quot; and &quot;shit&quot; closely resemble each other. I&#x27;m guessing it&#x27;s a macro which concatenates the two expletives for use in the code.
评论 #6309161 未加载
chatman超过 11 年前
With people like Linus Torvalds at the helm of the project, what else can be expected?
评论 #6309044 未加载
评论 #6309052 未加载
评论 #6309760 未加载