Skip to content

Quillwyrm/veld-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

140 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veld

Veld is a cellular stack-based language inspired by PostScript, Forth, Factor, and APL. Vectors and Grids are first-class stack values. Numeric words are overloaded across scalars, vectors, and grids, so grid grid + adds matching cells and grid 10 * scales the whole grid.

See the language reference for more details.

CLI

eval and dump take their source as exactly one shell argument.

.\veld.exe eval '1 2 + print'
.\veld.exe eval '"hello veld!" print'
.\veld.exe dump '"hello veld!" print'

The outer single quotes are PowerShell quoting. The inner double quotes are Veld syntax and are passed through to the language.

Example

# Define Proc as Name `greet`
:greet { name ;
    "Hello " . name . "!" print
}

# Invoke Word `greet` with a string
"Veld" greet

# Define Grid as Name `a`
:a [
    1 2 3;
    4 5 6
] def

# Define Grid as Name `b`
:b [
    10 20 30;
    40 50 60
] def

# Print a + b
a b + print

Prints:

Hello Veld!
11 22 33
44 55 66

About

Spall - A cellular stack-based language.

Topics

Resources

License

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages