Skip to content

v0.1.0

Choose a tag to compare

@codyspate codyspate released this 03 Sep 22:55

v0.1.0

The first release with a plain version number. 241 commits since
v0.1.0-rc.3, and the reason it took three candidates to get here is that
each one was scored against docs/release-readiness.md item by item and each
scoring found things the previous one had asserted rather than checked.

This is 0.1.0, and the number is the promise. The language may break
before 1.0, and this release breaks things rc.3 accepted. What it will not
do is break them quietly: CHANGELOG.md lists every one, and anything that
used to produce a silently wrong answer is listed as breaking as well as
fixed, because code written around it behaves differently now.

Install

curl -fsSL https://raw.githubusercontent.com/codyspate/khoralang/main/install.sh | sh
irm https://raw.githubusercontent.com/codyspate/khoralang/main/install.ps1 | iex

Three targets: x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc and
aarch64-apple-darwin. They are exactly what the release workflow builds,
packages, unpacks somewhere else and compiles a program with before anything
is published. Linux arm64, cross-compilation, musl and WebAssembly are named
as out of scope with the reason at https://khoralang.com/docs/next/deployment/supported-targets/,
because an unchecked platform in a supported table is worse than an absent
one.

What changed since rc.3

The full list is in CHANGELOG.md. The four things a program
is most likely to notice:

  • std::schema replaces std::json's decoding, and a type is its own
    schema.
    derive(Decode, Encode) on a record gives you the same reader for
    a request body, a database row, an environment block and an LLM's answer,
    and it reports a bad value as [2].amount should be a whole number rather
    than dropping it. FromJson/ToJson, std::ai::Extract and std::config's
    eight accessor functions are all deleted in favour of it.
  • khora doc no longer defaults to this repository's layout. It defaulted
    to std and to website/content/docs/stdlib/api, resolved against wherever
    you happened to be standing, and its stale sweep deleted markdown files it
    had not written. It is package-relative now and refuses outside a package.
  • Row carries its column names, so a query's answer reads through the
    same schema as everything else.
  • std::log. Khora had no way to write to standard error at all, which
    two of the people who tried building command-line tools with it reported
    independently: a program's diagnostics and its answer shared one stream, and
    the first > out.txt anybody typed swallowed the diagnostics. Logging is a
    capability, emits one JSON object per line, and takes the clock as a value
    so a log line can be asserted against.

Also here: an epoll backend on Linux, which is where the portable poll
reactor had a scaling ceiling worth removing (macOS and Windows still run
the portable one — kqueue is the same shape and unwritten, IOCP is a
different interface rather than a backend swap); an OTLP trace exporter in
packages/otlp; TLS read deadlines; and a language server that does the
things people expect one to do — completion that writes the import, code
actions that fill in a missing handler or a missing record field, extract
variable and extract function.

What is not done

docs/release-readiness.md scores 200 of 222. The twenty-two open items are
each written out there with what specifically is left; the ones worth knowing
before you build on this:

  • macOS has not had the scheduler soak run against it. Linux and Windows
    have. Nothing here can run macOS, which is also why there is no kqueue
    backend.
  • A bounded_nursery(n) admits n + 1 children, because Fiber::spawn
    starts the child before adopt blocks. Subtract one where the limit is a
    real resource.
  • The two fiber backends are distinguishable by a program, which the
    concurrency reference says twice they are not. Under
    KHORA_FIBERS=scheduler a cancelled fiber's sleep returns early; under
    the default thread backend it runs to completion.
  • Cancellation lands only where a fiber checks for it — a !, or a loop
    back-edge. A long sleep is not a cancellation point.
  • A type name in std can collide with one of your own and crash the
    program at run time
    rather than failing to compile. Erratum 79. This is
    why the logging level type is called Severity.
  • Thread-affine foreign libraries are untested against fiber migration.

https://khoralang.com/docs/next/limitations/ carries these and the rest, and
docs/errata.md is the list of things known to be wrong.

Documentation

https://khoralang.com/docs/ now serves next — a version, rather than the whole
site — and every page says so. A section per stable major gets cut when v1
ships; before then there is one tree, because there is one compiler anybody
can install and the language may still change under it.