Chris Wellons
nullprogram.com · Personal blog · on HN since 2007
Chris Wellons writes about C, Emacs, low-level programming tools and small software projects such as Endlessh.
What HN saysCommenters call it a favorite programming blog, with fascinating, diverse, sometimes challenging and mind-bending articles.
295HN people shared it
141linked it in comments
462stories submitted
16Kstory points
3 months agolast shared
2007people per year2026
Most-shared posts
- 1Homepage18 people · first shared 2017
- 2Prospecting for Hash Functions14 people · 150 points · first shared 2018 · 14 comments on HN
- 3Endlessh: An SSH Tarpit11 people · 585 points · first shared 2019 · 112 comments on HN
- 4A Tutorial on Portable Makefiles10 people · 460 points · first shared 2017 · 105 comments on HN
- 5Interactive Programming in C9 people · 225 points · first shared 2014 · 15 comments on HN
- 6Render Multimedia in Pure C9 people · 156 points · first shared 2017 · 15 comments on HN
- 7Atom vs. RSS8 people · 8 points · first shared 2016 · discussion on HN
- 8A Magnetized Needle and a Steady Hand7 people · 191 points · first shared 2016 · 62 comments on HN
- 9Gap Buffers Are Not Optimized for Multiple Cursors7 people · 107 points · first shared 2017 · 90 comments on HN
- 10My personal C coding style as of late 20237 people · 51 points · first shared 2023 · 26 comments on HN
- 11Debugging Emacs, or How I Learned to Stop Worrying and Love DTrace (2018)6 people · 268 points · first shared 2018 · 32 comments on HN
- 12Makefile Assignments are Turing-Complete6 people · 68 points · first shared 2016 · 16 comments on HN
- 13Arena Allocator Tips and Tricks6 people · 15 points · first shared 2023 · discussion on HN
- 14Finding the Best 64-bit Simulation PRNG6 people · 9 points · first shared 2017 · discussion on HN
- 15My review of the C standard library in practice6 people · 7 points · first shared 2023 · discussion on HN
What HN people wrote when they linked it
jedimastert · 2021-05-27
My favorite one relevant to HN is probably http://www.nullprogram.com
A programming blog for the most part, but I always find whatever they're writing about to be fascinating
eska · 2026-08-18
Recommended related reading:
https://nullprogram.com/blog/2024/02/05/
turtleyacht · 2026-04-27
Searched by tags and found author may try Evil [1], but unsure if they followed through.
You're right Spacemacs is essentially a batteries-included version of Emacs.
[1] https://nullprogram.com/blog/2017/04/01/
mananaysiempre · 2026-02-03
For static executables, “the system’s libc” is of course not a thing. To support those, OpenBSD requires them to include an exhaustive list of all addresses of syscall instructions in a predefined place[1].
(With that said, OpenBSD promises no stability if you choose to bypass libc. What it promises instead is that it will change things in incompatible ways that will hurt. It’s up to you whether the pain that thus results from supporting OpenBSD is worth it.)
[1] https://nullprogram.com/blog/2025/03/06/
agumonkey · 2025-12-23
Often enjoyed article by chris wellons https://nullprogram.com/
quite diverse, often challenging, sometimes mind bending
atiedebee · 2025-08-09
I misunderstood the question then, since I thought it was about learning about the newer language features.
C coding standards differ quite a lot, and unfortunately I can't point out any software that has standards developed for safety.
As to still try and be helpful: I've enjoyed reading nullprograms blog[0] where he looks into interesting ways to make C more useable (although he tends to replace the entire standard library for reasons highlighted here[1])
There is some must avoid functions (mostly string functions) and a good list of them has been compiled in the git project repository[2].
I've tried looking up the misra C guidelines but they were hard to find or (if I remember correctly) had to be paid for or something like that
[0] https://nullprogram.com [1] https://nullprogram.com/blog/2023/02/11/ [2] https://github.com/git/git/blob/master/banned.h
TachyonicBytes · 2025-03-16
I have to add https://nullprogram.com, just because of the care the author took to have it work better in lynx[1]:
Just in case you haven’t tried it, the blog also works really well with terminal-based browsers, such as Lynx and ELinks. Go ahead and give it a shot. The header that normally appears at the top of the page is actually at the bottom of the HTML document structure. It’s out of the way for browsers that ignore CSS. [1] https://nullprogram.com/blog/2017/09/01/
jamesponddotco · 2024-04-16
Just released a new version of a module I shared on Hacker News and Reddit in its infancy. Big thanks to @skeeto[1] for reviewing and auditing the underlying cryptographic interface.
Comments in the documentation are lacking, now that I think about it, but I'll work on that this week.
[1]: https://nullprogram.com/
rwbt · 2024-03-16
There's also Odin[0] too. I experimented them all and Odin is pretty nice. Nim is also good too but a lot more features.
But - I concluded that language matters a lot less compared to APIs. Yes, the language should have enough good features to let the programmers express themselves, but overall well designed APIs matter a lot more than language. For example -tossing most of the C stdlib and following a consistent coding style (similar to one described here -[1]), with using Arenas for memory allocation, I can be just as productive in C.
[0] - https://odin-lang.org [1] - https://nullprogram.com/blog/2023/10/08/
kccqzy · 2024-01-06
C gives you too many guns to shoot yourself in the foot. Beginners deserve a language with a helpful compiler, slightly more hand-holding, as well as more structure and convention to encourage a maintainable coding style.
You can read about how experts write their C code (like https://nullprogram.com/blog/2023/10/08/) but you aren't going to appreciate why they decide to do this. Indeed, beginners need to be able to blindly follow rules before they can critique them or invent their own coding styles.
devta · 2023-12-26
adamcc · 2023-10-26
Yeah, so you are probably right. The custom definition is something that grew out of my response to the following two posts:
A general review of the stdlib
https://nullprogram.com/blog/2023/02/11/
A review of scanf
https://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html
Originally I implemented `getLine` (terrible name!) as a way to get multiple lines of input from stdin in a relatively safe way. The implementation borrows almost all of its ideas from the `sekret.de` post. Because I knew the implementation and it was close to hand on my machine, I used it for this version and just swapped out `stdin` for just any old file.
Edit: here's the implementation for reference, https://github.com/adammccartney/algorithms/blob/master/libs/adio/adio…
kragen · 2023-08-22
i think it's pretty common for a specialized reimplementation of a standard library type or function to outperform it by an order of magnitude or so in some particular case. chris wellons gave an excellent example of this with hashing in golang in https://nullprogram.com/blog/2023/06/26/
commonly (as in wellons's post about the two-sum problem) there's a variation on the standard algorithm that can help significantly, but which the standard library function doesn't have an option for
also i think the cost of reimplementing simple 'algorithms from the book' like insertion sort or even quicksort is pretty low; as you saw in my comment above, insertion sort is six lines of code and only moderately bug-prone. we aren't talking about fibonacci heaps or red-black trees or fm-indexes or rader's algorithm or something. the cost is low enough that it's easy to justify in a lot of cases
thoughtFrame · 2022-12-19
I don't know of any formal introductions to the topic but you can see them in action in these places too
* some of Daniel Lemire's work in high performance data structures
* the blog posts related to solving board games on https://nullprogram.com
* the articles about board representations on the chess programming wiki https://www.chessprogramming.org/Main_Page
* Any explanation of Quake III's fast inverse square root
medstrom · 2022-12-13
Please DON'T use the threads. As of 2018 it has many data races (https://nullprogram.com/blog/2018/05/31/), and resultant bugs will be a nightmare to track down.
The Emacs community has always got by through finding other ways to ensure responsiveness. It's true that each individual user shouldn't have to spend that much time on configuration (Doom Emacs and such distros help here), but still: people who find it slow must have misconfigured something, and on profiling, they'll find at most 1 or 2 features of their config that's eating all the CPU cycles. These won't actually be hard to fix, for a programmer, and threads wouldn't have helped matters, and at best only have hid the CPU-eater.
suprjami · 2022-10-28
Some more
* Chris Wellons - C and all sorts of stuff - https://nullprogram.com/
* Raymond Chen - low-level Windows-centric, really good - https://devblogs.microsoft.com/oldnewthing/
* Robert Elder - Linux systems - https://blog.robertelder.org/
* Andrew Hutchings - old computer restoration - https://linuxjedi.co.uk/
WantonQuantum · 2022-04-26
There are so many great ideas in this!
For developers, here's a simpler but still cool GPU cellular automaton with code and a tutorial:
https://nullprogram.com/blog/2014/06/10/
joelkp · 2022-03-28
I've looked around more, and I should probably write a better/fuller comparison of other things with what I experiment with. I think the more unusual thing, and useful observation, is that multiplying with the result of a varying bitrotation (what I thought of as "chaotic waveshaping") can be enough to make it sound like white noise (though more is needed to make all bits decently random). It makes it possible to use a multiplication less.
SplitMix64 uses another multiplication and only fixed bitshifts, and is 64-bit. I've found more about the standard form of its core - a permuting hash function with two multiplications and three xor-right-shifts. There are also 32-bit functions of that type, where the best seem to be listed in this article on the topic: https://nullprogram.com/blog/2018/07/31/
Pr0ject217 · 2022-02-07
EDIT:
Paste this hacky snippet into your browser's console to save all of the links into your clipboard:
(() =>
{
let result = [...document.querySelectorAll('td a')]
.map((link) =>
link &&
!link.href.includes('ycombinator') &&
!link.href.includes('javascript:void')
? link.href
: ''
)
.filter(Boolean);
result = [...new Set(result)];
result.sort();
copy(result.join('\n\n'));
})();
Just to help, here's a compiled-list of all of the links shared here so…
gravypod · 2022-01-01
I find both https://nullprogram.com/ and https://christine.website/ to be very pleasant to read.
oso2k · 2021-12-15
Another great set of JIT introductions are
A Basic Just-In-Time Compiler
https://nullprogram.com/blog/2015/03/19/
A JIT Compiler Skirmish with SELinux
https://nullprogram.com/blog/2018/11/15/
keegancsmith · 2021-05-27
- Mark Brooker :: https://brooker.co.za/blog long time lead engineer @ AWS blogging technical info on distributed systems
- Chris Wellons :: https://nullprogram.com/ lots of interesting explorations in code
feniv · 2020-07-28
If you’re interested in diving deeper, the SMhasher benchmark suite tests a much more exhaustive list of hash functions (including wyhash) - https://github.com/rurban/smhasher
https://www.strchr.com/hash_functions
Is also a great write up of how some of the classic hashing algorithms perform of various data sets.
https://nullprogram.com/blog/2018/07/31/
is an interesting approach on generating hashing functions automatically.
Myrmornis · 2020-02-29
Here are two good reads on asynchronous programming
http://krondo.com/an-introduction-to-asynchronous-programming-and-twis…
https://nullprogram.com/blog/2019/03/10/
nipav · 2019-12-17
The best way is reading the spec: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
But to get you started Chris Wellons does have a pretty nice blog post about writing POSIX Makefiles: https://nullprogram.com/blog/2017/08/20/
sansnomme · 2019-08-27
Try this guy:
https://nullprogram.com/
He has been known to take on students.
devy · 2019-03-22
On a different note, I love this other tool he wrote: Enchive
https://nullprogram.com/blog/2017/03/12/
merlincorey · 2019-01-06
To allow implementations slack to do things in the way that works best for them, in some cases of undefined behavior -- but not all of them.
If you have not read it before, you might find "The Value of Undefined Behavior" informative: https://nullprogram.com/blog/2018/07/20/
gp7 · 2017-09-02
https://fgiesen.wordpress.com Most of his posts end up on the first page of hn. In fact there is one right now
http://nullprogram.com/ makes C look fun
andythemoron · 2017-07-25
Julia Evans' blog is one of my favorites! It was a big inspiration for starting my own blog (https://andythemoron.com). I also love High Scalability and Dan Luu's blog which have been mentioned in other comments.
I "follow" several which are mostly defunct, but in terms of blogs that still feature active updates:
Evan Klitze's blog: lots of topics around Linux, C++, etc. https://eklitzke.org/
Sutter's Mill: lots of "state of the world" for C++, but also context, history, etc. https://herbsutter.com/
IT Hare: C++, game programming http://ithare.com/
The Erlangelist: Erlang/Elixir http://theerlangelist.com/
null program: lots of miscellaneous topics http://nullprogram.com/
Fluent C++: the name speaks for itself http://www.fluentcpp.com/
Another Programmer's Blog: Linux, C, C++, C#, MSSQL https://www.stev.org/