koldfront

diva: Random signature generator in Haskell #amiga #computers #email #gnus #haskell #perl

๐Ÿ•๏ธŽ - 2019-12-08

Back in the days of FidoNet a lot of people created ARexx scripts for GCCHost, and later EMS, on our Amiga computers to generate random signatures at the end of our Echomail.

When moving to "real" email and usenet, this feature was of course not abandoned. I've been using two small Perl-scripts, one that selects a random signature from a list of signatures, and another that formats it, to include my name and email address for years.

I reported a bug and suggested an enhancement of the Text::Autoformat-module, I used for formatsig, in 2000, only later to recognize the positive reply coming from one of the "famous" Perl-programmers, Damian Conway - cool!

When I switched to a new laptop recently, I took it as an opportunity to leave behind some of the accumultated cruft and wean myself off some old habits. For instance, I haven't installed wajig (yet), and I also left behind the auto-signature scripts, because they sometimes didn't format correctly, and I didn't want to debug them.

But I still want to change my signature randomly, so I challenged myself to implement a randomizer and formatter in Haskell. The result is diva.

It is a very simple program, you need a file with signatures in ~/.sigs, and you call diva with two command line parameters, your name, and your email-address. diva then prints out a randomly chosen, formatted signature for you, which you can redirect into ~/.signature, where your email-program and/or newsreader will pick it up. I have integrated a call to it into message-signature-setup-hook in Gnus, so I get a new random signature for each message I write.

Add comment

To avoid spam many websites make you fill out a CAPTCHA, or log in via an account at a corporation such as Twitter, Facebook, Google or even Microsoft GitHub.

I have chosen to use a more old school method of spam prevention.

To post a comment here, you need to:

ยน Such as Thunderbird, Pan, slrn, tin or Gnus (part of Emacs).

Or, you can fill in this form:

+=