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

Could you give an example of program that prints the same string even after any one character is deleted? #3

Open
mrlzla opened this issue Oct 23, 2017 · 2 comments

Comments

@mrlzla
Copy link

mrlzla commented Oct 23, 2017

F.e. that prints "Hello World" ;)

@mame
Copy link
Owner

mame commented Oct 23, 2017

Here you are!

eval = "(puts 'Hello, world!'; exit)#"##"
instance_eval = "(puts 'Hello, world!'; exit)#"##"
/#{eval eval if eval==instance_eval}}/.i rescue##/

eval eval"[eval||='',instance_eval||=''].max_by{|s|s.size}#"##"

The implementation technique is elaborated in my book, "The world of obfuscated, esoteric, artistic programming"! It is written in Japanese, though...

@g105b
Copy link

g105b commented Jun 2, 2023

This is fantastic and I want to read your book. Would you ever get it translated to English?

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

No branches or pull requests

3 participants