4 ms·
Beauty is in the eye of the beholder. I actually find eval-based quines MORE beautiful because they highlight the philosophically interesting aspects of quines,
by xamuel 6y ago
Beauty is in the eye of the beholder. I actually find eval-based quines MORE beautiful because they highlight the philosophically interesting aspects of quines, such as...
* ...the blurring of the distinction between output and code.
* ...the distinction between name and thing-being-named. (The different "x"'s in my example, within different levels of nested quotes.)
* ...leaky context (local variables defined inside the eval scope ending up outside the eval scope, and vice versa).
Harder quines tend to hide all that behind layers of tedious encoding.
If you're really interested in hard quines, you might be interested in trying to dig up some fully-detailed proofs of Godel's incompleteness theorems. It's the same story there: elegant and beautiful ideas, drowned under mountains of tedious encoding.
- nuclearnice1 6y agoVery good points on eval. Can the read() example be similarly redeemed?
- deleted 6y ago[deleted]
- xamuel 6y agoGood question, I had to think about it for awhile. I think it would take some elaborate mental gymnastics to try to redeem the read example. The read example is sort of like an appeal to a higher-power oracle. It isn't self-contained; it wouldn't work in the REPL. As a compromise, one could imagine a quine which works by writing programs to disk and then reading those programs (as opposed to reading itself). This would be kind of silly, since the same data could be written to/read from RAM much easier.