ToolsSlide 86 of 86
86nextTools
Where to go next
That is the tour, and everything in it runs on the compiler that served it to you. The download link below is the latest release: one executable, built for Linux, macOS and Windows on amd64 and arm64. Put it on your PATH as hive, with Go 1.24 or newer installed beside it, and every example here runs from a single file.
The repository holds the reference this tour is not:
spec/is the language written out in full, one numbered document per part: the grammar, the type system, mutability, the bounds pass, the builtins, the standard library, and the lowering to Go. Read it when the tour has told you something is true and you want the exact rule.examples/holds whole programs rather than fragments, numbered and each one runnable, and./examples/runchecks every one of them against its expected output.src/is the compiler, written in Hive and built by itself, which also makes it the largest Hive program there is to read.
One file, every command
func greeting(): Str {
return "it works"
}
proc main(): void {
echo greeting()
}
test "the greeting says it works" {
assert greeting() == "it works"
}You can edit this program and run it here.Tab indents, Escape leaves the program, and Ctrl+Enter runs it.
What each one says
$ hive check hello.hive
No problems found in hello.hive (0s)
$ hive run hello.hive
it works
$ hive test hello.hive
PASS the greeting says it works
1 test: 1 passed
coverage: 33.3% of statements (2/6)
never exercised: main
$ hive container hello.hive
Wrote Dockerfile for hello.hive (0s)Output
Run a program to see what it prints here.