" r:2+a1Fi1+:1F1+[ro;
\n
インデックスを追跡する名前のファイルを作成します。
これはもっとゴルフができるかもしれませんが、すぐに私に飛び出すものはありません...
出力
$ starfish incrementalquine.sf
"$ starfish incrementalquine.sf
$ starfish incrementalquine.sf
r$ starfish incrementalquine.sf
:$ starfish incrementalquine.sf
2$ starfish incrementalquine.sf
+$ starfish incrementalquine.sf
a$ starfish incrementalquine.sf
1$ starfish incrementalquine.sf
F$ starfish incrementalquine.sf
i$ starfish incrementalquine.sf
1$ starfish incrementalquine.sf
+$ starfish incrementalquine.sf
:$ starfish incrementalquine.sf
1$ starfish incrementalquine.sf
F$ starfish incrementalquine.sf
1$ starfish incrementalquine.sf
+$ starfish incrementalquine.sf
[$ starfish incrementalquine.sf
r$ starfish incrementalquine.sf
o$ starfish incrementalquine.sf
;$ starfish incrementalquine.sf
説明
" r:2+ build the quine
a1F open file named "\n"
i1+: read input, increment by 1, duplicate
1F save incremented input to file
1+[ increment input, copy that many values to a new stack
ro output the character at the beginning of the new stack
; end
インクリメンタルクインの不正行為
a1Fi1+:0go1F;
説明
a1F open file named "\n"
i1+ read input and add 1 to it
:0g push the value at (input,0) to the stack
o output the value
1F save the incremented input to the file
; exit