esolang

Minkolang

A 2D language with time as a third dimension. On a space, the pointer falls to the next layer.

El'endia Starman, 2015 · Turing complete: unknown · ●●● hard · esolangs.org

Tested with 6 known programs · Hello World on Try It Online: identical except the line end · Test method

Run it

Expected: Hello, World!

The idea

Minkolang dates from 2015 and calls itself the Minkowskian (2+1)D semi-golfing language. The code has rows and columns like Befunge, and also layers, separated by lines of $$$. The layers are the time axis. When the pointer lands on a space it does not move on through space; it falls through time, into the same cell of the next layer. Every direction wraps around, layers too.

Read the story

So a space is never a plain no-op. In a program of one layer a stray space catches the pointer for good, because it falls back onto the same cell. V boosts the pointer across spaces, and # is a net with no effect but to be something other than a space.

Loops have their own stacks. ( hands the loop the whole stack of its parent, or with $ only the top n values, and the loop gives what is left back when it ends. { and } are recursion, rare in a 2D language.

The machine

One stack of Python numbers, with endless zeros below. $ toggles the next command to a second meaning.

CharDoes
"..." 0-9 lPush a string (first character on top), a digit, ten
+ - * : ; %Add, subtract, multiply, floor divide, power, modulo
= ` | Equal, greater
~ ,Negate, not
n o N ORead a number or a character, print a number and a space, print a character
d D g G c x X r R s S IDuplicate, index, copy, drop, reverse, rotate, sort, length
v < > ^ / \ _ \|Arrows and mirrors
! ? @ &Jump one cell, if true, n cells, n cells if true
b BTurn back if false, or bend left or right
( )While loop with its own stack; ) pops the value it tests
[ ] iFor loop, and its counter
{ }Recursion
p q a A w F f t CCode put and get, array, wormhole, gosub, ternary, comments
V # .Boost and net; end

When the run ends, the interpreter prints a newline.

Example

The Hello World from Try It Online pushes the string and prints its 13 characters one at a time.

The Hello World from Try It Online pushes the string and prints its 13 characters one at a time.

Expected: Hi

A for loop prints its counter five times. Then the recursive Fibonacci from the specification reads n, calls itself with { on n-1 and n-2 and adds the results.

Expected: 0 1 2 3 4
Expected: 55

Patterns it teaches

Further

Two-dimensional languages

Stack-based

Write your own in Run Convert a program from Minkolang

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run minkolang -e '34+N.'
shib manual minkolang

Source

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

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

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