3 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

# Quine tree

For this challenge, you must construct a quine tree, which is a thing I made up, specifically an infinite binary tree.

How a quine tree works:

A quine tree has infinite nodes.

• Each node is associated with a program

• Let X, Y, Z, be the programming languages. This program is a polyglot in X and Y. In all but the root node, it is also a polyglot in Z. Note the

• see below for more details

• Each node has exactly two children

• Every node but the root has a parent. Their parent has the node as a child (obviously).

Programs:

• When a node's program is run in X, it produces the program of the first child of that node.
• When run in Y, it produces the program of the second child of that node.
• The programs produced must be different (node foo's program, cannot have the same output in X and Y. This output must also be different than the nodes program).
• If not the root node, when run in Z, it produces the parent of the node.

## Example

Imagine that we have the (fake) programming languages Hello, World, and Foobaz. Say the root node is $QQ$QQ$;: • when run in Hello, perhaps it produces $QQ$QQ$;;
• When this is run with Hello again, perhaps produces $QQ$QQ$;;; • When this is run with World, perhaps produces $QQ$QQ$;;Q
• Both these programs must produce, run in Foobaz, $QQ$QQ$;; (Output of root node run in Hello) • when run in World, perhaps it produces $QQ$QQ$;Q
• When this is run with Hello, perhaps produces $QQ$QQ$;Q; • When this is run with World again, perhaps produces $QQ$QQ$;QQ
• Both these programs must produce, run in Foobaz, $QQ$QQ$;Q (Output of root node run in World) • Both these programs, run in Foobaz, must produce $QQ$QQ$; (root program).

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must construct a quine tree, which is a thing I made up, specifically an infinite binary tree.

How a quine tree works:

A quine tree has infinite nodes.

• Each node is associated with a program

• Let X, Y, Z, be the programming languages. This program is a polyglot in X and Y. In all but the root node, it is also a polyglot in Z. Note the

• see below for more details

• Each node has exactly two children

• Every node but the root has a parent. Their parent has the node as a child (obviously).

Programs:

• When a node's program is run in X, it produces the program of the first child of that node.
• When run in Y, it produces the program of the second child of that node.
• The programs produced must be different (node foo's program, cannot have the same output in X and Y. This output must also be different than the nodes program).
• If not the root node, when run in Z, it produces the parent of the node.

## Example

Imagine that we have the (fake) programming languages Hello, World, and Foobaz. Say the root node is $QQ$QQ$;: • when run in Hello, perhaps it produces $QQ$QQ$;;
• When this is run with Hello again, perhaps produces $QQ$QQ$;;; • When this is run with World, perhaps produces $QQ$QQ$;;Q
• Both these programs must produce, run in Foobaz, $QQ$QQ$;; (Output of root node run in Hello) • when run in World, perhaps it produces $QQ$QQ$;Q
• When this is run with Hello, perhaps produces $QQ$QQ$;Q; • When this is run with World again, perhaps produces $QQ$QQ$;QQ
• Both these programs must produce, run in Foobaz, $QQ$QQ$;Q (Output of root node run in World) • Both these programs, run in Foobaz, must produce $QQ$QQ$; (root program).

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must construct a quine tree, which is a thing I made up, specifically an infinite binary tree.

How a quine tree works:

A quine tree has infinite nodes.

• Each node is associated with a program

• Let X, Y, Z, be the programming languages. This program is a polyglot in X and Y. In all but the root node, it is also a polyglot in Z. Note the

• see below for more details

• Each node has exactly two children

• Every node but the root has a parent. Their parent has the node as a child (obviously).

Programs:

• When a node's program is run in X, it produces the program of the first child of that node.
• When run in Y, it produces the program of the second child of that node.
• The programs produced must be different (node foo's program, cannot have the same output in X and Y. This output must also be different than the nodes program).
• If not the root node, when run in Z, it produces the parent of the node.

## Example

Imagine that we have the (fake) programming languages Hello, World, and Foobaz. Say the root node is $QQ$QQ$;: • when run in Hello, perhaps it produces $QQ$QQ$;;
• When this is run with Hello again, perhaps produces $QQ$QQ$;;; • When this is run with World, perhaps produces $QQ$QQ$;;Q
• Both these programs must produce, run in Foobaz, $QQ$QQ$;; (Output of root node run in Hello) • when run in World, perhaps it produces $QQ$QQ$;Q
• When this is run with Hello, perhaps produces $QQ$QQ$;Q; • When this is run with World again, perhaps produces $QQ$QQ$;QQ
• Both these programs must produce, run in Foobaz, $QQ$QQ$;Q (Output of root node run in World) • Both these programs, run in Foobaz, must produce $QQ$QQ$; (root program).
2 added 787 characters in body

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must choose three languages.construct a quine (Sandbox: not sure if different versions of same language (Python 2 and 3) should be allowed) These languages will be referred to as Xtree, Ywhich is a thing I made up, Zspecifically an infinite binary tree. For this challenge, you must write

How a program. This program mustquine tree works:

A quine tree has infinite nodes.

• be runnable in X and YEach node is associated with a program

• Let X, Y, Z, be the programming languages. This program is a polyglot in X and Y. In all but the root node, it is also a polyglot in Z. Note the

• see below for more details

• produce a program that conforms to the rules below when run in XEach node has exactly two children

• produceEvery node but the root has a different program that conforms toparent. Their parent has the rules below when run in Ynode as a child (obviously).

The programs produced conform to the same rules as the first, exceptPrograms:

• When a node's program is run in ZX, it must produceproduces the program of the first child of that produced itnode.
• When run in Y, when it was runproduces the program of the second child of that node.
• The programs produced must be different (node foo's program, cannot have the same output in X orand Y. This output must also be different than the nodes program).
• If not the root node, when run in Z, it produces the parent of the node.

Hence, the programs create a tree

      .
X / \ Y
/   \
X /\Y X/\Y
/  \ /  \
[...]


## Example

Each of these lines is also traversable by running in Z, which goes up one inImagine that we have the tree(fake) programming languages Hello, World, and Foobaz.

The following things are irrelevant Say the root node is $QQ$QQ$;: • Whether the created program is largerwhen run in Hello, perhaps it produces $QQ$QQ$;;
• When this is run with Hello again, perhaps produces $QQ$QQ$;;; • When this is run with World, perhaps produces $QQ$QQ$;;Q
• Both these programs must produce, run in Foobaz, $QQ$QQ$;; (Output of root node run in Hello) • Whether the first program runswhen run in ZWorld, perhaps it produces $QQ$QQ$;Q
• When this is run with Hello, perhaps produces $QQ$QQ$;Q; • When this is run with World again, perhaps produces $QQ$QQ$;QQ
• Both these programs must produce, run in Foobaz, $QQ$QQ$;Q (Output of root node run in World) • Whether created program resembles the creatingBoth these programs, run in Foobaz, must produce $QQ$QQ$; (root program).

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must choose three languages. (Sandbox: not sure if different versions of same language (Python 2 and 3) should be allowed) These languages will be referred to as X, Y, Z. For this challenge, you must write a program. This program must:

• be runnable in X and Y

• produce a program that conforms to the rules below when run in X

• produce a different program that conforms to the rules below when run in Y

The programs produced conform to the same rules as the first, except:

• When run in Z, it must produce the program that produced it, when it was run in X or Y

Hence, the programs create a tree

      .
X / \ Y
/   \
X /\Y X/\Y
/  \ /  \
[...]


Each of these lines is also traversable by running in Z, which goes up one in the tree.

The following things are irrelevant:

• Whether the created program is larger
• Whether the first program runs in Z
• Whether created program resembles the creating program

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must construct a quine tree, which is a thing I made up, specifically an infinite binary tree.

How a quine tree works:

A quine tree has infinite nodes.

• Each node is associated with a program

• Let X, Y, Z, be the programming languages. This program is a polyglot in X and Y. In all but the root node, it is also a polyglot in Z. Note the

• see below for more details

• Each node has exactly two children

• Every node but the root has a parent. Their parent has the node as a child (obviously).

Programs:

• When a node's program is run in X, it produces the program of the first child of that node.
• When run in Y, it produces the program of the second child of that node.
• The programs produced must be different (node foo's program, cannot have the same output in X and Y. This output must also be different than the nodes program).
• If not the root node, when run in Z, it produces the parent of the node.

## Example

Imagine that we have the (fake) programming languages Hello, World, and Foobaz. Say the root node is $QQ$QQ$;: • when run in Hello, perhaps it produces $QQ$QQ$;;
• When this is run with Hello again, perhaps produces $QQ$QQ$;;; • When this is run with World, perhaps produces $QQ$QQ$;;Q
• Both these programs must produce, run in Foobaz, $QQ$QQ$;; (Output of root node run in Hello) • when run in World, perhaps it produces $QQ$QQ$;Q
• When this is run with Hello, perhaps produces $QQ$QQ$;Q; • When this is run with World again, perhaps produces $QQ$QQ$;QQ
• Both these programs must produce, run in Foobaz, $QQ$QQ$;Q (Output of root node run in World) • Both these programs, run in Foobaz, must produce $QQ$QQ$; (root program).
1

# Quine tree

Inspired by that really weird quine challenge

For this challenge, you must choose three languages. (Sandbox: not sure if different versions of same language (Python 2 and 3) should be allowed) These languages will be referred to as X, Y, Z. For this challenge, you must write a program. This program must:

• be runnable in X and Y

• produce a program that conforms to the rules below when run in X

• produce a different program that conforms to the rules below when run in Y

The programs produced conform to the same rules as the first, except:

• When run in Z, it must produce the program that produced it, when it was run in X or Y

Hence, the programs create a tree

      .
X / \ Y
/   \
X /\Y X/\Y
/  \ /  \
[...]


Each of these lines is also traversable by running in Z, which goes up one in the tree.

The following things are irrelevant:

• Whether the created program is larger
• Whether the first program runs in Z
• Whether created program resembles the creating program