diff --git a/.gitignore b/.gitignore index 6c69997..b5c0b49 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ gst.im /src/blc-boot.dat /src/grass-boot.dat *.sw* +tmp.*proj diff --git a/Dockerfile b/Dockerfile index a831195..a0164be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,8 @@ RUN chronic apt-get -qq install -y asymptote ats2-lang bash bc && chronic apt-ge RUN chronic apt-get -qq install -y bison bsdgames bsh clisp && chronic apt-get clean RUN chronic apt-get -qq install -y clojure cmake coffeescript crystal && chronic apt-get clean RUN chronic apt-get -qq install -y curl dafny dc dhall && chronic apt-get clean -RUN chronic apt-get -qq install -y elixir emacs-nox erlang f2c && chronic apt-get clean -RUN chronic apt-get -qq install -y fish flex fp-compiler fsharp && chronic apt-get clean +RUN chronic apt-get -qq install -y dotnet7 elixir emacs-nox erlang && chronic apt-get clean +RUN chronic apt-get -qq install -y f2c fish flex fp-compiler && chronic apt-get clean RUN chronic apt-get -qq install -y g++ gambas3-gb-pcre gambas3-scripter gap && chronic apt-get clean RUN chronic apt-get -qq install -y gawk gcc gdb gdc && chronic apt-get clean RUN chronic apt-get -qq install -y genius gforth gfortran ghc && chronic apt-get clean @@ -22,17 +22,17 @@ RUN chronic apt-get -qq install -y iverilog jasmin-sable jq kotlin && chronic ap RUN chronic apt-get -qq install -y ksh libevent-dev libgd-dev libpng-dev && chronic apt-get clean RUN chronic apt-get -qq install -y libpolyml-dev lisaac livescript llvm && chronic apt-get clean RUN chronic apt-get -qq install -y lua5.3 m4 make maxima && chronic apt-get clean -RUN chronic apt-get -qq install -y minizinc mono-devel mono-mcs mono-vbnc && chronic apt-get clean -RUN chronic apt-get -qq install -y nasm neko nickle nim && chronic apt-get clean -RUN chronic apt-get -qq install -y node-typescript nodejs ocaml octave && chronic apt-get clean -RUN chronic apt-get -qq install -y openjdk-11-jdk pari-gp parser3-cgi perl && chronic apt-get clean -RUN chronic apt-get -qq install -y php-cli polyml python3 r-base && chronic apt-get clean -RUN chronic apt-get -qq install -y rakudo ratfor rc regina-rexx && chronic apt-get clean -RUN chronic apt-get -qq install -y ruby ruby-mustache rustc scala && chronic apt-get clean -RUN chronic apt-get -qq install -y scilab-cli sed slsh spin && chronic apt-get clean -RUN chronic apt-get -qq install -y surgescript swi-prolog tcl tcsh && chronic apt-get clean -RUN chronic apt-get -qq install -y valac vim wabt xsltproc && chronic apt-get clean -RUN chronic apt-get -qq install -y yabasic yorick zoem zsh && chronic apt-get clean +RUN chronic apt-get -qq install -y minizinc mono-devel nasm neko && chronic apt-get clean +RUN chronic apt-get -qq install -y nickle nim node-typescript nodejs && chronic apt-get clean +RUN chronic apt-get -qq install -y ocaml octave openjdk-11-jdk pari-gp && chronic apt-get clean +RUN chronic apt-get -qq install -y parser3-cgi perl php-cli polyml && chronic apt-get clean +RUN chronic apt-get -qq install -y python3 r-base rakudo ratfor && chronic apt-get clean +RUN chronic apt-get -qq install -y rc regina-rexx ruby ruby-mustache && chronic apt-get clean +RUN chronic apt-get -qq install -y rustc scala scilab-cli sed && chronic apt-get clean +RUN chronic apt-get -qq install -y slsh spin surgescript swi-prolog && chronic apt-get clean +RUN chronic apt-get -qq install -y tcl tcsh valac vim && chronic apt-get clean +RUN chronic apt-get -qq install -y wabt xsltproc yabasic yorick && chronic apt-get clean +RUN chronic apt-get -qq install -y zoem zsh && chronic apt-get clean ADD . /usr/local/share/quine-relay WORKDIR /usr/local/share/quine-relay RUN make -C vendor diff --git a/Makefile b/Makefile index e6cced1..b76df56 100644 --- a/Makefile +++ b/Makefile @@ -215,8 +215,8 @@ QR.wasm: QR.vb @echo "## 22: Visual Basic -> WebAssembly (Binary format) ##" @echo "#######################################################" @echo - vbnc QR.vb - mono ./QR.exe > QR.wasm + echo 'Exenet7.0false' > tmp.vbproj + DOTNET_NOLOGO=1 dotnet run --project tmp.vbproj > QR.wasm QR.wat: QR.wasm @echo @@ -438,8 +438,8 @@ QR.chef: QR.cs @echo "## 49: C# -> Chef ##" @echo "######################" @echo - mcs QR.cs - mono QR.exe > QR.chef + echo 'Exenet7.0false' > tmp.csproj + DOTNET_NOLOGO=1 dotnet run --project tmp.csproj > QR.chef QR.clj: QR.chef @echo @@ -563,8 +563,8 @@ QR.false: QR.fsx @echo "## 64: F# -> FALSE ##" @echo "#######################" @echo - fsharpc QR.fsx -o QR.exe - mono QR.exe > QR.false + echo 'Exenet7.0false' > tmp.fsproj + DOTNET_NOLOGO=1 dotnet run --project tmp.fsproj > QR.false QR.fl: QR.false @echo diff --git a/QR.rb b/QR.rb index ef923b1..fab547f 100644 --- a/QR.rb +++ b/QR.rb @@ -3,10 +3,10 @@ (m=c;n=f)};v=n+v;s.K(n,(j%256).chr)},v]};%(fn~mX{Z`x21("{}",#{E["object~QR~extends~App{#{f(%((display~"#{e[%(Zf("1d;s/.//;s/1/~the~sum~of~a~son~and0/g;s/0/~twice/g;s/2/`x59ou~are~as~bad~as/g;s/3/~a~son`x21Speak~your~m!d`x21/g^n#The~Relay~of~Qu!e.^ n#Ajax,~a~man.^n#Ford,~a~man.^n#Act~i:~Qu!e.^n#Scene~i:~Relay.^n#[Enter~Ajax~and~Ford]^n#Ajax:^n#");function[]=f(s);for~i=1:2:length(s),Zf("2%s3",part(dec2b!(hex2dec(part(s,i:i+1))),$:-1:2)),end;endfunction`n#{s,v=rp["Transcript~show:~'#{d[%(fun~p ~n=Z(Int.toSJ~n`x5e"~");fun~mX=(p~0;p~0;p~130;List.tabulate(127,p);SJ.map(fn~c=>(p(3+ord~c);Z"-1~0~";c))#{E[~~~~~~%(object"Application"{state"ma!"{foreach(s~![#{f(%(puts~"#{Q[e[%(echo~'a::=`x7e#{Q[Q["let~s=#{E[%(void~p(!t[]c){foreach(!t~v~!~c)stdo -ut.Zf("%c%c",v/256,v%256);}void~mX{!t[]a;p({19796,26724,0,6,0,1,480,19796,29291,#{s=%(module~QR;!itial~beg!~#{f("let~s=#{E[%(Module~QR:Sub~MX:Dim~c,n,s~As~Object=#{C[0]}.OpenStandardOutput(),t()As~Short={26,34,86,127,148,158,200}:For~Each~c~!"Basm +ut.Zf("%c%c",v/256,v%256);}void~mX{!t[]a;p({19796,26724,0,6,0,1,480,19796,29291,#{s=%(module~QR;!itial~beg!~#{f((%(Module~QR`nSub~MX`nDim~c,n:Dim~s~As~Object=#{C[0]}.OpenStandardOutput():Dim~t()As~Short={26,34,86,127,148,158,200}:For~Each~d~!"Basm CBBBCRE`x60F<<<D`x21BE@ABRCABRCABRCA`x4a`x21CE@~B-BB~CACk:CvACqRC~COBMADRCACRCADRCABRCABRC~BACj:B-BBOBMADRCADRCADRCAFRCMM} CBABM`x7e#{40.chr}BBBCBBB,BBBDBBB0BBBDBBB4BBB=BBB?BBB;BBB~...^t..^n..(module(import~:wasi_snapshot_preview1:~:fd_H:~(func(param~i32~i32~i32~i32)(result~i32)))(memory(export~:memory:)(data~:^08^00^00^00$:))(func(export~:_start:)i32.const~1~i32.cons -t~0~i32.const~1~i32.const~0~call~0~drop))":c=Asc(c):If~c=36:For~c=0To~11:#$W(If(c~Mod~3,Asc(#{s="<#{U="xsl:template"}~match='/'><`x21[C DATA[#{%( sub~f(s$,n)Z(s$);:for~i=1to~n~Z("Y");:next:end~sub:f("#{V[e[%(H,format="#{y="";f("^H{-}{txt}{#{Q["echo~-E~$'#{Q[Q[E[%(with~Ada.Text_Io;procedure~qr~is~beg!~Ada.Text_Io.Put(" #{d[%(trans~B(Buffer)`ntrans~O(n){`nB:add(Byte(+~12 8~n))} `ntr ans~f(v~ n){`nO(+(/~n~64)107)`nO(n:mod~64)`nO~v}`ntrans~D(n){if(<~n~4){f(+(*~6~n)9)48}{if(n:odd-p){D(-~n~3)`nf~27~48`nf~36~11}{D(/~n~2)`nf~21~48`nf~48~20}}}`ntrans~S(Buffe r"#{e[%W[STRINGz:=~226+~153,a:=z+~166,b:=a+"2"+z+ ~16 0 ,c:=b+"8"+z+~165,t:="#{d[%(class~QR{#$L~void~ma!(SJ[]a){a=#{E["H('#{Q[e["implement~m a!0()=Z"+E["BEGIN{Z#{E[%(echo~'#{%(f(s){System.out.Z(s);}s="389 @@ -58,8 +58,8 @@ e"}]}.split("Y`x5e");for(!t~i=1;i";s.size*16+3}.ToSJ("x8")(1`x58or~7-c*2^3)),92)):Next:Else:n=(c>124)*(8*c-#{s.size+1294}):Do~While~n>127:#$W(128+(127And~n)):n^=128:Loop:#$W(If(c<125,If((c-1)^7-8,c+66*(c>65And~c<91),t(c-57)),n)):End~If:Next:For~Each~ -c~!"#{d[s].K~N,'"&~VbLf~&"'}":#$W(Asc(c)):Next:End~Sub:End~Module)]}`nput=s`nZ`nqa`x21",3){%($H("%s",#$S);)+N}}end~endmodule);W=s.size*72+4;"%d,%d"%[W/65536,W%65536]}});foreach(!t~c~!#{E[s]}.data)foreach(!t~v~!~a={0,9,7,4,5,c/100*7/6+1,c%100/10*7/ -6+1,c%10*7/6+1,7})p({144,v=15450+v*256,384,v});p({255,12032});})]},i=0,t='k';while(s[i])t='^x60.'+s[i++]+t;console.log(t)",B],?`x21].K(?',%('"'"'))}'"^n::=^na")],/[`[`]$]/]}"),4){$S+?,}}])Console.H(s);Application.exit();}})]};Z"0~0~-1");),?']}';cr -",127..255];f(%(variable~s=`x60#{s.K(/.{1,234}/){$&.K("`x60",%(`x60+"`x60"+`x60))+"`x60+`n`x60"}}`x60,i;for(i=0;i<129;i++)s=strreplace(s,pack("C",255-i),substrbytes(`x60#{v[0,99]}`x60+`n`x60#{v[99..-1]}`x60,i*2+1,2));Zf("%s",s)),7){"f('%s')`n"%$s. -unpack("`x48*")}}Zf("^n#[Exeunt]");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_b +c~!"#{d[s].K~N,'"&~VbLf~&"'}":#$W(Asc(c)):Next:End~Sub:End~Module)).l!es.map{|s|"let~s=#{E[s]}`nput=s`nZ`n"}.jo!+"qa`x21",3){%($H("%s",#$S);)+N}}end~endmodule);W=s.size*72+4;"%d,%d"%[W/65536,W%65536]}});foreach(!t~c~!#{E[s]}.data)foreach(!t~v~!~a= +{0,9,7,4,5,c/100*7/6+1,c%100/10*7/6+1,c%10*7/6+1,7})p({144,v=15450+v*256,384,v});p({255,12032});})]},i=0,t='k';while(s[i])t='^x60.'+s[i++]+t;console.log(t)",B],?`x21].K(?',%('"'"'))}'"^n::=^na")],/[`[`]$]/]}"),4){$S+?,}}])Console.H(s);Application. +exit();}})]};Z"0~0~-1");),?']}';cr",127..255];f(%(variable~s=`x60#{s.K(/.{1,234}/){$&.K("`x60",%(`x60+"`x60"+`x60))+"`x60+`n`x60"}}`x60,i;for(i=0;i<129;i++)s=strreplace(s,pack("C",255-i),substrbytes(`x60#{v[0,99]}`x60+`n`x60#{v[99..-1]}`x60,i*2+1, +2));Zf("%s",s)),7){"f('%s')`n"%$s.unpack("`x48*")}}Zf("^n#[Exeunt]");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_futu #################################################################################### Quine Relay -- Copyright (c) 2013, 2014 Yusuke Endoh (@mametter), @hirekoke ###################################################################################) diff --git a/README.md b/README.md index 94cef66..d0200e6 100644 --- a/README.md +++ b/README.md @@ -29,17 +29,17 @@ First, you need to type the following apt-get command to install them all. $ sudo apt-get install afnix algol68g aplus-fsf aspectj asymptote \ ats2-lang bash bc bsdgames bsh clisp clojure cmake coffeescript \ - crystal dafny dc dhall elixir emacs-nox erlang f2c fish flex \ - fp-compiler fsharp g++ gambas3-gb-pcre gambas3-scripter gap gawk gcc \ - gdb gdc genius gforth gfortran ghc ghostscript gnat gnu-smalltalk \ - gnucobol4 gnuplot gobjc golang gpt groovy guile-3.0 gzip haxe icont \ - iconx intercal iverilog jasmin-sable jq kotlin ksh libevent-dev \ + crystal dafny dc dhall dotnet7 elixir emacs-nox erlang f2c fish flex \ + fp-compiler g++ gambas3-gb-pcre gambas3-scripter gap gawk gcc gdb gdc \ + genius gforth gfortran ghc ghostscript gnat gnu-smalltalk gnucobol4 \ + gnuplot gobjc golang gpt groovy guile-3.0 gzip haxe icont iconx \ + intercal iverilog jasmin-sable jq kotlin ksh libevent-dev \ libpolyml-dev lisaac livescript llvm lua5.3 m4 make maxima minizinc \ - mono-devel mono-mcs mono-vbnc nasm neko nickle nim node-typescript \ - nodejs ocaml octave openjdk-11-jdk pari-gp parser3-cgi perl php-cli \ - polyml python3 r-base rakudo ratfor rc regina-rexx ruby ruby-mustache \ - rustc scala scilab-cli sed slsh spin surgescript swi-prolog tcl tcsh \ - valac vim wabt xsltproc yabasic yorick zoem zsh + mono-devel nasm neko nickle nim node-typescript nodejs ocaml octave \ + openjdk-11-jdk pari-gp parser3-cgi perl php-cli polyml python3 r-base \ + rakudo ratfor rc regina-rexx ruby ruby-mustache rustc scala scilab-cli \ + sed slsh spin surgescript swi-prolog tcl tcsh valac vim wabt xsltproc \ + yabasic yorick zoem zsh Then, build the bundled interpreters. @@ -71,7 +71,8 @@ Then, build the bundled interpreters. $ mono vendor/local/bin/Vlt.exe /s QR.mid && mono QR.exe > QR.v $ iverilog -o QR QR.v && ./QR -vcd-none > QR.vim $ vim -EsS QR.vim > QR.vb - $ vbnc QR.vb && mono ./QR.exe > QR.wasm + $ echo 'Exenet7.0false' > tmp.vbproj && + DOTNET_NOLOGO=1 dotnet run --project tmp.vbproj > QR.wasm $ $(WASI_RUNTIME) QR.wasm > QR.wat $ wat2wasm QR.wat -o QR.wat.wasm && $(WASI_RUNTIME) QR.wat.wasm > QR.ws $ ruby vendor/whitespace.rb QR.ws > QR.xslt @@ -98,7 +99,8 @@ Then, build the bundled interpreters. $ ruby vendor/bf.rb QR.bf > QR.c $ gcc -o QR QR.c && ./QR > QR.cpp $ g++ -o QR QR.cpp && ./QR > QR.cs - $ mcs QR.cs && mono QR.exe > QR.chef + $ echo 'Exenet7.0false' > tmp.csproj && + DOTNET_NOLOGO=1 dotnet run --project tmp.csproj > QR.chef $ PERL5LIB=vendor/local/lib/perl5 compilechef QR.chef QR.chef.pl && perl QR.chef.pl > QR.clj $ clojure QR.clj > QR.cmake @@ -114,7 +116,8 @@ Then, build the bundled interpreters. $ elixir QR.exs > QR.el $ emacs -Q --script QR.el > QR.erl $ escript QR.erl > QR.fsx - $ fsharpc QR.fsx -o QR.exe && mono QR.exe > QR.false + $ echo 'Exenet7.0false' > tmp.fsproj && + DOTNET_NOLOGO=1 dotnet run --project tmp.fsproj > QR.false $ ruby vendor/false.rb QR.false > QR.fl $ flex -o QR.fl.c QR.fl && gcc -o QR QR.fl.c && ./QR > QR.fish $ fish QR.fish > QR.fs @@ -239,8 +242,8 @@ I used the following Ubuntu deb packages to test this program. 18 |Vala |valac |0.56.7-1 19 |Velato |*N/A* |- 20 |Verilog |iverilog |11.0-1.1 -21 |Vimscript |vim |2:9.0.1000-4ubuntu3 -22 |Visual Basic |mono-vbnc |4.0.1-3 +21 |Vimscript |vim |2:9.0.1000-4ubuntu3.1 +22 |Visual Basic |dotnet7 |7.0.111-0ubuntu1\~23.04.1 23 |WebAssembly (Binary format) |wabt |1.0.32-1 24 |WebAssembly (Text format) |wabt |1.0.32-1 25 |Whitespace |*N/A* |- @@ -267,7 +270,7 @@ I used the following Ubuntu deb packages to test this program. 46 |Brainfuck |*N/A* |- 47 |C |gcc |4:12.2.0-3ubuntu1 48 |C++ |g++ |4:12.2.0-3ubuntu1 -49 |C# |mono-mcs |6.8.0.105+dfsg-3.3 +49 |C# |dotnet7 |7.0.111-0ubuntu1\~23.04.1 50 |Chef |*N/A* |- 51 |Clojure |clojure |1.11.1-2 52 |CMake |cmake |3.25.1-1ubuntu1 @@ -282,7 +285,7 @@ I used the following Ubuntu deb packages to test this program. 61 |Elixir |elixir |1.14.0.dfsg-2 62 |Emacs Lisp |emacs-nox |1:28.2+1-13ubuntu3 63 |Erlang |erlang |1:25.2.3+dfsg-1 -64 |F# |fsharp |4.0.0.4+dfsg2-2 +64 |F# |dotnet7 |7.0.111-0ubuntu1\~23.04.1 65 |FALSE |*N/A* |- 66 |Flex |flex |2.6.4-8.1 67 |Fish |fish |3.6.0-3 @@ -305,7 +308,7 @@ I used the following Ubuntu deb packages to test this program. 84 |Icon |icont, iconx |9.4.3-7ubuntu1 85 |INTERCAL |intercal |30:0.30-3 86 |Jasmin |jasmin-sable |2.5.0-2 -87 |Java |openjdk-11-jdk |11.0.18+10-0ubuntu5 +87 |Java |openjdk-11-jdk |11.0.20.1+1-0ubuntu1\~23.04 88 |JavaScript |nodejs |18.13.0+dfsg1-1ubuntu2 89 |Jq |jq |1.6-2.1ubuntu3 90 |JSFuck |nodejs |18.13.0+dfsg1-1ubuntu2 @@ -334,11 +337,11 @@ I used the following Ubuntu deb packages to test this program. 113 |PARI/GP |pari-gp |2.15.2-1 114 |Parser 3 |parser3-cgi |3.4.6-3 115 |Pascal |fp-compiler |3.2.2+dfsg-18ubuntu1 -116 |Perl 5 |perl |5.36.0-7 +116 |Perl 5 |perl |5.36.0-7ubuntu0.23.04.1 117 |Perl 6 |rakudo |2022.12-1 118 |PHP |php-cli |2:8.1+92ubuntu1 119 |Piet |*N/A* |- -120 |PostScript |ghostscript |10.0.0\~dfsg1-0ubuntu1.1 +120 |PostScript |ghostscript |10.0.0\~dfsg1-0ubuntu1.3 121 |PPT (Punched tape) |bsdgames |2.17-29 122 |Prolog |swi-prolog |9.0.4+dfsg-1ubuntu2 123 |Promela (Spin) |spin |6.5.2+dfsg-1 diff --git a/langs.png b/langs.png index 08b4b11..df27d35 100644 Binary files a/langs.png and b/langs.png differ diff --git a/src/code-gen.rb b/src/code-gen.rb index 681dfbf..a7b3f5b 100644 --- a/src/code-gen.rb +++ b/src/code-gen.rb @@ -798,8 +798,20 @@ class FALSELang < CodeGen class FSharp < CodeGen Name = "F#" File = "QR.fsx" - Cmd = "fsharpc QR.fsx -o QR.exe && mono QR.exe > OUTFILE" - Apt = "fsharp" + fsproj = <<-END + + + Exe + net7.0 + false + + + + + + END + Cmd = %(echo '#{ fsproj.lines.map {|s| s.strip }.join }' > tmp.fsproj && DOTNET_NOLOGO=1 dotnet run --project tmp.fsproj > OUTFILE) + Apt = "dotnet7" Code = %q('printfn("""'+d[PREV,?%]+' """)') end @@ -950,11 +962,23 @@ def code class CSharp_Chef < CodeGen Name = ["C#", "Chef"] File = ["QR.cs", "QR.chef"] + csproj = <<-END + + + Exe + net7.0 + false + + + + + + END Cmd = [ - "mcs QR.cs && mono QR.exe > OUTFILE", + %(echo '#{ csproj.lines.map {|s| s.strip }.join }' > tmp.csproj && DOTNET_NOLOGO=1 dotnet run --project tmp.csproj > OUTFILE), "PERL5LIB=vendor/local/lib/perl5 compilechef QR.chef QR.chef.pl && perl QR.chef.pl > OUTFILE" ] - Apt = ["mono-mcs", nil] + Apt = ["dotnet7", nil] def code <<-'END'.lines.map {|l| l.strip }.join %( @@ -1295,20 +1319,30 @@ def code class VisualBasic_WebAssemblyBinary_WebAssemblyText_Whitespace < CodeGen Name = ["Visual Basic", "WebAssembly (Binary format)", "WebAssembly (Text format)", "Whitespace"] File = ["QR.vb", "QR.wasm", "QR.wat", "QR.ws"] + vbproj = <<-END + + + Exe + net7.0 + false + + + + + + END Cmd = [ - "vbnc QR.vb && mono ./QR.exe > OUTFILE", + %(echo '#{ vbproj.lines.map {|s| s.strip }.join }' > tmp.vbproj && DOTNET_NOLOGO=1 dotnet run --project tmp.vbproj > OUTFILE), "$(WASI_RUNTIME) QR.wasm > OUTFILE", "wat2wasm QR.wat -o QR.wat.wasm && $(WASI_RUNTIME) QR.wat.wasm > OUTFILE", "ruby vendor/whitespace.rb QR.ws > OUTFILE" ] - Apt = ["mono-vbnc", "wabt", "wabt", nil] + Apt = ["dotnet7", "wabt", "wabt", nil] def code r = <<-'END'.lines.map {|l| l.strip }.join(?:) - %(Module QR - Sub Main() - Dim c,n,s As Object=#{C[0]}.OpenStandardOutput(),t()As Short={@@TBL@@} - For Each c in"@@DATA1@@}@@DATA2@@~@@DATA3@@$@@DATA4@@" - c=Asc(c) + %(Module QR\nSub Main()\nDim c,n:Dim s As Object=#{C[0]}.OpenStandardOutput():Dim t()As Short={@@TBL@@} + For Each d in"@@DATA1@@}@@DATA2@@~@@DATA3@@$@@DATA4@@" + c=Asc(d) If c=36 For c=0To 11 #$W(If(c Mod 3,Asc(#{s=PREV;s.size*16+3}.ToString("x8")(1Xor 7-c*2\\3)),92)) @@ -1351,7 +1385,11 @@ class VimScript < CodeGen Apt = "vim" File = "QR.vim" Cmd = "vim -EsS QR.vim > OUTFILE" - Code = %q("let s=#{E[PREV]}\nput=s\nprint\nqa!") + def code + <<-'END'.lines.map {|l| l.strip }.join + (PREV).lines.map{|s|"let s=#{E[s]}\nput=s\nprint\n"}.join+"qa!" + END + end end class Verilog < CodeGen diff --git a/thumbnail.png b/thumbnail.png index 7faa59f..81299f3 100644 Binary files a/thumbnail.png and b/thumbnail.png differ