object/array inside functons/loops can be quine cheated
Opened this issue · 0 comments
samualtnorman commented
export default () => () => [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
currently becomes
function(){return()=>[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]}
an 86 char script which does not use quine cheating to preserve js semantics of getting a new instance every time the expression is evaluated. but it could become
function(){
// ["parse","[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]"]
let[s,t]=JSON.parse(#fs.scripts.quine().split` `[1])
return()=>JSON[s](t)}
which is only 83 chars by using quine cheating but using JSON.parse()
on a quine cheated string to preserve js semantics shaving off a whole 3 chars in this case