esolang

Nikud

The letters are decoration. Only the vowel points under and over them are code.

Bary Levi · Turing complete: unknown · ●●○ moderate

Tested with 5 known programs · Hello World on Try It Online: identical · Test method

Run it

Expected: 144

The idea

Nikud is a stack language by Bary Levi. Its 14 commands are Hebrew vowel points, the small dots and dashes that show vowels in Hebrew text. Every other character is ignored, so a program is usually written as a row of alefs, each carrying one point, and it looks like a line of strange Hebrew.

The machine

PointDoes
hataf segol, hataf patahPush 1; push -1
patah, qamatsAdd; multiply
segol, holam haser, qubutsDuplicate; swap; turn c b a into a c b
shvaDrop
tsere, hataf qamatsPrint a number; print a character
dagesh, shin dotRead a number; read a character
holamPop, and skip the next instruction if that was not 0
hiriqPop a position and jump there

Positions count instructions from 0; a jump past the end stops the program. Numbers are JavaScript numbers. The interpreter keeps all output until the end, so a program that pops an empty stack, reads past its input or runs 1,000,000 instructions prints nothing at all.

Example

The first reads 12, duplicates it, multiplies and prints.
Expected: -1
Expected: 1
Expected: ab

The first reads 12, duplicates it, multiplies and prints. In the second, holam pops the 1 and skips a print that would have failed on the empty stack. The third builds 16 by doubling and squaring, then jumps over eight prints to instruction 16. The last reads two characters, swaps them and prints them in their first order.

Further

Ideas it shows

Also in Turing tarpits

Write your own in Run Convert a program from Nikud

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run nikud -e 'ֵֶָּ' --input '12'
shib manual nikud

Source

Module
langs/tio/ports.js
Interpreter
langs/tio/nikud.js

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