Vidar Holen
vidarholen.net · Personal blog · on HN since 2009
Vidar Holen, the developer of ShellCheck, writes about Linux, shell scripting, and small programming experiments.
What HN saysHN links it for his analysis of swearing in the Linux kernel source, which commenters enjoy, and for his write-ups of shell tricks.
68HN people shared it
31linked it in comments
59stories submitted
3.9Kstory points
12 months agolast shared
2009people per year2026
Most-shared posts
- 1Occurences of swearing in the Linux kernel source code over time29 people · 323 points · first shared 2009 · 264 comments on HN
- 2Useless Use of "dd" (2015)6 people · 756 points · first shared 2017 · 252 comments on HN
- 3Tricking the tricksters with a next level fork bomb5 people · 12 points · first shared 2019 · discussion on HN
- 4Finitecurve.com: TSP art on a CPU budget4 people · 6 points · first shared 2021 · 1 comments on HN
- 5What was the point of [ “x$var” = “xval” ]?3 people · 497 points · first shared 2021 · 226 comments on HN
- 6A shell script that deleted a database, and how ShellCheck could have helped3 people · 6 points · first shared 2019 · discussion on HN
- 7“Dynamic programming” is not referring to “computer programming”2 people · 425 points · first shared 2025 · 211 comments on HN
- 8I wasted weeks hand optimizing assembly because I benchmarked on random data2 people · 395 points · first shared 2025 · 187 comments on HN
- 9Lessons learned from writing ShellCheck2 people · 307 points · first shared 2020 · 46 comments on HN
- 10Swap on HDD: Does placement matter?2 people · 92 points · first shared 2021 · 92 comments on HN
- 11Why is /usr/bin/test 4kiB smaller than /usr/bin/[?2 people · 30 points · first shared 2021 · 5 comments on HN
- 12Buffers and windows: The mystery of ‘ssh’ and ‘while read’ in excessive detail2 people · 5 points · first shared 2017 · discussion on HN
- 13Two simple tips for shell commands in tech docs2 people · 5 points · first shared 2020 · 2 comments on HN
- 14ShellCheck on armv6hf: crossless compilers and the value of split sections2 people · 4 points · first shared 2018 · discussion on HN
- 15Solutions to some various Linux problems2 people · 4 points · first shared 2012 · discussion on HN
What HN people wrote when they linked it
mastazi · 2021-07-30
I stand corrected, thanks for the link, from that one I followed this link which is even more interesting as it explains the process of creating that snippet: https://www.vidarholen.net/contents/blog/?p=766
Intermernet · 2013-04-18
Yeah, but then again I love occasionally coming across the rant of some angry dev in source comments (see http://www.vidarholen.net/contents/wordcount/ for an analysis of profanity in the linux kernel source).
Compare that with the source of Win2k (http://www.kuro5hin.org/story/2004/2/15/71552/7795) where there were apparently "a dozen or so "fucks" and "shits", and hundreds of "craps"."
It seems greater stability is achieved when devs are allowed to express themselves in comments.
icebraining · 2012-06-12
I never understood what's so bad about swearing in code comments. It's not something I would do, but different people speak in different ways, so what? This commit seems like a big waste of time to me (except when it replaces variables names with something more descriptive).
Personally, I like William Morgan's IMAP rant[1], from the source of his excellent mail client Sup[2].
And then there's the kernel: http://www.vidarholen.net/contents/wordcount/
[1]: http://sup.rubyforge.org/svn/trunk/lib/sup/imap.rb
[2]: http://sup.rubyforge.org/
shazow · 2010-11-04
Ah, counting profanity in source code, a favourite pastime: http://www.vidarholen.net/contents/wordcount/
peeters · 2018-05-24
Edit: I stand corrected, the summary in the link below didn't agree with the more detailed steps it went into below. While the hash is used as the input to the next round, it is (for reasons beyond my understanding) repeated if necessary to match the length of the original password. But it still seems like if you're prehashing in both cases the performance issue goes away.
Is that true? I thought shacrypt stretching worked by passing the output of a round of hashing as the input to the next round of hashing, so it would go from 4096 bytes to 64 bytes (e.g.) after the first round.
That's how it's explained here: https://www.vidarholen.net/contents/blog/?p=33. I'd love to be proven wrong.
So it seems shacrypt and bcrypt would be equivalent. Do the expensive work from 4096 to <72 once, then subsequent rounds are all on the same size of input.
I think my point stands, this is comparing apples and oranges unless you pre-hash the input to bcrypt and include that in the benchmark.
ATB · 2009-01-29
Antonio,
on HN, you wrote --
"I hate how being harsh has become fashionable. Whatever happened to manners?"
on your blog, you follow up by saying --
"I stand behind those words. Acting bitter on the Internet seems to be increasingly gathering the popularity amongst an audience that’s used to being amused and entertained by cheap attacks."
Two points: the first is that you use the word "bitter" to back up an anecdote of someone using "fucking" as an adjective to describe a poor User Interface experience. I disagree with that assessment, as there's nothing that suggests bitterness by using "fucking." It's merely a more extreme descriptor of the user's anger or exasperation, but it doesn't suggest bitterness, which has a distinctly different flavour (if you will excuse the pun).
Secondly, I don't believe anything "happened" to manners. There have always been people, often a vast majority of a given population, who used much coarser language to describe their everyday life and experience. Often this was a class distinction, thus the reference to "swearing like a sailor" etc. I expect that many people posting here were exposed -- in the context of software engineering or computer science -- to colleagues who were either used to communicating in an academic or professional context. Although coarse language is to be expected to some extent, written communication about features, bugs, etc. in a corporate US context tends to avoid direct expletives for various reasons ("lack of…
8organicbits · 2025-11-13
It's a personal preference, but you could choose to leave it as-is. Linux, for example, has swear words.
https://www.vidarholen.net/contents/wordcount/#fuck*,shit*,damn*,idiot…
egypturnash · 2025-06-17
<https://www.vidarholen.net/contents/wordcount/#fuck*,shit*,damn*,idiot…
linus says gay rights, I guess
Denvercoder9 · 2025-06-16
It's actually because someone with "crap" as a substring of their e-mail address made a bunch of contributions with their e-mail address in it (e.g. in maintainer records and copyright notices) around that time. Nothing to do with COVID-19.
See the graph with the entire domain for comparison: https://www.vidarholen.net/contents/wordcount/#crapouillou
d3m0t3p · 2025-06-16
You can check company names too ! It's interesting to see that by default, the graph shows google,apple. But adding meta, and IBM really changes the plot.
Meta went from 2K to 10K+ from 2018 to 2025. While IBM seems to have stopped contributing in 2008. Since they the merging with RedHat, I would have expected to see them increase again but none of RedHat / IBM seems to have increase. https://www.vidarholen.net/contents/wordcount/#redhat,oracle,google,ap… Not sure if their name appearing means that they are contributing tho.
Really cool project,
bArray · 2025-06-16
Trying adding "ass", it explodes [1]. Not sure if that's because of keywords such as 'class' or something else? "dumb" is really on the uptake [2].
[1] https://www.vidarholen.net/contents/wordcount/#fuck*,shit*,damn*,idiot…
[2] https://www.vidarholen.net/contents/wordcount/#fuck*,shit*,damn*,idiot…
cycomanic · 2023-12-30
When did I mentioned one should always point to https://www.vidarholen.net/contents/blog/?p=479
For like >99% of cases where people used dd they would have been better of using a different tool.
koala_man · 2022-10-15
I was surprised to learn that a swap file on hdd is not nearly as fast as a dedicated swap partition at the start of the drive.
https://www.vidarholen.net/contents/blog/?p=1110
txutxu · 2022-09-02
Not so new age... but in IRC, the evalbot in #bash, did use something similar with QEMU:
> Initially, Qemu is booted and its state is saved. On each evaluated command, this state is loaded (giving a usable shell in less than one second), a command is fed on stdin and the output read on stdout.
https://www.vidarholen.net/contents/evalbot/
withinboredom · 2022-05-17
Die and kill far outweighs these words. https://www.vidarholen.net/contents/wordcount/#die,kill,fuck*,shit*,cr…
mkl · 2022-04-23
This shape filling curve method probably isn't what you're thinking of either, but it's neat and similar to the OP linked paper in 2D: https://news.ycombinator.com/item?id=25905534 & https://www.vidarholen.net/contents/blog/?p=1062
friseurtermin · 2021-12-09
I remember this coming up in a blog post by the creator of Shellcheck a while back [0] and being discussed here [1].
One reason given is this:
> Assuming the OSS projects aren't a conflict of interest
Apple is so secretive even internally that you can never guarantee whatever you're working on in your free time does not conflict what someone at Apple is working on secretly.
[0]: https://www.vidarholen.net/contents/blog/?p=859
[1]: https://news.ycombinator.com/item?id=22279585
LanternLight83 · 2021-05-03
Some related resources, for intermediate shell users already familiar with shellcheck and looking to dig deeper into the history underlying obscure corner cases, include the developer Vidar's blog (@ https://www.vidarholen.net/contents/blog/), the blog of the Oil-Shell developer (@ https://www.oilshell.org/blog/), and Greg's Wiki (@ https://mywiki.wooledge.org/BashPitfalls).
unhammer · 2019-11-14
maybe the inspiration for https://www.vidarholen.net/contents/rage/ =P
type0 · 2019-04-06
There's these cautionary tale you might find interesting
https://www.vidarholen.net/contents/blog/?p=746
and seriously just Shellcheck it should be in your repos.
auxym · 2019-01-08
Or, you know, cat.
https://www.vidarholen.net/contents/blog/?p=479
joshstrange · 2018-12-14
This is absolutely ridiculous. God knows how many swear words are in the Mac/Windows? We know how many are in Linux [0]. These are all professional pieces of software and yet the world does not come to halt because they have swear words in their source code. I'm all for gender-neutralizing documentation and hell, even source code, but this is just an example of people getting offended over nothing at all.
[0] https://www.vidarholen.net/contents/wordcount/
userbinator · 2018-05-23
Unfortunate that we (as a collective --- not something I personally believe in) seem to think that that is being "professional", and that it is somehow a reason to make everything as bland and soulless as possible, and that that is somehow better? I agree that a lot of code has lost its "character", so to speak.
The Linux kernel still retains much of its fucks and shits, and apparently has gained a whole lot of crap: https://www.vidarholen.net/contents/wordcount/
sz4kerto · 2017-02-12
You should use cp, that's just better for this task.
"dd is not a disk writing tool"
http://www.vidarholen.net/contents/blog/?p=479
shakna · 2017-01-09
Workaround seems to increase linearly over time: [0], perhaps a reflection on both the complexity, and inflexibility of underlying architectures.
[0] http://www.vidarholen.net/contents/wordcount/#hack*,workaround*,todo,f…
NAFV_P · 2014-03-26
Sorry, here you go.
http://www.vidarholen.net/contents/wordcount/
ehamberg · 2013-08-31
Check out the Linux Kernel Swear Count for graphs of the prevalence of various swear words in the Linux source code over the years:
http://www.vidarholen.net/contents/wordcount/
tsm · 2012-07-10
It seems like it's missing something (I'm comparing the pretty graph of profanity in the kernel[1] with manual searches). Is this only 3.4.4?
[1] - http://www.vidarholen.net/contents/wordcount/
nickmolnar · 2009-01-14
I just found this. Apparently the Linux kernel is primarily written by sailors.
http://www.vidarholen.net/contents/wordcount/
Akujin · 2015-07-29
I don't like framing this debate in the prism of government versus private company policing. Freedom of speech is not mutually exclusive to the government.
Consider a programming club meeting once a week that is open to the public. You get there and it's 6 dudes and they are accepting of you as a coder but completely at odds with you on the social justice spectrum (using words like "gay" and "retard" as examples). You have two choices at this point. Either accept the group for who they are or leave.
This is the context in which I see Github. There's a reason why Linus can run his mouth. It's because to the old "boys" club of programmers only results matter and not the social context of the group.
They have no problem with Linus using their service while running his mouth. Why are they picking on this group in particular? It's quite simple. They are small and not important.
Let me be clear. This is very very bad for open source. Github was once considered the automatic public place to share your code. For the most part most projects live in the world of a few singular coders who put their code out to the world for sharing sake and maybe to possibly intrigue others to join their project. Many of these guys are sitting in their bedrooms or garages hacking away and not looking to open themselves up to the SJW crowd when publishing their code. Regardless of what you think of the people doing the coding (which is reflected in the comments) the point of Github was to improve…