Re:Quines: self-replicating programs (2005)
by nuclearnice1 on Wednesday May 27, 2020 @08:05AM
(#23321991)
Very good points on eval. Can the read() example be similarly redeemed?
[ Parent
| on HN ]
Re:Quines: self-replicating programs (2005)
by xamuel on Wednesday May 27, 2020 @09:53PM
(#23332562)
Good 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.