esolang

Phena

Every program is one sentence in a language nobody speaks. Neho phene.

2023 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello World

The idea

Phena is from 2023. A program is a single sentence that should read like English, or at least like a language. It starts with a capital and ends with a period, and its words are glued together from syllables.

Read the story

Twenty syllables that start with a nasal are the variables, from na and nae to mu and my. A command is another syllable stuck to a variable, so phene prints the variable ne and jeina counts na up. There is one loop, and it always looks at nu.

The machine

WordDoes
phe__Print the variable, as a character or as its text
i__Read one character into it
jei__ sha__Count it up or down, wrapping between 0 and 255
__hoPut the text Hello World in it
pa ... thoLoop while nu is not 0
teEnd the program

Every variable starts at 0 and holds a number from 0 to 255 or the text Hello World. Counting a variable that holds text starts it again from 0. Only the first word has a capital, so the same command is Jeina at the start of a sentence and jeina anywhere else.

Example

Neho puts Hello World in ne and phene prints it.

Neho puts Hello World in ne and phene prints it.

The cat reads into nu and loops until it reads the null character. Reading past the end of the input gives 0, so it stops there too.

Expected: cat

A counted loop. nu goes up to 3 and the loop prints ne and counts nu down until it is 0.

Expected: Hello WorldHello WorldHello World

The truth machine takes 48 from the input with 48 shanu and counts na up to 49, the character 1, with 49 jeina. On a 1 the loop prints na forever. On a 0 it skips the loop, and one shana turns the 1 into a 0.

Patterns it teaches

Further

Also in Camouflage

Write your own in Run Convert a program from Phena

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run phena -e 'Neho phene.'
shib manual phena

Source

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

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

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