These instructions will get you a copy of the project up and running on your local machine for development, as well as normal use of the Hussar tools.
To install Hussar for development, you need Go on your local machine. For instructions on how to install Go for your OS, follow the guide on their website.
The simplest method to download this project for development is with
go get. Simply run
go get github.com/hussar-lang/hussar in your terminal of choice, and the project will be downloaded to your Go path.
An alternative method is to clone the project from this repository directly. You can do this by running
git clone firstname.lastname@example.org:hussar-lang/hussar. For the Go imports to work correctly without change, you will need to place the downloaded project in
$GOPATH/src/github.com/hussar-lang/hussar. Once you're inside the project directory, you may have to run
go get ./... to fetch any dependencies.
You can run scripts with the run subcommand, while passing in the script in question.
hussar run file.hss
Another option is to simply call the Hussar command without any subcommands, which will start the interactive mode (or REPL) like so:
Once in the interactive mode, you can run code and get the result returned. You can exit this mode by calling
exit(0) or by pressing control-c in your terminal.