Skip to content

Releases

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 27 Nov 16:21
307211e

Language

  • A mut argument is lent, not copied, to a callee that can keep none of it — no mut parameter, no thread, no function in its answer — and the answer is copied instead where it could hold that storage and weighs less.

Tooling

  • hive test runs multiple tests in parallel (or concurrently if you set N higher than your available core count). By default, it uses as many threads as your machine has cores, but you can change the number with --threads N.
  • Large programs compile significantly faster: the compiler builds itself in seconds rather than minutes.
    • The compiler's passes stopped deep-copying the whole symbol table at every lookup, through the lent arguments above.
    • indexOf over Str and Int vectors compares directly instead of through reflection, in every program.
    • A program with no with compiler call skips working out the order such calls run in.
    • Types and callables are looked up by name in an index rather than a scan.
    • Walking the storage a type reaches stops at a shape it has already been through.
    • A build asks go env once instead of up to four times.
  • hive analyze reports the copies the compiler really makes, in seconds rather than minutes on large programs: it names an answer copied in place of its arguments, no longer charges a Result for a copy that never happens, and counts the copy of a mut name bound twice in one body.

Breaking

was is
two tests in one program writing the same file a file of each test's own, or hive test --threads 1
a test relying on the node another one listens on, or a service name it registers one test doing both, or hive test --threads 1

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.5.2
asset:  hivec-linux-amd64
sha256: 062edba8e0a56100a76d3638eeb7e238c7ed16ef5ed5aa6fc2b07ffcfab23d8c

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 15:17

Language

  • f(x) with compiler runs a call while the program builds and builds its answer into the executable, so reading it costs nothing at run time. Only the entrypoint may write one, its arguments are literals or other such calls' answers, and a panic in it is a compile error at the call.
  • trim(str) is a builtin, answering with the string less the white space at both ends.

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.5.1
asset:  hivec-linux-amd64
sha256: e987e5b2635ea284906b64f21615769a657cecf29fde6de6c5b50ea9bf0f6889

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 21:57

