In my free time I’ve been making many trips to Discworld over the past few months. I’ve been rereading my favorites like Going Postal, and devouring other classics like Hogfather for the first time.

I thought I’d take a pause this Christmas and offer up my contribution to an ongoing tribute to the late Terry Pratchett.

You know they’ll never really die while the Trunk is alive… It lives while the code is shifted, and they live with it, always Going Home.
— Terry Pratchett, Going Postal

The Clacks, as described in Going Postal, is a system of trans-continental semaphore towers used to send messages across great distances. Each packet of text sent through the Clacks is encoded using a set of standardized codes and encodings.

Sounds familiar, doesn’t it?

The codes G, N, and U, stand for “send the message on”, “do not log the message”, and “turn the message around at the end of the line” respectively. In Going Postal, these codes are used to send a character’s name perpetually up and down the Clacks.

As long as his name is spoken, he will never die.

We can write a Plug function to easily broadcast our own Clacks overhead messages from our Phoenix server:


pipeline :browser do
  ...
  plug :gnu_terry_pratchett
end

def gnu_terry_pratchett(conn, options) do
  Plug.Conn.put_resp_header(conn, "X-Clacks-Overhead", "GNU Terry Pratchett")
end

Of course, this is all a fantasy. The Clacks aren’t real, Terry’s name won’t live forever in the overhead, and any X-Clacks-Overhead messages we send will simply be ignored by the world at large.

That being said, “humans need fantasy to be human”.

HUMANS NEED FANTASY TO BE HUMAN. TO BE THE PLACE WHERE THE FALLING ANGEL MEETS THE RISING APE.
“Tooth fairies? Hogfathers? Little—”
YES. AS PRACTICE. YOU HAVE TO START OUT LEARNING TO BELIEVE THE  LITTLE  LIES.
“So we can believe the big ones?”
YES. JUSTICE. MERCY. DUTY…
— Terry Pratchett, Hogfather