-
Notifications
You must be signed in to change notification settings - Fork 0
/
src.rb
55 lines (52 loc) · 2.26 KB
/
src.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
i = 0;
eval$s=%w(
s=%(
i=#{(i+1)%4};
eval$s=%w(#{$s})*"";
);
F = [
"?t4e4nq5ZOO0qrwiS.;Bl:[5AUZ`SXJ*L`SMpUJK2ZdOM*t*wZ9Ks+[qnbUtsuMn9`hbJ7JGz^3LAxnB3tVU~/,Dgvzy8/U}.;Ar2ml;Hb[<RH1wtuGKDpVFP.c-30I>DnP80Dv3Q7ZTG4`YV5ox1=-~or;4*hz34v,`?]5S7-/3;7/a.derS2mNNI,wIf7+M^pqZj5<,/l<C~3r?wQHEyIhw4z<5gw=P=1,~l53^spgB:A^^`O5jHBPTRqt+Pp~AX3~O8qyxX^yk*in0K;Lp|~`=fx..wCgSjHI/kF0f}d?v>7fwd424H*?CSOrU{ZU3mH@=Sw:zGBCconXzC",
"?u<|8Rk;_.195|*yDl@,NjL8Go89hT9OJDh;YtM=}]@8>hNp*yHP=,~BH]XS>oV/<w9QKhZ2U}Qa9x+yNA]{=JM>-or?bALEPEV8RT6L3Vbc,+azNq8q:q7~+PyXFWYj_yJ/Rv5dk3q|?9*Lhc-d+06JpNmb/cOue^=6y{M2A]QdK<w?n[qGY*c[`z2P/h9NlGDb9?P9vdvYsKbru[iJ^^yx@?e~pl.+F/6QP2M<Qy8a@}=a:Sid*zQ;xs>o@s0{W:U@<P5L6Zn+P2X*zMpOr03ym?V`@WUlUgo:b9.kQzNdqkEEMxSn29=qing>VC`A^SwYp-[F:Q.ptKFHC+",
"?u<|8Rk;_.1956nKJ_jL41+oEchIfpeDg7+Xb|f/44Hn-_jmT6e@Q]X4PW{F{E~8>@,Qco?ret3Ao+kf6={<}JckMd`^XLSuj6cP@:<+N;UR9z9YxE^k^d7,B<epB;JCw1S6_xb0GIRBp9[nSMLi*tU2=QD/xLe_DF4wKdj>*4FOmV>:2_z?m6xoNY-wiy`=?SX{9SC4Hj^1?@[ATd]tJW2jR1ob4/Pz@rXUXV1-M,C+iOQkE_G*Q7l,-K*L>8-[E[>MI@IQ,oUTIXAAX-1a]gFywe7z}q>SNhkMDS-`n58T-A`H=1{;fvT~R9P/B-d{nzzg=+e0a{B36oh=Ix",
"?u<|8Rk;_.1955HFpmZPN_9RU>fiOIOJ8e@`sL;aVXX9Mse{`hYEU*[Q;1qbJ@4~j5T+?qt>0Mq2:018w|=<Z3>dI^:QXZgoLDlRs7W=ZE/?Q;oWsbNi`[Q[ot[^1F^ae7cBi8~Wk+/6AC*_]4n9od-hP^o6}KkI1?VkH_AX/{.{]aG<gAXFmKOgFr2bQ>Q|*B~+E/s+2L1J,|X1}e?iys>nSB:6JzWYG0YnJt?~~/}`V^B_s,63HYBZnk}gqEZpzLjL=a9v[?/_s2fHH7BdDsB{2d0pnb,awTrHwi6mCWDeNkR*7w4:sME,|[<Ys-4n+xqIMHV9k^Rf-WJ?XW"
];
n = F[i];
f = 0;
n.bytes { |m| f = f * 84 + (m - 8) % 85 };
st = 0;
ps = false;
g = -> l {
cc = l.count('1');
cs = '';
nst = 0;
ft = -> {
h = s.slice(st..-1);
nst = st + cc - s.size;
if (!ps);
s = '%q' + 64.chr + s;
ps = true;
end;
t = s.slice(0, nst);
cs = h + t;
};
ff = -> {
cs = s.slice(st, cc);
nst = st + cc;
};
(st + cc > s.size) ? ft.call() : ff.call();
st = nst;
l.split('').reduce('') { |a, c|
a + ((c == '1') ? cs.slice!(0) : 32.chr)
}
};
R = 27;
C = 80;
PAD = '1' * C;
3.times { puts(g[PAD]) };
R.times { |y|
puts(g[(0..C - 1).map { |x| f[x + y * C] }.join]);
};
puts(g[PAD], g[PAD], g[PAD[0..-2]] + 64.chr);
list = ['hey', 'code', 'for', 'fun'];
`say #{32.chr + list[i]}`;
)*"";