3 ms·
I've heard of a quine but only confuse myself trying to think of a way to write one in Ruby that doesn't involve something like eval-ing strings. Reg Braithwait
by raganwald 17y ago
I've heard of a quine but only confuse myself trying to think of a way to write one in Ruby that doesn't involve something like eval-ing strings. Reg Braithwaite -> FAIL.
That being said, something tickles the back of my head... Are quines combinatorial? Something about a program that prints its own source code makes me think of some of Raymond Smullyan's various problems in the field...
- cschneid 17y agoMy first thought was to parse the AST, then print it back out. No string manipulation needed. (at least not fancy)