11
\$\begingroup\$

Your task is simple: Write a program that can be run in two languages. It should be a normal quine (prints its own source code) in language 1, and should be an error quine (generates an error message identical to its own source code) in language 2.

This is , so the shortest valid submission (in bytes) wins.

Rules:

  • The languages may be arbitrarily similar. Supersets/similar versions/similar dialects are not disallowed.
  • The error quine rules are the same as those in Make an Error Quine!.
\$\endgroup\$
  • \$\begingroup\$ Related, and Related. \$\endgroup\$ – Esolanging Fruit May 28 '17 at 6:04
  • \$\begingroup\$ Are two different dialects of BASIC allowed? \$\endgroup\$ – MD XF May 29 '17 at 4:28
  • \$\begingroup\$ @MDXF If they have the exact same behavior except that one outputs to STDERR instead, then no. Otherwise, yes. \$\endgroup\$ – Esolanging Fruit May 29 '17 at 6:31
  • \$\begingroup\$ So my answer is valid, then. \$\endgroup\$ – MD XF May 29 '17 at 14:58
  • \$\begingroup\$ @MDXF It is valid. \$\endgroup\$ – Esolanging Fruit May 29 '17 at 20:41
1
\$\begingroup\$

Applesoft BASIC / Commodore LCD BASIC, 13 bytes

?SYNTAX ERROR

In the Apple ][ emulator, hit the RESET key to enter BASIC mode.
In the Commodore LCD emulator, hit RightArrowEnter to get into the BASIC application.
In both of them, don't type ?SYNTAX ERROR in all caps, because they automatically capitalize.

\$\endgroup\$
  • 1
    \$\begingroup\$ non-competing status is reserved for submissions in languages that were made after the challenge. If it is invalid according to the rules, delete it. Await OP's confirmation first because I think this should be valid (assuming it works). \$\endgroup\$ – HyperNeutrino May 29 '17 at 5:05
  • \$\begingroup\$ @HyperNeutrino Thanks, edited. \$\endgroup\$ – MD XF May 29 '17 at 14:57
  • 1
    \$\begingroup\$ Going to have to suspect this one too, then. This question is rather more brutal than it looks... \$\endgroup\$ – Ørjan Johansen May 30 '17 at 18:48
  • 1
    \$\begingroup\$ @ØrjanJohansen Well, I'm not so sure about this one. Technically, the Commore LCD had no standard error byte stream, so is it really an error quine? \$\endgroup\$ – MD XF May 30 '17 at 18:50
  • 1
    \$\begingroup\$ @ØrjanJohansen this? I guess that could mean it's impossible to tell whether this is valid or not. We could wait for confirmation from the OP? \$\endgroup\$ – MD XF May 30 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.