Program that creates larger versions of itself (quine-variant)
You are to write a program that will output source code that is
- Larger than the original program (character wise)
- Will print another program larger than itself when run (i.e. the new program is also a valid answer to this challenge)
This is code-golf, so shortest answer wins.
@Kevin, The definition is recursive. The output should be a program whose output is larger than itself, and an answer to this question. So the output's output should be larger than the output, and the output's output's output should be even larger, etc.
Damn. Wanted to do this in Brainfuck. Took me almost half an hour to figure out that it is impossible to do so. :D
(or, well, at least almost impossible. YOu CAN create a Quine in BF, so this should be possible, too, but it'S too much work to bother with it)
I think you should clarify your rules. On one hand, *any* additional code output by such a program is "obviously useless"; on the other hand, *all* additional code in the output is "useful" in that it furthers the goal of answering this challenge.
@JohannesH. A selection of Brainfuck quines can be found here: http://esoteric.sange.fi/brainfuck/bf-source/quine/
I think this challenge would be much better as a popularity contest than a code golf. It would allow for a lot more creativity!
Does a program which prints its source and a comment count? For example: (bash) `cat %0 & echo \#comment`.
GS2 (8636bd8e), 0 bytes
This prints a single newline, which prints two newlines, which prints three newlines, et cetera.
This commit predates the challenge by a month and a half. I just tested it, and it works as intended.
@MamaFunRoll Why would it be? This isn't different from an empty Retina program printing **1**, an empty Jelly program printing **0**, or an empty Stuck program printing **Hello, World!**.
@Dennis well it is slightly different, in that the Jelly program `0` doesn't print `00`, the stuck program `Hello, World!` doesn't print `Hello, World!Hello, World!`, etc.