b
snekky-lang.org | Releases | Previews | Examples | Report an issue j
Please do not take this project too seriously. I'm in no way a professional. To be honest, I'm surprised myself that Snekky is even somewhat usable.
Snekky is a simple object-based, imperative programming language compiling to a custom bytecode. Checkout the specification for more information.
- Built-in REPL.
- Familiar syntax.
- Compiles to a custom bytecode.
- Arrays and hashes.
- Lambdas and closures are supported.
- Almost everything is an expression (including
if
s,when
s and blocks). - Final (
let
) and mutable (mut
) variables. - Destructuring of arrays and hashes.
for ... in
loops with iterators.- As flexible and dynamic as a snek.
- Download and install Haxe.
- Clone this repository.
- Compile the project by executing
haxe scripts/build-cpp.hxml
. - Binaries will be located in
cpp/
.
Builds can be found in the releases tab or the actions tab (login required).
- Create a file called
input.snek
in a text editor (e.g. Visual Studio Code). - (optional) Install the Snekky VSCode extension for syntax highlighting.
- Enter some code (check out the examples).
- Run it using
snekky input.snek
.
Run snekky --help
for more information.
For more examples, checkout the examples folder.
// An implementation of the classic FizzBuzz programming test
for let i in 0..100 {
Sys.println(when {
i % 3 == 0 && i % 5 == 0 => "FizzBuzz"
i % 3 == 0 => "Fizz"
i % 5 == 0 => "Buzz"
else => i
});
}
The REPL allows you to quickly test a few lines of code by entering them one after the other. Syntax highlighting and automatic block indentation are supported.
- snekkyd - Decompiler for Snekky bytecode files.
- snekkyd-gui - GUI frontend for snekkyd.
- snekkyp - Disassembler for Snekky bytecode files.
- Snekky VSCode - Extension for VSCode providing syntax highlighting.
- Fork it (https://github.com/snekkylang/snekky/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Senk Ju - creator and maintainer