Language

  • Binary values and patterns are written <<<...>>>, so << and >> are only ever shifts and a shift inside one needs no parentheses: <<<x >> 4, y>>>.
  • map, filter and filterMap take a proc as readily as a func, as long as it does not take its element mut.
  • hive.map.set and hive.map.delete are declared as the procs they are, taking their map mut.
  • A - that opens a line starts a new statement outside brackets, as ( and [ already did; to break a subtraction there, end the line with the -.
  • A T[dyn] parameter takes only a vector declared [dyn], mut or not; T[] is the parameter for any length, and the library's and Go functions' vector parameters are T[].

Tooling

  • Releases are signed: SHA256SUMS comes with SHA256SUMS.sig, and hive use and the Windows installer refuse a release whose signature does not check. GitHub attests to every file, for gh attestation verify.

Breaking

was is
<<a, b: UInt16>> <<<a, b: UInt16>>>
x is <<v: UInt4, ...rest>> x is <<<v: UInt4, ...rest>>>
a line opening with - to continue a subtraction end the line above with the -
a static vector or a literal passed to a T[dyn] parameter the parameter is T[], or the vector is declared [dyn]

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.5.0
asset:  hivec-linux-amd64
sha256: b782e35fdc73564209a638e2427a8ea0ca62d13348b1d6176c23d2374424f7c5

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 23 Nov 15:44
6f1f70c

Laws

  • A law follows hive.* calls, builtins and queries, and never runs them: a call that answers the same for the same arguments is worked out on known ones and one unknown otherwise, and any other answers whatever its type allows.
  • async, the await-all and with timeout are followed: a call run alongside is the call, and a wait with a timeout is both outcomes.
  • A law follows a hive.map.Map write by write, so get after a set of the same key is what was set, and a type's law about a map field is kept by set and delete.
  • An interpolation of something unknown is a string a law can still reason about, rather than a law that cannot be followed.

hive.map

  • hive.map.plus and hive.map.minus are set and delete answering a new map, leaving the one they were handed as it was.

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.4.3
asset:  hivec-linux-amd64
sha256: ffc1a9354dc60fc85cce077c29cfb074dc36ce9339dc4889e15e7da250985c0a

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 22 Nov 21:48

Fixes

  • A [ or ( that opens a line starts a new statement, so [a, b] := … under x := "…" is no longer read as an index into the string.
  • A law on known values follows a recursion to its end, and one the prover gives up on is reported as unproved rather than as a counterexample.
  • x / k and x % k by a positive literal are tied back to x, so n % 2 == 1 shows 0 <= n / 2 < n.
  • indexOf past the elements a law knows is one unknown Result, the same for the same vector and value, instead of a law that cannot be followed.
  • A guard on a call is what a type law asking the same call is told, so if unique(pages) { Update(pages) } keeps a law asserting unique(u.pages).

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.4.2
asset:  hivec-linux-amd64
sha256: 507af66e642fe4d26666bcc95e47ee0f5668858011a98079f1f3d96c2a40be53

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 19 Nov 00:21

Fixes

  • A != between integers is two cases to the prover, below and above: n != 0 beside n >= 0 shows n > 0, and len(v) != 0 shows len(v) > 0. A type law needing 0 < len(items) was refused after if len(items) == 0 { panic … }, with 0 != len(items) among what was known.
  • A law follows indexOf through the elements a vector is known to hold, splitting the case at each one that may be the one sought. It needed every element and the one sought known, so indexOf([], ip) was refused for an unknown ip, and so was indexOf(allowed, "*") under allowed is ["*", ..._].

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.4.1
asset:  hivec-linux-amd64
sha256: c5cd6d80287331245d52015cc0bf73028042094af0182a1768a1f7a1b7dfc664

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 22:09
b8da6ca

Laws

  • law declares a claim the compiler proves for every value of its parameters, and one it cannot prove is a compile error.
  • A false law is refused with a counterexample, and one nothing settles with the goal left open, the case it is in and what was known.
  • A law cites another by calling it, and is an induction by calling itself on a part a pattern took apart; the compiler tries an induction on each vector parameter on its own.
  • A generic law is proved at every set of types the program uses what it calls at, each copy on its own.
  • A law reaches only code that ends and answers the same every time: no library call, no async, no loop but for each and a counting loop the bounds pass trusts.
  • A law inside a type is kept by every value of it: each construction and each write is proved to keep it, from what that function knows there.
  • A type's laws are known wherever a value of it is read, by function laws and by the bounds pass.
  • A decoder refuses a value that breaks its type's law as Broken, beside Mismatch for a document of the wrong shape.
  • hive indent keeps an empty line around a type's law, which touches only other laws.
  • A law for table <name> is a SQL filter every query on the table carries, read off the query's SQL: in what it reads, changes and deletes, wherever the law's if holds.
  • A row a query inserts or updates has to land inside a table law's filter, by writing one of its column = value parts.
  • table is a keyword only after a law's for, so a name spelled table still compiles.
  • law is a keyword, so a name spelled law no longer compiles.
  • axiom is reserved: any use of it is a compile error, so a later version can give it a meaning without breaking a name.

Fixes

  • An assignment never lets a write through one name reach another: rec.f = xs copies an immutable xs, as a binding does.

Breaking

was is
a variable/parameter/field named law something else
a variable/parameter/field named axiom something else
hive.json.JsonError, hive.crypto.JwtError, hive.net.QueryParamsError and hive.term.FlagError as structs unions of Mismatch and Broken, sharing path, expected and found
hive.sql.raw(connection, text) hive.sql.unsafe(connection, text), which no table law reads

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.4.0
asset:  hivec-linux-amd64
sha256: db824fdcce0b9c16ce7dc9a37015d5019c43204b7164e7d6f75813ef1f21bb04

v0.3.9

Choose a tag to compare

@github-actions github-actions released this 17 Nov 16:23
789f035

Tooling

  • hive install <entrypoint.hive> builds a program and puts it where a shell finds commands: ~/.local/bin on Linux and macOS, and on Windows %LOCALAPPDATA%\Programs\Hive\bin, put on the user's PATH the first time. --name installs it under another name.
  • hive install --desktop adds a windowed program to the system's app launcher, with its icon, on Linux, macOS and Windows.
  • hive install --target android/arm64 installs the program as an app on a phone connected over USB, through adb.

The terminal

  • hive.term.print ends no line, and hive.term.println is the one that does, so a prompt or an escape sequence is written as it is.
  • A terminal is read a key at a time: raw stops the echo and the line buffering, readKey answers each key named as hive.ui names it and a paste as one, and size measures the window.
  • Raw mode is put back however a program ends: main returning, a panic, hive.term.exit, or its last window closing.
  • A Windows console paints the escape sequences a program prints, as every other terminal does.
  • hive.term.start runs a program alongside this one: its output read while it runs, its input written, and processKill stopping it with everything it started; whatever is left is stopped when this program ends.

Command-line flags

  • hive.term.flags() is the program's arguments as one line hive.term.codec() reads back word for word, a word holding a space or a quote quoted again; join(hive.term.args(), " ") split such a word in two.
  • A flag takes a short name: -- Flag as background-task bg; reads -bg as well as --background-task, the shorter of the two names being the short one.
  • hive.term.positional(line) answers with a command line's own words: those before the first flag, and everything after a lone --.
  • The flag codec pairs words knowing the type: a Bool takes the next word only when it is true or false, and a negative number is a value, never a flag.

Files, pictures and HTTP

  • hive.net.httpOpen reads a response as it arrives: it answers once the headers are in, httpReceiveLine and httpReceive hand the body over piece by piece, and httpClose drops the connection, which is what stops a model generating.
  • hive.image reads PNG, JPEG, GIF and WebP pictures into their pixels, and scale resizes one.
  • hive.file says where the program is: workingDirectory, home, executable, and isDir beside exists.
  • hive.file.asset reads the program's own assets/ folder out of its executable, which is built in whenever a program reads it, window or none.

Windows and pages

  • hive.ui lays out grids and stacks: grid with columns and span, stack with place, a row that wraps, and minWidth, maxWidth, minHeight, maxHeight and aspect on any box.
  • Text takes a weight, a slant and a length: weight, italic, mono, lines ending in an ellipsis, justify across a text's lines, and paragraph for words in several styles wrapped as one.
  • radio, choices, tabs, tree and progress are widgets, the first four heard through onChoose, on and onToggle.
  • Any widget hears the pointer and the focus: onEnter, onLeave, onPress, onPoint, onRelease, onWheel, onFocus, onBlur, onScroll and onSize; carry and onDrop drag one onto another, and onFile hears a file chosen or dropped.
  • A box looks more ways: gradient, opacity, shadow, ease to bring a change in over time, and fit for a picture.
  • limits sets a slider's or a number's range and step, and InputKind adds Time, DateTime, Email, Tel, Url, Color and File.
  • Icon has 320, drawn from Lucide alike on a page and in a window.
  • A canvas draws more: oval, arc, wedge, curve, cutout, symbol, picture, an edge, a dash and a gradient, and measure says how wide words will be everywhere.

Scenes

  • A scene has more shapes: torus, capsule, disc, mesh, tube, extrude, lathe, cloud, model, sign, group, and a line with thick.
  • A shape says how it shines: rough, metal, glow, unlit, wire, shadows, and a texture and relief of its own laid by tile; scale sizes every shape.
  • A scene's light is the program's: lamp, spot, sunlight, ambient, a panorama, and a background with no alpha to see through.
  • The camera can orbit, look toward a place, roll, go ortho and set its depth.
  • A scene says what is under the pointer through onHit and onOver, and hands over a PNG of itself through snapshot and onSnapshot.
  • A model or figure plays its file's animations with play(clip, at, loop), and a glTF without a skin, or with many meshes, is drawn whole.

Fixes

  • onDrag reaches a scene on a page, where the picture drawn over the scene took the press.
  • Writing an element inside a branch or a loop keeps what was proved about its vector: t[k] = 1 in an inner if cost the outer t bounds k, which a write cannot change.
  • A proof is lost when what it was about is replaced: an indexOf over a vector since rebound, and a guard on grid[0] after grid[0] = [1], still proved an index that could be out of range.

Breaking

was is
an index proved for a vector, or for a row, used after the vector or a row of it is written guarded again after the write: writing grid[1] costs the proofs about every row of grid
hive.term.print(text) ending its line hive.term.println(text)
--verbose file.txt, an error about file.txt file.txt is a word, and words go before the flags or after --
a flag the type does not declare, or a word between the flags, passed over a FlagError
a value opening with a dash, --name -x --name=-x, or quoted

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.3.9
asset:  hivec-linux-amd64
sha256: 6c18e273040c5ec34de1f1cd07e3131396b9969e4bb0a829ec1e2fadfb0b0ce2

v0.3.8

Choose a tag to compare

@github-actions github-actions released this 15 Nov 01:08
8a73860

Standard library

  • hive.net.httpWsServe(port, handler, wsHandler) serves HTTP and WebSockets on one port: every request reaches handler as under httpServe, and answering 101 hands that one to wsHandler, which takes it as under wsServe.
  • A hive.net.WsConnection says who is at the far end: conn.address is its host:port, and hive.net.WsConnection(address) builds one with no socket behind it, for a test.
  • hive.sql.run prepares a statement once and runs that one from then on, where the database parsed its text again on every call — about half of what a short SQLite statement cost. hive.sql.raw is not prepared.

Fixes

  • A query with a row type can be run from a test: its row mapper was written only where the program itself ran the query, and a test that ran one nothing else did failed in Go with undefined: sqlFields_….
  • A hole's name may open with _, as any binding's may: "{_before is (\s*)}" was refused.

Tooling

  • hive container reads the port httpWsServe serves, as it does the other servers'.

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.3.8
asset:  hivec-linux-amd64
sha256: 67e0ec41d20189256f8b25900bb0d56d0861b19831f7a5a29b519d90039236cf

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 12 Nov 22:46
14648d6

Tooling

  • hive lsp is a language server: errors as a file is typed, hover, go to definition, completion, an outline, and reindenting.
  • LSP.md sets it up in Neovim and VS Code, the second through the extension in editors/vscode.
  • hive agents sends a coding agent to the language server: a page on what to ask it, and a Claude Code plugin in .hivedocs/plugin that starts it.
  • A name that is no value is refused where a value was wanted: hive.env.nope, a module or a type on its own, and a variant nobody declared passed hive check and failed in Go.
  • An error inside a string's {...} is reported at the expression, where it was at the string.
  • An error is reported on the line it is on, from every pass: an index at the index, an argument at the argument, a field at the field — where it was the line of the declaration around it.
  • hive check writes no Go: it stops after the checks and the bounds pass.
  • hive analyze no longer scores a program that does not compile: five rejections that were the emitter's alone are the checker's.
  • The runtime is Go under runtime/, with its comments, and ./bootstrap puts it in the compiler; it was strings in the compiler's source.
  • A module of the standard library is declared once, in a stub beside its Go — term.hive beside term.go — where it was three tables in the compiler.
  • A call added to the library and used by the compiler is one build: ./bootstrap has the compiler read the checkout's runtime/, which HIVE_RUNTIME names.
  • scene/build downloads the engine of the latest release where that was built from the same scene/, and --force compiles regardless.

To bootstrap from this release, seed/pinned.txt becomes:

tag:    v0.3.7
asset:  hivec-linux-amd64
sha256: 4a835eeefed3b29533c15fda136eccfa602644332c8fe37a1de5ca6a931cb51e