diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-08-09 02:30:00 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-08-09 02:30:00 +0900 |
| commit | 46eabfc7b9fcfc088032fbe728c7631752e424a0 (patch) | |
| tree | 0b40b8dfb411032219dd1ce90b886ef2a93608f5 | |
| parent | 31cf15c2668253bc3c6b0efff9c76b9fb1cb3703 (diff) | |
| download | twitter2x-quine-46eabfc7b9fcfc088032fbe728c7631752e424a0.tar.gz twitter2x-quine-46eabfc7b9fcfc088032fbe728c7631752e424a0.tar.zst twitter2x-quine-46eabfc7b9fcfc088032fbe728c7631752e424a0.zip | |
| -rw-r--r-- | README.md | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7915ca6 --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +# What's this? + +This is a quine-like program. + +`q.rb` is shaped like the Twitter logo. It generates the X logo. The output is also a valid Ruby program. When you run it, it returns to the logo of Twitter back. + + + +## `q.rb` + +```ruby + k=1;eval( s= + ( %w{s="k=#{1-k};eval + (s=( %w{#{s}})*'')";s+="; + %q\x5f "+s;i=f=0;puts([%|B*(#~% + ":4~$%65~ $'39~$*/8~$-,6~%1'6~&K~ + (I~$L~%K~'H~ (G~*D~'F~)C~+@~.<~17~ + .8~);~$=~(5|,%|" 0A)~"&''=)~#'''9)~%'' + '5)~''''1)~)'''-)~+'''))~-'''%)~/''/~1''+~ + 3'''~5'''~7'''~7)''~5-''~3)#'''~1)''''~/ + )+'''~-)/'''~+)3'''~))7'''~');''&~%)?0|,][k + ].tr("~","\n").gsub(/./){n=$&.ord-33;(f=!f + )?s[(i+=n)-n,n]:"\40"*n}+"_")})*'');%q_ + k=1;eval(s=(%w{s="k=#{1-k};eval(s=(%w{ + #{s}})*'')";s+=";%q\x5f"+s;i=f=0;pu + ts([%|B*(#~%":4~$%65~$'39~$*/8~$-,6~% + 1'6~&K~(I~$L~%K~'H~(G~*D~'F~)C~+@~ + .<~17~.8~);~$=~(5|,%|"0A)~"&''= + )~#'''9)~%'''5)~''''1)~)''' + -)~+'''))~-'''%)~/''/~ + 1''+~3'''~5'''~7'''~7)' + '~5-''~3)#'''~1)''''~/)+'' + '~-)/'''~+)3'''~))7'''~');'' + &~%)?0|,][k].tr("~",_ +``` + +## Result of `q.rb` + +```ruby + k=0;eval(s=(%w{ s="k=#{1 + -k};e val(s= (%w{#{s} + })*'') ";s+=" ;%q\x5f" + +s;i=f =0;put s([%|B*( + #~%":4 ~$%65~ $'39~$*/ + 8~$-,6 ~%1'6~ &K~(I~$L + ~%K~'H ~(G~*D ~'F~)C~+ + @~.<~1 7~.8~) ;~$=~(5| + ,%|"0A )~"&''=)~#'''9 + )~%''' 5)~''''1)~ + )'''-) ~+''') + )~-''' %)~/'' + /~1''+ ~3'''~ + 5'''~7'' '~7)'' + ~5-''~3)#''' ~1)''' + '~/)+''' ~-)/'' '~+)3' + ''~))7'' '~');' '&~%)? + 0|,][k]. tr("~" ,"\n") + .gsub(/. /){n=$ &.ord- + 33;(f=!f )?s[(i +=n)-n + ,n]:"\40 "*n}+" _")})* + '');%q_k =0;eva l(s=( + %w{s="k= #{1-k};eval(s=(_ +``` + +It will generate `q.rb` again. |
