This documentation is available on GitHub or my website
hotshot
is a LISP interpreter, borrowing features from Lua.
This is hotshot
. A LISP based language written in Golang.
It's a dynamically typed language with hint of languages like Lua. It's built in Go.
It looks like this
(fn fizzbuzz (n)
(cond ((and (= (mod n 3) 0) (= (mod n 5) 0)) "FizzBuzz")
((= (mod n 3) 0) "Fizz")
((= (mod n 5) 0) "Buzz")
(true n)))
This language is practically newborn and has a lot of it's features unplanned. But it's big enough to be considered releasing to the public.
It does have around 40 builtin functions implemented. But no you can't use this language in production.
Its designed for reading and experimenting, and maybe small scripts.
The only way to use the langauge is to manually compile and run it on the CLI.
It has a builtin REPL, along with ability to run scripts.
- Clone the project
git clone https://github.com/pspiagicw/hotshot
- Compile using
Go
cd hotshot
go build .
Run the binary without any arguments to open the REPL.
./hotshot
To run a script pass it as a argument.
./hotshot <script-to-run>
You can run
- To run all the tests.
go test ./...
- To run specific tests (
lexer
in this case).
go test ./lexer
- use the
-v
flag to provide information about all the subtests being run.
go test -v ./...
Anybody is free to develop hotshot
. You will need knowledge of Go and preferably understanding of Compiler Theory
. You will need knowledge of Go and preferably understanding of Compiler Theory.
This project is under heavy development and contributions are highly appreciated. A lot of decisions are already taken regarding the language, but a lot of them are still remaining. Hope you can join us in making them.