Output a program that outputs a program ... that outputs PPCG

18

3

Challenge:

Write a code that, when executed will output the source code of a second program that can be executed in another language. The second program should output the source code of a third program that can be executed in a third language and so on. The last program should output PPCG with an optional single trailing newline.

The winner will be the submission with the most languages. Code length of the first program will be the tie breaker.

Important rules:

  1. No programs can be identical
  2. Each language must only work on one of the source codes. It should be impossible to use the same language two places in the chain without breaking it(see examples).
    • A shortened chain is not a broken chain. If you can use a language in a different place than intended and the end result is still PPCG then it's invalid
  3. All versions of a language count as unique languages (but keep in mind rule number 2)

Examples:

An invalid submission:

print("""print'disp("PPCG")'""")
  • Python 3: print("""print'disp("PPCG")'""") prints print'disp("PPCG")'
  • Python 2: print'disp("PPCG")' prints disp("PPCG")
  • Octave : disp("PPCG") prints PPCG

This works properly, but: you can run both the first and the second code in Python 2 without breaking the chain, so this violates rule number 2.

A valid submission with score 3:

print("""print'disp("PPCG")'""")
  • Python 3: print("""print'disp("PPCG")'""") prints print'disp("PPCG")'
  • Perl : print'disp("PPCG")' prints disp("PPCG")
  • Octave : disp("PPCG") prints PPCG

This is the exact same code as the invalid example. The difference is, we have chosen languages that adhere to rule number 2: You can't run the first code in Perl/Octave, the second code in Python 3/Octave nor the last code in Python 3/Perl. This is valid even though Python 2 can run the two first programs, because we haven't used Python 2 as one of the languages.

Stewie Griffin

Posted 2017-01-24T22:21:29.540

Reputation: 43 471

Related, but not a duplicate. – Stewie Griffin – 2017-01-24T22:21:43.520

Related, possible duplicate. Practically the same challenge, but the scoring system takes into account the length of the code. – ETHproductions – 2017-01-24T22:26:04.583

3Ah yes, I hadn't really noticed rule 2. That makes it definitely not a duplicate in my eyes. – ETHproductions – 2017-01-24T22:32:17.117

1Rule 2 makes Rule 1 redundant. – Pavel – 2017-01-24T23:27:10.850

It's unfortunate this challenge has the no-repeats rule, which is novel, but ALSO has the "must end with PPCG" instead of it being otherwise a normal ouroboros challenge. – Sparr – 2017-01-25T02:01:43.437

The final output of PPCG can optionally have a trailing newline. Can the intermediate stages have trailing newlines that "don't count"? E.g. if stage 2 outputs a trailing newline, must that newline be included in the stage 3 code? – DLosc – 2017-01-25T10:20:20.670

Yes, that's ok. You don't need to include trailing newlines in the code in the intermediate stages. – Stewie Griffin – 2017-01-25T10:29:16.993

Answers

12

12 languages, 64 bytes

Charcoal -> tinylisp -> Python 3 -> /// -> Python 2 -> Perl -> QBasic -> Pip -> V -> Retina -> Pyth -> GolfScript

Charcoal

