3 ms·
A Haskell program that prints out a Perl program that prints out...
- bediger 16y agoApparently these are called "ouroboros programs". http://asiajin.com/blog/2009/09/22/uroboros-programming-with-11-programming-languages/ http://asiajin.com/blog/2009/09/22/uroboros-programming-with... (which serves an empty page to me right now) used to have a period-11 cycle of programs. I wrote a period-3 program (http://www.stratigery.com/source.html#Ouroboros http://www.stratigery.com/source.html#Ouroboros).
- seles 16y agohttp://golf.shinh.org/reveal.rb?Quine/shinh+%28C+C%2B%2B+Ruby+Python+PHP+Perl%29_1194650418&rb http://golf.shinh.org/reveal.rb?Quine/shinh+%28C+C%2B%2B+Rub... Here is a 396 byte C program that prints a C++ program that prints a Ruby program that prints a Python program that prints a PHP program that prints a Perl program, that prints the original C program. Coincidentally that program is the same in all languages :) it is a polygot. This is definitely a much harder problem than just cycling through the languages...