HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mame
quine-relay
Ruby2013–2026
mame / quine-relay

quine-relay

An uroboros program with 100+ programming languages

93Distinct people
99Mentions
1Explicit recommenders
14.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An uroboros program with 100+ programming languages

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love his sense of humor too: https://github.com/mame/quine-relay/issues/10

minikomi used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year99 dated mentions

Observed mentions: 2013-07-15 14:59:43 UTC to 2026-08-07 10:01:08 UTC.

051015202013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 20 mentions; 3 submissions, 17 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 7 mentions; 4 submissions, 3 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 15 mentions; 5 submissions, 10 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 7 mentions; 2 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 2 submissions, 7 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 14 mentions; 5 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC20317
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC211
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC743
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC15510
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC725
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC422
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC523
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC927
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC1459
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC413
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC312
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC523

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Quine Relay What this is QR.rb is a Ruby program that generates a Rust program that generates a Scala program that generates ...(through 128 languages in total)... a REXX program that generates the original Ruby code again. (If you want to see the old 50-language version, see the 50 branch.) Usage Ubuntu If you are using Ubuntu 26.04 (Resolute Raccoon), 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 aspectj asymptote ats2-lang bash \ bc bsh clisp clojure cmake coffeescript crystal dc dhall \ dotnet-sdk-10.0 elixir emacs-nox erlang execline f2c fennel 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 \ livescript llvm lua5.3 m4 make minizinc mono-devel nasm neko nickle \ nim node-typescript nodejs ocaml octave openjdk-25-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 swiftlang tcl tcsh valac vim wabt \ xsltproc yabasic yorick zoem zsh Then, build the bundled interpreters. $ sudo apt-get install cmake libpng-dev libgd-dev libfl-dev groff bison curl $ make -C vendor 2. Run each program on each interpreter/compiler. $ ulimit -s unlimited $ ruby QR.rb > QR.rs $ rustc QR.rs && ./QR > QR.scala $ scalac QR.scala && scala QR > QR.scm $ guile QR.scm > QR.sci $ scilab-cli -nb -f QR.sci > QR.sed $ 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.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.swift $ swiftc QR.swift && ./QR > QR.tcl $ tclsh QR.tcl > QR.tcsh $ tcsh QR.tcsh > QR.t $ ruby vendor/thue.rb QR.t > QR.ts $ tsc --outFile QR.ts.js QR.ts && nodejs QR.ts.js > QR.unl $ ruby vendor/unlambda.rb QR.unl > QR.vala $ valac QR.vala && ./QR > QR.mid $ 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 $ echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net10.0</TargetFramework><EnableDefaultCompileItems>false</EnableDefaultCompileItems></PropertyGroup><ItemGroup><Compile Include="QR.vb" /></ItemGroup></Project>' > 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 $ xsltproc QR.xslt > QR.yab $ yabasic QR.yab > QR.yorick $ yorick -batch QR.yorick > QR.azm $ zoem -i QR.azm > QR.zsh $ zsh QR.zsh > qr.adb $ gnatmake qr.adb && ./qr > QR.als $ LANG=C LD_LIBRARY_PATH=/usr/lib/afnix axi QR.als > QR.aheui $ ruby vendor/aheui.rb QR.aheui > QR.a68 $ a68g QR.a68 > QR.ante $ ruby vendor/ante.rb QR.ante > QR.aj $ ajc QR.aj && java QR > QR.asy $ asy QR.asy > QR.dats $ patscc -o QR QR.dats && ./QR > QR.awk $ awk -f QR.awk > QR.bash $ bash QR.bash > QR.bc $ BC_LINE_LENGTH=4000000 bc -q QR.bc > QR.bsh $ bsh QR.bsh > QR.bef $ cfunge QR.bef > QR.Blc $ ruby vendor/blc.rb < QR.Blc > QR.bf $ ruby vendor/bf.rb QR.bf > QR.c $ gcc -o QR QR.c && ./QR > QR.cpp $ g++ -o QR QR.cpp && ./QR > QR.cs $ echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net10.0</TargetFramework><EnableDefaultCompileItems>false</EnableDefaultCompileItems></PropertyGroup><ItemGroup><Compile Include="QR.cs" /></ItemGroup></Project>' > 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 $ cmake -P QR.cmake > QR.cob $ cobc -O2 -x QR.cob && ./QR > QR.coffee $ 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.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.e $ execlineb QR.e > QR.fsx $ echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net10.0</TargetFramework><EnableDefaultCompileItems>false</EnableDefaultCompileItems></PropertyGroup><ItemGroup><Compile Include="QR.fsx" /></ItemGroup></Project>' > tmp.fsproj && DOTNET_NOLOGO=1 dotnet run --project tmp.fsproj > QR.false $ ruby vendor/false.rb QR.false > QR.fnl $ fennel QR.fnl > QR.fl $ flex -o QR.fl.c QR.fl && gcc -o QR QR.fl.c && ./QR > QR.fish $ fish QR.fish > QR.fs $ gforth QR.fs > QR.f $ gfortran -o QR QR.f && ./QR > QR.f90 $ gfortran -o QR QR.f90 && ./QR > QR.gbs $ gbs3 QR.gbs > QR.g $ gap -q QR.g > QR.gdb $ gdb -q -x QR.gdb > QR.gel $ genius QR.gel > QR.plt $ gnuplot QR.plt > QR.go $ go run QR.go > QR.gs $ ruby vendor/golfscript.rb QR.gs > QR.gpt $ mv QR.c QR.c.bak && gpt -t QR.c QR.gpt && gcc -o QR QR.c && ./QR > QR.grass && mv QR.c.bak QR.c $ ruby vendor/grass.rb QR.grass > QR.groovy $ groovy QR.groovy > QR.gz $ gzip -cd QR.gz > QR.hs $ rm -f QR.o && ghc QR.hs && ./QR > QR.hx $ haxe -main QR -neko QR.n && neko QR.n > QR.icn $ icont -s QR.icn && ./QR > QR.i $ ick -bfOc QR.i && gcc -std=c99 -static QR.c -I /usr/include/ick-* -o QR -lick && ./QR > QR.j $ jasmin QR.j && java QR > QR.java $ javac QR.java && java QR > QR.js $ nodejs QR.js > QR.jq $ jq -r -n -f QR.jq > QR.jsfuck $ nodejs --stack_size=100000 QR.jsfuck > QR.kt $ kotlinc QR.kt -include-runtime -d QR.jar && kotlin QR.jar > QR.ksh $ ksh QR.ksh > QR.lazy $ lazyk QR.lazy >
Read the full README on GitHub

