3 ms·
If you look at the ruby source file[1], you'll see that the first thing it does is take all of its source and put it in a variable $s. Then it evaluates the sou
by shawnz 13y ago
If you look at the ruby source file[1], you'll see that the first thing it does is take all of its source and put it in a variable $s. Then it evaluates the source code in that variable, with that source having access to itself as a string. All of the intermediate representations could easily contain this string in its entirety (and they likely do). Hopefully you can see now how it's not so impossible (but still ridiculously awesome!)
[1] https://github.com/mame/quine-relay/blob/master/QR.rb https://github.com/mame/quine-relay/blob/master/QR.rb