Hash combines the convenience of a Unix shell with expressions, values, types, and functions that you would find in a conventional programming language. Its key features include:
help command; and
files = ["main.C", "parser.C"]
echo Counting (len files) source files
wc -l files
A few key differences to keep in mind:
f(g(x+y), z) will be f (g x+y) z in hash.
These are self-contained binaries that need no additional packages to be
installed, and run under Ubuntu 22.04 or later versions. On an Apple-silicon
Mac, use the ARM64 binary inside an Ubuntu 22.04 or later virtual machine. On an
Intel or AMD machine, use the x86-64 binary inside Ubuntu 22.04 or later. On
Windows, use the appropriate binary inside an Ubuntu 22.04 or later WSL 2
distribution. (If these are not installed yet, run wsl --install.)
After downloading the appropriate binary into the Ubuntu system, make it executable and start an interactive session. For example:
chmod +x hash-ubuntu22.04-x86_64
./hash-ubuntu22.04-x86_64 --interactive
At the hash prompt, enter help tutorial for a guided introduction,
help topics for the documentation index, or
help name for a specific language feature.
To run a program non-interactively, give its source file followed by any arguments for that program:
./hash-ubuntu22.04-x86_64 program [argument ...]
Run the binary with --help to see its command-line options,
including modes that only parse, type-check, or display inferred types.
hash is a reference implementation you may use to explore general semantic questions. The Sash language used for the course project differs from hash. Reproducing hash's behavior is not the specification for Sash and may produce an incorrect project.