Camouflage

From Esolang
Jump to navigation Jump to search

Camouflage is a language designed by Benedict Roeser, based on the idea of "disguises" which change the mode of interpreting commands.

There are five types of disguises. 1. security guard 2. slot machine 3. ghost 4. tax collector 5. playwright

Several disguises can be added resulting in more than one active command mode.

In 'security guard mode' each command is plausability checked. No errors are thrown, but default values are used on error.

In 'slot machine mode' there is a fity-fifty chance that a command is executed. 'slot machine mode' has no effect if 'security guard mode' is active.

In 'ghost mode' commands are executed without visible traces. No text is outputted, no graphical interface changes, ... Nevertheless, side effects are computed. E. g. if you have commands in ghost mode, that store the current screen resolution in a variable and change the screen resolution to 1024x768 the resolution will NOT CHANGE, but the variable will be set.

In 'playwright mode' everything is ultra-verbose and the return value of every command is displayed after the execution of the command. 'playwright mode' has no effect if 'ghost mode' is active.

In 'tax collector mode' all variable or constant values are substituted by user input. If 'security guard mode' is active and impossible values are entered by the user, default values are taken. If 'ghost mode' is active, the urge for user input will not be shown in any way (No popup windows with 'Please enter something:', no blinking cursor on the console, ...)

Implementations

At University of Ulm, Germany, at least two interpreters for the Camouflage programming language have been implemented. One of them, written by Manfred Sauter in Ruby, is publicly available: An interpreter for the Camouflage programming language. In addition to an implementation to 99 bottles and hello world this webpage also features a quine in Camouflage.

External resources