Skip to content

Commit

Permalink
* the 79th language: BLC8
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Dec 2, 2014
1 parent 4de947b commit 0ab03d8
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 172 deletions.
116 changes: 62 additions & 54 deletions Makefile

Large diffs are not rendered by default.

113 changes: 57 additions & 56 deletions QR.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,61 @@
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[%(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="~v
ersion='1.0'"}?><?xml-#{I="stylesheet"}~type='te xt/xsl' href='QR .xslt'?><xsl:#{I+O}~xmlns:xsl='http://www.w3.org/1999/`x5
8SL/Transform'><xsl:output~method='text '/><# {U=" xsl: template"}~match='/'><`x21[CDATA[#{%(H,format="#{y="";f("^
H{-}{txt}{#{Q[E[%(with~Ada.Text_Io;pr oce d ure~qr~is~beg!~Ada.Text_Io.Put_L!e("#{d[%(Z"#{e[%
W[STRINGz:=~226+~153,a:=z+~16 6,b:= a +"2"+z+~160,c:=b+"8"+z+~165,t:="#{d[%(H('#{Q[e[%(i
mplement~mX=Z)+E[%(BEGIN{s=# {E[ %(f={n~as~!t|'Y'*n};a=0;s=#{V[Q[E["#!clu
de"+M["#!clude<iostream>`n! t ~mX{std::cout<<#{E[%(class~Program{public
~static~void~MX{System.#{C +E[(%((doseq[s(lazy-cat["IDENTIFIC
ATION~DIVISION.""PROGRAM- ID.~QR.""PROCEDURE~DIVISION."'DISPL
A`x59](map~#(str"~~~~^"" (.replace~%1"^"""^"^"")"^"&")(
re-seq~#".{1,45}""#{e[% ((f=(n)->Array(n+1).jo!~"Y");co
nsole.log("%s",#{V[E[ %((H-l!e" #{e[%(~:~A~."#{g*9}"~;~:~B~
A~."~WRITE(*,*)'"~A ~;~:~C~B~T`x59PE~."~'"~CR ~;~:~D~S"~#$D"~C~S^"~Z~^"(&"
~C~S^"~#{e[%(packa ge~ma!;import"fmt";func~mX{fmt.Pr! t#{E[%(Z'#{e[("ma!=putStr"+
E[%(procedure~mX ;i:=c:=0;s:=#{E[%(.class~public~QR`n.supe r~#{$T="java/io/Pr!tStrea
m"}`n.method~pu blic~static~ma!([L#{S="java/lang/"}SJ;)V~;]`n. limit~stack~2`ngetstatic
~#{S}System/ou t~L#$T;`nldc~"#{e[%(class~QR{public~static~void~ma !(SJ[]v){SJ~c[]=new~SJ[
9000],y="",z= y,s="#{z=t=(0..r=q=126).map{|n|[n,[]]};a="";b=->n{a<< (n%78+55)%84+42};("s=#
{E[%(@s=glob al[#{i=(s=%(PR~"`x48AI^~1.2~PR~"VISIBLE^~"#{Q["Z"+E[%(al l:`n`t@echo~'#{d["l!e
l:99999;Z#{ E[%(.assembly~t{}.me thod~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( output);beg!~H(#{f((
p="eval";% ($_="#{s=%(<?php~fun c tion~f($n){return~str_repeat("Y",$n);}; $f="f";$z=3+$w=strl
en($s=#{V[ Q[E["!t~mX{H#{E[%((_ ___ _______)dup~=/s(|~~~~~.~~~|)def(#{Q["q r:-H('#{Q[e[%(for~c
~!"".jo!([ "s ay~'%s'^n"%l~for~l~! #{E[d [%(eval$s=%q(#$s)),?']]}.split("^n")]) :Z('cat("r=fput(ch
ar(%d))^n" )'%ord(c))`nZ('cat(" end^n") '))],?']}').",B]}){9~7{exch~dup~1~and~ 79~mul~32~add~exch
~2~idiv~3~1 ~roll~s~ exch~2~!dex~exch~put~1~su b~dup~6~eq{1~sub}i
f}repeat~s~= ~po p~pop}fora ll~=~qu it)]};return~ 0;}"]], "{$f(",")}"]})*3;echo"^x89P NG^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; foreach(array("I`x48DR".pack( "NNCV",$w+2,128,8,
2),"IDAT".gzcompress($ m),"IEND")as$d) e cho~pack("NA*N",str l en($d)-4,$d,crc32($d));?>);(s+ N*(-s.size%6)).unp
ack("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 um2 cell(b=11-ceil(s/ 13) );for~n=1:9m = { };for~i=1:141f=@
(x,y,n)repmat(["Ook"~x~ "~Ook"~y~32] ,[1~a bs(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(di ff([0~s(x=b== n)])+13 );end;Zf("%%s" , t {:}))]]]})+N]}
;"+N]}`x60`nglobal~_star t`n_start :mov~edx,#{s . s ize}`nmov~ecx
,m`nmov~ebx,1`nmov~eax,4 `n!t~128`nmov~ebx,0`n mov~eax ,1`n!t~128)]}"call~void~[ mscorlib ] S ystem.Console
::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"declare~i32@put s (i8*)def!e~i
32@mX{%1=call~i32@puts(i8*g etelementptr([#{i}x~i 8 ]*@s,i32~0,i32~0))ret~i32~0})]};type o f~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.length();){q=q*7 8 +(s.charAt(
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!vokevirt
ual~#$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,1SUB#"||i||"< -#"||((c-u)%256));c :=u;};H("PL
EASEREADOUT,1^nPLEASEGIVEUP");end)] ).tr(B,?&)]}'.tr('&','YY');)]};})]}" ~DUP~FOR~S"~&A,&"~C~NE `x58T~S^"~
&A)^",&"~C~0~DO~B~."~&char("~COUNT~.~. "~),&'"~CR~LOOP~S^"~&^"^""~C ~S"~end~#$D"~C~A~."~STOP "~CR~A~."~
END"~CR~B`x59E~;~D~)]}"))],'#{f(',')}']} ))]}"))["~~~~ ^"~^".""STOP~RUN."])](Zln(str"#{g*8}"s)
))))]};}})]};}"]]],"$(f(","))"]};for~i~!~ran ge(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);K(/./,"^"&^",",s);K(/"""/,"75*1-",s);K(/
Y/,"YY",s);K(/"/,"Yq",s);Z~"Z^"",s,"@","^"";Z~"quit";}) ]],?']}');)]}";FORiTO`~UPBtDO`~INTn:=ABSt[i];Z(~(50+n%
64)+c+~(50+n%8MOD8)+c+~(50+nMOD8)+b+"`x4a"+a)OD]*"REPR"]}")]}");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_#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for
ersion='1.0'"}?><?xml-#{I="stylesheet"}~type='text/xsl'href='QR.xslt'?><xsl:#{I+O}~xmlns:xsl='http://www.w3.org/1999/`x58SL/T
ransform'><xsl:output~method='text'/><#{U="xsl:t emplate "}~match ='/'><`x21[CDATA[#{%(H,format="#{y="";f("^H{-}{txt}{#{Q[E
[%(with~Ada.Text_Io;procedure~qr~is~beg !~Ada .Tex t_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[%(f={n~as
~!t|'Y'*n};a=0;s=#{V[Q[E["#!c lude" + M["#!clude<iostream>`n!t~mX{std::cout<<#{E[%(class
~Program{public~static~void~ MX{ System.#{C+E[(%((doseq[s(lazy-cat["IDENT
IFICATION~DIVISION.""PROGRA M -ID.~QR.""PROCEDURE~DIVISION."'DISPLA`x59
](map~#(str"~~~~^""(.repla ce~%1"^"""^"^"")"^"&")(re-seq~#".{
1,45}""#{e[%((f=(n)->Arra y(n+1).jo!~"Y");console.log("%s",#{
V[E[%((H-l!e"#{e[%(~:~A~ ."#{g*9}"~;~:~B~A~."~WRITE(*,*
)'"~A~;~:~C~B~T`x59PE~. "~'"~CR~;~:~D~S"~#$D"~C~S^"~Z~^
"(&"~C~S^"~#{e[%(pack age~ma!;i mport"fmt";func~mX{fmt.Pr!t
#{E[%(Z'#{e[("ma!=p utStr"+E[%(procedure~mX;i :=c:=0;s:=#{E[%(.class~publi
c~QR`n.super~#{$T= "java/io/Pr!tStream"}`n.method~pub lic~static~ma!([L#{S="java/
lang/"}SJ;)V~;]` n.limit~stack~2`ngetstatic~#{S}System/out ~L#$T;`nldc~"#{e[%(class~
QR{public~stati c~void~ma!(SJ[]v){SJ~c[]=new~SJ[9000],y="",z=y ,s="#{z=t=(0..r=q=126).m
ap{|n|[n,[]]}; a="";b=->n{a<<(n%78+55)%84+42};("s=#{E[%(@s=global [#{i=(s=%(PR~"`x48AI^~1
.2~PR~"VISIBL E^~"#{Q["Z"+E[%(all:`n`t@echo~'#{d["l!el:99999;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(output);beg!~H(#{f((p="eval";%($_= "#{s=%(<?php~function
~f($n){retu rn~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)),?']]}.spl it( "^n")]):Z('cat("r=fput(char(%d))^n")'% ord(c))`nZ('cat("en
d^n")'))], ?' ]}').",B]}){9~7{exch ~dup~ 1~and~79~mul~32~add~exch~2~idiv~3~1~ro ll~s~exch~2~!dex~e
xch~put~1~ sub~dup~6~eq{1~sub}i f}repea t~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 ".pack("NNCV",$w+2,128,8,2), "IDAT".gzcompress(
$m),"IEND")as$d) echo~pack("NA*N",s trl en($d)-4,$d,crc32 ($d ));?>);(s+N*(-s.size%6)).unpa ck("B*")[0].K(/.{6
}/){n=$&.to_i~2;((n+14 )/26*6+n+47).ch r }}";s|.|$n=ord$&;su b 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=num2cell(b=1 1-ceil(s/13));f o r~n=1:9m={};for~i=1 : 141f=@(x,y,n)repmat(["Oo k "~x~"~Ook"~y~32],[
1~abs(n)]);m(i)=[f(z=4 6,63,n)~f(q=z -(i <13)*13,q,i-13)~f (33 ,z,1)~f(63,z , n )];end;t(x)=m(di
ff([0~s(x=b==n)])+13);e nd;Zf("%%s", t{:}) )]]]})+N]};"+N] }`x60 `nglobal ~ _ start`n_start:m
ov~edx,#{s.size}`nmov~e cx,m`nmov~ ebx,1`n mov~eax,4`n!t ~128`nm ov~ebx,0`nmov~ e a x,1`n!t~128)]}
"call~void~[mscorlib]Sys tem.Conso le::Write(sJ ) r et})]};quit()
;",?$].K(?'){"'^''"}}')] .K(/[:"]/,":^0"),/[~Y `t;"(){ }`[`]]/]}"~PR~"`x4bT`x48` x58B`x59 E ~ B`x59E)).size
+1}x~i8]c"#{s.K(/[^"]/){" ^%`x58"%$&.ord}}^00"d eclar e~i32@puts(i8*)def!e~i32@mX{%1=cal l ~ i32@puts(i8*
getelementptr([#{i}x~i8]*@ s,i32~0,i32~0))ret~i3 2~0 })]};typeof~Z=='function'?Z(s):conso l e.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;f
or(;++n<126;)c[n]=""+(char)n ;for(;i<s.length();) {q=q*78+(s.charAt(i)-13)%84;if(i++% 2 >0){y=q<n?c
[q]:y;c[n++]=z+y.charAt(0);Sy stem.out.Z(z=c[q]);q =0;}}}})]}"`n!vokevirtual~#$T/Zln(L # {S}SJ;)V`nr
eturn`n.end~method)+N]};H("DO, 1<-#"||*s);s?while~t:=ord(move(1))do{i+:=1;u:=-i;eve ry~0to~ 7do{u:=u*2+
t%2;t/:=2};H("PLEASE")^(i%4/3);H ("DO,1SUB#"||i||"<-#"||((c-u)%256));c:=u;};H("PL EASEREADO UT,1^nPLEAS
EGIVEUP");end)]).tr(B,?&)]}'.tr(' &','YY');)]};})]}"~DUP~FOR~S"~&A,&"~C~NE`x 58T~S^"~&A)^",&"~C~ 0~DO~B~."~&
char("~COUNT~.~."~),&'"~CR~LOOP~S^" ~&^"^""~C~S"~end~#$D"~C~A~."~STOP"~C R~A~."~END"~CR~B`x59E~ ;~D~)]}"))
],'#{f(',')}']}))]}"))["~~~~^"~^".""ST OP~RUN."])](Zln(str"#{g*8}"s )))))]};}})]};}"]]],"$(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"]}")]}");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~",?]]}"~^x6
0.&]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%4
7%12]})))*"")#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_future_bu
####################### Quine Relay -- Copyright (c) 2013, 2014 Yusuke Endoh (@mametter), @hirekoke ######################)
Loading

0 comments on commit 0ab03d8

Please sign in to comment.