diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4594525..631ac9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,6 +26,7 @@ jobs: sudo docker cp qr:/usr/local/share/quine-relay/QR.sed spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.spl spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.sl spoiler/ + sudo docker cp qr:/usr/local/share/quine-relay/QR.nut spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.sml spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.sq spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.ss spoiler/ @@ -74,12 +75,12 @@ jobs: sudo docker cp qr:/usr/local/share/quine-relay/QR.lisp spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.cr spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.d spoiler/ - sudo docker cp qr:/usr/local/share/quine-relay/QR.dfy spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.dc spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.dhall spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.exs spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.el spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.erl spoiler/ + sudo docker cp qr:/usr/local/share/quine-relay/QR.e spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.fsx spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.false spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.fl spoiler/ @@ -117,7 +118,6 @@ jobs: sudo docker cp qr:/usr/local/share/quine-relay/QR.lua spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.m4 spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.mk spoiler/ - sudo docker cp qr:/usr/local/share/quine-relay/QR.mac spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.mzn spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.mod spoiler/ sudo docker cp qr:/usr/local/share/quine-relay/QR.il spoiler/ @@ -148,13 +148,7 @@ jobs: sudo docker cp qr:/usr/local/share/quine-relay/QR.rexx spoiler/ cd spoiler git add . - GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" \ - GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" \ - GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" \ - GIT_COMMITTER_NAME='GitHub Actions' \ - GIT_COMMITTER_EMAIL='actions@github.com' \ - TZ=UTC \ - git commit --allow-empty -m "spoiler: $(git show -s --format=%s "$GITHUB_SHA")" + GIT_AUTHOR_NAME="$(git show -s --format=%an "$GITHUB_SHA")" GIT_AUTHOR_EMAIL="$(git show -s --format=%ae "$GITHUB_SHA")" GIT_AUTHOR_DATE="$(git show -s --format=%ad "$GITHUB_SHA")" GIT_COMMITTER_NAME='GitHub Actions' GIT_COMMITTER_EMAIL='actions@github.com' TZ=UTC git commit --allow-empty -m "spoiler: $(git show -s --format=%s "$GITHUB_SHA")" git push --quiet origin spoiler echo The intermediate sources are available: https://github.com/${GITHUB_REPOSITORY}/tree/spoiler if: github.event_name == 'push' && github.ref == 'refs/heads/master' diff --git a/Dockerfile b/Dockerfile index 3e35099..d4eb16e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.10 ENV DEBIAN_FRONTEND noninteractive -RUN rm /etc/dpkg/dpkg.cfg.d/excludes RUN apt-get update && apt-get upgrade -y RUN apt-get -qq install -y apt-utils > /dev/null RUN apt-get -qq install -y moreutils @@ -8,8 +7,8 @@ RUN chronic apt-get -qq install -y afnix algol68g aplus-fsf aspectj && chronic a RUN chronic apt-get -qq install -y asymptote ats2-lang bash bc && chronic apt-get clean RUN chronic apt-get -qq install -y bison bsh clisp clojure && chronic apt-get clean RUN chronic apt-get -qq install -y cmake coffeescript crystal curl && chronic apt-get clean -RUN chronic apt-get -qq install -y dafny dc dhall dotnet8 && 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 dc dhall dotnet8 elixir && chronic apt-get clean +RUN chronic apt-get -qq install -y emacs-nox erlang execline f2c && chronic apt-get clean RUN chronic apt-get -qq install -y fish flex fp-compiler g++ && chronic apt-get clean RUN chronic apt-get -qq install -y gambas3-gb-pcre gambas3-scripter gap gawk && chronic apt-get clean RUN chronic apt-get -qq install -y gcc gdb gdc genius && chronic apt-get clean @@ -21,15 +20,15 @@ RUN chronic apt-get -qq install -y icont iconx intercal iverilog && chronic apt- RUN chronic apt-get -qq install -y jasmin-sable jq kotlin ksh && chronic apt-get clean RUN chronic apt-get -qq install -y libevent-dev libgd-dev libpng-dev libpolyml-dev && chronic apt-get clean RUN chronic apt-get -qq install -y lisaac livescript llvm lua5.3 && chronic apt-get clean -RUN chronic apt-get -qq install -y m4 make maxima minizinc && chronic apt-get clean -RUN chronic apt-get -qq install -y mono-devel nasm neko nickle && chronic apt-get clean -RUN chronic apt-get -qq install -y nim node-typescript nodejs ocaml && chronic apt-get clean -RUN chronic apt-get -qq install -y octave openjdk-11-jdk pari-gp parser3-cgi && chronic apt-get clean -RUN chronic apt-get -qq install -y perl php-cli pike8.0 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 m4 make minizinc mono-devel && 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 pike8.0 polyml python3 && chronic apt-get clean +RUN chronic apt-get -qq install -y r-base rakudo ratfor rc && chronic apt-get clean +RUN chronic apt-get -qq install -y regina-rexx ruby ruby-mustache rustc && chronic apt-get clean +RUN chronic apt-get -qq install -y scala scilab-cli sed slsh && chronic apt-get clean +RUN chronic apt-get -qq install -y spin squirrel3 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 diff --git a/Makefile b/Makefile index d55179f..ec9d16a 100644 --- a/Makefile +++ b/Makefile @@ -92,19 +92,27 @@ QR.sl: QR.spl gcc -z muldefs -o QR -I ./vendor/local/include -L ./vendor/local/lib QR.spl.c -lspl -lm ./QR > QR.sl -QR.sml: QR.sl +QR.nut: QR.sl @echo - @echo "################################" - @echo "## 8: S-Lang -> Standard ML ##" - @echo "################################" + @echo "#############################" + @echo "## 8: S-Lang -> Squirrel ##" + @echo "#############################" + @echo + slsh QR.sl > QR.nut + +QR.sml: QR.nut @echo - slsh QR.sl > QR.sml + @echo "##################################" + @echo "## 9: Squirrel -> Standard ML ##" + @echo "##################################" + @echo + squirrel QR.nut > QR.sml QR.sq: QR.sml @echo - @echo "################################" - @echo "## 9: Standard ML -> Subleq ##" - @echo "################################" + @echo "#################################" + @echo "## 10: Standard ML -> Subleq ##" + @echo "#################################" @echo polyc -o QR QR.sml ./QR > QR.sq @@ -112,7 +120,7 @@ QR.sq: QR.sml QR.ss: QR.sq @echo @echo "#################################" - @echo "## 10: Subleq -> SurgeScript ##" + @echo "## 11: Subleq -> SurgeScript ##" @echo "#################################" @echo ruby vendor/subleq.rb QR.sq > QR.ss @@ -120,7 +128,7 @@ QR.ss: QR.sq QR.tcl: QR.ss @echo @echo "##############################" - @echo "## 11: SurgeScript -> Tcl ##" + @echo "## 12: SurgeScript -> Tcl ##" @echo "##############################" @echo surgescript QR.ss > QR.tcl @@ -128,7 +136,7 @@ QR.tcl: QR.ss QR.tcsh: QR.tcl @echo @echo "#######################" - @echo "## 12: Tcl -> tcsh ##" + @echo "## 13: Tcl -> tcsh ##" @echo "#######################" @echo tclsh QR.tcl > QR.tcsh @@ -136,7 +144,7 @@ QR.tcsh: QR.tcl QR.t: QR.tcsh @echo @echo "########################" - @echo "## 13: tcsh -> Thue ##" + @echo "## 14: tcsh -> Thue ##" @echo "########################" @echo tcsh QR.tcsh > QR.t @@ -144,7 +152,7 @@ QR.t: QR.tcsh QR.ts: QR.t @echo @echo "##############################" - @echo "## 14: Thue -> TypeScript ##" + @echo "## 15: Thue -> TypeScript ##" @echo "##############################" @echo ruby vendor/thue.rb QR.t > QR.ts @@ -152,7 +160,7 @@ QR.ts: QR.t QR.unl: QR.ts @echo @echo "##################################" - @echo "## 15: TypeScript -> Unlambda ##" + @echo "## 16: TypeScript -> Unlambda ##" @echo "##################################" @echo tsc --outFile QR.ts.js QR.ts @@ -161,7 +169,7 @@ QR.unl: QR.ts QR.vala: QR.unl @echo @echo "############################" - @echo "## 16: Unlambda -> Vala ##" + @echo "## 17: Unlambda -> Vala ##" @echo "############################" @echo ruby vendor/unlambda.rb QR.unl > QR.vala @@ -169,7 +177,7 @@ QR.vala: QR.unl QR.mid: QR.vala @echo @echo "##########################" - @echo "## 17: Vala -> Velato ##" + @echo "## 18: Vala -> Velato ##" @echo "##########################" @echo valac QR.vala @@ -178,7 +186,7 @@ QR.mid: QR.vala QR.v: QR.mid @echo @echo "#############################" - @echo "## 18: Velato -> Verilog ##" + @echo "## 19: Velato -> Verilog ##" @echo "#############################" @echo mono vendor/local/bin/Vlt.exe /s QR.mid @@ -187,7 +195,7 @@ QR.v: QR.mid QR.vim: QR.v @echo @echo "################################" - @echo "## 19: Verilog -> Vimscript ##" + @echo "## 20: Verilog -> Vimscript ##" @echo "################################" @echo iverilog -o QR QR.v @@ -196,7 +204,7 @@ QR.vim: QR.v QR.vb: QR.vim @echo @echo "#####################################" - @echo "## 20: Vimscript -> Visual Basic ##" + @echo "## 21: Vimscript -> Visual Basic ##" @echo "#####################################" @echo vim -EsS QR.vim > QR.vb @@ -204,7 +212,7 @@ QR.vb: QR.vim QR.wasm: QR.vb @echo @echo "#######################################################" - @echo "## 21: Visual Basic -> WebAssembly (Binary format) ##" + @echo "## 22: Visual Basic -> WebAssembly (Binary format) ##" @echo "#######################################################" @echo echo 'Exenet8.0false' > tmp.vbproj @@ -213,7 +221,7 @@ QR.wasm: QR.vb QR.wat: QR.wasm @echo @echo "####################################################################" - @echo "## 22: WebAssembly (Binary format) -> WebAssembly (Text format) ##" + @echo "## 23: WebAssembly (Binary format) -> WebAssembly (Text format) ##" @echo "####################################################################" @echo $(WASI_RUNTIME) QR.wasm > QR.wat @@ -221,7 +229,7 @@ QR.wat: QR.wasm QR.ws: QR.wat @echo @echo "###################################################" - @echo "## 23: WebAssembly (Text format) -> Whitespace ##" + @echo "## 24: WebAssembly (Text format) -> Whitespace ##" @echo "###################################################" @echo wat2wasm QR.wat -o QR.wat.wasm @@ -230,7 +238,7 @@ QR.ws: QR.wat QR.xslt: QR.ws @echo @echo "##############################" - @echo "## 24: Whitespace -> XSLT ##" + @echo "## 25: Whitespace -> XSLT ##" @echo "##############################" @echo ruby vendor/whitespace.rb QR.ws > QR.xslt @@ -238,7 +246,7 @@ QR.xslt: QR.ws QR.yab: QR.xslt @echo @echo "###########################" - @echo "## 25: XSLT -> Yabasic ##" + @echo "## 26: XSLT -> Yabasic ##" @echo "###########################" @echo xsltproc QR.xslt > QR.yab @@ -246,7 +254,7 @@ QR.yab: QR.xslt QR.yorick: QR.yab @echo @echo "#############################" - @echo "## 26: Yabasic -> Yorick ##" + @echo "## 27: Yabasic -> Yorick ##" @echo "#############################" @echo yabasic QR.yab > QR.yorick @@ -254,7 +262,7 @@ QR.yorick: QR.yab QR.azm: QR.yorick @echo @echo "##########################" - @echo "## 27: Yorick -> Zoem ##" + @echo "## 28: Yorick -> Zoem ##" @echo "##########################" @echo yorick -batch QR.yorick > QR.azm @@ -262,7 +270,7 @@ QR.azm: QR.yorick QR.zsh: QR.azm @echo @echo "#######################" - @echo "## 28: Zoem -> zsh ##" + @echo "## 29: Zoem -> zsh ##" @echo "#######################" @echo zoem -i QR.azm > QR.zsh @@ -270,7 +278,7 @@ QR.zsh: QR.azm QR.+: QR.zsh @echo @echo "#####################" - @echo "## 29: zsh -> A+ ##" + @echo "## 30: zsh -> A+ ##" @echo "#####################" @echo zsh QR.zsh > QR.+ @@ -278,7 +286,7 @@ QR.+: QR.zsh qr.adb: QR.+ @echo @echo "#####################" - @echo "## 30: A+ -> Ada ##" + @echo "## 31: A+ -> Ada ##" @echo "#####################" @echo a+ QR.+ > qr.adb @@ -286,7 +294,7 @@ qr.adb: QR.+ QR.als: qr.adb @echo @echo "########################" - @echo "## 31: Ada -> AFNIX ##" + @echo "## 32: Ada -> AFNIX ##" @echo "########################" @echo gnatmake qr.adb @@ -295,7 +303,7 @@ QR.als: qr.adb QR.aheui: QR.als @echo @echo "##########################" - @echo "## 32: AFNIX -> Aheui ##" + @echo "## 33: AFNIX -> Aheui ##" @echo "##########################" @echo LANG=C LD_LIBRARY_PATH=/usr/lib/afnix axi QR.als > QR.aheui @@ -303,7 +311,7 @@ QR.aheui: QR.als QR.a68: QR.aheui @echo @echo "#############################" - @echo "## 33: Aheui -> ALGOL 68 ##" + @echo "## 34: Aheui -> ALGOL 68 ##" @echo "#############################" @echo ruby vendor/aheui.rb QR.aheui > QR.a68 @@ -311,7 +319,7 @@ QR.a68: QR.aheui QR.ante: QR.a68 @echo @echo "############################" - @echo "## 34: ALGOL 68 -> Ante ##" + @echo "## 35: ALGOL 68 -> Ante ##" @echo "############################" @echo a68g QR.a68 > QR.ante @@ -319,7 +327,7 @@ QR.ante: QR.a68 QR.aj: QR.ante @echo @echo "###########################" - @echo "## 35: Ante -> AspectJ ##" + @echo "## 36: Ante -> AspectJ ##" @echo "###########################" @echo ruby vendor/ante.rb QR.ante > QR.aj @@ -327,7 +335,7 @@ QR.aj: QR.ante QR.asy: QR.aj @echo @echo "################################" - @echo "## 36: AspectJ -> Asymptote ##" + @echo "## 37: AspectJ -> Asymptote ##" @echo "################################" @echo ajc QR.aj @@ -336,7 +344,7 @@ QR.asy: QR.aj QR.dats: QR.asy @echo @echo "############################" - @echo "## 37: Asymptote -> ATS ##" + @echo "## 38: Asymptote -> ATS ##" @echo "############################" @echo asy QR.asy > QR.dats @@ -344,7 +352,7 @@ QR.dats: QR.asy QR.awk: QR.dats @echo @echo "######################" - @echo "## 38: ATS -> Awk ##" + @echo "## 39: ATS -> Awk ##" @echo "######################" @echo patscc -o QR QR.dats @@ -353,7 +361,7 @@ QR.awk: QR.dats QR.bash: QR.awk @echo @echo "#######################" - @echo "## 39: Awk -> bash ##" + @echo "## 40: Awk -> bash ##" @echo "#######################" @echo awk -f QR.awk > QR.bash @@ -361,7 +369,7 @@ QR.bash: QR.awk QR.bc: QR.bash @echo @echo "######################" - @echo "## 40: bash -> bc ##" + @echo "## 41: bash -> bc ##" @echo "######################" @echo bash QR.bash > QR.bc @@ -369,7 +377,7 @@ QR.bc: QR.bash QR.bsh: QR.bc @echo @echo "###########################" - @echo "## 41: bc -> BeanShell ##" + @echo "## 42: bc -> BeanShell ##" @echo "###########################" @echo BC_LINE_LENGTH=4000000 bc -q QR.bc > QR.bsh @@ -377,7 +385,7 @@ QR.bsh: QR.bc QR.bef: QR.bsh @echo @echo "################################" - @echo "## 42: BeanShell -> Befunge ##" + @echo "## 43: BeanShell -> Befunge ##" @echo "################################" @echo bsh QR.bsh > QR.bef @@ -385,7 +393,7 @@ QR.bef: QR.bsh QR.Blc: QR.bef @echo @echo "###########################" - @echo "## 43: Befunge -> BLC8 ##" + @echo "## 44: Befunge -> BLC8 ##" @echo "###########################" @echo cfunge QR.bef > QR.Blc @@ -393,7 +401,7 @@ QR.Blc: QR.bef QR.bf: QR.Blc @echo @echo "#############################" - @echo "## 44: BLC8 -> Brainfuck ##" + @echo "## 45: BLC8 -> Brainfuck ##" @echo "#############################" @echo ruby vendor/blc.rb < QR.Blc > QR.bf @@ -401,7 +409,7 @@ QR.bf: QR.Blc QR.c: QR.bf @echo @echo "##########################" - @echo "## 45: Brainfuck -> C ##" + @echo "## 46: Brainfuck -> C ##" @echo "##########################" @echo ruby vendor/bf.rb QR.bf > QR.c @@ -409,7 +417,7 @@ QR.c: QR.bf QR.cpp: QR.c @echo @echo "####################" - @echo "## 46: C -> C++ ##" + @echo "## 47: C -> C++ ##" @echo "####################" @echo $(CC) -o QR QR.c @@ -418,7 +426,7 @@ QR.cpp: QR.c QR.cs: QR.cpp @echo @echo "#####################" - @echo "## 47: C++ -> C# ##" + @echo "## 48: C++ -> C# ##" @echo "#####################" @echo $(CXX) -o QR QR.cpp @@ -427,7 +435,7 @@ QR.cs: QR.cpp QR.chef: QR.cs @echo @echo "######################" - @echo "## 48: C# -> Chef ##" + @echo "## 49: C# -> Chef ##" @echo "######################" @echo echo 'Exenet8.0false' > tmp.csproj @@ -436,7 +444,7 @@ QR.chef: QR.cs QR.clj: QR.chef @echo @echo "###########################" - @echo "## 49: Chef -> Clojure ##" + @echo "## 50: Chef -> Clojure ##" @echo "###########################" @echo PERL5LIB=vendor/local/lib/perl5 compilechef QR.chef QR.chef.pl @@ -445,7 +453,7 @@ QR.clj: QR.chef QR.cmake: QR.clj @echo @echo "############################" - @echo "## 50: Clojure -> CMake ##" + @echo "## 51: Clojure -> CMake ##" @echo "############################" @echo clojure QR.clj > QR.cmake @@ -453,7 +461,7 @@ QR.cmake: QR.clj QR.cob: QR.cmake @echo @echo "##########################" - @echo "## 51: CMake -> Cobol ##" + @echo "## 52: CMake -> Cobol ##" @echo "##########################" @echo cmake -P QR.cmake > QR.cob @@ -461,7 +469,7 @@ QR.cob: QR.cmake QR.coffee: QR.cob @echo @echo "#################################" - @echo "## 52: Cobol -> CoffeeScript ##" + @echo "## 53: Cobol -> CoffeeScript ##" @echo "#################################" @echo cobc -O2 -x QR.cob @@ -470,7 +478,7 @@ QR.coffee: QR.cob QR.lisp: QR.coffee @echo @echo "#######################################" - @echo "## 53: CoffeeScript -> Common Lisp ##" + @echo "## 54: CoffeeScript -> Common Lisp ##" @echo "#######################################" @echo coffee --nodejs --stack_size=100000 QR.coffee > QR.lisp @@ -478,7 +486,7 @@ QR.lisp: QR.coffee QR.cr: QR.lisp @echo @echo "##################################" - @echo "## 54: Common Lisp -> Crystal ##" + @echo "## 55: Common Lisp -> Crystal ##" @echo "##################################" @echo clisp QR.lisp > QR.cr @@ -486,28 +494,19 @@ QR.cr: QR.lisp QR.d: QR.cr @echo @echo "########################" - @echo "## 55: Crystal -> D ##" + @echo "## 56: Crystal -> D ##" @echo "########################" @echo crystal QR.cr > QR.d -QR.dfy: QR.d +QR.dc: QR.d @echo - @echo "######################" - @echo "## 56: D -> Dafny ##" - @echo "######################" + @echo "###################" + @echo "## 57: D -> dc ##" + @echo "###################" @echo gdc -o QR QR.d - ./QR > QR.dfy - -QR.dc: QR.dfy - @echo - @echo "#######################" - @echo "## 57: Dafny -> dc ##" - @echo "#######################" - @echo - dafny QR.dfy - mono QR.exe > QR.dc + ./QR > QR.dc QR.dhall: QR.dc @echo @@ -541,18 +540,26 @@ QR.erl: QR.el @echo emacs -Q --script QR.el > QR.erl -QR.fsx: QR.erl +QR.e: QR.erl @echo - @echo "########################" - @echo "## 62: Erlang -> F# ##" - @echo "########################" + @echo "##############################" + @echo "## 62: Erlang -> Execline ##" + @echo "##############################" + @echo + escript QR.erl > QR.e + +QR.fsx: QR.e + @echo + @echo "##########################" + @echo "## 63: Execline -> F# ##" + @echo "##########################" @echo - escript QR.erl > QR.fsx + execlineb QR.e > QR.fsx QR.false: QR.fsx @echo @echo "#######################" - @echo "## 63: F# -> FALSE ##" + @echo "## 64: F# -> FALSE ##" @echo "#######################" @echo echo 'Exenet8.0false' > tmp.fsproj @@ -561,7 +568,7 @@ QR.false: QR.fsx QR.fl: QR.false @echo @echo "#########################" - @echo "## 64: FALSE -> Flex ##" + @echo "## 65: FALSE -> Flex ##" @echo "#########################" @echo ruby vendor/false.rb QR.false > QR.fl @@ -569,7 +576,7 @@ QR.fl: QR.false QR.fish: QR.fl @echo @echo "########################" - @echo "## 65: Flex -> Fish ##" + @echo "## 66: Flex -> Fish ##" @echo "########################" @echo flex -o QR.fl.c QR.fl @@ -579,7 +586,7 @@ QR.fish: QR.fl QR.fs: QR.fish @echo @echo "#########################" - @echo "## 66: Fish -> Forth ##" + @echo "## 67: Fish -> Forth ##" @echo "#########################" @echo fish QR.fish > QR.fs @@ -587,7 +594,7 @@ QR.fs: QR.fish QR.f: QR.fs @echo @echo "##############################" - @echo "## 67: Forth -> FORTRAN77 ##" + @echo "## 68: Forth -> FORTRAN77 ##" @echo "##############################" @echo gforth QR.fs > QR.f @@ -595,7 +602,7 @@ QR.f: QR.fs QR.f90: QR.f @echo @echo "##################################" - @echo "## 68: FORTRAN77 -> Fortran90 ##" + @echo "## 69: FORTRAN77 -> Fortran90 ##" @echo "##################################" @echo @mv QR.c QR.c.bak @@ -606,7 +613,7 @@ QR.f90: QR.f QR.gbs: QR.f90 @echo @echo "######################################" - @echo "## 69: Fortran90 -> Gambas script ##" + @echo "## 70: Fortran90 -> Gambas script ##" @echo "######################################" @echo gfortran -o QR QR.f90 @@ -615,7 +622,7 @@ QR.gbs: QR.f90 QR.g: QR.gbs @echo @echo "################################" - @echo "## 70: Gambas script -> GAP ##" + @echo "## 71: Gambas script -> GAP ##" @echo "################################" @echo $(GBS) QR.gbs > QR.g @@ -623,7 +630,7 @@ QR.g: QR.gbs QR.gdb: QR.g @echo @echo "######################" - @echo "## 71: GAP -> GDB ##" + @echo "## 72: GAP -> GDB ##" @echo "######################" @echo gap -q QR.g > QR.gdb @@ -631,7 +638,7 @@ QR.gdb: QR.g QR.gel: QR.gdb @echo @echo "###############################" - @echo "## 72: GDB -> GEL (Genius) ##" + @echo "## 73: GDB -> GEL (Genius) ##" @echo "###############################" @echo gdb -q -x QR.gdb > QR.gel @@ -639,7 +646,7 @@ QR.gel: QR.gdb QR.plt: QR.gel @echo @echo "###################################" - @echo "## 73: GEL (Genius) -> Gnuplot ##" + @echo "## 74: GEL (Genius) -> Gnuplot ##" @echo "###################################" @echo genius QR.gel > QR.plt @@ -647,7 +654,7 @@ QR.plt: QR.gel QR.go: QR.plt @echo @echo "#########################" - @echo "## 74: Gnuplot -> Go ##" + @echo "## 75: Gnuplot -> Go ##" @echo "#########################" @echo gnuplot QR.plt > QR.go @@ -655,7 +662,7 @@ QR.go: QR.plt QR.gs: QR.go @echo @echo "############################" - @echo "## 75: Go -> GolfScript ##" + @echo "## 76: Go -> GolfScript ##" @echo "############################" @echo go run QR.go > QR.gs @@ -663,7 +670,7 @@ QR.gs: QR.go QR.gpt: QR.gs @echo @echo "####################################" - @echo "## 76: GolfScript -> G-Portugol ##" + @echo "## 77: GolfScript -> G-Portugol ##" @echo "####################################" @echo ruby vendor/golfscript.rb QR.gs > QR.gpt @@ -671,7 +678,7 @@ QR.gpt: QR.gs QR.grass: QR.gpt @echo @echo "###############################" - @echo "## 77: G-Portugol -> Grass ##" + @echo "## 78: G-Portugol -> Grass ##" @echo "###############################" @echo mv QR.c QR.c.bak @@ -683,7 +690,7 @@ QR.grass: QR.gpt QR.groovy: QR.grass @echo @echo "###########################" - @echo "## 78: Grass -> Groovy ##" + @echo "## 79: Grass -> Groovy ##" @echo "###########################" @echo ruby vendor/grass.rb QR.grass > QR.groovy @@ -691,7 +698,7 @@ QR.groovy: QR.grass QR.gz: QR.groovy @echo @echo "##########################" - @echo "## 79: Groovy -> Gzip ##" + @echo "## 80: Groovy -> Gzip ##" @echo "##########################" @echo groovy QR.groovy > QR.gz @@ -699,7 +706,7 @@ QR.gz: QR.groovy QR.hs: QR.gz @echo @echo "###########################" - @echo "## 80: Gzip -> Haskell ##" + @echo "## 81: Gzip -> Haskell ##" @echo "###########################" @echo gzip -cd QR.gz > QR.hs @@ -707,7 +714,7 @@ QR.hs: QR.gz QR.hx: QR.hs @echo @echo "###########################" - @echo "## 81: Haskell -> Haxe ##" + @echo "## 82: Haskell -> Haxe ##" @echo "###########################" @echo ghc QR.hs @@ -716,7 +723,7 @@ QR.hx: QR.hs QR.icn: QR.hx @echo @echo "########################" - @echo "## 82: Haxe -> Icon ##" + @echo "## 83: Haxe -> Icon ##" @echo "########################" @echo haxe -main QR -neko QR.n @@ -725,7 +732,7 @@ QR.icn: QR.hx QR.i: QR.icn @echo @echo "############################" - @echo "## 83: Icon -> INTERCAL ##" + @echo "## 84: Icon -> INTERCAL ##" @echo "############################" @echo icont -s QR.icn @@ -734,7 +741,7 @@ QR.i: QR.icn QR.j: QR.i @echo @echo "##############################" - @echo "## 84: INTERCAL -> Jasmin ##" + @echo "## 85: INTERCAL -> Jasmin ##" @echo "##############################" @echo @mv QR.c QR.c.bak @@ -746,7 +753,7 @@ QR.j: QR.i QR.java: QR.j @echo @echo "##########################" - @echo "## 85: Jasmin -> Java ##" + @echo "## 86: Jasmin -> Java ##" @echo "##########################" @echo jasmin QR.j @@ -755,7 +762,7 @@ QR.java: QR.j QR.js: QR.java @echo @echo "##############################" - @echo "## 86: Java -> JavaScript ##" + @echo "## 87: Java -> JavaScript ##" @echo "##############################" @echo javac QR.java @@ -764,7 +771,7 @@ QR.js: QR.java QR.jq: QR.js @echo @echo "############################" - @echo "## 87: JavaScript -> Jq ##" + @echo "## 88: JavaScript -> Jq ##" @echo "############################" @echo $(JAVASCRIPT) QR.js > QR.jq @@ -772,7 +779,7 @@ QR.jq: QR.js QR.jsfuck: QR.jq @echo @echo "########################" - @echo "## 88: Jq -> JSFuck ##" + @echo "## 89: Jq -> JSFuck ##" @echo "########################" @echo jq -r -n -f QR.jq > QR.jsfuck @@ -780,7 +787,7 @@ QR.jsfuck: QR.jq QR.kt: QR.jsfuck @echo @echo "############################" - @echo "## 89: JSFuck -> Kotlin ##" + @echo "## 90: JSFuck -> Kotlin ##" @echo "############################" @echo ulimit -s unlimited && $(JAVASCRIPT) --stack_size=100000 QR.jsfuck > QR.kt @@ -788,7 +795,7 @@ QR.kt: QR.jsfuck QR.ksh: QR.kt @echo @echo "#########################" - @echo "## 90: Kotlin -> ksh ##" + @echo "## 91: Kotlin -> ksh ##" @echo "#########################" @echo kotlinc QR.kt -include-runtime -d QR.jar @@ -797,7 +804,7 @@ QR.ksh: QR.kt QR.lazy: QR.ksh @echo @echo "#########################" - @echo "## 91: ksh -> Lazy K ##" + @echo "## 92: ksh -> Lazy K ##" @echo "#########################" @echo ksh QR.ksh > QR.lazy @@ -805,7 +812,7 @@ QR.lazy: QR.ksh qr.li: QR.lazy @echo @echo "############################" - @echo "## 92: Lazy K -> Lisaac ##" + @echo "## 93: Lazy K -> Lisaac ##" @echo "############################" @echo lazyk QR.lazy > qr.li @@ -813,18 +820,18 @@ qr.li: QR.lazy QR.ls: qr.li @echo @echo "################################" - @echo "## 93: Lisaac -> LiveScript ##" + @echo "## 94: Lisaac -> LiveScript ##" @echo "################################" @echo @mv QR.c QR.c.bak - lisaac qr.li + lisaac -gcc -Wno-implicit-function-declaration qr.li ./qr > QR.ls @mv QR.c.bak QR.c QR.ll: QR.ls @echo @echo "##################################" - @echo "## 94: LiveScript -> LLVM asm ##" + @echo "## 95: LiveScript -> LLVM asm ##" @echo "##################################" @echo lsc QR.ls > QR.ll @@ -832,7 +839,7 @@ QR.ll: QR.ls QR.lol: QR.ll @echo @echo "###############################" - @echo "## 95: LLVM asm -> LOLCODE ##" + @echo "## 96: LLVM asm -> LOLCODE ##" @echo "###############################" @echo @mv QR.bc QR.bc.bak @@ -843,7 +850,7 @@ QR.lol: QR.ll QR.lua: QR.lol @echo @echo "##########################" - @echo "## 96: LOLCODE -> Lua ##" + @echo "## 97: LOLCODE -> Lua ##" @echo "##########################" @echo lci QR.lol > QR.lua @@ -851,7 +858,7 @@ QR.lua: QR.lol QR.m4: QR.lua @echo @echo "#####################" - @echo "## 97: Lua -> M4 ##" + @echo "## 98: Lua -> M4 ##" @echo "#####################" @echo lua5.3 QR.lua > QR.m4 @@ -859,28 +866,18 @@ QR.m4: QR.lua QR.mk: QR.m4 @echo @echo "##########################" - @echo "## 98: M4 -> Makefile ##" + @echo "## 99: M4 -> Makefile ##" @echo "##########################" @echo m4 QR.m4 > QR.mk -QR.mac: QR.mk +QR.mzn: QR.mk @echo - @echo "##############################" - @echo "## 99: Makefile -> Maxima ##" - @echo "##############################" - @echo - make -f QR.mk > QR.mac - -QR.mzn: QR.mac - @echo - @echo "###############################" - @echo "## 100: Maxima -> MiniZinc ##" - @echo "###############################" + @echo "#################################" + @echo "## 100: Makefile -> MiniZinc ##" + @echo "#################################" @echo - @if [ "$(CI)" = "true" ]; then mv /tmp /tmp.bak && ln -s /dev/shm /tmp; fi - maxima -q --init-mac=QR.mac > QR.mzn - @if [ "$(CI)" = "true" ]; then rm /tmp && mv /tmp.bak /tmp; fi + make -f QR.mk > QR.mzn QR.mod: QR.mzn @echo @@ -888,7 +885,7 @@ QR.mod: QR.mzn @echo "## 101: MiniZinc -> Modula-2 ##" @echo "#################################" @echo - minizinc --solver Gecode --soln-sep '' QR.mzn > QR.mod + minizinc --solver COIN-BC --soln-sep '' QR.mzn > QR.mod QR.il: QR.mod @echo diff --git a/QR.rb b/QR.rb index d057bf3..50c44d6 100644 --- a/QR.rb +++ b/QR.rb @@ -1,65 +1,65 @@ 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+$&}};R=";return~0;";V=->s,a,z{s.K(/( #{B*4})+/){a+"#{$&.size/2}"+z}};C=%w(System.Console~Write);$C=C*?.;$D="program~QR";$G="~contents~of"+$F="~the~mix!g~bowl";$L="public~static";$W="s.WriteByte";rp=->s,r{v="";[r.!ject(s){|s,j|o={};m=n=0;s.size.times{|i|o[f=s[i,2]]||=0;c=o[f]+=1;m(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)stdout.Zf("%c%c",v/256,v%25 -6);}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~!"BasmCBBBCRE`x60F<<<D`x21BE@ABRCABRCABRCA`x4a`x21CE@~B-BB~CACk:CvACqRC~COBMADRCACRCADRCABRCABRC~BACj:B-BBOBMADRCADRCADRCAFRCMM}CBABM`x7e#{40.chr}BBBCB -BB,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.const~0~i32.const~1~i32.con -st~0~call~0~drop))":c=Asc(d):If~c=36:For~c=0To~11:#$W(If(c~Mod~3,Asc(#{s="<#{U="xsl:template"}~match='/'><`x21[CDATA[#{%(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)`n -trans~O(n){`nB:add(Byte(+~128~n))}`ntrans~f(v~n){`n O(+(/~ 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(Buffer"#{e[%W[STRINGz:=~226+ -~153,a:=z+~166,b:=a+"2"+z+~160,c:=b+"8"+z+~165,t: ="# { d[%(class~QR{#$L~void~ma!(SJ[]a){a=#{E["H('#{Q[e["implement~ma!0()=Z"+E["BEGIN{Z#{E[ %(echo~'#{%(f(s){System.out.Z(s);}s="389**6+44*6+00p45*,";for(c -:#{E[(s="#!clude`n!t~mX{std::cout<<#{ E[ %(class~Program{#$L~void~MX{#$C("Qu!e~Relay~Coffee.^n^nIngredie nts.^n");for(!t~i=9;i++<126;)#$C($"{i}~g~caffe!e~{i}^n" -);#$C("^nMethod.^n");foreach(char~c~!#{E[%((d oseq[s(lazy-cat["IDENTIFICATION~DIVISION.""PROGRAM-ID.~QR."" PROCEDURE~DIVISION."'DISPLA`x59](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["puts#{E["import~std.st -dio;void~mX{H(`x60#{%(method~MX{Z(@"#{d["[' ']p[#{"IO.puts"+E[%((pr!c~"#{e["`nma!(_)-> `nio:fH#{d[E['Zfn("""'+d[?"+"%option~noyywr -ap`n%%`n%%`n!t~mX{puts#{E["echo~'#{Q[Q[%( ~:~A~."#{g*9}"~;~:~B~A~."~WRITE(*,*)'"~A~ ;~:~C~B~T`x59PE~."~'"~CR~;~:~D~S"~#$D"~C -~S^"~Z~^"(&"~C~S^"~#{e[%(Z"#{e["s:=Outp utTe xtUser();WriteAll(s,#{E[%(Zf"#{e[d [f('set~Z"-";Z '+E[%(package~ma!;import"fmt";func~mX -{fmt.Pr!t#{E[%(236:j;{119:i;{206i-:i;. 48<{7 1+}{[i]^48-*}if}%}:t;"algori tmo~QR;!"[195][173]++'cio~im prima("'"013141"t"/12131"t~6*"/1:191 -8151:??6271413/4=3626612/2/353251215/ `x5a 0`x5a0R"t"#{e[%(z=new~java. util.zip.G`x5aIPOutputStream(System.ou t);z.H('#{"ma!=putStr"+E["class~QR -{#$L~function~mX{neko.Lib.Z#{E[%(proc edure~mX;i:=c:=0;s:=#{ E[%(.class~public~QR`n .super~#{$T="java/io/Pr!tStream"}`n.method~# $L~ma!([L#{S="java/lang/S"}J;)V~ -;]`n.limit~stack~2`ngetstatic~#{S}yst em/o ut~L#$T;`nldc~"#{e[%(class~QR{#$L~ void~ma!(SJ[]v){S J~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};(%(P={0:'[+[]]',m:'((+[ ])'+(C="['constructor']")+"+[])['11']"};for(R~!~B =('`x21[]@`x2 1`x21[]@[][[]]@'+(A="[]['fill']")+"@([]+[])['fontcolor ']([])@(+('11e20')+[])['split -']([])@"+A+C+"('return~escape')()("+ A+')').split('@'))for(E~!~D=eval(G='('+B[R]+'+[])') )P[T=D[E]]=P [T]||G+"['"+E+"']";for(G='[',B=0;++B<36;)P[D=B.toSJ(36)]=B <10?(G+='+`x21+[]')+']':P[D] -||"(+('"+B+"'))['to'+([]+[])"+C+" ['name']]('36')";A+=C+"('console.log(unescape(^"";for(E~ !~G=#{E[ "fun~ma!(a:Array){Z#{Q[E[%(s=();a(){~s+=($(echo~-n~$1|od~ -An~-tu1~-v)~$2);};a~"Secti -on`x48eader+name:=QR;SectionPubl ic-ma!<-("~10;t='#{"console.log"+Q[E[%(@s=global[#{i=(s=%(`x 48AI ~1.2`nVISIBLE~"#{"x=sJ.K(#{V[E["changequote(<@,@>)`ndef!e(p,<@#{" all:`n`t@echo~'#{d["l!el:9 -9999;Z#{E["solve~satisfy;outpu t~[#{E["MODULE~QR;FROM~StrIO~IMPORT~WriteSJ;BEGIN~#{(%(.assembl y~ t{}.method~#$L~void~MX{.entrypo!t~ldstr"#{e["m{{`x21:~x`nqr:~|-`n~:db`x60#{e[s= "$Z#{E["Zf#{E["echo#{E["#i -mport#{N}!t~mX{puts #{E["Z_sJ"+E["s=double#{E["Z#{E["$console:l!e[#{"#$D(output);beg!~H (#{f(( p="eval";%($_="#{s,v=rp["$_='#{Q[%($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".p ack("NNCV",$w+2,128,8,2),"IDAT".gzcompres s($m),"IEND")as$d)echo~p -ack("NA*N",strlen($d)-4,$ d,crc32($d));).K(B,"`x7f"),?']}';s:g/^x7f/Y/;Z~$_",128..287];s="$_='#{Q[s,c= /['Y]/]}';$n=32;$s='#{Q[v,c]}';$s=`x7 es{..}{$a=$&;$b=chr(--$n -&255);`x7es/$b/$a/g;}eg; Z";(s+N*(-s.size%6)).unpack("B*")[0].K(/.{6}/){n=$&.to_i~2;((n+14)/26*6+n+47).c hr}}";s|.|$n=ord$&;substr~unpack(B 8,chr$n-!t($n/32)*6-41) -,2|eg;eval~pack'B*',$_). scan(/[~,-:A-z]+|(.)/){p="s++#{$1?"chr~#{$1.ord}+e":$&+?+};"+p};p),1){"'#$s',"}} '')end.".K(/[:;()]/){?`x5e+$&}} ]"]};quit"]};t=num2cell -(b=11-ceil(s/13));for~n =1:9m={};for~i=1:141f=@(x,y,n)repmat(['Ook'~char(x)~'~Ook'~char(y)~'~'],[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 =b==n)=m(diff([0~s(x)])+13);end;Zf('%%s',t{:})"]]+R}}"]}"]}`n"]};"]}`x60`n~global~_ start`n~_start:mov~edx,# {s.size}`n~mov~ecx,m`n~m -ov~ebx,1`n~mov~eax,4`n~ !t~128`n~mov~ebx,0`n~mov~eax,1`n~!t~128`nx:~|`n~}}{{{qr}}}"]}"call~void~[mscorlib] # {C*"::"}(sJ)ret})).K( /()[#{i=94.chr}"]+|[#{i} -']+/){["WriteSJ(",$&,") ;"]*($1??":?')}}END~QR."]}];"]};quit();",?$].K(?'){"'^''"}}'"}@>)`np"],?&,?&]},' &( %d+)&',fun ctio n(s)return~sJ.rep( 'Y',tonumber(s))end);Z(x -)".K(/[:"]/,":^0")}"`n` x4bT`x48`x58B`x59E~B`x59E)).size+1}x~i8]c"#{s.K(/[^"`n`t]/){"^%02`x58"%$&.ord}} ^ 00"declare~i3 2@puts(i8*) def!e~i32@mX{%1 =call~i32@puts(i8*getelem -entptr([#{i}x~i8],[#{i}x ~i8]*@s,i32~0,i32~0))ret~i32~0})],?#].K(?',%('"'"'))}';for((i=0;i<${#t};i+=99 ) );do;x=${t:$i: 99};a~"^"${x// [Y^`" ]/Y^0}^".Z;" ~10;done;a~");";p(){~echo -~-n~$1;};f(){~for~x~!~${ s[*]};do;p~$3;for((j=$2;j--;));do;h~$1~$x~$j;done;done;};p~k^`x60;h(){~p~^ `x 60${1:$(($2>>$3&1)):2};};f~kki~ 7~'`x60`x60s `x60`x60s `x60`x60s`x60`x60s`x60`x60 -s`x60`x60s`x60`x60s`x60`x 60si';s=();a~'AG-`x48-`x48Fy.IlD==;=jdlAy=;=jldltldltl{lAulAy=jtlldlAyFy =?=j dlAyGFyFyG2AFy>zlAFFBCjldGyGFy>G Fy.AGy=G==n`x48= =nlldC =j@=jtlldltldlAut11';h(){~p -~${1:$(((($2%83-10)>>((2-$ 3)*2))%4)):1};};f~ski^`x60~3)]]}~}"]})A+="'+`x21[]+'"+G.charCodeAt(E) .toSJ(16 );for(A+="^".replace(/'+`x21[]+' /g,^"%^")))')()",R= 0;R <9;R++)A=A.replace(/'.*?'/g, -function(B){T=[];for(E=1;B [E+1];)T.push(P[B[E++]]);return~T.jo!('+')});console.log('"'+A+'"' ))).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<#{a.size};){q=q*78+(s.charAt(i)-13)%84;if(i++%2> 0){y=qn{L<<(n+62)%92+35;D};s. bytes{|c|n>0?n-=1:(t[c]=(t[c]||[]).reject{|j -|j4&&x<<[k,j]};x=x.ma x)?(n,j=x;x=b.size;(u=[x,3999].m!;D[u%87][u/87] -;L<0;x=4001+i- j;D[x%87][x/87][n-5]):b<`nchar*p=#{E[L]},s[999999],*q=s;!t~mX{!t~n,m;for(; -*p;){n=(*p-5)%92+(p[1]-5)%92*87;p+=2;if(n>3999)for (m=(*p++-5)%92+6;m--;q++)*q=q[4000-n];else~for(;n--;)*q++=*p++;}p uts(s)#{R}}")]}){s+="00g,";for(m=1;m<256;m*=2)s+="00g,4 -,:"+(c/m%2>0?"4+":"")+",";f(s);s="4,:,";}f(s+s);for(c:Ba se64.getDecoder().decode("kaARERE`x58/I0ALn3n5ef6l/Pz8+fnz58/BOf5/7/hE`x58/O`x5 azM5mC`x58/Oczm`x5azBPn5+`x58/OczMznBL/nM5m`x5azBPu++fPPOc5zng -nnO`x5azO`x5agnBMGAW7A==")){c=c<0?256+c:c;for(i=0;i++<3;c/=8)f(c%8);f("8*+8*+,");}f("@");).K(?',%('"'"'))}'|sed~-e's/Y/YY/g'~-e's/"/Yq/g'~-e's/.*/Z~"&"^nquit/')]}}"]],?']}');".K(/^+/){"`x5e#{$&.size}`x5e"}]}.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)):Nex -t: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");),127..255];f(%(varia -ble~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_bug_fixes_#_buffer_for +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["Z"+E[%(fun~p~n=Z(Int.toSJ~n`x +5e"~");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)stdout.Zf("%c%c",v/25 +6,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~!"BasmCBBBCRE`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.const~0~i32.const~1~i +32.const~0~call~0~drop))":c=Asc(d):If~c=36:For~c=0To~11:#$W(If(c~Mod~3,Asc(#{s="<#{U="xsl:template"}~match='/'><`x21[CDATA[#{%(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(Buf +fer)`ntrans~O(n){`nB:add(Byte(+~128~n))}`ntrans~f(v ~n){`n O(+( /~n~64)1 07)`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(Buffer"#{e[%W[STRINGz: +=~226+~153,a:=z+~166,b:=a+"2"+z+~160,c:=b+"8"+z+~ 165 , t:="#{d[%(class~QR{#$L~void~ma!(SJ[]a){a=#{E["H('#{Q[e["implement~ma!0()=Z"+E["BEGIN {Z#{E[%(echo~'#{%(f(s){System.out.Z(s);}s="389**6+44*6+00p45*," +;for(c:#{E[(s="#!clude`n!t~mX{std::co ut <<#{E[%(class~Program{#$L~void~MX{#$C("Qu!e~Relay~Coffee.^n^nIn gredients.^n");for(!t~i=9;i++<126;)#$C($"{i}~g~caffe!e~ +{i}^n");#$C("^nMethod.^n");foreach(char~c~!#{ 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)->Array(n+1).jo!~'Y');console .log('%s',#{V[E[%((H-l!e"#{e["puts#{E["import~ +std.stdio;void~mX{H(`x60#{"['']p[#{"IO.puts "+E[%((pr!c~"#{e["`nma!(_)->`nio:fH#{d[E[% (echo~"#{e['Zfn("""'+d[?"+"%option~noyywrap +`n%%`n%%`n!t~mX{puts#{E["echo~'#{Q[Q[%(~: ~A~."#{g*9}"~;~:~B~A~."~WRITE(*,*)'"~A~;~ :~C~B~T`x59PE~."~'"~CR~;~:~D~S"~#$D"~C~S +^"~Z~^"(&"~C~S^"~#{e[%(Z"#{e["s:=Output Text User();WriteAll(s,#{E[%(Zf"#{e[d[f ('set~Z"-";Z'+ E[%(package~ma!;import"fmt";func~mX{f +mt.Pr!t#{E[%(236:j;{119:i;{206i-:i;.48 <{71+ }{[i]^48-*}if}%}:t;"algoritm o~QR;!"[195][173]++'cio~impr ima("'"013141"t"/12131"t~6*"/1:19181 +51:??6271413/4=3626612/2/353251215/`x 5a0` x5a0R"t"#{e[%(z=new~java.ut il.zip.G`x5aIPOutputStream(System.out) ;z.H('#{"ma!=putStr"+E["class~QR{# +$L~function~mX{neko.Lib.Z#{E[%(proced ure~mX;i:=c:=0;s:=#{E[ %(.class~public~QR`n.s uper~#{$T="java/io/Pr!tStream"}`n.method~#$L ~ma!([L#{S="java/lang/S"}J;)V~;] +`n.limit~stack~2`ngetstatic~#{S}ystem /out ~L#$T;`nldc~"#{e[%(class~QR{#$L~vo id~ma!(SJ[]v){SJ~ c[]=new~SJ[99999],y="",z=y,s="#{z=t=(0..r=q=126).m ap{|n|[n,[]]};a="";b=->n{a<<(n% +78+55)%84+42};(%(P={0:'[+[]]',m:'((+[]) '+(C="['constructor']")+"+[])['11']"};for(R~!~B=( '`x21[]@`x21` x21[]@[][[]]@'+(A="[]['fill']")+"@([]+[])['fontcolor'] ([])@(+('11e20')+[])['split'] +([])@"+A+C+"('return~escape')()("+A+ ')').split('@'))for(E~!~D=eval(G='('+B[R]+'+[])'))P [T=D[E]]=P[T ]||G+"['"+E+"']";for(G='[',B=0;++B<36;)P[D=B.toSJ(36)]=B<1 0?(G+='+`x21+[]')+']':P[D]|| +"(+('"+B+"'))['to'+([]+[])"+C+"[' name']]('36')";A+=C+"('console.log(unescape(^"";for(E~!~ G=#{E["f un~ma!(a:Array){Z#{Q[E[%(s=();a(){~s+=($(echo~-n~$1|od~-A n~-tu1~-v)~$2);};a~"Section +`x48eader+name:=QR;SectionPublic -ma!<-("~10;t='#{"console.log"+Q[E[%(@s=global[#{i=(s=%(`x48 AI~1 .2`nVISIBLE~"#{"x=sJ.K(#{V[E["changequote(<@,@>)`ndef!e(p,<@#{"al l:`n`t@echo~'#{d["solve~sa +tisfy;output~[#{E["MODULE~QR;F ROM~StrIO~IMPORT~WriteSJ;BEGIN~#{(%(.assembly~t{}.method~#$L~vo id ~MX{.entrypo!t~ldstr"#{e["m{{`x21:~x`nqr:~|-`n~:db`x60#{e[s="$Z#{E["Zf#{E["echo #{E["#import#{N}! +t~mX{puts#{E["Z_sJ"+E["s=dou ble#{E["Z#{E["$console:l!e[#{"#$D(output);beg!~H(#{f((p="eval";%($_ ="#{s, v=rp["$_='#{Q[%($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",strlen($ +d)-4,$d,crc32($d));).K(B, "`x7f"),?']}';s:g/^x7f/Y/;Z~$_",128..287];s="$_='#{Q[s,c=/['Y]/]}';$n=32;$s= '#{Q[v,c]}';$s=`x7es{..}{$a=$&;$b=chr (--$n&255);`x7es/$b/$a/g +;}eg;Z";(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;eval~pack'B*' +,$_).scan(/[~,-:A-z]+|(. )/){p="s++#{$1?"chr~#{$1.ord}+e":$&+?+};"+p};p),1){"'#$s',"}}'')end.".K(/[:;()]/ ){?`x5e+$&}}]"]};quit"]};t=num2 cell(b=11-ceil(s/13));f +or~n=1:9m={};for~i=1:14 1f=@(x,y,n)repmat(['Ook'~char(x)~'~Ook'~char(y)~'~'],[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=b==n)=m(diff([0~s( x)])+13);end;Zf('%%s',t{:})"]]+R}}"]}"]}`n"]};"]}`x60`n~global~_start`n~_start:mov~ edx,#{s.size}`n~mov~ecx, m`n~mov~ebx,1`n~mov~eax, +4`n~!t~128`n~mov~ebx,0` n~mov~eax,1`n~!t~128`nx:~|`n~}}{{{qr}}}"]}"call~void~[mscorlib]#{C*"::"}(sJ)ret})) . K(/()[#{i=94.chr}"]+| [#{i}']+/){["WriteSJ(",$ +&,");"]*($1??":?')}}END ~QR."]}];",?$].K(?'){"'^''"}}'"}@>)`np"],?&,?&]},'&(%d+)&',function(s)return~sJ. re p('Y',tonu mber (s))end);Z(x)".K(/ [:"]/,":^0")}"`n`x4bT`x4 +8`x58B`x59E~B`x59E)).si ze+1}x~i8]c"#{s.K(/[^"`n`t]/){"^%02`x58"%$&.ord}}^00"declare~i32@puts(i8*)def!e ~ i32@mX{%1=cal l~i32@puts( i8*getelementpt r([#{i}x~i8],[#{i}x~i8]*@ +s,i32~0,i32~0))ret~i32~0 })],?#].K(?',%('"'"'))}';for((i=0;i<${#t};i+=99));do;x=${t:$i:99};a~"^"${x//[ Y ^`"]/Y^0}^".Z; "~10;done;a~") ;";p( ){~echo~-n~$ 1;};f(){~for~x~!~${s[*]}; +do;p~$3;for((j=$2;j--;)) ;do;h~$1~$x~$j;done;done;};p~k^`x60;h(){~p~^`x60${1:$(($2>>$3&1)):2};};f~k ki ~7~'`x60`x60s`x60`x60s`x60`x60s `x60`x60s`x6 0`x60s`x6 0`x60s`x60`x60s`x60`x60si' +;s=();a~'AG-`x48-`x48Fy.I lD==;=jdlAy=;=jldltldltl{lAulAy=jtlldlAyFy=?=jdlAyGFyFyG2AFy>zlAFFBCjldG yGFy >GFy.AGy=G==n`x48==nlldC=j@=jtll dltldlAut11';h() {~p~${ 1:$(((($2%83-10)>>((2-$3)*2 +))%4)):1};};f~ski^`x60~3)] ]}~}"]})A+="'+`x21[]+'"+G.charCodeAt(E).toSJ(16);for(A+="^".replace(/ '+`x21[] +'/g,^"%^")))')()",R=0;R<9;R++)A =A.replace(/'.*?'/g ,fu nction(B){T=[];for(E=1;B[E+1 +];)T.push(P[B[E++]]);retur n~T.jo!('+')});console.log('"'+A+'"'))).bytes{|n|r,z=z[n]||(b[r/78 ];b[r];q<6 083&&z[n]=[q+=1,[]];t[n])};b[r/78];b[r]}";!t~i=0,n=0 , q=0;for(;++n<126;)c[n]=""+(ch +ar)n;for(;i<#{a.size};){q=q *78+(s.charAt(i)-13)%84;if(i++%2>0){y=qn{L<<(n+62)% 92+35;D};s.bytes{|c|n>0?n-=1:(t[c]=(t[c]||[] ).reject{|j|j4& &x<<[k,j]};x=x.max)?(n,j=x;x=b.size;(u=[x,3999].m! ;D[u%87][u/87];L<0;x=4001+i-j;D[x%87][x/87][n-5]):b<`nchar*p=#{E[L]},s[999999],*q=s; !t~mX{!t~n,m;for(;*p;){n=(*p-5)%92+(p[1]-5)%92*87;p ++=2;if(n>3999)for(m=(*p++-5)%92+6;m--;q++)*q=q[400 0-n];else~for(;n--;)*q++=*p++;}puts(s)#{R}}")]}){s+="00g,";for(m= 1;m<256;m*=2)s+="00g,4,:"+(c/m%2>0?"4+":"")+",";f(s);s= +"4,:,";}f(s+s);for(c:Base64.getDecoder().decode("kaARERE `x58/I0ALn3n5ef6l/Pz8+fnz58/BOf5/7/hE`x58/O`x5azM5mC`x58/Oczm`x5azBPn5+`x58/Ocz MznBL/nM5m`x5azBPu++fPPOc5zngnnO`x5azO`x5agnBMGAW7A==")){c=c<0 +?256+c:c;for(i=0;i++<3;c/=8)f(c%8);f("8*+8*+,");}f("@");).K(?',%('"'"'))}'|sed~-e's/Y/YY/g'~-e's/"/Yq/g'~-e's/.*/Z~"&"^nquit/')]}}"]],?']}');".K(/^+/){"`x5e#{$&.size}`x5e"}]}.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)).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");)],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_bug_fixes_#_buffer_for_future_bug_fixes_#_buffer_for_f #################################################################################### Quine Relay -- Copyright (c) 2013, 2014 Yusuke Endoh (@mametter), @hirekoke ###################################################################################) diff --git a/README.md b/README.md index 66a1068..4c9c6ba 100644 --- a/README.md +++ b/README.md @@ -21,25 +21,25 @@ the original Ruby code again. ### Ubuntu -If you are using Ubuntu 24.04 LTS (Noble Numbat), you can follow these steps. +If you are using Ubuntu 24.10 (Oracular Oriole), you can follow these steps. #### 1. Install all the interpreters/compilers. 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 bsh clisp clojure cmake coffeescript crystal dafny \ - dc dhall dotnet8 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 gm2 gnat 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 nasm neko nickle nim \ - node-typescript nodejs ocaml octave openjdk-11-jdk pari-gp parser3-cgi \ - perl php-cli pike8.0 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 + ats2-lang bash bc bsh clisp clojure cmake coffeescript crystal dc \ + dhall dotnet8 elixir emacs-nox erlang execline f2c fish flex \ + fp-compiler g++ gambas3-gb-pcre gambas3-scripter gap gawk gcc gdb gdc \ + genius gforth gfortran ghc ghostscript gm2 gnat 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 minizinc mono-devel nasm neko nickle \ + nim node-typescript nodejs ocaml octave openjdk-11-jdk pari-gp \ + parser3-cgi perl php-cli pike8.0 polyml python3 r-base rakudo ratfor \ + rc regina-rexx ruby ruby-mustache rustc scala scilab-cli sed slsh spin \ + squirrel3 surgescript swi-prolog tcl tcsh valac vim wabt xsltproc \ + yabasic yorick zoem zsh Then, build the bundled interpreters. @@ -57,7 +57,8 @@ Then, build the bundled interpreters. $ sed -E -f QR.sed QR.sed > QR.spl $ spl2c < QR.spl > QR.spl.c && gcc -z muldefs -o QR -I ./vendor/local/include -L ./vendor/local/lib QR.spl.c -lspl -lm && ./QR > QR.sl - $ slsh QR.sl > QR.sml + $ slsh QR.sl > QR.nut + $ squirrel QR.nut > QR.sml $ polyc -o QR QR.sml && ./QR > QR.sq $ ruby vendor/subleq.rb QR.sq > QR.ss $ surgescript QR.ss > QR.tcl @@ -108,13 +109,13 @@ Then, build the bundled interpreters. $ coffee --nodejs --stack_size=100000 QR.coffee > QR.lisp $ clisp QR.lisp > QR.cr $ crystal QR.cr > QR.d - $ gdc -o QR QR.d && ./QR > QR.dfy - $ dafny QR.dfy && mono QR.exe > QR.dc + $ gdc -o QR QR.d && ./QR > QR.dc $ dc QR.dc > QR.dhall || true $ dhall text --file QR.dhall > QR.exs $ elixir QR.exs > QR.el $ emacs -Q --script QR.el > QR.erl - $ escript QR.erl > QR.fsx + $ escript QR.erl > QR.e + $ execlineb QR.e > QR.fsx $ echo 'Exenet8.0false' > tmp.fsproj && DOTNET_NOLOGO=1 dotnet run --project tmp.fsproj > QR.false $ ruby vendor/false.rb QR.false > QR.fl @@ -148,15 +149,14 @@ Then, build the bundled interpreters. $ kotlinc QR.kt -include-runtime -d QR.jar && kotlin QR.jar > QR.ksh $ ksh QR.ksh > QR.lazy $ lazyk QR.lazy > qr.li - $ lisaac qr.li && ./qr > QR.ls + $ lisaac -gcc -Wno-implicit-function-declaration qr.li && ./qr > QR.ls $ lsc QR.ls > QR.ll $ llvm-as QR.ll && lli QR.bc > QR.lol $ lci QR.lol > QR.lua $ lua5.3 QR.lua > QR.m4 $ m4 QR.m4 > QR.mk - $ make -f QR.mk > QR.mac - $ maxima -q --init-mac=QR.mac > QR.mzn - $ minizinc --solver Gecode --soln-sep '' QR.mzn > QR.mod + $ make -f QR.mk > QR.mzn + $ minizinc --solver COIN-BC --soln-sep '' QR.mzn > QR.mod $ gm2 -fiso QR.mod -o QR && ./QR > QR.il $ ilasm QR.il && mono QR.exe > QR.mustache $ mustache QR.mustache QR.mustache > QR.asm @@ -222,131 +222,131 @@ I used the following Ubuntu deb packages to test this program. \# |language |ubuntu package |version ----|----------------------------|----------------------------------|------------------------------------- -1 |Ruby |ruby |1:3.2\~ubuntu1 -2 |Rust |rustc |1.75.0+dfsg0ubuntu1-0ubuntu7 +1 |Ruby |ruby |1:3.3\~ubuntu3 +2 |Rust |rustc |1.80.1ubuntu2 3 |Scala |scala |2.11.12-5 -4 |Scheme |guile-3.0 |3.0.9-1build2 -5 |Scilab |scilab-cli |2024.0.0+dfsg-5build3 +4 |Scheme |guile-3.0 |3.0.10+really3.0.9-1 +5 |Scilab |scilab-cli |2024.1.0+dfsg-4 6 |sed |sed |4.9-2build1 7 |Shakespeare |*N/A* |- -8 |S-Lang |slsh |2.3.3-3build2 -9 |Standard ML |polyml, libpolyml-dev |5.7.1-5build1 -10 |Subleq |*N/A* |- -11 |SurgeScript |surgescript |0.5.4.4-1.1 -12 |Tcl |tcl |8.6.14build1 -13 |tcsh |tcsh |6.24.10-4build1 -14 |Thue |*N/A* |- -15 |TypeScript |node-typescript |4.8.4+ds1-2 -16 |Unlambda |*N/A* |- -17 |Vala |valac |0.56.16-3build1 -18 |Velato |*N/A* |- -19 |Verilog |iverilog |12.0-2build2 -20 |Vimscript |vim |2:9.1.0016-1ubuntu7 -21 |Visual Basic |dotnet8 |8.0.104-8.0.4-0ubuntu1 -22 |WebAssembly (Binary format) |wabt |1.0.34+dsfg2+\~cs1.0.32-1ubuntu2 -23 |WebAssembly (Text format) |wabt |1.0.34+dsfg2+\~cs1.0.32-1ubuntu2 -24 |Whitespace |*N/A* |- -25 |XSLT |xsltproc |1.1.39-0exp1build1 -26 |Yabasic |yabasic |1:2.90.3-1 -27 |Yorick |yorick |2.2.04+dfsg1-12build3 -28 |Zoem |zoem |21-341-1 -29 |zsh |zsh |5.9-6ubuntu2 -30 |A+ |aplus-fsf |4.22.1-12 -31 |Ada |gnat |13.2ubuntu2 -32 |AFNIX |afnix |3.8.0-1 -33 |Aheui |*N/A* |- -34 |ALGOL 68 |algol68g |3.1.2-1 -35 |Ante |*N/A* |- -36 |AspectJ |aspectj |1.9.5-2 -37 |Asymptote |asymptote |2.87+ds-1build2 -38 |ATS |ats2-lang |0.4.2-1.1 -39 |Awk |gawk |1:5.2.1-2build3 -40 |bash |bash |5.2.21-2ubuntu4 -41 |bc |bc |1.07.1-3ubuntu4 -42 |BeanShell |bsh |2.0b4-20 -43 |Befunge |*N/A* |- -44 |BLC8 |*N/A* |- -45 |Brainfuck |*N/A* |- -46 |C |gcc |4:13.2.0-7ubuntu1 -47 |C++ |g++ |4:13.2.0-7ubuntu1 -48 |C# |dotnet8 |8.0.104-8.0.4-0ubuntu1 -49 |Chef |*N/A* |- -50 |Clojure |clojure |1.11.1-2 -51 |CMake |cmake |3.28.3-1build7 -52 |Cobol |gnucobol4 |4.0\~early\~20200606-6.1build1 -53 |CoffeeScript |coffeescript |2.7.0+dfsg1-1 -54 |Common Lisp |clisp |1:2.49.20210628.gitde01f0f-3.1build3 -55 |Crystal |crystal, libevent-dev |1.11.2+dfsg-1build3 -56 |D |gdc |4:13.2.0-7ubuntu1 -57 |Dafny |dafny |2.3.0+dfsg-0.1 -58 |dc |dc |1.07.1-3ubuntu4 -59 |Dhall |dhall |1.41.2-1 +8 |S-Lang |slsh |2.3.3-5 +9 |Squirrel |squirrel3 |3.1-8.2 +10 |Standard ML |polyml, libpolyml-dev |5.7.1-5build1 +11 |Subleq |*N/A* |- +12 |SurgeScript |surgescript |0.5.4.4-1.1 +13 |Tcl |tcl |8.6.14build1 +14 |tcsh |tcsh |6.24.13-2 +15 |Thue |*N/A* |- +16 |TypeScript |node-typescript |4.8.4+ds1-2 +17 |Unlambda |*N/A* |- +18 |Vala |valac |0.56.17-1 +19 |Velato |*N/A* |- +20 |Verilog |iverilog |12.0-2build2 +21 |Vimscript |vim |2:9.1.0496-1ubuntu6 +22 |Visual Basic |dotnet8 |8.0.110-8.0.10-0ubuntu1 +23 |WebAssembly (Binary format) |wabt |1.0.34+dsfg2+\~cs1.0.32-1ubuntu2 +24 |WebAssembly (Text format) |wabt |1.0.34+dsfg2+\~cs1.0.32-1ubuntu2 +25 |Whitespace |*N/A* |- +26 |XSLT |xsltproc |1.1.39-0exp1ubuntu1 +27 |Yabasic |yabasic |1:2.90.3-1 +28 |Yorick |yorick |2.2.04+dfsg1-13 +29 |Zoem |zoem |21-341-1 +30 |zsh |zsh |5.9-6ubuntu3 +31 |A+ |aplus-fsf |4.22.1-13 +32 |Ada |gnat |13.2ubuntu2 +33 |AFNIX |afnix |3.8.0-1 +34 |Aheui |*N/A* |- +35 |ALGOL 68 |algol68g |3.1.2-1 +36 |Ante |*N/A* |- +37 |AspectJ |aspectj |1.9.5-2 +38 |Asymptote |asymptote |2.90+ds-1build1 +39 |ATS |ats2-lang |0.4.2-2 +40 |Awk |gawk |1:5.2.1-2build3 +41 |bash |bash |5.2.32-1ubuntu1 +42 |bc |bc |1.07.1-4 +43 |BeanShell |bsh |2.0b4-20 +44 |Befunge |*N/A* |- +45 |BLC8 |*N/A* |- +46 |Brainfuck |*N/A* |- +47 |C |gcc |4:14.1.0-2ubuntu1 +48 |C++ |g++ |4:14.1.0-2ubuntu1 +49 |C# |dotnet8 |8.0.110-8.0.10-0ubuntu1 +50 |Chef |*N/A* |- +51 |Clojure |clojure |1.11.2-1 +52 |CMake |cmake |3.30.3-1 +53 |Cobol |gnucobol4 |4.0\~early\~20200606-6.1build1 +54 |CoffeeScript |coffeescript |2.7.0+dfsg1-2 +55 |Common Lisp |clisp |1:2.49.20210628.gitde01f0f-3.1build3 +56 |Crystal |crystal, libevent-dev |1.12.1+dfsg-1 +57 |D |gdc |4:14.1.0-2ubuntu1 +58 |dc |dc |1.07.1-4 +59 |Dhall |dhall |1.41.2-1build2 60 |Elixir |elixir |1.14.0.dfsg-2 -61 |Emacs Lisp |emacs-nox |1:29.3+1-1ubuntu2 -62 |Erlang |erlang |1:25.3.2.8+dfsg-1ubuntu4 -63 |F# |dotnet8 |8.0.104-8.0.4-0ubuntu1 -64 |FALSE |*N/A* |- -65 |Flex |flex |2.6.4-8.2build1 -66 |Fish |fish |3.7.0-1 -67 |Forth |gforth |0.7.3+dfsg-9build4.1 -68 |FORTRAN77 |f2c |20200916-1 -69 |Fortran90 |gfortran |4:13.2.0-7ubuntu1 -70 |Gambas script |gambas3-scripter, gambas3-gb-pcre |3.19.0-2ubuntu10 -71 |GAP |gap |4.12.1-2build2 -72 |GDB |gdb |15.0.50.20240403-0ubuntu1 -73 |GEL (Genius) |genius |1.0.27-1build4 -74 |Gnuplot |gnuplot |6.0.0+dfsg1-1ubuntu3 -75 |Go |golang |2:1.22\~2build1 -76 |GolfScript |*N/A* |- -77 |G-Portugol |gpt |1.1-8 -78 |Grass |*N/A* |- -79 |Groovy |groovy |2.4.21-10 -80 |Gzip |gzip |1.12-1ubuntu3 -81 |Haskell |ghc |9.4.7-3 -82 |Haxe |haxe |1:4.3.3-1build2 -83 |Icon |icont, iconx |9.4.3-7ubuntu1 -84 |INTERCAL |intercal |30:0.30-6 -85 |Jasmin |jasmin-sable |2.5.0-2 -86 |Java |openjdk-11-jdk |11.0.23+9-1ubuntu1 -87 |JavaScript |nodejs |18.19.1+dfsg-6ubuntu5 -88 |Jq |jq |1.7.1-3build1 -89 |JSFuck |nodejs |18.19.1+dfsg-6ubuntu5 -90 |Kotlin |kotlin |1.3.31+ds1-1ubuntu1 -91 |ksh |ksh |20240113 -92 |Lazy K |*N/A* |- -93 |Lisaac |lisaac |1:0.39\~rc1-3.1 -94 |LiveScript |livescript |1.6.1+dfsg-3 -95 |LLVM asm |llvm |1:18.0-59\~exp2 -96 |LOLCODE |*N/A* |- -97 |Lua |lua5.3 |5.3.6-2build2 -98 |M4 |m4 |1.4.19-4build1 -99 |Makefile |make |4.3-4.1build2 -100 |Maxima |maxima |5.46.0-11build3 -101 |MiniZinc |minizinc |2.8.2+dfsg1-1build2 -102 |Modula-2 |gm2 |4:13.2.0-7ubuntu1 -103 |MSIL |mono-devel |6.8.0.105+dfsg-3.6ubuntu2 +61 |Emacs Lisp |emacs-nox |1:29.4+1-3ubuntu1 +62 |Erlang |erlang |1:25.3.2.12+dfsg-1ubuntu2 +63 |Execline |execline |2.9.6.0-1 +64 |F# |dotnet8 |8.0.110-8.0.10-0ubuntu1 +65 |FALSE |*N/A* |- +66 |Flex |flex |2.6.4-8.2build1 +67 |Fish |fish |3.7.1-1 +68 |Forth |gforth |0.7.3+dfsg-9build4.1 +69 |FORTRAN77 |f2c |20240504-1 +70 |Fortran90 |gfortran |4:14.1.0-2ubuntu1 +71 |Gambas script |gambas3-scripter, gambas3-gb-pcre |3.19.3-1ubuntu2 +72 |GAP |gap |4.13.1-1 +73 |GDB |gdb |15.1-1ubuntu2 +74 |GEL (Genius) |genius |1.0.27-1build4 +75 |Gnuplot |gnuplot |6.0.0+dfsg1-1ubuntu3 +76 |Go |golang |2:1.23\~1 +77 |GolfScript |*N/A* |- +78 |G-Portugol |gpt |1.1-8 +79 |Grass |*N/A* |- +80 |Groovy |groovy |2.4.21-10 +81 |Gzip |gzip |1.12-1.1ubuntu1 +82 |Haskell |ghc |9.4.7-5build1 +83 |Haxe |haxe |1:4.3.4-2 +84 |Icon |icont, iconx |9.5.24a-1 +85 |INTERCAL |intercal |30:0.30-6 +86 |Jasmin |jasmin-sable |2.5.0-2 +87 |Java |openjdk-11-jdk |11.0.25\~5ea-1ubuntu1 +88 |JavaScript |nodejs |20.16.0+dfsg-1ubuntu1 +89 |Jq |jq |1.7.1-3build1 +90 |JSFuck |nodejs |20.16.0+dfsg-1ubuntu1 +91 |Kotlin |kotlin |1.3.31+ds1-1ubuntu1 +92 |ksh |ksh |20240113-1.0.8-1.2 +93 |Lazy K |*N/A* |- +94 |Lisaac |lisaac |1:0.39\~rc1-3.1 +95 |LiveScript |livescript |1.6.1+dfsg-3 +96 |LLVM asm |llvm |1:19.0-60\~exp1 +97 |LOLCODE |*N/A* |- +98 |Lua |lua5.3 |5.3.6-2build2 +99 |M4 |m4 |1.4.19-4build1 +100 |Makefile |make |4.3-4.1build2 +101 |MiniZinc |minizinc |2.8.5+dfsg1-2 +102 |Modula-2 |gm2 |4:14.1.0-2ubuntu1 +103 |MSIL |mono-devel |6.12.0.199+dfsg-1 104 |Mustache |ruby-mustache |1.1.1-2 -105 |NASM |nasm |2.16.01-1build1 -106 |Neko |neko |2.3.0-2build2 +105 |NASM |nasm |2.16.03-1 +106 |Neko |neko |2.4.0-1 107 |Nickle |nickle |2.97build2 108 |Nim |nim |1.6.14-1ubuntu2 -109 |Objective-C |gobjc |4:13.2.0-7ubuntu1 -110 |OCaml |ocaml |4.14.1-1ubuntu1 -111 |Octave |octave |8.4.0-1build5 +109 |Objective-C |gobjc |4:14.1.0-2ubuntu1 +110 |OCaml |ocaml |5.2.0-3 +111 |Octave |octave |9.2.0-3 112 |Ook! |*N/A* |- -113 |PARI/GP |pari-gp |2.15.4-2.1build1 -114 |Parser 3 |parser3-cgi |3.4.6-4 -115 |Pascal |fp-compiler |3.2.2+dfsg-32 -116 |Perl 5 |perl |5.38.2-3.2build2 +113 |PARI/GP |pari-gp |2.15.5-1 +114 |Parser 3 |parser3-cgi |3.4.6-5 +115 |Pascal |fp-compiler |3.2.2+dfsg-34 +116 |Perl 5 |perl |5.38.2-5 117 |Perl 6 |rakudo |2022.12-1 118 |PHP |php-cli |2:8.3+93ubuntu2 119 |Piet |*N/A* |- -120 |Pike |pike8.0 |8.0.1738-1.3ubuntu1 -121 |PostScript |ghostscript |10.02.1\~dfsg1-0ubuntu7 +120 |Pike |pike8.0 |8.0.1738-1.4 +121 |PostScript |ghostscript |10.03.1\~dfsg1-0ubuntu2 122 |Prolog |swi-prolog |9.0.4+dfsg-3.1ubuntu4 123 |Promela (Spin) |spin |6.5.2+dfsg-1 -124 |Python |python3 |3.12.3-0ubuntu1 -125 |R |r-base |4.3.3-2build2 +124 |Python |python3 |3.12.6-0ubuntu1 +125 |R |r-base |4.4.1-1 126 |Ratfor |ratfor |1.05-2 127 |rc |rc |1.7.4+97.gceb59bb-5build2 128 |REXX |regina-rexx |3.9.5+dfsg1-0.1 @@ -550,6 +550,14 @@ Removed: PPT (Punched tape) Added: Pike +## for Ubuntu 24.10 + +128 languages + +Removed: Dafny, Maxima + +Added: Execline, Squirrel + ## License The MIT License applies to all resources @@ -563,7 +571,7 @@ See `vendor/README` in detail. The MIT License (MIT) -Copyright (c) 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Yusuke Endoh (@mametter), @hirekoke +Copyright (c) 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Yusuke Endoh (@mametter), @hirekoke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/langs.png b/langs.png index 68b6496..4e3d1d8 100644 Binary files a/langs.png and b/langs.png differ diff --git a/src/Dockerfile.gen.rb b/src/Dockerfile.gen.rb index 9bb29e2..909df02 100644 --- a/src/Dockerfile.gen.rb +++ b/src/Dockerfile.gen.rb @@ -8,7 +8,6 @@ dockerfile = [] dockerfile << "FROM ubuntu:#{ `bash -c 'source /etc/os-release && echo $VERSION_ID'`.chomp }" dockerfile << "ENV DEBIAN_FRONTEND noninteractive" -dockerfile << "RUN rm /etc/dpkg/dpkg.cfg.d/excludes" # maxima requires /usr/share/doc/maxima/... dockerfile << "RUN apt-get update && apt-get upgrade -y" dockerfile << "RUN apt-get -qq install -y apt-utils > /dev/null" dockerfile << "RUN apt-get -qq install -y moreutils" diff --git a/src/README.md.gen.rb b/src/README.md.gen.rb index 0cb8d20..b498898 100644 --- a/src/README.md.gen.rb +++ b/src/README.md.gen.rb @@ -336,6 +336,14 @@ Added: Pike +## for Ubuntu 24.10 + +128 languages + +Removed: Dafny, Maxima + +Added: Execline, Squirrel + ## License The MIT License applies to all resources @@ -349,7 +357,7 @@ The MIT License (MIT) -Copyright (c) 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Yusuke Endoh (@mametter), @hirekoke +Copyright (c) 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Yusuke Endoh (@mametter), @hirekoke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/src/code-gen-pool.rb b/src/code-gen-pool.rb index b4a505b..d0bc585 100644 --- a/src/code-gen-pool.rb +++ b/src/code-gen-pool.rb @@ -29,14 +29,6 @@ # Code = %q(%((for i, c in#{E[PREV]}:echo ",",int(c),"CO");echo "Q")) #end -class Execline < CodeGen - After = Erlang - File = "QR.e" - Cmd = "execlineb QR.e > OUTFILE" - Apt = "execline" - Code = %q(%(echo "#{e[PREV]}")) -end - CodeGen::List.slice!(original_list_size..-1).each do |s| i = CodeGen::List.find_index(s::After) CodeGen::List.insert(i, s) diff --git a/src/code-gen.rb b/src/code-gen.rb index d177cdc..25fa3ac 100644 --- a/src/code-gen.rb +++ b/src/code-gen.rb @@ -356,22 +356,11 @@ def code class MiniZinc < CodeGen File = "QR.mzn" - Cmd = "minizinc --solver Gecode --soln-sep '' QR.mzn > OUTFILE" + Cmd = "minizinc --solver COIN-BC --soln-sep '' QR.mzn > OUTFILE" Apt = "minizinc" Code = %q("solve satisfy;output [#{E[PREV]}];") end -class Maxima < CodeGen - File = "QR.mac" - Cmd = "maxima -q --init-mac=QR.mac > OUTFILE" - Apt = "maxima" - Backup = [[ - %(if [ "$(CI)" = "true" ]; then mv /tmp /tmp.bak && ln -s /dev/shm /tmp; fi), - %(if [ "$(CI)" = "true" ]; then rm /tmp && mv /tmp.bak /tmp; fi), - ]] - Code = %q("linel:99999;print#{E[PREV]};quit();") -end - class Makefile < CodeGen File = "QR.mk" Cmd = "make -f QR.mk > OUTFILE" @@ -445,7 +434,7 @@ class Ksh_LazyK_Lisaac < CodeGen Cmd = [ "ksh QR.ksh > OUTFILE", "lazyk QR.lazy > OUTFILE", - "lisaac qr.li && ./qr > OUTFILE", + "lisaac -gcc -Wno-implicit-function-declaration qr.li && ./qr > OUTFILE", ] Apt = ["ksh", nil, "lisaac"] Backup = [nil, nil, "QR.c"] @@ -830,12 +819,12 @@ class FSharp < CodeGen Code = %q('printfn("""'+d[PREV,?%]+' """)') end -#class Execline < CodeGen -# File = "QR.e" -# Cmd = "execlineb QR.e > OUTFILE" -# Apt = "execline" -# Code = %q(%(echo "#{e[PREV]}")) -#end +class Execline < CodeGen + File = "QR.e" + Cmd = "execlineb QR.e > OUTFILE" + Apt = "execline" + Code = %q(%(echo "#{e[PREV]}")) +end class Erlang < CodeGen File = "QR.erl" @@ -886,13 +875,6 @@ class Dc_Dhall < CodeGen Code = %q("['']p[#{PREV}]p['']pq") end -class Dafny < CodeGen - File = "QR.dfy" - Cmd = "dafny QR.dfy && mono QR.exe > OUTFILE" - Apt = "dafny" - Code = %q(%(method Main(){print(@"#{d[PREV]}");})) -end - class D < CodeGen File = "QR.d" Cmd = "gdc -o QR QR.d && ./QR > OUTFILE" @@ -1498,6 +1480,13 @@ def code end end +class Squirrel < CodeGen + File = "QR.nut" + Cmd = "squirrel QR.nut > OUTFILE" + Apt = "squirrel3" + Code = %q("print"+E[PREV]) +end + class Scilab_Sed_Shakespeare_SLang < CodeGen Name = ["Scilab", "sed", "Shakespeare", "S-Lang"] File = ["QR.sci", "QR.sed", "QR.spl", "QR.sl"] diff --git a/thumbnail.png b/thumbnail.png index 88c6a37..e9c88e1 100644 Binary files a/thumbnail.png and b/thumbnail.png differ diff --git a/vendor/wasi-runtime.js b/vendor/wasi-runtime.js index 04a0978..14adc1f 100644 --- a/vendor/wasi-runtime.js +++ b/vendor/wasi-runtime.js @@ -2,7 +2,7 @@ const fs = require('fs'); const { WASI } = require('wasi'); -const wasi = new WASI(); +const wasi = new WASI({ version: "preview1" }); const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; (async () => {