hotshot

This documentation is available on GitHub or my website

hotshot

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

1(fn fizzbuzz (n)
2  (cond ((and (= (mod n 3) 0) (= (mod n 5) 0)) "FizzBuzz")
3        ((= (mod n 3) 0) "Fizz")
4        ((= (mod n 5) 0) "Buzz")
5        (true n)))

Status

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.

Getting Started

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.

Compilation

  1. Clone the project
1git clone https://github.com/pspiagicw/hotshot
  1. Compile using Go
1cd hotshot
2go build .

Running

Run the binary without any arguments to open the REPL.

1./hotshot

To run a script pass it as a argument.

1./hotshot <script-to-run>

Testing

You can run

  1. To run all the tests.
1go test ./...
  1. To run specific tests (lexer in this case).
1go test ./lexer
  1. use the -v flag to provide information about all the subtests being run.
1go test -v ./...

Contribution

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.