What Hacker News says

99 sources
It's a video talking about and showcasing some "strange loops" (an idea coined by Douglas Hofstadter in his book "Gödel, Escher, Bach"). Probably most interesting to the people here is the quine relay: https://github.com/mame/quine-relay ("a Ruby program that generates a Rust program that generates a Scala program that generates ...(through 128 languages in total)... a REXX program that generates the original Ruby code again") Also around 6:50 he shows a nice little easter egg in the quine of a RubyConf talk by Yusuke Endoh (mame). The talk is also full of really nice examples: https://www.youtube.com/watch?v=VDk---TgCv4
In Shorter is longer than longer [video]
This project has always fascinated me, so I tried making a tiny uroboros quine with Python -> Javascript -> Python -> etc. I started with a quine for each language, and tried inserting them into each other, but the output always grew exponentially. py_quine_template = "s = {}; print(s.format(repr(s)))" py_quine = py_quine_template.format(repr(py_quine_template)) js_quine_template = "s = {}; console.log(s.replace('{}', JSON.stringify(s)))" js_quine = js_quine_template.format(repr(js_quine_template)) py_js_quine = py_quine_template.format(repr(js_quine_template)) ??? So I checked how it's done in the Github repo[1], but the language snippets only seemed to be quoting and printing without any self-references like you'd expect in a quine... Then it hit me. You only need the quine machinery in one language. If I
Read the rest
can make a Python script that has a string with its own source code, then the Javascript code will simply be `console.log(py_source)`, no manipulation necessary. So here's my Python/Javascript uroboros quine: s = "s = {}\npy_source = s.format(repr(s))\nprint('console.log('+repr(py_source)+')')" py_source = s.format(repr(s)) print('console.log('+repr(py_source)+')') If there were more languages, then it'd be `console.log("System.out.println({python_source})")`, etc. The problem then becomes escaping inner quotes, and escaping the escape characters themselves. I managed to sidestep the issue by using two types of quotes, and relying on Python's `repr` also giving valid JS strings, but if I had to add just one more language I'd need a lot more scaffolding. I still think the Quine Relay is a tour de force, but now for different reasons. It's not 128 quines in different languages, but an incredibly robust system for escaping strings in 128 wildly different languages. [1] https://github.com/mame/quine-relay/blob/master/src/code-gen...
In Radiation-hardened Quine (2014)
Quine relay [1] is to this day the most "I will never understand this" brainfuck project I have ever seen. > This is a Ruby program that generates Rust program that generates Scala program that generates ...(through 128 languages in total, including brainfuck!)... REXX program that generates the original Ruby code again. It is so mysterious how it's even possible, and hilariously the explanation of how it was made exists in Japanese only. I think at this point it would be easier to learn Japanese than to try to understand this project. Other things like a brainfuck interpreter in brainfuck are impressive but don't come nearly as close to black magic as quine-relay. [1] https://github.com/mame/quine-relay
In 30 years of Brainfuck
Read the rest
id=8602122 https://news.ycombinator.com/item?id=10719317 Not exactly what you asked for, but, some similar fun stuff.
In Time.gif (2017)

Showing the 15 most recent of 99 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.