Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 49,218 posts.

Any topic
Any year
16608

Let's write a setjmp

Yesterday I wrote that setjmp is handy and that it would be nice to have without linking the C standard library. It’s conceptually simple, after all. Today let’s explore some differently-portable implementation possibilities with distinct trade-offs. At the very least it should illuminate why setjmp sometimes requires…

16617

Making my own bed sensor

I recently created some “bed sensors” for my smart home that detect if one of us, or both of us, is in bed. I use a couple of pressure mats that detect when weight is applied to them, and stuck then under our mattress at around hip level and these tell my Home Assistant home automation platform if