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

not using quine cheated version in weird case #158

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

not using quine cheated version in weird case #158

samualtnorman opened this issue Apr 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@samualtnorman
Copy link
Owner

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

@samualtnorman samualtnorman added the bug Something isn't working label May 2, 2024
@Kyromyr
Copy link

Kyromyr commented May 3, 2024

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
Copy link
Owner Author

ah, you're right. thank you for spotting this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants