1.0.2 • Published 4 years ago

stck v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Stck lang

npm.io npm.io npm.io

Stck is a minimal stack based esoteric programming language. Data is stored on an unlimited number of stacks. Stacks can be pushed to, popped from, or manipulated with operators.

The language spec can be found at stck.jakerunzer.com/spec.

npx stck file.stck

Features

  • Multiple stacks
  • Functions
  • Loops
1>a # push 1 to a
a>b # pop from a and push to a
a>   # pop from a

# 0 is popped from empty stack

# o is the output stack and is write only
# pushing values to it will be sent to stdout
"hello, world">o

# i is the input stack and is read only
# when the program starts, stdin is parsed and added to this stack
i>o

a+  # pop from a and b, add, push result to a
a+a # pop 2 values from a, add, push result to a
a+1 # pop from a, add 1, push result to a

(a # loop until a is empty
)

:foo { # define function foo
}

:foo # call foo

Getting Started

Head to stck.jakerunzer.com for information how to use and get started with Stck.