Vandevelo

From Esolang
Jump to navigation Jump to search

Vandevelo is an input-only esolang by User:PythonshellDebugwindow.

Values

The only values in Vandevelo are nil and not nil.

Statements

Each line has zero or one statements.

Command Meaning
var -> value Set the variable var to value (lazy evaluation, evaluated again on each access)
var -!> value Set the variable var to not value (e.g., (nil) if value == (not nil) else (not nil)) (lazy evaluation, evaluated again on each access)
var ~> value Set the variable var to value (strict evaluation, evaluated immediately)
var ~!> value Set the variable var to not value (e.g., (nil) if value == (not nil) else (not nil)) (strict evaluation, evaluated immediately)
x :: y JavaScript (x) && (y); (e.g., short-circuit if; nil is falsy and not nil is truthy)

Expressions

Usable within statements.

Expression Result
var? The variable var (error if undefined)
x == y Not nil if x == y else nil
x != y Nil if x == y else not nil

Comments

Comments last until end-of-line, and are denoted by --, e.g. 2? -> 2? --Infinite loop.

Conventions

Variable names have to match the regex [A-Za-z0-9_&*$]+, but conventions are to number them starting with 0 incrementing by 1.

Special variables

Nil contains nil, and Inp returns user input when accessed (nil if input in {ε, 0, space} else not nil).

Truth-machine

0 -!> Nil?
1 -> Inp? == 0?
2 -> 2?
1? :: 2?