Ken Thompson wrote in his famous paper [1] about quines:<p>> If you have never done this, I urge you to try it on your own. The discovery of how to do it is a revelation that far surpasses any benefit obtained by being told how to do it<p>Every once in a while I give them a try but I couldn't yet create one and it frustrates me very much. Afraid of being denied that "revelation" I never dared to read his paper past that point. I'm afraid I might never read it because of my ego.<p>1: <a href="https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf" rel="nofollow">https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_Ref...</a>
This was written by Yusuke Endoh, who also wrote this submission to the IOCCC that I remember being arguably more astonished when I saw it for the first time: <a href="https://www.youtube.com/watch?v=QMYfkOtYYlg" rel="nofollow">https://www.youtube.com/watch?v=QMYfkOtYYlg</a> (ASCII fluid dynamics).
This issue imploring Yusuke Endoh to write a paper about it is amusing:<p><a href="https://github.com/mame/quine-relay/issues/10" rel="nofollow">https://github.com/mame/quine-relay/issues/10</a><p>> p-e-w:<p>> This is more than a cool program – it's a computer science breakthrough! Apparently, you have discovered a method for constructing quines based on an arbitrary blueprint involving any amount of languages.
>
> Please write a technical paper describing your approach. I'm sure you'll have no trouble finding a CS journal that will publish it.<p>> mame:<p>> Okay I'll submit to the Journal of Universal Rejection.<p>Later:<p>> mame:<p>> I'll soon publish a book, "The world of obfuscated, esoteric, artistic programming". The book explains how to write a uroboros quine. Hence, I proudly close this issue.<p>> It also contains my almost all (about forty) works, including alphabet-only Ruby program, radiation-hardened quine, etc., and explains many techniques to write such programs.<p>> You can buy my book on amazon.co.jp. Unfortunately, it is written in Japanese, yet another esoteric language. I hope anyone can translate to English.
Some background: <a href="https://esoteric.codes/blog/the-128-language-quine-relay" rel="nofollow">https://esoteric.codes/blog/the-128-language-quine-relay</a><p>Note that the author made the challenge even harder by sorting the languages in alphabetical order:<p>> According to Endoh, the most challenging transitions were Befunge to BLC8 to brainfuck, as all three are esoteric. It runs through languages strictly in alphabetical order, so there was no opportunity to group easier-to-work-with languages together.
I am amazed. I have no idea how the hell could the author even do that.<p>Apparently, they have a book called "The world of obfuscated, esoteric, artistic programming", but it seems to be written in Japanese. I hope it will be translated to English someday, so I may learn this dark sorcery.
Last December I had the itch to do some blogging. As it happens, I wrote a four part series that explains in detail how to write quines and quine relays. The initial post can be found at <a href="https://drcabana.org/quine/" rel="nofollow">https://drcabana.org/quine/</a><p>I am a longtime lurker and finally decided to join in order to comment on this thread. I hope that it is not inappropriate to post a link to my own take on this material. If it is, please accept my apologies and feel free to downvote/flag me out of existence.
I like the Radiation-hardened Quine: <a href="https://github.com/mame/radiation-hardened-quine" rel="nofollow">https://github.com/mame/radiation-hardened-quine</a>
Many programmers complain that they can't complete a hello world example in one or more of the languages featured here because they're too difficult.<p>This guy demonstrated enough understanding of 128 of them to make this work.<p>Is the difference in competence really so big between us?
A work of art :)<p>Previous discussion: <a href="https://news.ycombinator.com/item?id=6048761" rel="nofollow">https://news.ycombinator.com/item?id=6048761</a> (177 comments) (2013)
It’s amazing what people can do with stuff like this. Such a beautiful language (Ruby) made so ugly yet beautiful when viewed from a higher altitude.. there’s a metaphor there somewhere
There is an ongoing issue in Nixpkgs[0] to package this quine, more help would be appreciated!<p>[0] <a href="https://github.com/NixOS/nixpkgs/issues/131492" rel="nofollow">https://github.com/NixOS/nixpkgs/issues/131492</a>
Code that writes code that writes code... my limited experience combining AWK and GAMS gave me impressively powerful feelings about my limited code. This surely belongs to the next level, I'll go for more!
This article explains the basic idea:<p>David Bertoldi's "How to write your first Quine program"
<a href="https://towardsdatascience.com/how-to-write-your-first-quine-program-947f2b7e4a6f" rel="nofollow">https://towardsdatascience.com/how-to-write-your-first-quine...</a><p>However, that article is a basic introduction. This 128-language quine loop is beyond expert, bordering on magic.
If it's a 128 language loop is it fair to describe it as ruby?<p>The other 127 languages presumably have all the information so you should be able to start and end at any language?<p>I guess in its current implementation the ruby code is the code that ends the loop? But that is optional?
I wrote a new page describing how to write quines recently[1], but the quine-relay is really above and beyond<p>1: <a href="https://github.com/kirjavascript/quine-howto" rel="nofollow">https://github.com/kirjavascript/quine-howto</a>
How exactly does this work? Does one language invoke another and another in a chain, or ruby at the top calling A, then B, then C..<p>And is that an Ouroboros snake, or something else