Chef (Programmiersprache)
Diskussion über den Löschantrag
Hier der konkrete Grund, warum dieser Artikel nicht den Qualitätsanforderungen entsprechen soll: Irgend jemand hat sich einen Unsinn ausgedacht. Brauchen wir den auch noch?!? ((o)) Bitte?!? 13:29, 17. Feb 2005 (CET)
Chef (engl. für Koch oder Chefkoch) ist eine von David Morgan-Mar entwickelte esoterische Programmiersprache. Sie beruht auf der Modifizierung von Daten auf einigen Stacks. Das Konzept ähnelt dem der Programmiersprache "Shakespeare".
Jedes Programm besteht zumindest aus folgenden Bestandteilen:
- Titel
- Liste von Variablen und ihren Werten
- Liste von Instruktionen zur Modifizierung der Stacks
Die Variablen sind in der Regel nach typischen Zutaten benannt, und die Stacks heißen "mixing bowls" oder "baking dish", stellen also Rührschüsseln und Backbleche dar. Die Befehle heißen "mix" (mischen), "stir" (rühren) usw. Chef-Programme lesen sich daher wie englischsprachige Kochrezepte.
Beispielprogramm
Das übliche Hello-World-Programm kann folgendermaßen geschrieben werden:
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.
Weblinks
- http://www.dangermouse.net/esoteric/chef.html - Offizielle Dokumentation