Re:A Ruby program that generates itself through a 128-langua...
by ohwellhere on Thursday October 06, 2022 @09:39AM
(#33108015)
He didn't say it was easy at all, he simply pointed out that the required knowledge of each language is a subset of the total available functionality of each language.
Re:A Ruby program that generates itself through a 128-langua...
by lifthrasiir on Thursday October 06, 2022 @11:28AM
(#33109514)
"Easier than polyglot" does not mean "easy". :-) But I took a bit of time to produce a three-language quine relay elsewhere in this thread [1], and it is relatively easy to follow. The quine stuff (and thus every necessary quoting) is done in Ruby here, Python and Java only prints an appropriately quoted string.
Of course there should be several intermediate steps to keep the number of quotes reasonable (since it will be exponentially increasing in most languages), and that's probably why there are hexdumps after about 20ish languages.
Making a quine relay is substantially more complicated, because you don't just print the quoted string, you have to print the quoted version of a string in a different language, but that unwraps to the same thing 128 applications later!
If you still think it's easy, I reckon you should write us a quine relay of just 3 languages and then explain how simple it is.