MiLambda

From Esolang
Jump to: navigation, search

MiLambda(μλ), is esoteric two dimensional turing-complete programming language. In this languages all instructions are letters of Greek alphabet.

Operands

Direction control instructions

> Set the direction to right

< Set the direction to left

^ Set the direction to up

v Set the direction to down

Ι Redirect the control flow

ι Redirect the control flow


Сonditional direction control instructions

Z If the cell is not 0, reverse the control flow. (It bounces off the Z)

ζ If the cell is 0, reverse the control flow. (It bounces off the ζ)

| Reverse the control flow if coming from a right/left-direction

_ Reverse the control flow if coming from a up/down-direction

Υ If store is not equals 0 change direction to left

υ If store is not equals 0 change direction to right

σ If cell is not equals store change direction to up

Σ if cell is not equals store change direction to down


Cell/store control instructions

Δ Increment the cell

δ Decrement the cell

E Adding 10 to current cell value

ε Deleting 10 from value of current cell

ς Set current cell value to 0

Ξ store = cell

ξ cell = store

s memory[cell] = store

g store = memory[cell]

P memory[store] = cell

ρ cell = memory[store]

` Decrement the store

' Increment the store


I/O instructions

Θ Output the cell as character

θ Output the cell as number

π Read character from input


Special instructions

λ halt the program

Examples

Hello world

>  EEEEEEEΔΔΘς       v
v  ςΘΔEEEEEEEEEE     <
>  EEEEEEEEEEEδδΘς   v
v  ΘδδEEEEEEEEEEEς   <
>  ς EEEEEEEEEEEΔΘ   v
v  ΘΔΔΔΔEEEEς        <
>  ςEEEΔΔΘ           v
v  ΘδEEEEEEEEEEEEς   <
>  ςEEEEEEEEEEEΔΘ    v
v  ΘΔΔΔΔEEEEEEEEEEEς <
>  ςEEEEEEEEEEEδδΘ   v
v  ΘEEEEEEEEEEς      <
>  ςEEEΔΔΔΘ          λ

Count to five

'''''>Δθ Σ λ
     ^   <

External resources