Limbaje de programare ezoterice

Un limbaj de programare ezoteric este un limbaj de programare proiectat pentru a testa limitele limbajelor de programare, ca o dovadă a unui concept sau doar de amuzament. Nu este nici o intenție ca un astfel de limbaj să fie folosit pe scară largă în realizarea de software, deși unele concepte pot fi puse în practică.

Istorie modificare

Cel mai vechi exemplu al unui limbaj de programare ezoteric a fost INTERCAL, proiectat în 1972 de Don Woods și James M. Lyon cu intenția de a fi un limbaj diferit de oricare alt limbaj cu care autorii ar fi fost obișnuiți. Acesta parodia elementele comune ale limbajelor din aceea vreme, ca de exemplu Fortran, COBOL și Limbajul de asamblare.

În 1992, Wouter van Oortmerssen a creat FALSE, un mic limbaj orientat pe stivă, cu sintaxa proiectată astfel încât codul să fie greu de citit și încurcat. Acest limbaj l-a inspirat pe Urban Müller în a crea un limbaj chiar mai mic, cunoscut astăzi sub numele de Brainfuck, care consistă în numai 8 caractere recunoscute. Împreună cu limbajul Befunge creat de Chris Pressey, Brainfuck este unul dintre cele mai bine întreținute limbaje de programare ezoterice la ora actuală.

Exemple modificare

  • LOLCODE un limbaj proiectat pentru a semăna cu limbajul folosit de LOLCATS. Urmatorul exemplu afiseaza pe ecram celebrul mesaj Hello, World!
 HAI
 CAN HAS STDIO?
 VISIBLE "HELLO, WORLD!"
 KTHXBYE
  • Chef a fost proiectat astfel incat sa semene foarte mult cu retetele de gatit.
 Hello World Souffle.

 Ingredients.
 72 g haricot beans
 101 eggs
 108 g lard
 111 cups oil
 32 zucchinis
 119 ml water
 114 g red salmon
 100 g dijon mustard
 33 potatoes

 Method.
 Put potatoes into the mixing bowl.
 Put dijon mustard into the mixing bowl.
 Put lard into the mixing bowl.
 Put red salmon into the mixing bowl.
 Put oil into the mixing bowl.
 Put water into the mixing bowl.
 Put zucchinis into the mixing bowl.
 Put oil into the mixing bowl.
 Put lard into the mixing bowl.
 Put lard into the mixing bowl.
 Put eggs into the mixing bowl.
 Put haricot beans into the mixing bowl.
 Liquefy contents of the mixing bowl.
 Pour contents of the mixing bowl into the baking dish.

 Serves 1.