Skip to main content
Removed dividing line
Source Link

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

+-----------+   Lang. A    +-----------+   Lang. B
| Program 1 | -----------> | Program 2 | -----------> "<Lang. A>"
| ---------          |              +-----------+
|   Your    |              +-----------+
|  Program  | -----------> | Program 3 | -----------> "<Lang. B>"
+-----------+   Lang. B    +-----------+   Lang. A

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

+-----------+   Lang. A    +-----------+   Lang. B
| Program 1 | -----------> | Program 2 | -----------> "<Lang. A>"
| --------- |              +-----------+
|   Your    |              +-----------+
|  Program  | -----------> | Program 3 | -----------> "<Lang. B>"
+-----------+   Lang. B    +-----------+   Lang. A

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

+-----------+   Lang. A    +-----------+   Lang. B
| Program 1 | -----------> | Program 2 | -----------> "<Lang. A>"
|           |              +-----------+
|   Your    |              +-----------+
|  Program  | -----------> | Program 3 | -----------> "<Lang. B>"
+-----------+   Lang. B    +-----------+   Lang. A

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.
Added diagram
Source Link

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

+-----------+   Lang. A    +-----------+   Lang. B
| Program 1 | -----------> | Program 2 | -----------> "<Lang. A>"
| --------- |              +-----------+
|   Your    |              +-----------+
|  Program  | -----------> | Program 3 | -----------> "<Lang. B>"
+-----------+   Lang. B    +-----------+   Lang. A

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

+-----------+   Lang. A    +-----------+   Lang. B
| Program 1 | -----------> | Program 2 | -----------> "<Lang. A>"
| --------- |              +-----------+
|   Your    |              +-----------+
|  Program  | -----------> | Program 3 | -----------> "<Lang. B>"
+-----------+   Lang. B    +-----------+   Lang. A

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.
Further explanation of uniqueness
Source Link

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.

Intertwined Polyglot

Write a program which when executed as language A, produces a different program in language B, which in turn produces the name of language A. And the other way round (B to A to B).

Rules

  • The produced programs must be unique both from each other, and from the original program.
  • Uniqueness is defined as at least one modified or moved printing character. Example: a bc => ab c would not be considered unique, whereas a bc=> a cb would.
  • The output may contain leading and/or trailing whitespace and/or newlines, so long as the language name is intact.
  • Your program(s) may not take any input.
  • This is , so fewest bytes wins.
Added definition of uniqueness to rules
Source Link
Loading
Source Link
Loading