Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)
Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)

🔧 Programmierung 🕛 vor 2 Jahren 7 Min Lesezeit
0

MultiQuine. Weaving the web of Quines

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht
📺
dev.to

Previously, we've seen how to construct . Now, prepare to have your minds blown once again as we unlock the next level of Quine wizardry: . But if it is called with a particular command line argument, it will print a different program, its "sibling". Its sibling is also a Quine, but in a different programming language, so its sibling prints its own source code when run normally. But when run with a particular command line argument, the sibling prints the source code of the original program. So in effect, a Bi-Quine is a set of two programs each of which is able to print either of the two.



Essentially, MultiQuines are set of n programs, in n different languages such that:




  • Each program is a valid Quine and outputs itself when executed with no input.

  • Each program can output the source of any other program in the set, according to the command line argument it is passed.
    Think Fully-Connected-Graph here.




All MultiQuines are QuineRelays, but all QuineRelays are not MultiQuines.




Note that cheating is not allowed: the command line arguments must not be too long — passing the full source of a program is considered cheating.









5th-order MultiQuine (PentaQuine)



Here's a 5th-order MultiQuine made up of Python, Perl, F#, newLISP, and C.







25th-order MultiQuine



A MultiQuine consisting of 25 languages, from Ruby, Octave, CoffeScript, JavaScript, Python and 20 more.

and states:




I read somewhere that everybody on this planet is separated by only six other people. Six degrees of separation between us and everyone else on this planet. The President of the United States, a gondolier in Venice, just fill in the names. I find it extremely comforting that we're so close. I also find it like Chinese water torture, that we're so close because you have to find the right six people to make the right connection... I am bound, you are bound, to everyone on this planet by a trail of six people.




This phenomenon is also called (Play with argument py or js)




CODE
d1 = "import sys; print('d1 =', repr(d1)); print('d2 =', repr(d2)); print(d2 if len(sys.argv) > 1 and sys.argv[1] == 'js' else d1)"
d2 = "console.log(`d1 = ${JSON.stringify(d1)}`); console.log(`d2 = ${JSON.stringify(d2)}`); console.log(process.argv.length > 2 && process.argv[2] == 'py' ? d1 : d2);"
import sys; print('d1 =', repr(d1)); print('d2 =', repr(d2)); print(d2 if len(sys.argv) > 1 and sys.argv[1] == 'js' else d1)






JavaScript: has written a C/Perl Bi-Quine. For fun, only the : xyzzy as the argument. In the C version, c_data is the main data set and perl_data is an intron; in the Perl version, of course, things are reversed.



One peculiar thing, you might notice in the above C/Perl example, is that the data section is encoded as an array of numbers. This is a common trick to avoid having to deal with nested quoting problem, while writing Quines. In fact if one wanted to, each data set could use a different coding mechanism, or even an encryption mechanism, although you'd need a key to decrypt it in the code section.



Stay tuned for the next post on , blog by David Madore.


  • , GitHub repo by Lu Wang.


  • , Youtube video clip from the movie Six Degrees of Separation.


  • , , set of four self-referencing blogs that link to each other in a fully-connected graph.

  • Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    3 Quellen
    Use custom web fonts in Google Sheets charts
    2 Quellen
    Introducing the new 1Password App for Google Chat
    1 Quelle
    Context-aware access controls are available for Gemini Enterprise in the Admin console
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten MultiQuine. Weaving the web of Quines

    Thematisch verwandte Begriffe: MultiQuine, Weaving, Quines · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...