Skip to content

v0.3.9

Choose a tag to compare

@github-actions github-actions released this 17 Nov 16:23
· 28 commits to master since this release
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