P(q(print('/x/print/x"""x q<?"`i.*":?CHR$(34)+"\'PPCG\'`">"""'*1

Any run of printable ASCII is a string literal in Charcoal. can be used for multidirectional printing, but in this case it simply prints the string going rightward.

tinylisp

(q(print('/x/print/x"""x q<?"`i.*":?CHR$(34)+"\'PPCG\'`">"""'*1

The only reserved characters in tinylisp (as of this writing) are parentheses and whitespace. Any other run of characters is a token, even something like +"\'PPCG\'`">"""'*1. Parentheses define lists. The q (quote) builtin returns its argument unevaluated--in this case, the nested list (print ('/x/print/x"""x q<?"`i.*":?CHR$ (34) +"\'PPCG\'`">"""'*1)). (Missing parentheses at the end are autocompleted.)

Python 3

(print ('/x/print/x"""x q<?"`i.*":?CHR$ (34) +"\'PPCG\'`">"""'*1))

Since print is a function in Python 3, we can wrap it in parentheses with no problem. In Python 2, where it's a statement, this is a syntax error. Unfortunately, Perl is fine with the parentheses, so we also do *1 (string repetition in Python, cast to int and multiply in Perl).

///

/x/print/x"""x q<?"`i.*":?CHR$ (34) +"'PPCG'`">"""

/x/print/ changes x to print in the rest of the program, which has no slashes and therefore is output with no further changes.

Python 2

print"""print q<?"`i.*":?CHR$ (34) +"'PPCG'`">"""

No parentheses after print, doesn't work in Python 3. Perl doesn't like the triple quotes.

Perl

print q<?"`i.*":?CHR$ (34) +"'PPCG'`">

Perl's various ways of quoting a string are helpful, and distinct from other languages. Here we use q<...>.

QBasic

?"`i.*":?CHR$ (34) +"'PPCG'`"

A couple of print statements (abbreviated as ?), using CHR$(34) to get a double quote.

Pip

`i.*
"'PPCG'`

A single Pattern (regex) literal in backticks.

V

i.*
"'PPCG'

Switch to insert mode, add some text.

Retina

.*
"'PPCG'

Match anything and replace it with the second line.

Pyth

"'PPCG'

Pyth quotes don't need to be matched (which makes this not a valid program in Pip).

GolfScript

'PPCG'

DLosc

Posted 2017-01-24T22:21:29.540

Reputation: 21 213

Any documentation on charcoal? – ev3commander – 2017-01-27T00:32:36.833

@ev3commander Sort of. See list of commands, brief notes on syntax (mainly literals), and code page. But yeah, the documentation isn't great. I added some explanation to the answer, too.

– DLosc – 2017-01-27T03:51:41.207

ah. I was wondering because the P wasn't actually a pure ASCII p, but I guess it was so that it wouldn't print "Pprint...." not "print...." – ev3commander – 2017-01-28T00:18:50.267

Add bash: echo '…' to the beginning – OldBunny2800 – 2017-01-28T20:01:41.160

7

Java --> C --> Ruby --> /// --> Python 3 --> Batch --> JavaScript --> BrainFuck (8 Languages)


Click the language names for the code through each execution, except for Batch, because I couldn't find an online interpreter for it.


class Main {public static void main(String[]args){System.out.println("int main(){printf(\"puts \\\"/code/print('echo console.log(\\\\\\\\'-[--->+<]>-----..-[----->+<]>.++++.\\\\\\\\\')')/code\\\"\");}");}}

Explanation:

Java outputs int main(){printf("puts \"/code/print('echo console.log(\\\\'-[--->+<]>-----..-[----->+<]>.++++.\\\\')')/code\"");}
C outputs puts "/code/print('echo console.log(\\'-[--->+<]>-----..-[----->+<]>.++++.\\')')/code"
Ruby outputs /code/print('echo console.log(\'-[--->+<]>-----..-[----->+<]>.++++.\')')/code
/// outputs print('echo console.log(\'-[--->+<]>-----..-[----->+<]>.++++.\')')
Python outputs echo console.log('-[--->+<]>-----..-[----->+<]>.++++.')
Batch outputs console.log('-[--->+<]>-----..-[----->+<]>.++++.')
JavaScript outputs -[--->+<]>-----..-[----->+<]>.++++.
BrainFuck outputs PPCG

TrojanByAccident

Posted 2017-01-24T22:21:29.540

Reputation: 300

The Rhino interpreter for JavaScript can run the Python program, thus repeating a language. So whether this answer's valid or not depends on exactly how the rules on interpreters work. – None – 2017-01-25T06:17:17.020

1@ais523 although print() works in JavaScript, it does not output anything, and in fact attempts to print the page, so I don't think that counts. – TrojanByAccident – 2017-01-25T06:19:43.683

No, in Rhino, print() outputs its argument to standard output. (JavaScript the language doesn't really define a standard library; JavaScript + DOM does, but Rhino uses a different library.) – None – 2017-01-25T06:32:17.213

@ais523 Well, I'm not sure what exactly Rhino is. I've tested my code in Chrome, FF, IE, and repl.it, and it works the same in all. – TrojanByAccident – 2017-01-25T06:35:24.117

3If i understood the rules correctlu your score should be 1 as running the original code in BF ouptut PPCG – Sefa – 2017-01-25T08:55:07.473

2@Sefa Well, not exactly--I think there's always a null byte (ASCII 0) output first, because of the . in console.log. – DLosc – 2017-01-25T10:54:15.067

@DLosc That's open for interpretation, but i tend to agree with you, i hadn't thought of it – Sefa – 2017-01-25T10:56:32.783

@DLosc fishy, but I'll allow it :) – Stewie Griffin – 2017-01-25T12:37:11.263

1Good thing I didn't use alert ;) – TrojanByAccident – 2017-01-25T20:36:24.727

6

Java -> BotEngine -> Treehugger -> Loader -> Batch -> Thue -> Microscript II -> BF -> ForceLang -> Javascript, 10 languages

Java program:

public class ManyLang {
    public static void main(String[]arg){
        int m=120;
        String e="++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++^^^^^^^^^^^^^^^^-]>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>+.-^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++^^^^^^^^>>>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>--.++^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>>>>>>----.++++^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>>>>>>----.++++^^^^^^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++^^^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>+.-^^^^^^^>>>>>>>-.+^^^^^^^.";
        for(int i=1;i<e.length();i++){
            if(i==1){
                System.out.print("v");
            }
            else if(i%m==1&&i>1){
                System.out.println();
                System.out.println(">eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev");
                System.out.println("v                                                                                                                        <");
                System.out.print(" ");
            }
            System.out.print(e.charAt(i-1));
        }
        System.out.println();System.out.print(">eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeP");
    }
}

BotEngine program:

v++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ++++++++>+++++++++++++++>++++++++++++++++^^^^^^^^^^^^^^^^-]>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>+.-^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^^^>>>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.-
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 --^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>-
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 -.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>---.+++^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 +^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 +.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 .---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 +++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>--.++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.--
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 -^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.++
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 +^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^>>>>>>--.++^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>--.++^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>>>>>>----.++++^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>----.++++^^^^^^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 >>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++^^^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 --^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>++.--^^^^>>>>.^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeev
v                                                                                                                        <
 ^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>+.-^^^^^^^>>>>>>>-.+^^^^^^^
>eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeP

Treehugger program:

++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++^^^^^^^^^^^^^^^^-]>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>+.-^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++^^^^^^^^>>>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>>>>>>>+++.---^^^^^^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>>>>----.++++^^^^^^^^>>>>>>>>>>>>---.+++^^^^^^^^^^^^>>>>>>>>--.++^^^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>+++.---^^^^^>>>>>+++.---^^^^^>>>>>>--.++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>---.+++^^^^^^>>>>>>--.++^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>--.++^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>>>>>>----.++++^^^^^^^>>>>>>----.++++^^^^^^>>>>>>+++.---^^^^^^>>>>>>>----.++++^^^^^^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>---.+++^^^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>>>>>>----.++++^^^^^^>>>>>>>---.+++^^^^^^^>>>>>>>.^^^^^^^>++.--^>>>>>>>>>>>>>>.^^^^^^^^^^^^^^>>>>>>>>>>>>>>++.--^^^^^^^^^^^^^^>>>>>>>>>>>>>+.-^^^^^^^^^^^^^>>>>>>>>>>>>>>--.++^^^^^^^^^^^^^^>>>>>>>>>>>>>>>----.++++^^^^^^^^^^^^^^^>>>>>>>>>>>>>--.++^^^^^^^^^^^^^>>>>.^^^^>>>>++.--^^^^>>>>>>>>.^^^^^^^^>>>>>>>>>>>>>---.+++^^^^^^^^^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>>>>>>>>>.^^^^^^^^^^^^^>>>>>>>>>>>>>>-.+^^^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>>---.+++^^^^^>>>>>>>>>>>>+++.---^^^^^^^^^^^^>>>>++.--^^^^>>>>.^^^^>>>>>>+++.---^^^^^^>>>>>>++.--^^^^^^>>>>>>----.++++^^^^^^>>>>>>>+.-^^^^^^^>>>>>>>-.+^^^^^^^.

Loader program:

printf "@echo%ca%c%c=~%c+[----->+++<]>++.++++++.[->+++++<]>+++.[--->++<]>+++.-----.---------.+++++++++++.+++[->+++<]>.--[--->+<]>-.++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.-.+[->++<]>..-[----->+<]>.++++.+[-->+<]>+++.++.-------.%c." 32,58,58,34,34
printf "@echo%c%c%c=" 32,58,58
printf "@echo%c%c" 32,97

Batch program:

@echo a::=~"+[----->+++<]>++.++++++.[->+++++<]>+++.[--->++<]>+++.-----.---------.+++++++++++.+++[->+++<]>.--[--->+<]>-.++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.-.+[->++<]>..-[----->+<]>.++++.+[-->+<]>+++.++.-------.".
@echo ::=
@echo a

Thue program:

a::=~"+[----->+++<]>++.++++++.[->+++++<]>+++.[--->++<]>+++.-----.---------.+++++++++++.+++[->+++<]>.--[--->+<]>-.++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.-.+[->++<]>..-[----->+<]>.++++.+[-->+<]>+++.++.-------.".
::=
a

Microscript II program:

"+[----->+++<]>++.++++++.[->+++++<]>+++.[--->++<]>+++.-----.---------.+++++++++++.+++[->+++<]>.--[--->+<]>-.++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.-.+[->++<]>..-[----->+<]>.++++.+[-->+<]>+++.++.-------.".

BF program:

+[----->+++<]>++.++++++.[->+++++<]>+++.[--->++<]>+++.-----.---------.+++++++++++.+++[->+++<]>.--[--->+<]>-.++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.-.+[->++<]>..-[----->+<]>.++++.+[-->+<]>+++.++.-------.

ForceLang program:

io.write "alert('PPCG')"

Javascript program:

alert('PPCG')

SuperJedi224

Posted 2017-01-24T22:21:29.540

Reputation: 11 342

Can you list the steps? – OldBunny2800 – 2017-01-28T20:02:50.770

@OldBunny2800 Done. – SuperJedi224 – 2017-01-28T20:29:37.363

4

Befunge (5 versions)

We start with the most recent version, Befunge-109 (run with cfunge -s 109):

1k!!k@"1k!k@#;>@,k>'"'""r;@;"'"::''\"@_,#:>"'""\''::"'":''\"1j#@0"'""\'':"'":''\"::''\"'"::''\"GCPP"'""\'':"'":''\"::''\"'"::''\">:#,_@"'""\''::"'":''\"@j1A"'"::''\">:#,_@"'"";@r"'qk,@

Which outputs the following Befunge-98 code (Try it online!):

r@;"@_,#:>"'""A1j@"'"::''\"@_,#:>"'""\''::"'":''\"PPCG"'""\''::"'":''\"0@#j1"'"::''\">:#,_@"'"";@;r"'>k,@>;#@k!k1

Which output the following Befunge-97 code (Try it online!):

r;@;"@_,#:>"'""1j#@0"'"::''\"GCPP"'"::''\">:#,_@"'""@j1A">:#,_@

Which output the following Befunge-96 code (Try it online!):

A1j@"@_,#:>"'""PPCG"'""0@#j1">:#,_@

Which outputs the following Befunge-93 (Try it online!):

1j#@0"GCPP">:#,_@

Which outputs the string: PPCG

Each program will only run in the version of Befunge that it is targetting. If you try to run them in another version, they will exit immediately without outputting anything.

Thanks to Dennis, nearly all versions of Befunge are now available online at TIO. The only exception is Befunge-109, for which you'll need cfunge, which can be found here.

James Holderness

Posted 2017-01-24T22:21:29.540

Reputation: 8 298

4

11 languages, 536 bytes

Bash -> Python 3 -> Go -> Lua -> Rust -> Java -> C99 -> Python 2 -> JavaScript -> Ruby -> Batch

Bash:

e="echo -n "
p(){
eval "for i in {1..$1}
do
$e'\'
done"
}
$e'import sys;print("package main\nimport \"fmt\"\nfunc main() {fmt.Printf(\"if 1 == 1 then print(\\\"fn main() {let s='
p 7
$e'"public class Main{public static void main(String[] args){System.out.println('
p 15
$e'"#include <stdio.h>'
p 16
$e'nint main() {printf('
p 31
$e'"print '
p 63
$e"\"alert('puts "
p 128
$e"'@echo PPCG"
p 128
$e"'');"
p 63
$e'"'
p 31
$e'");}'
p 15
$e'");}}\\\\\\\";println!(\\\\\\\"{}\\\\\\\", s);}\\\") end\")}") if sys.version_info[0]==3 else exit()'

The p function reduces the code size by 497 bytes compared to typing all backslashes manually.

Python 3:

import sys;print("package main\nimport \"fmt\"\nfunc main() {fmt.Printf(\"if 1 == 1 then print(\\\"fn main() {let s=\\\\\\\"public class Main{public static void main(String[] args){System.out.println(\\\\\\\\\\\\\\\"#include <stdio.h>\\\\\\\\\\\\\\\\nint main() {printf(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"print \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"alert('puts \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'@echo PPCG\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");}\\\\\\\\\\\\\\\");}}\\\\\\\";println!(\\\\\\\"{}\\\\\\\", s);}\\\") end\")}") if sys.version_info[0]==3 else exit()

The obligatory Python 2/3 differentiation.

Go:

package main
import "fmt"
func main() {fmt.Printf("if 1 == 1 then print(\"fn main() {let s=\\\"public class Main{public static void main(String[] args){System.out.println(\\\\\\\"#include <stdio.h>\\\\\\\\nint main() {printf(\\\\\\\\\\\\\\\"print \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"alert('puts \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'@echo PPCG\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\");}\\\\\\\");}}\\\";println!(\\\"{}\\\", s);}\") end")}

Lua:

if 1 == 1 then print("fn main() {let s=\"public class Main{public static void main(String[] args){System.out.println(\\\"#include <stdio.h>\\\\nint main() {printf(\\\\\\\"print \\\\\\\\\\\\\\\"alert('puts \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'@echo PPCG\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'');\\\\\\\\\\\\\\\"\\\\\\\");}\\\");}}\";println!(\"{}\", s);}") end

Using if 1 == 1 then prevents Python compatibility.

Rust:

fn main() {let s="public class Main{public static void main(String[] args){System.out.println(\"#include <stdio.h>\\nint main() {printf(\\\"print \\\\\\\"alert('puts \\\\\\\\\\\\\\\\'@echo PPCG\\\\\\\\\\\\\\\\'');\\\\\\\"\\\");}\");}}";println!("{}", s);}

Java:

public class Main{public static void main(String[] args){System.out.println("#include <stdio.h>\nint main() {printf(\"print \\\"alert('puts \\\\\\\\'@echo PPCG\\\\\\\\'');\\\"\");}");}}

C99:

#include <stdio.h>
int main() {printf("print \"alert('puts \\\\'@echo PPCG\\\\'');\"");}

Python 2:

print "alert('puts \\'@echo PPCG\\'');"

JavaScript:

alert('puts \'@echo PPCG\'');

Ruby:

puts '@echo PPCG'

Batch:

@echo PPCG

314

Posted 2017-01-24T22:21:29.540

Reputation: 41

Welcome to PPCG and nice first answer! – user41805 – 2017-02-04T14:54:36.300

3

11 languages (102 bytes)

I'm going to add more soon.

Jelly -> Ruby -> ><> -> /// -> Batch -> Python 3 -> JavaScript -> J -> FOG -> Jolf -> Stacked

“puts <<q
/!/@ECHO print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")/!~
/0v
  >:1+$0g:'~'=?;o
q

Jelly (Try it online!) outputs:

puts <<q
/!/@ECHO print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")/!~
/0v
  >:1+$0g:'~'=?;o
q

Ruby (Try it online!) outputs:

/!/@ECHO print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")/!~
/0v
  >:1+$0g:'~'=?;o

><> (use this interpreter; it outputs spaces instead of null bytes for spaces) outputs:

/!/@ECHO print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")/!

/// (Try it online!) outputs:

@ECHO print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")

Batch outputs:

print("""console.log(`'"a Lq5(80::13-:4+)#:out"X'`)""")

Python 3 (Try it online!) outputs:

console.log(`'"a Lq5(80::13-:4+)#:out"X'`)

JavaScript (Try it online!) outputs:

'"a Lq5(80::13-:4+)#:out"X'

J (Try it online!—only an approximation) yields:

"a Lq5(80::13-:4+)#:out"X

FOG prints:

a Lq5(80::13-:4+)#:out

Jolf (Try it here!) outputs:

(80::13-:4+)#:out

Finally, Stacked (Try it here!) outputs:

PPCG

Conor O'Brien

Posted 2017-01-24T22:21:29.540

Reputation: 36 228

It would be trivial to add Java. – Addison Crump – 2017-01-26T18:39:01.323

@VoteToClose I don't .know Java, but I'd bet it involves a lot of escaping. – Conor O'Brien – 2017-01-26T19:34:06.917

http://www.freeformatter.com/java-dotnet-escape.html is your friend. – Addison Crump – 2017-01-26T19:45:10.810

3

Windows Batch -> Powershell -> Ruby -> Python 3 -> JavaScript -> SQL -> CJam: 7 languages

Windows Batch

@echo @"
@echo puts <<x
@echo print("""alert(`prompt '"PPCG"'`)""")
@echo x
@echo "@

Powershell

@"
puts <<x
print("""alert(`prompt '"PPCG"'`)""")
x
"@

Ruby

puts <<x
print("""alert(`prompt '"PPCG"'`)""")
x

Python 3

print("""alert(`prompt '"PPCG"'`)""")

JavaScript

alert(`prompt '"PPCG"'`)

SQL

prompt '"PPCG"'

CJam

"PPCG"

Roman Gräf

Posted 2017-01-24T22:21:29.540

Reputation: 2 915

1I think (in the title) you mean Batch, not Bytch? – FlipTack – 2017-01-28T08:19:59.207

2

9 languages: Processing -> Java -> C -> Python 3 -> JavaScript (ES6) -> Octave -> Bash -> sed -> V, 160 bytes

print("class A{public static void main(String[]a){System.out.print(\"main(){printf(\\\"print(\\\\\\\"alert`disp('echo s/.*/iPPCG/')`\\\\\\\")#\\\");}\");}}");//

Right now my objective is to find and add languages where I don't need to escape quotes and stuff.

Processing outputs (note that the the Java program doesn't run in Processing and vice-versa)

class A{public static void main(String[]a){System.out.print("main(){printf(\"print(\\\"alert`disp('echo s/.*/iPPCG/')`\\\")#\");}");}}

Java outputs:

main(){printf("print(\"alert`disp('echo s/.*/iPPCG/')`\")#");}

C outputs:

print("alert`disp('echo s/.*/iPPCG/')`")#

Python 3 (note that the python program won't work in Processing because of the comment and vice-versa) outputs:

alert`disp('echo s/.*/iPPCG/')`

JavaScript outputs:

disp('echo s/.*/iPPCG/')

Octave outputs:

echo s/.*/iPPCG/

Bash outputs:

s/.*/iPPCG/

sed outputs:

iPPCG  

V outputs:

PPCG

user41805

Posted 2017-01-24T22:21:29.540

Reputation: 16 320

2

/// to Jelly to Javascript to MS-SQL to QBasic to QBIC, 39 bytes, 6 languages

/b/“a/blert("select'PRINT\"?@PPCG`\"'")

Explanation:

///  Replaces the one 'b' with '“a', returns 
“alert("select'PRINT\"?@PPCG`\"'")

Jelly just sees everything as a string literal and prints it (shamelessly stole this trick from @ConoroBrien)
alert("select'PRINT\"?@PPCG`\"'")

Javascript posts this in a dialog window:
select'PRINT"?@PPCG`"'

MSSQL then selects:
PRINT"?@PPCG`"'")

QBasic puts this on the screen:
?@PPCG`

QBIC then prints 'PPCG'

QBIC and QBasic have many similarities. However, these lines of code are not cross-compatible: QBasic accepts the ? as shorthand for PRINT, but does not know what to do with the @ and the backtick. QBIC will interpret the PRINT line as a reference to 5 different string variables and P$R$I$N$T$ is not a valid statement.

steenbergh

Posted 2017-01-24T22:21:29.540

Reputation: 7 772

2I love the blert ;-) – ETHproductions – 2017-01-25T20:51:33.947

1

Python 2 -> Bash -> MySQL -> PHP

int score = 4;


print """echo "SELECT 'printf(\\"PPCG\\");';\""""

Even though this isn't code golf, the bytecount is 49.


Python outputs:

echo "SELECT 'printf(\"PPCG\");';"

Bash outputs:

SELECT 'printf("PPCG");';

MySQL outputs:

printf("PPCG");

PHP outputs:

PPCG

There you go!

ckjbgames

Posted 2017-01-24T22:21:29.540

Reputation: 1 287

1

New to codegolf, just trying to make an entry. Not trying to win. Am I doing this right?

Bash -> Batch - 23 bytes

printf "echo PPCG">.bat

This will output "echo PPCG" to a .bat which can be executed in windows.

user233009

Posted 2017-01-24T22:21:29.540

Reputation: 389

Hello and welcome to the site. This answer looks perfectly valid, but I would recommend putting your score (2) in your title. This question is a [tag:code-golf] question so there is no need to include your byte count unless you want to. – Post Rock Garf Hunter – 2017-01-29T05:12:08.557

I think maybe wheat wizard forgot a "not" in there. This is not code golf. Also, welcome – Stewie Griffin – 2017-01-29T07:58:34.203

@StewieGriffin "Code length of the first program will be the tie breaker." hmm... – Erik the Outgolfer – 2018-05-30T18:19:49.253

I agree, but then the wizard's comment doesn't make sense: This question is a code-golf question so there is no need to include your byte count. – Stewie Griffin – 2018-05-30T18:55:42.640