CV(N)(C)
CV(N)(C) is an esoteric programming language based on the International Phonetic Alphabet and created by User:PythonshellDebugwindow. Its goal is to be pronounceable.
Memory
CV(N)(C) uses an unbounded unsigned integer accumulator, a deque of unbounded unsigned integers, and a function from unbounded unsigned integers to unbounded unsigned integers.
Syntax
CV(N)(C)'s source code is made up of IPA symbols. The language's syllable structure is CV(N)(C), where C is any non-nasal consonant, V is any vowel, and N is any nasal consonant.
For example, su, suŋ, and suŋs are valid programs, and so is suŋsu, but susŋ is not, as its structure is CVCN, which can't be broken up into valid syllables.
Commands
Consonants
Fricatives manage I/O; plosives manage the function; and approximants manage control flow.
| IPA | Command |
|---|---|
| Fricatives | |
| /θ/ | Print the accumulator as an integer |
| /f/ | Print the accumulator modulo 256 as an ASCII character with no newline after it |
| /s/ | Input an integer to the accumulator |
| /ʒ/ | Input an ASCII character to the accumulator (if Unicode, then modulo it by 256) |
| Plosives | |
| /p/ | Pop from the front of the deque and append it to the function |
| /k/ | Pop from the back of the deque and append it to the function |
| /d/ | Append (a reference to the accumulator) to the function |
| /b/ | Append a plus sign () to the function |
| /t/ | Append a minus sign () to the function |
| /ɡ/ | Append a multiplication sign () to the function |
| /q/ | Append a division sign () to the function |
| /ʔ/ | Append a left parenthesis () to the function |
| /ʡ/ | Append a right parenthesis () to the function |
| /c/ | Reset the function to , the function's default |
| Approximants | |
| /ɹ/ | Goto the accumulator-th character in the source code, zero-indexed |
| /j/ | Goto the accumulator-th syllable in the source code, zero-indexed |
| /ɰ̊/ | Begin a while loop: if the accumulator is equal to zero, jump to the matching /ʋ/ |
| /ɰ/ | Begin a while loop: if the accumulator is not equal to zero, jump to the matching /ʋ/ |
| /ʋ/ | End a while loop: jump back to the matching /ɰ̊/ or /ɰ/ |
Vowels
Vowels modify the accumulator.
| IPA | Command |
|---|---|
| /i/ | Increment the accumulator |
| /ə/ | Decrement the accumulator if it is greater than zero |
| /æ/ | Square the accumulator |
| /o/ | Square-root and floor the accumulator () |
| /u/ | Set the accumulator to the result of applying the function to the accumulator () if the function is valid, else do nothing |
Nasal consonants
Nasal consonants operate on the deque.
| IPA | Command |
|---|---|
| /m/ | Push the accumulator to the front of the deque |
| /n/ | Push the accumulator to the back of the deque |
| /ŋ/ | Pop the front of the deque into the accumulator |
| /ɲ/ | Pop the back of the deque into the accumulator |
Examples
"HI"
I am too lazy to write a proper Hello, world! program.
didididædədædidididididididifif
Hello, world!
cicidigæducədəcədəcədəcədəcəfodigiducificiʔiciʔicidifufiʡiʡifocədəgəduqəʔəcədəgəfoduʡəʡəʡəcəfodogiducidigædəbəfodubifiditifoducədəfogæfodufoboʔidiʡuʔiʔicif
Cat program
ʒuɰ̊fuʒʋu
Truth-machine
soθɰ̊oθʋi