Repository navigation
v0.4.0
The release in which the type system grows into something you can write a library with. →
full notes
0.3.0 let a user write generic DATA. 0.4.0 lets them write an ABSTRACTION.
- A
specis a value's type. A spec-typed position builds a counted box carrying the value and a witness
table; a call dispatches through it,isworks on it, and the table carries a rendering soprintsays
what the value says. A parameterized spec is a type too.E9115,E9116andE9048retire. - An
enumcan be generic —E9003retires — with a variant's parameters solved from the payload,
supplied at the application, or refused by name when neither reaches them. A method carries its own type
parameters, andE9044retires with it. log'sSinkis the acceptance test, and that module is written the way it wanted to be: a parameter
can say any destination rather than naming one.- Two doctrines were being restated, not provided. Four ledgers and six run-and-compare loops each had
their own copy; each is one implementation now. Collecting them found twogates-checkclauses that could
report and not fail, two sites that ran a program with2>/dev/null, a gate that never asked the exit
status, and a skip list that checked an exit status where it meant a rule. - Three dead-code questions had no gate.
make dead-codeasks the two that are about the repository —
apubfunction of the compiler nothing calls, and a script nothing invokes — and the third turned out to
be a defect inL101: an import belongs to the FILE that wrote it, and the rule was asking the merged
program. - 60 gates, up from 58.
One leftover ships unfixed — #123, an unsafe fn as a
spec requirement — and so do two defects this release's own subject has, found by putting the
milestone's sentence to the compiler rather than by re-reading the tickets that closed:
#165, where E3079 names a spelling E3069 refuses, and
#166, where a generic method's receiver decides a later
payload-free variant's parameter. Both are loud; neither miscompiles.
Install
Download the tarball for your platform, unpack it anywhere, and put its bin on your PATH.
Nothing has to be exported: the compiler finds its runtime and standard library from its own
path.
tar xzf zerg-0.4.0-<platform>.tar.gz
./zerg-0.4.0-<platform>/bin/zerg --versionVerify what you downloaded against SHA256SUMS:
sha256sum -c SHA256SUMS # macOS: shasum -a 256 -c SHA256SUMSA C compiler is required to build a program, not only to build Zerg: zerg build emits C17
and hands it to cc.
There is no Intel-Mac binary — Rosetta runs x86_64 on Apple Silicon and not the reverse, so an
Intel Mac builds from source, which needs Go as well as cc.