Quine
rosettacode.org
rosettacode.org
Since it doesn't seem to have a regular English wiki article: It is an esotieric language that is not turing complete but can do pretty much anything that people usually do with esoteric languages. It has 4 opcodes:
H prints "Hello World!".
Q prints the source text of the input program (quine).
9 prints 99 bottles of beer.
+ increments the accumulator.
There are articles on Wikipedia in a hand full of languages about HQ9+, but no regular English one (there is one in simplified English tough). I'm surprised there even is a German one, usually people on the German Wikipedia are quite trigger happy with deletion requests and speedy deletions.
> We will teach attendees how to use the relational (logic) language miniKanren to write several relational interpreters and reducers capable of automatically synthesizing recursive, symbolic programs, including quines (programs that evaluate to themselves) and fixpoint combinators (such as the famous Y-combinator). https://www.thestrangeloop.com/2014/program-synthesis-using-...
- miniKanren, live and untagged: quine generation via relational interpreters (programming pearl) (http://webyrd.net/quines/quines.pdf) by William E. Byrd, Eric Holk, and Daniel P. Friedman
Learned about it first from Joe Armstrong: https://joearms.github.io/#
It is created using TiddlyWiki
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x)))
The same author also has a radiation-hardened quine, which still emits the original quine even if you delete any(!) one character before running it: https://github.com/mame/radiation-hardened-quine
But coming back to traditional quines; the most common solution is of the form:
> The following string followed by itself in quotes: "The following string followed by itself in quotes: "
This is by no means the only possible solution: If you view the compiler/interpreter as a function then a quine is the fixpoint of that function.
So, if your "compiler" is `cat`, the shell identity function, then any string is a quine! A fork bomb is also a kind of quine. The quine there is not the code itself, but a process running the code. That process is "interpreted" by the kernel, which dutifully creates an exact copy of the fork-bomb process.
I've never sat down and tried it, but one day I want to write a quine of the form: "Initialize a PRNG with this seed and print the first n bytes". Probably there's a language which lets you get the required code small enough that you could brute-force the correct seed.
#!/usr/bin/cat 10 LIST