not using quine cheated version in weird case
samualtnorman opened this issue · 2 comments
samualtnorman commented
export default args => args.foo(`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`)
quine cheats to 98 chars
function(a){return a.foo("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}
but
export default args => args.foo(`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`)
quine cheats to 77 chars
function(o){
// ["foo","aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]
let[$,n]=JSON.parse(#fs.scripts.quine().split` `[1])
return o[$](n)}
despite the source being longer
Kyromyr commented
This happens because the quined/non-quined selection comes before postprocessing. At this point the scripts are
function _0a3zb0ymxzr_SCRIPT_(a){return a.foo("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}
and
function _0m9hbj02g1l_SCRIPT_($){
// ["foo","aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]
let[l,t]=JSON.parse($0m9hbj02g1l$SUBSCRIPT$scripts$quine$().split` `[1])
return $[l](t)}
samualtnorman commented
ah, you're right. thank you for spotting this