Boss (programming language)

from Wikipedia, the free encyclopedia

Chef (English for cook or chef ) is an esoteric programming language developed in 2002 by David Morgan-Mar . It relies on modifying data on some stacks . The concept is similar to that of the esoteric Shakespeare programming language and that of the "serious" programming language BASIC .

Each program consists of at least the following components:

  • title
  • List of variables and their values
  • List of instructions for modifying the stacks

In principle, the names of variables can be freely chosen, but variables are usually named after typical cooking ingredients. Values ​​of dry ingredients are output as numerical values, those of liquid ingredients as characters (e.g. letters). The stacks are called "mixing bowls" or "baking dish", so they represent mixing bowls and baking trays. The commands are called "mix", "stir", etc. Chef programs therefore read like English-language cooking recipes .

Sample program

The usual hello world program can be written as follows:

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.

Here, the variable haricot beans is assigned the Unicode value 72, which represents the character H - the variable eggs receives the value 101 (characters: e ) etc. These values ​​are strung together with Put , converted into characters with Liquefy , copied with Pour and finally issued by Serve , so Hello world! is issued.

use

Like other esoteric programming languages, Chef is not intended for practical use, although it can be used to write executable programs. However, for didactic reasons, the language is dealt with at different universities.

literature

Web links

Individual evidence

  1. Michael Mateas, Nick Montfort: A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics (PDF), in: Proceedings of the 6th Digital Arts and Culture Conference, IT University of Copenhagen , 1. – 3. December 2005, pp. 144-153
  2. Matthias Werner: Algorithms and Programming (script for the lecture) , Chemnitz University of Technology , as of September 5, 2017 (pdf)
  3. Translators and language processing tools (lecture content) , Technical University of Kaiserslautern , summer semester 2009
  4. ^ Project 6: Chef Program of the LCC 2700 Introduction to Computational Media course , Georgia Institute of Technology 2006