esolang

ConstantLanguage()

A language for making constant languages.

WarzokERNST135, 2025 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, world!

The idea

WarzokERNST135 made ConstantLanguage() in 2025. A constant language prints the same text whatever its program is; many joke languages on esolangs.org are one. In this language a program is a call that names such a language. ConstantLanguage("Hello, world!") reads a line and prints Hello, world!.

Read the story

Two more calls bend the rule for one input. QuineAvoiding("ooh", "oooooh") prints ooh, unless the input is ooh; then it prints oooooh, so feeding the language its own output never gives a quine. QuineInvoking does the opposite and answers oooooh to oooooh as well, which makes it a quine.

The machine

Each call reads one line of input and prints one line. The specification's interpreter is three Python lambdas and exec(input()), so several calls run one after the other. At the end of the input an empty line is read.

Example

Expected: oooooh
Expected: ooh
Expected: oooooh

Further

Ideas it shows

Meta-languages

Write your own in Run Convert a program from ConstantLanguage()

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: constantlanguage.

Command line

shib run constantlanguage -e 'QuineAvoiding("ooh", "oooooh")' --input 'hi
'
shib manual constantlanguage

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/constantlanguage.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org