Hacker News Hug of Deaf

By Susam Pal on 05 Apr 2025

"It's essentially the Hacker News Hug of Deaf." – @TonyTrapp

About three years ago, I set up a tiny netcat loop on one of my Debian servers to accept arbitrary connections from the Hacker News (HN) community. The loop ran for 24 hours and did exactly three things whenever a client connected:

  1. Send a simple ok message to the client.
  2. Close the connection immediately.
  3. Make my terminal beep four times.

That's it! It was a playful experiment in response to a thread about quirky, do-it-yourself alerting systems for friends and family. See this HN thread for the original discussion. Here is the exact command I ran on my server:

while true; do (echo ok | nc -q 1 -vlp 8000 2>&1; echo; date -u) | tee -a beeper.log; for i in 1 2 3 4; do printf '\a'; sleep 1; done & done

The nc command closes the connection immediately after sending the ok message and runs an inner for loop in a background shell that asynchronously prints the bell character to the terminal four times. Meanwhile, the outer while command loops back quickly to run a new nc process, thus making this one-liner script instantly ready to accept the next incoming connection.

Soon after I shared this, members of the HN community began connecting to the demo running on susam.net:8000. Anyone on the Internet could use any client of their choice to connect. Here's how I explained it in the HN thread:

Now anytime someone connects to port 8000 of my system by any means, I will hear 4 beeps! The other party can use whatever client they have to connect to port 8000 of my system, e.g., a web browser, nc HOST 8000, curl HOST:8000, or even, ssh HOST -p 8000, irssi -c HOST -p 8000, etc.

In the next 24 hours, I received over 4761 connections, each one triggering four beeps. That's a total of 19 044 terminal beeps echoing throughout the day!

Graph
Number of connections received every hour since 31 Jan 2022 10:00 UTC

The data for the above graph is available at beeper.log. Now, 4761 isn't a huge number in the grand scheme of things, but it was still pretty cool to see people notice an obscure comment buried in a regular HN thread, act on it, and make my terminal beep thousands of time.

At the end of the day, this was a fun experiment. Pointless, but fun! Computing isn't always about solving problems. Sometimes, it's also about exploring quirky ideas. The joy is in the exploration, and having others join in made it even more enjoyable. Activities like this keep computing fun for me!


Update on 10 Apr 2025: I shared this article on Hacker News today and saw another surge in connections to my beeper loop.

Graph
Number of connections received every hour since 10 Apr 2025 10:00 UTC

The data for the above graph is available at beeper2.log. The data shows a total of 352 831 connections from 1396 unique client addresses over 14 hours. That amounts to a total of 1 411 324 beeps! Much of the traffic seems to have come from persistent client loops constantly connecting to my beeper loop. In particular, the client identified by the anonymised identifier C0276 made the largest number of connections by far, with 327 209 total connections. The second most active client, C0595, made only 6771 connections. There were 491 clients that connected exactly once. If you'd like to see the number of connections by each client, see beeperclient2.log.

In conclusion, the difference in the volume of connections between the earlier experiment and today's is striking. In the first round, three years ago, there were only 4761 connections from some readers of a comment thread. But in today's round, with this post being featured on the HN front page, there were 352 831 connections! It is fascinating to see how odd experiments like this can find so many participants within the HN community!

Comments | #unix | #shell | #networking | #technology