This is a collaborative answer with BlueEyedBeast
I decided to do a 2D approach to this question... Yes, there are 7 2D esolangs!
I have taken inspiration for additional languages to add by BlueEyedBeast's answer (Foo, GolfScript)
<ESC>
is the character literal for Escape.
#>!>\'n\'r\'o\'c\,,,,,@'s'a'l'a'dJ,é'g'n+'i+'s+'s+'e+'r+'d+.ó[-]+[----->+++<]>.+++++++++++.+++[->+++<]>++.+[--->+<]>.+++H'turkey'~;oooooooo'sweettea.0-5++++++++fffffffff''`'
# >99*d1+c3-c89*4+dcc99*2+c!|$l9D3-O93++dOO8+O1+O1-O5+OO1+O95++O.
# >'p'()'u'()'m'()'p'()'k'()'i'()'n'()'p'()'i'()'e'()\
print'biscuits';'pecanpie'#"stuffing"R'c!'o!'r!'n!'b!'r!'e!'a!'d!*<ESC>ddddddSapplepie
Befunge-98
#?!> nothing important
'n push 'n'
STACK: [110]
\ swap top two stack values (TBH, I'm not really sure what happens in this case)
STACK: [110, 0]
'r\'o\'c\ repeat the same for other characters
STACK: [110 114 111 99 0]
,,,,, output the next 5 top stack values, "corn"
@ end program
rest of the code is irrelevant
since program has already stopped
Try it online! outputs corn
><>
Commands are shown in the order they appear
enter from the left, direction = right
# mirror, now the direction will change to left
and it wraps around and comes to the right
and reads code from the right to the left
'`' push this
' ... 5-0.aetteews' push this too
oooooooo outputs the top 5 characters of the stack
; end program
Try it online! (Copy and Paste only) outputs sweettea
V
...<ESC> writes stuff over three lines and enters normal mode
ddddddS deletes 3 lines, delete another line and enter insert mode
applepie writes "applepie"
Try it online! outputs applepie
(it might take ˜20 seconds for it to run)
Python 2
# first two lines are comments
print"biscuits"; # prints "biscuits" and ends statement
'pecanpie' # dangling (and ignored) string literal
Try it online! (Copy and Paste only) outputs biscuits
05AB1E
#>!> # does nothing important
\'n\ # push 'n' and delete it
'r\'o\'c\ # repeat for other characters
,,,,, # prints 5 times (since there is nothing in stack,
# prints nothing)
@ # push the index of the top of stack
's'a'l'a'd # push these characters
J, # join them and print them out
# the rest of the code does not matter
# since there is no implicit print
# because we used the print statement
Try it online! outputs salad
Gol><>
Commands are shown in the order they appear
enter from the left, direction = right
# mirror, now the direction changes to left
and it wraps around and comes to the right
and reads code from the right to the left
' starting parsing strings
` escape next character
' gets escaped
" stop string parsing
fffffffff pushes 15, 8 times
++++++++ adds up the numbers, resulting in 135
5- subtract 4 from it, 130
0 pushes 0
0 jumps to (130, 0)
#\'n\'r\'o\'c\,,,,,@'r'o'l'l'sJ, ... H'turkey'~;oooooooo"sweettea.0-5++++++++fffffffff""`"
^
we are here now
˜ removes value at top of stack, '"'
"yekrut" push this string
H Output stack as characters and halt program
Try it online! outputs turkey
Foo
Foo outputs anything in double quotes, that is why I have been careful to not use any double quotes in the other languages. Since "stuffing"
is in double quotes, it will be printed.
Try it online! outputs stuffing
and then has an error
Haystack (2015)
This uses Haystack's 2015 (not 2016) interpreter since the newer version is invalid. The interpreter for this is haystack.py
and not haystack_new.py
Commands are shown in the order they appear
# ignored
\ reflection (now it moves downwards)
> set direction to right
99*d1+c Output 'R'
3-c Output 'O'
89*4+dcc Outputs 'L', newline, 'L'
99*2+c!| Outputs 'S' and ends the program
Note: '!' is ignored by the interpreter
This program outputs
R
O
L
L
S
and a newline after this output (hey, whitespace doesn't matter!)
GolfScript
first 2 lines are comments
print'biscuits'; pushes "biscuits" to the stack and discards it
'pecanpie' push this
#... comment
implicit output
Try it online! outputs pecanpie
BF
I used https://copy.sh/brainfuck/text.html to convert text into BF. Although there are a lot of ,
input statements, the BF code runs independent of it.
Try it online! outputs gravy
Fission
For a Fission program to begin, an atom has to be spawned. We see this happening the the third line:
..."stuffing" Blah blah blah
R Spawns an atom with direction right
'c Gives the atom the mass of 'c''s ASCII value
! Print the atom's mass
'o!'r!'n!'b!'r!'e!'a!'d! Do the same for other characters
* Destroy atom, end program
Try it online! outputs cornbread
Minkolang v0.15
# Doesn't really do anything
\ Reflect, moves downwards
> Changes direction to right
... !| Does stuff in stack, '!' ignores the '|'
$l9D3 ... ++O Uses ASCII character codes to print "applecider"
. Ends program
Try it online! outputs applecider
Seriously
é - clear stack
'g'n+'i+'s+'s+'e+'r+'d+ - load chars onto stack
. - print stack
ó - exit
Try it online! outputs dressing
Axo
(Commands are shown the order they are encountered)
#> blah blah
! rotate direction 90 degrees clockwise
> go right
'p'() push char and output
'u'() ... 'e'() repeat for other characters
\ end program
Try it online! outputs pumpkinpie
1
Two related challenges: 1, 2
– ETHproductions – 2016-11-19T16:47:20.483Case and whitespace do not matter So can we remove whitespace? Say output
cornbread
– Luis Mendo – 2016-11-19T17:20:45.957@LuisMendo Yup. – ETHproductions – 2016-11-19T17:23:57.400
Related. – Martin Ender – 2016-11-19T19:48:37.983
"turkey is not the only main dish" But it is the most traditional. – jpmc26 – 2016-11-19T19:50:42.473
Would an answer involving different dialects of a language count? Like shell scripts (bash, fish, cmd, etc.), or the various dialects of ECMAScript (JavaScript, ActionScript, etc.)? – Alexander O'Mara – 2016-11-20T01:29:55.240
1Well, I'll bring nothing, because I don't live in USA. XD – Mega Man – 2016-11-20T10:57:53.967
Can we output extraneous null chars? (0x00) – Conor O'Brien – 2016-11-20T22:30:27.103
Also, can we use BF derivatives with BF? – Conor O'Brien – 2016-11-20T23:40:24.343
@AlexanderO'Mara Yes, you can use different dialects. – ETHproductions – 2016-11-20T23:54:33.523
1@ConorO'Brien I'll allow the null char as whitespace. And yes, you may use different "dialects" of BF. – ETHproductions – 2016-11-21T00:11:58.953
Is it ok if my BF program takes input, but then deletes it, so that it will produce the same output even no matter the input? – user41805 – 2016-11-28T12:39:47.520
@KritixiLithos Submissions should be run with no input, so as long as it works with empty input, yes. – ETHproductions – 2016-11-28T16:57:07.933
So this is basically asking us to code a Turducken.
– steenbergh – 2016-12-05T14:56:50.030