Ceci est une réponse collaborative avec BlueEyedBeast
J'ai décidé de faire une approche 2D de cette question ... Oui, il y a 7 esolangs 2D!
J'ai inspiré d'autres langues à ajouter par la réponse de BlueEyedBeast (Foo, GolfScript)
<ESC>
est le caractère littéral de 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
Essayez-le en ligne!les sortiescorn
> <>
Les commandes sont affichées dans leur ordre d'apparition
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
Essayez-le en ligne! (Copier et coller uniquement) sortiessweettea
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"
Essayez-le en ligne! les sortiesapplepie
(cela peut prendre environ 20 secondes)
Python 2
# first two lines are comments
print"biscuits"; # prints "biscuits" and ends statement
'pecanpie' # dangling (and ignored) string literal
Essayez-le en ligne! (Copier et coller uniquement) sortiesbiscuits
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
Essayez-le en ligne!les sortiessalad
Gol> <>
Les commandes sont affichées dans leur ordre d'apparition
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
Essayez-le en ligne!les sortiesturkey
Foo
Foo ne donne rien entre guillemets, c’est pourquoi j’ai veillé à ne pas utiliser de guillemets dans les autres langues. Puisque"stuffing"
est entre guillemets, il sera imprimé.
Essayez-le en ligne! les sortiesstuffing
et a ensuite une erreur
Meule de foin (2015)
Ceci utilise l'interprète de Haystack 2015 (pas 2016) puisque la version la plus récente n'est pas valide. L'interprète pour cela est haystack.py
et non haystack_new.py
Les commandes sont affichées dans leur ordre d'apparition
# 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
Ce programme génère
R
O
L
L
S
et une nouvelle ligne après cette sortie (hé, les espaces n'ont pas d'importance!)
GolfScript
first 2 lines are comments
print'biscuits'; pushes "biscuits" to the stack and discards it
'pecanpie' push this
#... comment
implicit output
Essayez-le en ligne!les sortiespecanpie
BF
J'ai utilisé https://copy.sh/brainfuck/text.html pour convertir du texte en BF. Bien qu'il y ait beaucoup de,
instructions d'entrée, le code BF s'exécute indépendamment de celui-ci.
Essayez-le en ligne! les sortiesgravy
Fission
Pour qu'un programme de fission commence, il faut générer un atome. Nous voyons cela se passer la troisième ligne:
..."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
Essayez-le en ligne! les sortiescornbread
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
Essayez-le en ligne! les sortiesapplecider
Sérieusement
é - clear stack
'g'n+'i+'s+'s+'e+'r+'d+ - load chars onto stack
. - print stack
ó - exit
Essayez-le en ligne! les sortiesdressing
Axo
(Les commandes sont affichées dans l'ordre dans lequel elles sont rencontrées)
#> blah blah
! rotate direction 90 degrees clockwise
> go right
'p'() push char and output
'u'() ... 'e'() repeat for other characters
\ end program
Essayez-le en ligne! les sortiespumpkinpie