Hacker News new | past | comments | ask | show | jobs | submit login

The source code equivalent of this is a polyglot program:

https://en.wikipedia.org/wiki/Polyglot_(computing)

Apparently people on Stack Exchange have been working together on a single polyglot program for four years and have gotten a single codebase up to validity in nearly 300 languages.

https://codegolf.stackexchange.com/questions/102370/add-a-la...

Edit: also, Yusuke Endoh is a master at this art form

https://github.com/mame/quine-relay

and has even written a book about it

http://uguu.org/words/2015_10_01.html

which I would still love to have available in English!




+1 for the mention of Endoh's work -- Yusuke Endoh's YouTube channel with many of his quines is really fantastic: https://www.youtube.com/c/YusukeEndoh/videos

A quine that prints itself as scrolling text in an AVI file: https://www.youtube.com/watch?v=rMlJy5He-Tk

A self-similar quine that behaves like a fractal zooming out infinitely: https://www.youtube.com/watch?v=6J7u2G52scc

A quine with source code that contains sheet music to a Bach song in comments and plays it: https://www.youtube.com/watch?v=OryXKUgRVOg


>Apparently people on Stack Exchange have been working together on a single polyglot program for four years and have gotten a single codebase up to validity in nearly 300 languages.

Wow, what a link. I submitted it just now as a separate HN post using your phrasing:

https://news.ycombinator.com/item?id=24257630


Classical examples of chimera/polyglots are:

PoC||GTFO International Journal of Proof-of-Concept or ... https://www.alchemistowl.org/pocorgtfo/

Corkami: https://github.com/corkami




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: