These are the general instructions, but I can't guarantee they will work for you.
Installation on macOS might be similar.
Install the Go language. I've tested with go 1.10.
Set the GOPATH environment variable. The following links may be helpful. I have not used the new "Go Modules" spoken of in the link (and quoted below).
- Golang Installation, Setup, GOPATH, and Go Workspace
- Understanding the GOPATH
"Introduced in Go 1.11, Go Modules aim to replace Go Workspaces and the GOPATH. While it is recommended to start using modules, some environments, such as corporate environments, may not be ready to use modules.
The GOPATH is one of the trickier aspects of setting up Go, but once it is set up, we can usually forget about it." – digitalocean.com ...
Preferably, install an integrated development environment (IDE) to use with Go. I've been using LiteIDE.
Copy the /src/ files from the download archive to the appropriate user Go source folder on your system (something like ~/go/src/).
The simplest way to install the needed packages may be to use go get from the command line (requires that you also have git installed, which you likely do if you're running Linux) ...
go get github.com/rin01/decnum go get golang.org/x/text/language go get golang.org/x/text/unicode/norm
Note that, as 0.8, you don't need the decnum library any more, as it uses a modified version of the shopspring/decimal library, included with the 0.8 download.
You'll need to copy the files from Go's regexp folder (something like /usr/lib/go-1.10/src/regexp) to the src/langur/regexp folder. This is to account for the missing replace-with-maximum-count method in Go's standard library, which is needed to make langur's regex methods complete for re2.
Once you have these things in place, you can test langur through the REPL. And, if you build langur, you can execute script files, of course.