Monthly Archives: June 2004

towers of hanoi in sendmail

Posted by Julian Dunn on June 14, 2004
Electronic Mail / No Comments

Classic. But still truly frightening.

Towers of Hanoi in sendmail.cf

From shrchin Thu Jan 25 05:38:40 1996
Newsgroups: alt.sysadmin.recovery
Subject: Re: ASR London – The Next Generation
Message-ID: <4e7512$712@susscsc1.rdg.ac.uk>
From: shrchin@reading.ac.uk (Jonathan H. N. Chin)
References: <4du54g$kf@kadath.zeitgeist.net> <4e081g$gh1@shellx.best.com> <4e443s$g80@kadath.zeitgeist.net>

cuccia@motherhouse.Talamasca.COM (Nick Cuccia) writes:
>–Nick (still working on towers of hanoi in sendmail.cf…)

Bastard.
I was planning to go home early for once.
Here:


# Towers of Hanoi
S49
RHANOI:$+ $:1 2 3$1
R$-$-$-$*[$+] $:$1$2$3$4

R$-$-$- $@$1$2$3
R$-$-$-@$* $:$>49 $1$3$2$4
R$-$-$-$* $:$>49 $2$3$1$4[Move Top Disk Of Peg $1 To Peg $3]
R$-$-$-$* $:$3$2$1@$4

Add to your /etc/sendmail.cf equivalent.
If S49 is in use, change the three `49′s to an unused ruleset.

Invoke with something like:

echo ’49 HANOI:@@@@’ | /usr/sbin/sendmail -bt -d21

Add `@’s to taste.
Assumes you have three pegs and want to move the stack from
the first peg to the second.

v8 output is cleaner than SunOS.

Was too lazy to make it count (ie. let `HANOI:14′, etc, work);
Didn’t seem too hard, but kind of long-winded and tedious.

Anyone know the iterative (non-recursive) solution?

-jonathan

And that, friends, is why I use Postfix.

[belated] report from BSDCan 2004

Posted by Julian Dunn on June 14, 2004
BSD, Technology / No Comments

I attended BSDCan 2004 last month
and I’ve been remiss in not speaking about it. In my view it is an example of
a conference “done right”. Here’s why:

  • Inexpensive (registration fees were $150)
  • Excellent speakers
  • Good crowd, from developers to administrators to plain old users and students

There’s really not much more than that to ask for at a conference. Lots of
FreeBSD developers attended; among them,
Wes Peters, Robert Watson, Poul-Henning Kamp, Jacques Vidrine, and so on. It
just proves that you don’t need to charge an arm and a leg to demonstrate how
"professional" your conferences are, or to attract quality speakers.

The full text of all the papers presented is here.