Skip to content

Commit

Permalink
* use LZ77 compression to shrink Befunge program.
Browse files Browse the repository at this point in the history
The compressor is written in Ruby.
The decompressor is written in Boo.
  • Loading branch information
mame committed Dec 22, 2014
1 parent 8e140aa commit 182b703
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 236 deletions.
134 changes: 68 additions & 66 deletions QR.rb
Original file line number Diff line number Diff line change
@@ -1,66 +1,68 @@
eval$s=%q(eval(%w(B=92.chr;g=32.chr;puts(eval(%q(N=10.chr;n=0;e=->s{Q[Q[s,B],?"].K(N,B+?n)};E=->s{'("'+e[s]+'")'};d=->s,t=?"{s.K(t){t
+t}};def~f(s,n)s.K(/.{1,#{n*255}}/m){yield$S=E[$s=$&]}end;Q=->s,t=?${s.K(t){B+$&}};M=->s{"<stdio.h>#{N}!t~mX{puts#{E[s]};return~0;}"}
;V=->s,a,z{s.K(/(#{B*4})+/){a+"#{$&.size/2}"+z}};C="Console.Write";$D="program~QR";$G="~contents~of"+$F="~the~mix!g~bowl";%(object~QR
~extends~App{#{f(%((display~"#{e[%(#{f(%[echo~-En~"#{Q[e[e["Transcript~show:~'#{d[%(H#{Q[E[%(fun~p~n=Z(Int.toSJ~n`x5e"~");p~0;p~0;p~1
30;List.tabulate(127,p);SJ.map(fn~c=>(p(3+ord~c);Z"-1~0~";c))#{E[%(proc~f~{n}~{sJ~repeat~"Y"~$n};puts~a::=`x7e[reK~-all~{.}~"#{V[Q[e[
%(!t~mX{Z#{d[E[%(module~QR;!itial~beg!~#{f(%(Module~QR:Sub~MX:Dim~s,n,i,c~As~Object:n=Chr(10):For~Each~c~!"#{d["<?xml#{O="~version='1
.0'"}?><?xml-#{I="stylesheet"}~type='text/xsl'href='QR.xslt'?><xsl:#{I+O}~xmlns:xsl='http://www.w3.org/1999/`x58SL/Transform'><xsl:ou
tput~method='text'/><#{U="xsl:template"}~match='/'><`x21[CDATA[#{%(H,format="#{y="";f("^H{-}{txt}{#{Q[E[%(with~Ada.Text_Io;procedure~
qr~is~beg!~#{~f(%(Z"#{e[%W[STRINGz:=~226+~153,a:=z+~ 166,b:= a+"2"+z+ ~160,c:=b+"8"+z+~165,t:="#{d[%(H('#{Q[e[%(implement~mX=Z)+E[%
(BEGIN{s=#{E[%(f={n~as~!t|'Y'*n};a=0;s=#{V[ Q[E[" #!cl ude" +M["#!clude<iostream>`n!t~mX{std::cout<<#{E[%(class~Program{pu
blic~static~void~MX{System.#{C+E[(%(let~f (c~ : Int):Lat!1=if~c=127then""else(sJ_of~c@"~g~caffe!e~"@s
J_of~c@"`n")@f(c+1)!~Z("Qu!e~Rela y~Cof f ee.`n`nIngredients.`n"@f~10@"`nMethod.`n");let~g(SJ~->
[])`n[c;t]->Z("Put~caffe!e~"@sJ_ of( !t_of_char~c)@"~!to#$F.`n");g~t`n|_~->Z("Liq
uify#$G.`nPour#$G~!to~the~bak!g ~ dish.`n`nServes~1.`n")!~g#{E[%((doseq[s(lazy-
cat["IDENTIFICATION~DIVISION." "PROGRAM-ID.~QR.""PROCEDURE~DIVISION."
'DISPLA`x59](map~#(str"~~~~^" "(.replace~%1"^"""^"^"")"^"&")(re-seq~#
".{1,45}""#{e[%((f=(n)->Arra y(n+1).jo!~"Y");console.log("%s",#
{V[E[%((H-l!e"#{e["import~s td.stdio;void~mX{H#{E["[#{"class~QR
:Application{void~MX{#{f( %((pr!c~" #{e[%(`nma!(_)->`nio:fH#{E["Zfn
"+d[E[?>+E[?"+%(~:~A~." #{g*9}"~;~:~B~A~."~WRITE( *,*)'"~A~;~:~C~B~T`x59PE~."~'"~C
R~;~:~D~S"~#$D"~C~S^"~ Z~^"(&"~C~S^"~#{e[%(Z"#{e["s:=Outp utTextUser();WriteAll(s,#{E[f('
set~Z"-";Z'+E[%(pack age~ma!;import"fmt";func~mX{fmt.Pr!t("alg oritmo~QR;!^xC3^xADcio~imprim
a(^`"#{e[e[%(^q="^" "`n)+f(("ma!=putStr"+E["class~QR{static~functi on~mX{neko.Lib.Z#{E[%(proced
ure~mX;i:=c:=0;s:= #{E[%(.class~public~QR`n.super~#{$T="java/io/Pr!tS tream"}`n.method~public~sta
tic~ma!([L#{S="ja va/lang/"}SJ;)V~;]`n.limit~stack~2`ngetstatic~#{S}Sys tem/out~L#$T;`nldc~"#{e[%(
class~QR{public~ static~void~ma!(SJ[]v){SJ~c[]=new~SJ[99999],y="",z=y,s=" #{z=t=(0..r=q=126).map{|n
|[n,[]]};a="";b =->n{a<<(n%78+55)%84 +42};("s=#{E["Z"+Q[E[%(#$D;Void~mX{put Str#{E[%(@s=global[#{i=(s
=%(PR~"`x48AI^~ 1.2~PR~"VISIBLE^~"#{ Q["Z"+E[%(all:`n`t@echo~'#{d["l!el:9999 9;Z#{E[%(.assembly~t{}.m
ethod~static~v oid~MX{.entrypo!t~ld s tr"#{e[%(m:db`x60#{e[s="$Z#{E[%(Zf#{E[" #import"+M["Z_sJ"+E[%(s
=toascii#{E["Z #{E[%(say"#{e["#$D(o utp ut);beg!~H(#{f((p="eval";%($_="#{s=%(< ?php~function~f($n){ret
urn~str_repeat (" Y",$n);};$f="f";$z=3 +$w=s trlen($s=#{V[Q[E["!t~mX{H#{E[%((______ _____)dup~=/s(|~~~~~.~
~~|)def(#{Q["q r:-H('#{Q[e[%(for~c~ !"".jo! (["say~'%s'^n"%l~for~l~!#{E[d["eval$s= %q(#$s)",?']]}.split("
^n")]):Z('cat(" r=fput(c har(%d))^n")'%ord(c))`nZ( 'cat("end^n")'))],?']}
').",B]}){9~7{ex ch~ dup~1~and~ 79~mul~ 32~add~exch~2 ~idiv~3 ~1~roll~s~exch~2~!dex~exch~ put~1~sub~dup~6~eq{1~s
ub}if}repeat~s~=~ pop~pop}forall~= ~quit )]};return~0;}" ]],"{ $f(",")}"]})*3;echo"^x89PNG^ r^n^x1a^n";$m="";$t="^
xc0^0^xff";for($i=-1 ;$i<128*$z;$m.=$c- -?( $w-$c||$i>$z)&&$i /$z <($c<$w?ord($s[(!t)($c/3)]):$ c--%3+2)?$t[2].$t[$c%3
%2].$t[$c%3]:"^0^0^0":"^0" )$c=++$i%$z;for e ach(array("I`x48DR" . pack("NNCV",$w+2,128,8,2),"IDA T".gzcompress($m),"IEN
D")as$d)echo~pack("NA*N",s trlen($d)-4,$d,c rc32($d));?>);(s+N*(- s.size%6)).unpack("B*")[0].K(/. {6}/){n=$&.to_i~2;((n+
14)/26*6+n+47).chr}}";s|.| $n=ord$&;substr ~ unpack(B8,chr$n-!t( $ n/32)*6-41),2|eg;Z~pack" B *",$_).scan(/[~,-:A-z]
+|(.)/){p="s++#{$1?"chr~#{ $1.ord}+e":$& +?+ };"+p};p),1){"'#$ s', "}}'')end."] } " `nend)]};quit"]};t=n
um2cell(b=11-ceil(s/13));fo r~n=1:9m={}; for~i =1:141f=@(x,y,n )repm at(["Ook " ~ x~"~Ook"~y~32],[1~a
bs(n)]);m(i)=[f(z=46,63,n)~ f(q=z-(i<1 3)*13,q ,i-13)~f(33,z ,1)~f(6 3,z,n)];end;t( x ) =m(diff([0~s(x=b==
n)])+13);end;Zf("%%s",t{:})) ]]]})+N]} ;"+N]}`x60`n g l obal~_start`n_sta
rt:mov~edx,#{s.size}`nmov~ec x,m`nmov~ebx,1`nmov~e ax,4`n! t~128`nmov~ebx,0`nmov~eax ,1`n!t~1 2 8 )]}"call~void~[ms
corlib]System.Console::Write( sJ)ret})]};quit();",? $].K( ?'){"'^''"}}')].K(/[:"]/,":^0"),/[ ~ Y `t;"(){}`[`]]/]}
"~PR~"`x4bT`x48`x58B`x59E~B`x5 9E)).size+1}x~i8]c"#{ s.K (/[^"]/){"^%`x58"%$&.ord}}^00"declar e ~i32@puts(i8*)de
f!e~i32@mX{%1=call~i32@puts(i8* getelementptr([#{i}x~ i 8]*@s,i32~0,i32~0))ret~i32~0})]};})] ] ]};typeof~Z=='fu
nction'?Z(s):console.log('%s',s) ").bytes{|n|r,z=z[n] ||(b[r/78];b[r];q<6083&&z[n]=[q+=1, [ ]];t[n])};b[r/7
8];b[r]}";!t~i=0,n=0,q=0;for(;++n <126;)c[n]=""+(char) n;for(;i<s.length();){q=q*78+(s.cha r At(i)-13)%84;if
(i++%2>0){y=q<n?c[q]:y;c[n++]=z+y. charAt(0);System.out.Z(z=c[q]);q=0;}}}})]}"`n!vokevi rtual~# $T/Zln(L#{S}SJ;
)V`nreturn`n.end~method)+N]};H("DO,1 <-#"||*s);s?while~t:=ord(move(1))do{i+:=1;u:=-i; every~0to ~7do{u:=u*2+t%2
;t/:=2};H("PLEASE")^(i%4/3);H("DO,1SU B#"||i||"<-#"||((c-u)%256));c:=u;};H("PLEA SEREADOUT,1^nPLEASE GIVEUP");end)]}
;}}"]).tr(B,?&),51){%(show~"Z'#{e[$s].K ~B+?",%("~"^q"~")}'.tr('&','YY');"`n )}]]}^`");fim")})],62) {"Zn#$S`n"}]})
;CloseStream(s);QUIT;"]}")]}"~DUP~FOR~S"~& A,&"~C~NE`x58T~S^"~&A)^",&"~ C~0~DO~B~."~&char("~COUN T~.~."~),&'"~C
R~LOOP~S^"~&^"^""~C~S"~end~#$D"~C~A~."~STOP" ~CR~A~."~END" ~CR~B`x59E~;~D~).K(?"){'"34,"'}+?"]],?%]]}.
)]}")),15){"Pr!t#$S;"}}}}"}]pq"]};}"]}"))],'#{f( ',')}']}))]}"))["~~~~^"~^".""STOP~RUN."])](Zln
(str"#{g*8}"s)))).reverse]}))]};}})]};}"]]],"$(f("," ))"]};for~i~!~range(len(s)):b~as~!t=s[i];a-=b;Z(('+
'*-a~if~0>a~else'-'*a)+'.');a=b;).tr~B,?`x21]};K(/`x21/,"Y" ,s);for(Z"def!e~void~f(n){^"00g,^";for(m=128;m;m/=2){^"00g
,4,:^";if(n/m%2<1)^"4+^";^",^";};^"4,:,^"}^"389**6+44*6+00p29*,^";";++j<=length(s);Z"f("n");")for(n=9;substr(s,j,1)`x21=sZf("%c",++n)
;);Z"^"4,:,@^"^nquit"})]],?']}');)]}";FORiTO`~UPBtDO`~INTn:=ABSt[i];Z(~(50+n%64)+c+~(50+n%8MOD8)+c+~(50+nMOD8)+b+"`x4a"+a)OD]*"REPR"]
}"),117){%(Ada.Text_Io.Put("#{d[$s]}");`n)}~}end;)]+"`nsys.exit~0",/[^{}]/]}}",35){y<<",`n"+$S;"%s"}}")+y}]]></#{U}></xsl:#{I}>"].K~N
,'"&~VbLf~&"'}":s="~~~":For~i=0To~7:s~&=Chr(32-(Asc(c)>>7-i~And~1)*23):Next:#{C}(s~&n~&Chr(9)&n~&"~~"):Next:#{C}(n~&n~&n):End~Sub:End
~Module),3){%($H("%s",#$S);)+N}}end~endmodule)],?%]};return~0;}).reverse],/[`[`]$]/],"[f~",?]]}"~^x60.&]k^n::=^na)]};Z"0~0~-1";)]]};)
,?']}';cr"]]]}"|sed~-E~-e~'s/([`x5eY]|Y.){1,120}/Zf("%s","^0");^n/g'],7){%(Zf("%s","#{d[d[$s],?']}")`n)}}quit)]}")),196){%(Z#$S;)}}})
).gsub(/[!HJKXYZ^`~]/){[B*2,:write,B,:tring,:gsub,"ain()",B*4,:print,g,:in][$&.ord%47%12]})))*"")#_buffer_for_future_bug_fixes_#_buff
########################### Quine Relay -- Copyright (c) 2013, 2014 Yusuke Endoh (@mametter), @hirekoke ##########################)
eval$s=%q(eval(%w(B=92.chr;g=32.chr;puts(eval(%q(N=10.chr;n=0;e=->s{Q[Q[s,B],?"].K(N,B+?n)};E=->s{'("'+e[s]+'")'};d=->s,t=?"{s.K(t){t+t}}
;def~f(s,n)s.K(/.{1,#{n*255}}/m){yield$S=E[$s=$&]}end;Q=->s,t=?${s.K(t){B+$&}};M=->s{"<stdio.h>#{N}!t~mX{puts#{E[s]};return~0;}"};V=->s,a
,z{s.K(/(#{B*4})+/){a+"#{$&.size/2}"+z}};C="Console.Write";$D="program~QR";$G="~contents~of"+$F="~the~mix!g~bowl";%(object~QR~extends~App
{#{f(%((display~"#{e[%(#{f(%[echo~-En~"#{Q[e[e["Transcript~show:~'#{d[%(H#{Q[E[%(fun~p~n=Z(Int.toSJ~n`x5e"~");p~0;p~0;p~130;List.tabulate
(127,p);SJ.map(fn~c=>(p(3+ord~c);Z"-1~0~";c))#{E[%(proc~f~{n}~{sJ~repeat~"Y"~$n};puts~a::=`x7e[reK~-all~{.}~"#{V[Q[e[%(!t~mX{Z#{d[E[%(mod
ule~QR;!itial~beg!~#{f(%(Module~QR:Sub~MX:Dim~s,n,i,c~As~Object:n=Chr(10):For~Each~c~!"#{d["<?xml#{O="~version='1.0'"}?><?xml-#{I="styles
heet"}~type='text/xsl'href='QR.xslt'?><xsl:#{I+O}~xmlns:xsl='http://www.w3.org/1999/`x58SL/Transform'><xsl:output~method='text'/><#{U="xs
l:template"}~match='/'><`x21[CDATA[#{%(H,format="#{y="";f("^H{-}{txt}{#{Q[E[%(with~Ada.Text_Io;procedure~qr~is~beg!~Ada.Text_Io.Put_L!e("
#{d[%(Z"#{e[%W[STRINGz:=~226+~153,a:=z+~166,b:=a+"2"+z+~160,c:=b+"8"+z+~165,t:="#{d[%(H('#{Q[e[%(implement~mX=Z)+E[%(BEGIN{s=#{E[(s="#!cl
ude#{M["#!clude<iostream>`n!t~mX{std::cout<<#{E[%(clas s~Progr am{publi c~static~void~MX{System.#{C+E[(%(let~f(c~:Int):Lat!1=if~c=127th
en""else(sJ_of~c@"~g~caffe!e~"@sJ_of~c@"`n")@ f(c+1 )!~Z ("Qu !e~Relay~Coffee.`n`nIngredients.`n"@f~10@"`nMethod.`n");let~g(SJ
~->[])`n[c;t]->Z("Put~caffe!e~"@sJ_of(!t_of _ch a r~c)@"~!to#$F.`n");g~t`n|_~->Z("Liquify#$G.`nPour#$G~!t
o~the~bak!g~dish.`n`nServes~1.`n")! ~g#{E [ %((doseq[s(lazy-cat["IDENTIFICATION~DIVISION.""PROGRAM-I
D.~QR.""PROCEDURE~DIVISION."'DISPL A`x 59](map~#(str"~~~~^""(.replace~%1"^"""^"^"")"^
"&")(re-seq~#".{1,45}""#{e[%((f=( n )->Array(n+1).jo!~"Y");console.log("%s",#{V[E[%
((H-l!e"#{e["import~std.stdio;vo id~mX{H#{E["[#{"class~QR:Application{voi
d~MX{#{f(%((pr!c~"#{e[%(`nma!(_ )->`nio:fH#{E["Zfn"+d[E[?>+E[?"+%(~:~A~."
#{g*9}"~;~:~B~A~."~WRITE(*,*)' "~A~;~:~C~B~T`x59PE~."~'"~CR~;~:~D~S
"~#$D"~C~S^"~Z~^"(&"~C~S^"~#{ e[%(Z"#{e["s:=OutputTextUser();WriteA
ll(s,#{E[f('set~Z"-";Z'+E[% (package~ ma!;import"fmt";func~mX{fmt.Pr!t(
"algoritmo~QR;!^xC3^xADci o~imprima(^`"#{e[e[%(^q=" ^""`n)+f(("ma!=putStr"+E["class~QR
{static~function~mX{neko .Lib.Z#{E[%(procedure~mX;i:=c:=0;s :=#{E[%(.class~public~QR`n.super~
#{$T="java/io/Pr!tStre am"}`n.method~public~static~ma!([L#{S="ja va/lang/"}SJ;)V~;]`n.limit~stac
k~2`ngetstatic~#{S}Sy stem/out~L#$T;`nldc~"#{e[%(class~QR{public~sta tic~void~ma!(SJ[]v){SJ~c[]=new
~SJ[99999],y="",z=y, s="#{z=t=(0..r=q=126).map{|n|[n,[]]};a="";b=->n{a< <(n%78+55)%84+42};("s=#{E["Z"
+Q[E[%(#$D;Void~mX{ putStr#{E[%(@s=global[#{i=(s=%(PR~"`x48AI^~1.2~PR~"VI SIBLE^~"#{Q["Z"+E[%(all:`n`t
@echo~'#{d["l!el:9 9999;Z#{E[%(.assembly~t{}.method~static~void~MX{.entrypo !t~ldstr"#{e[%(m:db`x60#{e[
s="$Z#{E[%(Zf#{E[ "#import"+M["Z_sJ"+E [%(s=toascii#{E["Z#{E[%(say"#{e["#$D(o utput);beg!~H(#{f((p="eval"
;%($_="#{s=%(<?ph p~function~f($n){ret urn~str_repeat("Y",$n);};$f="f";$z=3+$w =strlen($s=#{V[Q[E["!t~mX{
H#{E[%((________ ___)dup~=/s(|~~~~~.~ ~ ~|)def(#{Q["qr:-H('#{Q[e[%(for~c~!"".jo !(["say~'%s'^n"%l~for~l~!
#{E[d["eval$s=%q (#$s)",?']]}.split(" ^n" )]):Z('cat("r=fput(char(%d))^n")'%ord( c))`nZ('cat("end^n")'))],
?']}').",B]}){9~ 7{ exch~dup~1~and~79~mu l~32~ add~exch~2~idiv~3~1~roll~s~exch~2~!dex ~exch~put~1~sub~dup~6~eq
{1~sub}if}repeat ~s~=~pop~pop}forall~ =~quit) ]};return~0;}"]],"{$f(",")}"]})*3;echo "^x89PNG^r^n^x1a^n";$m="
";$t="^xc0^0^xff" ;for($i= -1;$i<128*$z;$m.=$c--?($w -$c||$i>$z)&&$i/$z<($c<$
w?ord($s[(!t)($c/3 )]) :$c--%3+2) ?$t[2]. $t[$c%3%2].$t [$c%3]: "^0^0^0":"^0")$c=++$i%$z;fo reach(array("I`x48DR".pa
ck("NNCV",$w+2,128, 8,2),"IDAT".gzco mpres s($m),"IEND")as $d)ec ho~pack("NA*N",strlen($d)-4, $d,crc32($d));?>);(s+N*(
-s.size%6)).unpack("B* ")[0].K(/.{6}/){n= $&. to_i~2;((n+14)/26 *6+ n+47).chr}}";s|.|$n=ord$&;sub str~unpack(B8,chr$n-!t($
n/32)*6-41),2|eg;Z~pack"B*", $_).scan(/[~,-: A -z]+|(.)/){p="s++#{ $ 1?"chr~#{$1.ord}+e":$&+?+};"+p };p),1){"'#$s',"}}'')end
."]}"`nend)]};quit"]};t=num2 cell(b=11-ceil(s /13));for~n=1:9m={};f or~i=1:141f=@(x,y,n)repmat(["Oo k"~x~"~Ook"~y~32],[1~abs
(n)]);m(i)=[f(z=46,63,n)~f(q =z-(i<13)*13,q, i -13)~f(33,z,1)~f(63 , z,n)];end;t(x)=m(diff([0 ~ s(x=b==n)])+13);end;Zf("
%%s",t{:}))]]]})+N]};"+N]}`x 60`nglobal~_s tar t`n_start:mov~edx ,#{ s.size}`nmov ~ e cx,m`nmov~ebx,1`nmov~e
ax,4`n!t~128`nmov~ebx,0`nmov~ eax,1`n!t~12 8)]}" call~void~[msco rlib] System.C o n sole::Write(sJ)ret})]
};quit();",?$].K(?'){"'^''"}} ')].K(/[:" ]/,":^0 "),/[~Y`t;"() {}`[`]] /]}"~PR~"`x4bT ` x 48`x58B`x59E~B`x59E)
).size+1}x~i8]c"#{s.K(/[^"]/){ "^%`x58"% $&.ord}}^00" d e clare~i32@puts(i8*)
def!e~i32@mX{%1=call~i32@puts( i8*getelementptr([#{i }x~i8]* @s,i32~0,i32~0))ret~i32~0 })]};})] ] ] };typeof~Z=='functi
on'?Z(s):console.log('%s',s)"). bytes{|n|r,z=z[n]||(b [r/78 ];b[r];q<6083&&z[n]=[q+=1,[]];t[n] ) } ;b[r/78];b[r]}";!t
~i=0,n=0,q=0;for(;++n<126;)c[n]= ""+(char)n;for(;i<s.l eng th();){q=q*78+(s.charAt(i)-13)%84;if ( i++%2>0){y=q<n?c[q
]:y;c[n++]=z+y.charAt(0);System.o ut.Z(z=c[q]);q=0;}}}} ) ]}"`n!vokevirtual~#$T/Zln(L#{S}SJ;)V ` nreturn`n.end~meth
od)+N]};H("DO,1<-#"||*s);s?while~t :=ord(move(1))do{i+: =1;u:=-i;every~0to~7do{u:=u*2+t%2;t / :=2};H("PLEASE")^
(i%4/3);H("DO,1SUB#"||i||"<-#"||((c -u)%256));c:=u;};H(" PLEASEREADOUT,1^nPLEASEGIVEUP");end ) ]};}}"]).tr(B,?&)
,51){%(show~"Z'#{e[$s].K~B+?",%("~"^ q"~")}'.tr('&','YY');"`n)}]]}^`");fim")})],62){"Zn#$ S`n"}]} );CloseStream(s);
QUIT;"]}")]}"~DUP~FOR~S"~&A,&"~C~NE`x5 8T~S^"~&A)^",&"~C~0~DO~B~."~&char("~COUNT~.~."~) ,&'"~CR~L OOP~S^"~&^"^""~C~
S"~end~#$D"~C~A~."~STOP"~CR~A~."~END"~C R~B`x59E~;~D~).K(?"){'"34,"'}+?"]],?%]]}.) ]}")),15){"Pr!t#$S; "}}}}"}]pq"]};}"]
}"))],'#{f(',')}']}))]}"))["~~~~^"~^".""S TOP~RUN."])](Zln(str"#{g*8}"s)))).re verse]}))]};}})]};}"]} /****//****/";t=
{};b="";L="";n=i=0;D=->n{L<<(n+62)%92+35;D}; s.bytes{|c|n>0?n-=1:(t[c]=(t [c]||[]).reject{|j|j<i-3 560};x=[];t[c].m
ap{|j|k=(0..90).f!d{|k|not~s[i+1+k]==s[j+k]}|| 91;k>4&&x<<[k ,j]};x=x.max)?(n,j=x;x=b.size;(u=[x,3999].m!;
D[u%87][u/87];L<<b[0,u];b[0,u]="";x-=u)while~x>0;x =4001+i-j;D[x%87][x/87][n-5]):b<<c;t[c]+=[i+=1]}
;%(d=#{Q[E[L]]};s="";while~0<len(d):`n~x~as~!t,y~as~!t =d;i=3;if(n=(x-5)%92+(y-5)%92*87)>3999:`n~~for~_~!~ra
nge(((d[2]cast~!t-5)%92+6)):s+=s[len(s)+4000-n]`n~else:s+=d[2 :i=n+2]`n~d=d[i:]`na=0;for~i~!~range(len(s)):b~as~!t=s[i];a-
=b;Z(('+'*-a~if~0>a~else'-'*a)+'.');a=b)).tr~B,?`x21]};K(/`x21/,"Y",s);for(Z"def!e~void~f(n){^"00g,^";for(m=128;m;m/=2){^"00g,4,:^";if(n/
m%2<1)^"4+^";^",^";};^"4,:,^"}^"389**6+44*6+00p29*,^";";++j<=length(s);Z"f("n");")for(n=9;substr(s,j,1)`x21=sZf("%c",++n););Z"^"4,:,@^"^n
quit"})]],?']}');)]}";FORiTO`~UPBtDO`~INTn:=ABSt[i];Z(~(50+n%64)+c+~(50+n%8MOD8)+c+~(50+nMOD8)+b+"`x4a"+a)OD]*"REPR"]}")]}");end;)]+"`nsy
s.exit~0",/[^{}]/]}}",35){y<<",`n"+$S;"%s"}}")+y}]]></#{U}></xsl:#{I}>"].K~N,'"&~VbLf~&"'}":s="~~~":For~i=0To~7:s~&=Chr(32-(Asc(c)>>7-i~A
nd~1)*23):Next:#{C}(s~&n~&Chr(9)&n~&"~~"):Next:#{C}(n~&n~&n):End~Sub:End~Module),3){%($H("%s",#$S);)+N}}end~endmodule)],?%]};return~0;}).
reverse],/[`[`]$]/],"[f~",?]]}"~^x60.&]k^n::=^na)]};Z"0~0~-1";)]]};),?']}';cr"]]]}"|sed~-E~-e~'s/([`x5eY]|Y.){1,120}/Zf("%s","^0");^n/g']
,7){%(Zf("%s","#{d[d[$s],?']}")`n)}}quit)]}")),196){%(Z#$S;)}}})).gsub(/[!HJKXYZ^`~]/){[B*2,:write,B,:tring,:gsub,"ain()",B*4,:print,g,:i
n][$&.ord%47%12]})))*"")#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_future_bug
############################# Quine Relay -- Copyright (c) 2013, 2014 Yusuke Endoh (@mametter), @hirekoke ############################)
Loading

0 comments on commit 182b703

Please sign in to comment.