A poly-moly-holy quine. (Well, it's not, but the title's cool.)

3

0

This is an answer chaining puzzle, where each answer must add on to the last.

The \$n\$th submission must output its own source code in the \$n\$th language and the \$n−1\$ languages before it.

A language can be either a dialect or a major version of a language, so Python version 2.121 is only counted as version 2 and Common Lisp and Clojure are considered different languages. This excludes compiler flags.

You can post 2 answers in a row, but have to use different languages.

The winner of this puzzle is the person to submit the second-to-last quine if there have been no new quines for a week. The aim of this puzzle is to go on as long as it can, so if you want the green tick, you'll have to respect that.

Have fun.

Andrew

Posted 2019-03-14T21:34:25.060

Reputation: 2 067

2But other than that, creative and cool challenge! (Just a note, don't be offended by the downvotes, they are just indicating whether it would be good for the site in it's current form). Also, "output its own source code in n different languages" may seem a little bit too hard for an answer-chaining questions, so you may want to change that to the current language instead of all the previous languages. – MilkyWay90 – 2019-03-15T00:59:19.070

Well actually re: scoring, one thing you can do is copy the other polyglot-chaining problem, which has a scoring metric based on both number of languages and code size – ASCII-only – 2019-03-15T06:25:33.570

Let us continue this discussion in chat.

– Andrew – 2019-03-15T14:15:21.067

1Are there any rules on one person posting two answers in a row? – Jo King – 2019-03-16T07:11:47.043

Answers

6

><>, 187 bytes

var s=1
<0?"":"var s=1{0}<0?{1}{1}:{1}{3}{1};Write(s,(char)10,(char)34,(char)39,s)//.1+d*fao;!?l{1}var s=1{1}ar*3dr{2}";Write(s,(char)10,(char)34,(char)39,s)//.1+d*fao;!?l"var s=1"ar*3dr'

Try it online!

Try C# Online

Let's add a 2D language, why not?

Jo King

Posted 2019-03-14T21:34:25.060

Reputation: 38 234

Just for your info: if you plan to submit again, the quine must only work properly for this lang and another one of your choice, while still including the C# code. – Andrew – 2019-03-15T13:42:51.613

No. You have to use other people's languages, leave all the previous stuff intact, while adding on your thing. However, the result only needs to work like a quine for whatever lang you choose next and the one in the last submission. If I added something as the third last submission, the quine could work like mud in my language but work perfectly in yours and in the last one. – Andrew – 2019-03-15T13:50:42.483

I'm reverting it to the polyquine challenge. – Andrew – 2019-03-15T14:03:51.087

I get 1 What do you want 0/0 to be? What do you want 0/0 to be? when I try running this in Befunge, lol – MilkyWay90 – 2019-03-16T01:01:41.960

@MilkyWay90 Yeah, if you're going to add Befunge-98 to this, then you're either going to have to get rid of the "s in the C# code, or have to use nk', e.g. like this quine

– Jo King – 2019-03-16T02:17:29.223

@JoKing Was just seeing if I could implement a quine in Befunge with still maintaining compatibility with the previous languages easily; I probably could not solve a hard solution to this problem – MilkyWay90 – 2019-03-16T02:19:34.407

4

C# (Visual C# Interactive Compiler), 63 bytes

var s="var s={0}{1}{0};Write(s,(char)34,s)";Write(s,(char)34,s)

Just to start it off.

Try it online!

Embodiment of Ignorance

Posted 2019-03-14T21:34:25.060

Reputation: 7 014

I've written a polyglot with ><> (Try it online!), but I can't post it since it breaks the 50+ chars rule :(

– Jo King – 2019-03-15T00:31:41.777

@JoKing It also seems to break the no STDERR rule ("something smells fishy...") – MilkyWay90 – 2019-03-15T01:00:12.033

@JoKing it isn't impossible, see here. Granted, the two languages are basically the same, but you know, it's the implementation that counts

– Embodiment of Ignorance – 2019-03-15T02:28:39.190

@JoKing and we can make it work for all 5 c# compilers if we wrap the whole thing into a lambda, since all 5 basically are the same language – Embodiment of Ignorance – 2019-03-15T02:29:29.047

3Okay, but try making a polyquine with a language that isn't C# and see how far you get. (P.S. I've always been annoyed with the implementation vs languages ruling when it comes to polyglots. You wouldn't post a program and say "This is a polyglot with all 16 implementations of the language, because all of them work exactly the same". It's only really a polyglot if none of the languages do the exact same thing with the program) – Jo King – 2019-03-15T02:46:06.577

2

An example of a bullshit polyglot is your previous answer here which "scored" infinity, because the "languages" had literally no difference between them

– Jo King – 2019-03-15T02:47:18.230