From Esolang
Jump to navigation Jump to search

OCPL /ˈɔkpʌl/ or One Character Programming Language is a family of programming languages. In every language, only one character is used.


A member of OCPL is like this:


When interpreting OCPL(lang,char,charset), it counts the number of char in program, represents the count with a base-|charset| number, where |charset| is the length of the charset, and removes the highest digit, then it replaces every digit with the character at the index of the digit in charset and interprets it in lang.

For example, the following program:


In OCPL(brainfuck,'x',".,") works as a one time cat program, because it will become:


When translated.

The most well-known member of OCPL is perhaps Unary, since it is the same as OCPL(brainfuck,'0',"><+-.,[]").

There are, of course, infinitely many members in OCPL.


All languages in OCPL are zero dimensional.

See also