Quines and multiquines

21 Mar 2022

(meandering about basics of quines and multiquines)

What is a quine?

Let's start with an example. @MarfSalvador said, in 2018:

@MarfSalvador interviewer: any hobbies? me: I do jokes on twitter interviewer: tell me one me: ok. interviewer colon any hobbies? me colon I do jokes on twitter interviewer colon tell me one me colon open brackets tells joke close brackets interviewer colon idgi interviewer: idgi

This is the core idea of a quine, as a tweet. Aside: I am impressed. It is a tour de force, to integrate two such rich constrained-art traditions as "quines" and "tweets". It's like as if someone wrote a perfectly formed sestina that is also a perfectly formed limerick. Aside aside: Though technically it's not perfectly formed; @MarfSalvador does point that out in the replies.

What are quines like?

A quine generally has two parts, an active outer part, and a passive inner part. The active outer part's activity is grabbing the inner part and manipulating it, and the result of this activity is the quine itself.

This leads to another example. A living eukaryotic cell is a quine. The active outer part is a soup of proteins and membranes and organelles floating in cytoplasm and so on. The passive inner part is the DNA. The activity of the outer part characteristically reproduces the cell as a whole.

Ted Chiang's "Seventy-two Letters" is another masterwork. I hate to spoil it, because the gradual reveal is amazing, but it conveys how, if life were not already quine-shaped, we would have to start a crash program to make life quine-shaped.

Quines are mathematically inevitable - once you have a strong enough programming language, it starts to have quines in it. However, quines are infinite in number - so, not like the 5 platonic solids, or the 26 sporadic simple groups, more like the primes, or like magic squares: grids of numbers where the rows and columns and two main diagonals each sum to the same number. This means that you can seek to "find" or "design" (depending on your philosophy) a quine for yourself, and it's something like a programmer's crossword puzzle, except that there is no author setting the puzzle.

Why are quines interesting?


What are multiquines?


What are multiquines like?


Why are multiquines interesting?