A Quine

When I take a break from philosophy I often find myself creating utterly useless computer programs. Today, for example, I've spent some hours on Quines. A Quine is a program that outputs its own source code. (Quines are so called because Quine, in "The Ways of Paradox" if I recall correctly, introduced the self-denoting expression "'appended to its own quotation' appended to its own quotation".) Making Quines is a lot of fun, and also a good training to avoid use/mention mistakes. I've just written several JavaScript Quines. Here is a particularly neat one (try it!):

for(i=0;c=[",","'",'"',"for(i=0;c=[", "][('320202120121023202424').charAt(i++)];)document.write(c)" ][('320202120121023202424').charAt(i++)];)document.write(c)

Comments

No comments yet.

Add a comment

Please leave these fields blank (spam trap):

No HTML please.
You can edit this comment until 30 minutes after posting.