301

H9+ : 1 char 9 That's right. One character. Outputs the lyrics to 99 bottles of beer, which is a valid program. All the extraneous data does not count, but there are plenty of 9s in there. The output of the outputted program is the lyrics to 99 bottles of beer 59 times. This function gives the number of times the lyrics are outputted if you run the ...


118

GolfScript, 9 chars {.'.~'}.~ This code outputs: {.'.~'}{.'.~'}.~ which outputs: {.'.~'}{.'.~'}{.'.~'}.~ which outputs: {.'.~'}{.'.~'}{.'.~'}{.'.~'}.~ and so on. I believe this is the shortest answer in a "real" Turing-complete programming language so far. Explanation: Basically, the original code above is a "quine-layer": it outputs a normal ...


109

Java 7: 0 chars Save as file Blank.java. If you save it as any other file, replace any instance of Blank with the appropriate file name. Then, run in command line via first compiling, then running. If compiling fails, stop. I list this as Java 7 because it might output differently for different versions of Java. First few outputs (outputted to stderr): ...


93

GS2 (8636bd8e), 0 bytes This prints a single newline, which prints two newlines, which prints three newlines, et cetera. Try it online!


80

HQ9+, HQ9++ and similars, 2 characters QQ This is the output: QQQQ


55

Foo → gs2 → M → Jelly → Retina → Aeolbonn → Par → Actually → Sprects → sed → Universal Lambda → Lines → /// → m4: 19/13 ≈ 1.4615 points "“GḋÞḊCøẉYỴ⁴ñ<ȯƥ»Ṿ¦ All answers are given in the Jelly code page. ¶ represents a newline. Mechanism Language Code —————————————————————————————————————— Foo "“GḋÞḊCøẉYỴ⁴ñ<ȯƥ»Ṿ¦ gs2 “...


49

Pyth, 12 p1: l"1 p2: 1 p3: 1 etc.. p1p2p3: l"111 Output: 3 Explanation: l length "1 string "1" On first run, this outputs the length of a single character string, 1. This also happens to be a valid Pyth program, outputting 1 again. Therefore, pn+1 is always 1. When the programs are chained, p1 outputs the length of the chained ...


49

;#+, 61 bytes Outgolfed by Conor O'Brien ;;;;;;;(~;;;;;~-;-)~>:~;;;;(~;;;;;;~-;-)~>~-*((;~<#~):<#-:-*) Try it online! Note that the input has a trailing null byte.


46

33 languages, 40 bytes, 1.25 points 33.Bubblegum : (hexdump) 3f1dbbbc87ebd1594f79fdbfa01c8a8ded64e1796d24d2f23e0115677f3cd9b3cd59c217c75a5c30 32./// : "echo "B*"Rube Goldberg"+````{`]"print(%s)"e%}E*/ 31.CJam : "echo "B*"Rube Goldberg"+````{`]"print(%s)"e%}E* 30.Python : (524,452 bytes) 29.Falcon : (262,301 bytes) 28.Groovy ...


33

Jolf -> Actually -> Jelly -> Pyth -> Retina -> /// -> Golfscript: 15 / 6 = 2.5 points 5.4 points thanks to Martin Ender. 0.1 points thanks to Cᴏɴᴏʀ O'Bʀɪᴇɴ. Note: both Actually and Jelly have their own code-page, so they could be transfered byte-by-byte, just not in the Online versions. Jolf aq"“'ẉ'ɠ@ịQCṁỊ» Actually "“'ẉ'ɠ@ịQCṁỊ» Try it online! ...


33

;#+, 40 bytes ;;;;;~+++++++>~;~++++:>*(-(;~<#~):<#-*:) Try it online! Input is terminated with a null byte. Explanation The code is split into two parts: generation and iteration. Generation ;;;;;~+++++++>~;~++++:> This puts the constants ; and # into memory as such: ;;;;;~+++++++>~;~++++:> ;;;;; set A to 5 ...


29

Ruby 27 A very slightly modified version of this (via): puts <<3*3,3 puts <<3*3,3 3 The number of times that puts-line is printed grows exponentially. $ ruby quine.rb | ruby | ruby puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <<3*3,3 puts <&...


28

pl, 0 bytes Code: Try it online! Explanation: An empty program in pl is simply a cat program, outputting the exact same as the input. In pl, all ASCII characters are essentially variables, but when the variable doesn't exist (yet), pl assumes that they are part of a string.


26

Python -> Batch -> Javascript -> Java -> PHP -> C++ -> Foo -> Brainfuck 31.(142857) points Python print'@echo alert`void f(){System.out.println("echo\"void f(){cout<<\\"\\\\"-[--->+<]>---.----[-->+++<]>.+[->+++<]>.+++.--[--->+<]>-.+++[->++<]>+.[--->+<]>++.---.--------.--.+++.+++++++++++++.---------...


25

Lambda Calculus - 29 A simple lambda term (λu.(u u)(u u))(λu.(u u)(u u)) Reducing this term by one beta reduction yields ((λu.(u u)(u u))(λu.(u u)(u u)))((λu.(u u)(u u))(λu.(u u)(u u))) And so on and so on. It's a simple variant on the classic (λu.u u)(λu.u u) which is a quine in lambda calculus, double self application here means we get twice the ...


23

SH script, 9 cat $0 $0 Grows at exponential rate. Either run as sh whatever.sh or set it as executable. Windows version is here.


23

