4
0
We've been twice challenged to make 'error quines' (see Make an error quine! and Make a slow error quine maker!), so why don't we try the opposite?
Instructions
- Write a "program" that, when run, produces an error.
- Copy the error message into a new program, and run it.
- Repeat Step 2 until the program runs without producing an error.
Rules
- All of your programs must be run in the same language.
- None of your programs can be shorter than 1 byte long.
- The error(s) should be printed to STDERR.
Winning criteria
Your score is the number of programs run minus the length in bytes of your initial program. Highest score wins.
An example in monochrome TI-83+/84+ BASIC:
Initial program: {"
This creates a list with a string inside it, throwing an ERR:DATA TYPE
.
Program 2: ERR:DATA TYPE
The space causes the interpreter to throw an ERR:SYNTAX
.
Program 3: ERR:SYNTAX
The letters are treated as variable multiplication, and the colon as
a newline. This runs successfully.
This chain's score is 3 (number of programs) minus 2 (length in bytes of {"
, the initial program), totaling 1
.
This might be considered a duplicate of the slow error quine question, because the top answers there can be copied with slight modifications and become the top answers here.
– DLosc – 2015-06-01T01:29:56.260@DLosc good point, as that's the case with both answers so far. I was going to add a rule that states
Even if otherwise qualifies to win, your answer will not be accepted if it's a modification of an answer to the slow error quine thread
, but that's not particularly objective; where do I draw the line at 'modification of'? – M. I. Wright – 2015-06-01T01:50:05.000Yeah, I don't think a special-case rule of that nature is a good idea. You would need to either 1) change the description so that solutions to the first question intrinsically won't work here, or 2) change the scoring so that good solutions to the first question won't score well here. I don't know if there's a good way to do that without radically changing the concept, though. ("Must complete the sequence in X amount of time" was the first thing that came to mind, but then I'd just keep trying different numbers in my code until one was barely small enough.) – DLosc – 2015-06-01T01:59:32.500
(Normally, changing the rules after a question has been answered is frowned upon, but--speaking for myself--I wouldn't mind in this case, given the nature of the answers posted so far.) – DLosc – 2015-06-01T02:01:02.223
2(to anyone who thinks these aren't duplicate, the top two answers are both trivial ports of answers to the other question) – pppery – 2018-08-31T17:56:13.407