Does there exist a solution that doesn't rely on undefined repeat behavior? I finally gave in and looked at the answers, but it looks like they all use `repeat M N>M`, or `repeat M N>currentOutputSize`. I kinda assumed that the interpreter was just there for convenience, and that its implementation of undefined behavior was irrelevant. But is the interpreter's implementation critical to the solution? (Then again, I'm…
A Quine Puzzle
31–36 of 36 posts
Re: A Quine Puzzle
#32Earlier quoted context omitted.
Maybe it copy-pasted wrong, but this doesn't look like a solution to me. The output is shorter than the input, and contains commands in a different order.
I just tried it again, and then copy pasted from the output to the input; it still works. Did you select the full string and decode with base64?
Re: A Quine Puzzle
#33cHJpbnQgMQpwcmludCAxCnByaW50IDEKcHJpbnQgMQpwcmludCAxCnByaW50IDEKcmVwZWF0IDMg MgpwcmludCAyCnJlcGVhdCAzIDIKcHJpbnQgMgpyZXBlYXQgMyAyCgo= Wasn't terribly difficult, though not the shortest. What's the code golf answer?
Re: A Quine Puzzle
#34Spoiler: cmVwZWF0IDMgMgpwcmludCAyCnJlcGVhdCAzIDIKcHJpbnQgMgpyZXBlYXQgMyAyCg==
This is the shortest one of the solutions so far. Wonder if it's the shortest possible? (Other than empty = empty)
Re: A Quine Puzzle
#35Re: A Quine Puzzle
#36It found JoshTriplett's 10-line solution and shows that it's minimal if you don't allow undefined REPEAT behavior, and it found daveloyall's 5-line solution and shows that it's minimal of you do allow undefined REPEAT behavior.