stck is a statically typed stack-based concatenative programming language
- Parser
- Type Checker
- Type Inference
- Compiler into own bytecode
- Virtual Machine
- Compiler into native
- More Features (in progress)
- More Examples and Documentation (in progress)
- Cross Platform
- Package Manager
- Bootstrapped
First of all, you need to have Bun installed. Bun will be replaced with node.js in the future for more cross platform support, but for now, the compiler is usable only on platforms supported by bun.
include "std"
proc main
"Hello, World!\n" puts
end
$ ./stck.ts run hello_world.stck
Hello, World!
$ ./stck.ts build hello_world.stck
[INFO] Compiled to hello_world
$ ./hello_world
Hello, World!
The stck compiler currently supports two targets: its own bytecode and FASM.
FASM is used by default, but you can provide the target using the --target
(-t
) parameter.
$ ./stck.ts build hello_world.stck --target bytecode
[INFO] Compiled to hello_world.stbin
$ ./stck.ts run hello_world.stbin
Hello, World!
You can also use the --target
parameter in the run
subcommand.
Check the examples
folder for more examples!
WIP