vim 56 54 keystrokes iclass Tuple1 {public Object _0;}<esc>qyYp<C-a>$y2bPr,<C-a>q98@y Since V is backwards compatible, you can Try it online! This is the perfect task for vim! I might golf it a little bit more later. Also note that <c-a> means Control-A, and it counts as one keystroke. Explanation: iclass Tuple1 {public Object _0;...


21

JS -> Cobol -> Python -> IBM 360 BAL 261 bytes/4 languages = 65.25 Points Was aiming to use difficult languages, with more obfuscation. Javascript converts the string from base64 into Cobol, which produces Python that decodes the BAL code from hex. Javascript console.log(atob(' 1 LH8T88d@05R850T8LT88!Q!R Cek*k{[~&vgm88yx9m4m6y6m8wx9m6}s}...


21

Python 2, 32 bytes exec"print'x'"+".join('{^_}')"*5 Try it online!


20

dc 11 Quite simple: 6579792 dfP The first line is repeated once every generation: $ dc growing_quine.dc 6579792 6579792 dfP $ dc growing_quine.dc | dc | dc 6579792 6579792 6579792 6579792 dfP The last line consists of the following instructions: d duplicates the last value put on the stack (6579792) (so that we get one more copy each time we run it), ...


20

Haskell: ψ(ΩΩω) + 999672 points main=print$f++shows f"$iterate(Z:@)Z";f="data N=Z|N:@N deriving Show;r=repeat;s Z=[];s(a:@Z)=r a;s(Z:@b)=($u b)<$>h b;s(a:@b)=do(f,c)<-h b`zip`s a;f<$>[c:@b,a]\nh=scanl(flip(.))id.t;t(Z:@Z)=r(:@Z);t(Z:@b)=((Z:@).)<$>t b;t(a:@b)=flip(:@).(:@b)<$>s a;u Z=Z;u(Z:@b)=u b;u(a:@_)=a;g f=mapM_$print.((f++...


20

CJam, 4.56 × 10526 programs 2D#2b{"\256b_(256b:c'\s`_:(er`":T~{;38'ÿ*`{:T~{;63'ÿ*`{:T~{;88'ÿ*`{:T~{;114'ÿ*`{:T~{;140'ÿ*`{:T~{;166'ÿ*`{:T~{;192'ÿ*`{:T~{;219'ÿ*`{Q?\"_~"}s(\T}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}_~ Exact score: 254219 + 254192 + 254166 + 254140 + 254114 + 25488 + 25463 + ...


19

05AB1E, n=13, 189 bytes 'Ì6×ÐI" ÿB`0¢ "D"₁h44₁44÷÷÷ÝÐÃм₁hhhÐÃ44u4÷÷÷₁h44₁44÷÷÷ǝ÷ƶê4₁÷÷ 1 Èÿ°À4ô¤¬ xÒÍÍ<_Zÿ11*Ò88w8*н¡Ë18*Ë xh`H°` ₂6₂6₂6$--«üuÆ-«üuÆ-«üuÆΘ ÒæP<<<<<<<<<<n(Zd XXšXXÜýвXšXš¥Æ≠≠ ÿÿð¨и0Ì<0ǝÀ0ÿäÀ`∍`Ā"#Iè Try it online! or validate codepoint divisibility. n=1: 1 simply returns 1, since all integers are ...


18

05AB1E, 5-chain: 236 + 29 + 13 + 3 + 1 = 282 bytes 10101100011010001101100010110110001111000111001110101001000000000010111100100110011011010110011000100110101001001101100001110001111010100100000100010010001010011101011001110001000001011010101111001110011110001010111100001110110C₁<Au¦н.V Try it online! which prints the program 633693S<J6bαð3<žQTÌ&...


17

MATL -> CJam -> 05AB1E -> Golfscript 21/2 18/2 22/3 Thanks for Martin for 3 chars off! '"''Rube Goldberg''"`' executed in MATL gives "''Rube Goldberg''"` which in CJam gives "'Rube Goldberg'" which in 05AB1E gives 'Rube Goldberg' which in Golfscript gives Rube Goldberg


17

brainfuck, 56 55 33 bytes 1 byte saved thanks to Gravitron, and 22 bytes saved thanks to Jo King! --[>+<++++++],[[->.<]>+++.--.-<,] Try it online! Output requires an interpreter that wraps on memory underflow and has EOI=0. TIO has such an interpreter. Explanation --[>+<++++++] initializes the tape with a single +. The input ...


16

redcode (recursive solution) This is the code of the easiest warrior writable in redcode, the famous Imp: MOV 0, 1 When executed, the code writes a copy of its single instruction at the next address in memory; then executes it, etc.


16

CJam, 118 116 bytes This got slightly out of hand... especially the second half seems like it should be very golfable. ri2/_)mr:R-"<>"R*mr_'=fm0\{1$+}%+__&e`]:\{mr1aa..+}*\@](\z:~\{~\("+-"*mr1$3$e=[{_,)mr_2$<@@>}*+]@@f{`1$`={(}@?\}W<}/ Test it here. This handles N = 100 pretty much instantly. I don't have time to write the full ...


16

JavaScript (ES6) / Python 3, 264 + 258 = 522 bytes Program A: a="a=%r;b=%r;c=%r;1//2;print(c);'''\nconsole.log(b,...[a,b,c].map(uneval))//'''";b="a=%s;b=%s;c=%s;1//2;'''\nprint=_=>console.log(c)//'''\nprint(a%(a,b,c))";c="1//2;alert=print\nalert('Wrong language!')";1//2;print(c);''' console.log(b,...[a,b,c].map(uneval))//''' Program B: a="a=%r;b=%r;c=%...


Only top voted, non community-wiki answers of a minimum length are eligible