Skip to content

Instantly share code, notes, and snippets.

@tompng
Last active February 20, 2022 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tompng/77fb317a1d47b6731302b92f412159b8 to your computer and use it in GitHub Desktop.
Save tompng/77fb317a1d47b6731302b92f412159b8 to your computer and use it in GitHub Desktop.
2022/02/20 quine `ruby 20220220.rb [fontsize(12.5..)]`
eval(%w(->{ev al($s=_1.sp lit*'')})*'') ["h=29;$*.map
{h=[25,( _1.to_f*2 ).roun d].max };e='';q =32.chr+ 'rq_xkyz sugt[wvc
'.byte s.map{ (_1+95 09).c hr'utf -8'}*' ';s=[' 2022',
'2/20' ].map {|s|( 1..h) .map{ |y|y=1-(2*y- 1.0)/
h;(1.. 6*h).m ap{|x| j,x=x .divm
od(1. 5*h); x=(x-0 .75*h) /h;a=(
0.5-y) **2;[ (x*x/0 .49-1+ c=y.a
bs*y*y )*(c* 41+26* b=(30* x/11)*
*2-1), (y-2* x).abs *6-1,2 *y>1?(
x*x/1 .96+y *y-y)* (b+9*a ):[(6*
x+3.2) **2+(6 -12*y )**3- 1,(30
*x-g=6 *a *a-a* 499/18 +11)* (2 7*x-0 .9
*g-9+2*a),[6*x-y-5, 4*y+3- 8**(6* x-4),2*x+8*y+3,0.7*y -x].max].min][s[j%4]
.ord%8%3]<0?1:0}}+[[ 0]*6*h]*2*(s.t o_i/2000*h/9)}.sum([ ]).each_slice(2).map
{|a,b|a.each_slice(2) .zip(b. each_slice(2)).map{q [(_1*e).to_i(2)]}*e}
*$/;a=?[ +q[ 1..]+?]; w=?'*2;
f=->c{c=c.chars; s.g sub!(eval'/'+a+' /'){c.shift||_
1}};f[' eval(% w(- >{eval( $s=_1.s plit*' +w+')
})*']; s.sub! (ev al'/' +a+'. /'){a[ _1[1]
]?w:(e =w;?+ +q[ 0])}; f[e+') ['+[3 4.chr]
*2*$s. sub (/[0- 9]+/, h.to_
s)+']; ']; puts(s );exit "];██
▟███▛ ▟█▛ ▗████▘ ▐████▌ █████
▄███▛▘ ▟█▛ ▗▟███▀ ▐████▌ █████
▄███▀▘ ▟█▛ ▗▟██▛▀ ████▌ █████
▄██▛▀ ▟█▛ ▗▟██▀▘ ████▙ ████▛
▗▟██▛▘ ▄ ▟█▛ ▄███▀ ▗▖ ▐████▖ ▐████▘
▟██▀ ▗▟█ ▟█▛ ▗██▛▘ ▄█▌ ▜███▙ ▗████▘
▗██████████████████▛ ▟█▛ ▟██████████████████▘ ▝████▄ ▗▄███▛▘
▗███████████████████▌ ▟█▛ ▟███████████████████ ▝▀▜██████▀▀
$s=code = File.read(__FILE__).split(/[#]{2}DATA[#]{2}/).last.delete(" \n")
##DATA##
h=25;
$*.map{h=[25,(_1.to_f*2).round].max};
e='';
q = 32.chr+'rq_xkyzsugt[wvc'.bytes.map{(_1+9509).chr'utf-8'}*'';
s=['2022','2/20'].map{|s|
(1..h).map{|y|
y = 1-(2*y-1.0)/h;
(1..6*h).map{|x|
j,x=x.divmod(1.5*h);
x = (x-0.75*h)/h;
a=(0.5-y)**2;
[
(x*x/0.49-1+c=y.abs*y*y)*(c*41+26*b=(30*x/11)**2-1),
(y-2*x).abs*6-1,
2*y>1 ? (x*x/1.96+y*y-y)*(b+9*a)
: [
(6*x+3.2)**2+(6-12*y)**3-1,
(30*x-g=6*a*a-a*499/18+11)*(27*x-0.9*g-9+2*a),
[6*x-y-5,4*y+3-8**(6*x-4),2*x+8*y+3,0.7*y-x].max
].min
][s[j%4].ord%8%3]<0 ? 1 : 0
}
}+[[0]*6*h]*2*(s.to_i/2000*h/9)
}.sum([]).each_slice(2).map{|a,b|
a.each_slice(2).zip(b.each_slice(2)).map{
q[(_1*e).to_i(2)]
}*e
}*$/;
a=?[+q[1..]+?];
w=?'*2;
f=->c{c=c.chars;s.gsub!(eval'/'+a+'/'){c.shift||_1}};
f['eval(%w(->{eval($s=_1.split*'+w+')})*'];
s.sub!(eval'/'+a+'./'){a[_1[1]] ? w:(e=w;?++q[0])};
f[e+')['+[34.chr]*2*$s.sub(/[0-9]+/,h.to_s)+'];'];
puts(s);exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment