Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object/array inside functons/loops can be quine cheated #157

Open
samualtnorman opened this issue Apr 22, 2024 · 0 comments
Open

object/array inside functons/loops can be quine cheated #157

samualtnorman opened this issue Apr 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@samualtnorman
Copy link
Owner

samualtnorman commented Apr 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant