2 ms·
I hadn't written one until ~30 mins ago [1]. I cheated and looked at a Java quine (not particularly elegant, but easy to see what is going on.), but I wrote one
by titzer 4y ago
I hadn't written one until ~30 mins ago [1]. I cheated and looked at a Java quine (not particularly elegant, but easy to see what is going on.), but I wrote one for Virgil. Just think string substitution; a string with a hole in it and you substitute a copy of the string, quoted into the hole. Just one substitution suffices.
[1] https://github.com/titzer/virgil/blob/master/apps/Quine/Quine.v3 https://github.com/titzer/virgil/blob/master/apps/Quine/Quin...
- thomasahle 4y agoYou should put SPOILER tags on that.
- _wldu 4y agoNice, this Go version satisfies gofmt: https://github.com/62726164/quine https://github.com/62726164/quine