The programming language "dust" November 27, 1997



Programs are "words" made up from the letters 'd', 'u', 's', and 't' and act upon a word written after them. A program works by having each letter in turn, left to right, do its thing to the other word. The letter actions are as follows:



d duplicate the last letter of the other word

u uh... (do nothing at all to the other word!)

s swap the last two letters of the other word

t take away the last letter of the other word



For example, the program "dust" applied to "abc" works as follows:



dust abc

ust abcc // the 'd' has done its thing

st abcc // the 'u' has done its nothing

t abcc // the 's' has done its thing, which only appears to be nothing

abc // the 't' had taken away what the 'd' hath given



So, in the dust programming language, the program dust doth nothing at all. My kids were fascinated by this. Elizabeth, totally unprompted by me, asked what dust would do to dust. Self-application, my favorite of all favorite things to do with computer programs! I didn't answer, but let her generalize herself, which she did in a moment, and said, "nothing!" Again, delighted. Dust to dust, ashes to ashes.



She was puzzled by the 'u' wondering why we'd have something that did nothing. I said, we can use it to make a program pronouncable, and we got "tut tut" -- the program that banishes four-letter words!



We began putting together an algebra (though I didn't frighten her with the word!), noting that:



dt = u

ss = u

ds = d



and so on. A simple elimination rule (you can always take out a 'u'), allowed us to derive:



dust = dst = dt = u = nothing



I was wonderfully surprised by the effect of "st" on "mrs", so I called it the "feminist" program (as a mnemonic), and then told her about the feminist program to turn "mrs" into "ms".



All in all, we had a delightful evening.