*{box-sizing:border-box;}html{background:#fff;}body{background:#fff;color:#000;margin:0 auto;padding:20px;max-width:600px;}p{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:14px;line-height:20px;margin:0 0 15px;}p.link{background:#eff0f1;border-radius:3px 0 0 3px;display:inline-block;margin:0 0 10px;width:32px;}a{display:block;padding:4px;}svg{fill:#212121;height:24px;width:24px;vertical-align:middle;}svg.warning{fill:#b00020;}pre{background:#eff0f1;border-radius:0 3px 3px 0;display:inline-block;line-height:16px;margin:0 0 10px 2px;padding:8px;width:calc(100% - 34px);}code{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif;font-size:13px;}p>code{background:#eee;padding:1px 5px;}
<p>Click the play icon next to each programme to test it. Note that all programmes will auto-run and some, highlighted in red with a circle, may freeze or crash the tab they're running in so proceed with cautiond.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=WHZVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>XvU}a@MgX+1</code></pre><p>Without the first <code>@</code> to open the left function the, now unmatched, closing <code>}</code> causes the programme to throw an error.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QHZVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@vU}a@MgX+1</code></pre><p>Removing the first <code>X</code> results in <code>U</code> being auto-inserted between the <code>@</code> and the <code>v</code> and, therefore, the left function instead testing whether <code>U</code> is divisible by itself, which, of course, it is. So, no matter the input, the programme will exit after the first iteration and always return <code>1</code>.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFhVfWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XU}a@MgX+1</code></pre><p>If the <code>v</code> is removed then the <code>X</code> is ignored and the left function now tests whether <code>U</code> is truthy, which, for all non-zero inputs, it always will be. So, as above, the programme will exit after the first iteration and always return <code>1</code>.</p><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2fWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@Xv}a@MgX+1</code></pre><p>The default agrument for the <code>v</code> method when applied to an integer is <code>2</code> so, by checking if <code>X</code> is divisible by 2, this version will always return the first even Fibonacci number: <code>2</code>.<p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VWFATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvUa@MgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1ATWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}@MgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hTWdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}aMgX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQGdYKzE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@gX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1YKzE&input=MTM" target="_blank"><svg class="warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z"/></svg></a></p><pre><code>@XvU}a@MX+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nKzE&input=MTM" target="_blank"><svg class="warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z"/></svg></a></p><pre><code>@XvU}a@Mg+1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nWDE&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@MgX1</code></pre><p class="link"><a href="https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFh2VX1hQE1nWCs&input=MTM" target="_blank"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Try it</title><path d="M8,5.14V19.14L19,12.14L8,5.14Z"/></svg></a></p><pre><code>@XvU}a@MgX+</code></pre>
1Thanks for the tag, didn't know it existed. – Don Thousand – 2019-12-10T23:07:17.183
Strictly a pristine program is one that will error if bytes are removed. This challenge only requires that the program will have different functionality, which I interpret as producing a different output for some inputs – Luis Mendo – 2019-12-10T23:11:11.870
@LuisMendo That is correct. – Don Thousand – 2019-12-10T23:16:07.277
1@LuisMendo I'll add it to the text – Don Thousand – 2019-12-10T23:19:15.723
@Shaggy Thanks, I missed that bit. – Grimmy – 2019-12-11T12:41:03.760
1Any requirements for the range of outputs? 'Cause I can save bytes if leave it as int – Varad Mahashabde – 2019-12-11T19:44:52.787
@VaradMahashabde Sure, you can leave it as an int. – Don Thousand – 2019-12-12T01:18:46.173
While you've found a different way of quantifying it, it's unclear to me how this is any different from classic code golf. The shorter the program is in terms of bytes, the lower score it is going to have under your scoring criteria. Are there exceptions that I'm missing? Why not just make this code golf? – Cody Gray – 2019-12-12T07:19:08.190
@CodyGray That's not completely true. Some small byte patterns have high scores (for example, $13$ bytes). This condition ensured that code isn't just copied directly from other Fibonacci challenges. See Sandbox for discussion. – Don Thousand – 2019-12-13T01:37:45.190
in other words "a←1⋄r←1x⋄⎕ct←0" is not ok because this can be rewritten as "a←r←1x⋄⎕ct←0" eliminate 2 bytes (and the result of the funtion would the same) but this "a←1⋄⎕ct←0⋄r←1x" would be ok because if i eliminate some byte the meaning change... is thit right? – RosLuP – 2019-12-17T18:12:53.460
1@RosLuP I don't know the language, but that looks right to me. – Don Thousand – 2019-12-17T18:15:14.010