λ⁁

From Esolang
Jump to navigation Jump to search

λ⁁(pronounced lambda insertion point) is a esolang made by User:yayimhere made to be and look weird.

memory

number are stored in a register. there can be created new registers and there can be shifted between registers. there exist 3 kinds of register. input registers which take input when told to and saves into that register, normal register which is just a way to store a single number for later(its also the only one that works for the register commands that are not specifically tailored to another kind of register), and output registers which will output whatever is inside if told to. there are also two stacks: the control stack which is for flow control and the normal stack that just can be used to store numbers. there is also a forth register type the stack type which can transfer value from the stack to a register. the memory starts with one register thats normal

syntax

since there are many commands in λ⁁ i will be putting it into sections

register commands

all commands for registers

register commands
symbol description
i create a input register to the left
I create a input register to the right
r create normal register to the left
R create normal register to the right
o create output register to the left
O create output register to the right
s create stack register to the left
S create stack register to the right
d delete register to the left
D delete the register to the right
> go to the register to the right
< go to the register to the left
& make the input register get input. gives error if the current register is not a input register
: make the output register output as a number. gives error if not output register
; make the output register output the number as a ascii char. gives error if not output register
{numb} make the current register be numb. gives error if input register
+ add the current register onto the register to the left and save that into the register to the left
- subtract the current register by the register to the left and save that into the register to the left
* multiply the current register by the register to the left and save that into te register on the left
/ divide the current register by the register to the left and save that into the left register
make the current register into a normal register
make the current stack register pop the top value of the stack and store it. gives error if the current register is not a input register
/ push whats in current stack register to the normal stack
turn current register into stack register
^ turn current register into a output register
make current register into a input register

normal commands

these are the normal commands(control flow. Its just mixed commands tbh):

normal commands
symbol description
[ jump to corresponding ] if there are a false on the stack(control stack)
] jump to corresponding [ if there are more than true or no falses on the stack(control stack)
letter if the top of the control stack is the same as the current register then jump to closest copy of the letter
( jump to corresponding ) if there are a 0 on the top of the control stack
) jump to corresponding ( if there are no 0's on the top of the control stack

stack syntax

all the syntax for the stack(normal stack)

stack syntax
symbol description
∨0-9 push that number onto the stack
pop top value
+ pop top two values, add them together and push the result
* pop top two values, multiply them and push the result
- pop top value, negate it, and push it
! pop the top value, take the reciprocal and push it
pop the to value, take the square root and push it
pop the top value, take the cube root and push it
pop the top value, take the 4th root and push it
= pushes a true on the stack if the top of the stack is equal to the next to bottom value else push false
$ take user input as a string and push it onto the stack. as a string
# turn top string into integer(like int() in python)
´ put whats on the normal stack onto the control stack

examples

truth-machine:

⤽&⁋/´^(:):

looping counter(not unary):

{1}R{1}⁋/(^:⅋+)

A+B problem:

⤽&I>&+^:

computational class

this is a translation from λ⁁ to Brainfuck:

> = >
< = <
, = ⤽&⅋
. = ^;⅋
[...] = ⁋/´(⁋/´⅋...)
+ = r<{1}>+<D
- = r<{1}>-d

proving that its turing complete