Skip to content

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 27 Oct 18:22
· 463 commits to main since this release
fba6a17

What's New in v0.3.6

Much sort, very local, wow.

Four gaps a real server hits, closed: records sort by a field, dates land in the right time zone, and sockets can cap a line and drop an idle client.

Collections

  • xs.sort(key) (#76) — pass any function value and the list sorts by what it returns, once per element. The sort is stable, so equal keys keep their order; for newest
    first, sort then reverse(). A key can return a List to sort by several fields: return [p["date"], p["amount"]] sorts by date, then amount.
  • Lists, Decimals, and Bytes sort — sort() compares Lists item by item (a prefix sorts first), Decimals by value alongside Ints, and Bytes byte by byte. A Decimal beside a
    Float, or any other unorderable mix, raises a catchable TypeError that says what it found and where.

Stdlib

  • nap.stamp(secs, zone) and nap.offset(secs, zone) (#77) — local time in any IANA zone, DST included: nap.stamp(1784116800, "Europe/Amsterdam") is
    "2026-07-15T14:00:00+02:00", and offset gives the seconds east of UTC at that instant. Zone rules come from the OS where installed, with a bundled copy as the fallback, so
    Windows and bare containers work too. An unknown zone raises a catchable ValueError.
  • howl.recv_line(conn, max_bytes) (#75) — an optional cap on a line's length, enforced while reading: a peer that floods bytes without a newline gets a catchable IOError
    once the cap is passed, instead of being buffered in full. Answer 431 and close.
  • howl.set_timeout(conn, secs) (#78) — later recv/recv_bytes/recv_line calls that see no data for secs raise a catchable IOError, so a server can drop idle
    clients; none clears it. The timeout is per wait for data, not per call.

Fixes

  • howl.set_timeout(conn, secs) (#78) — later recv/recv_bytes/recv_line calls that see no data for secs raise a catchable IOError, so a server can drop idle
    clients; none clears it. The timeout is per wait for data, not per call.

Fixes

  • Int/Float comparisons are exact — comparing an Int with a Float used to round the Int first, so 2 ** 53 + 1 == 2.0 ** 53 was true, and sorting a mix of large
    Ints and Floats could crash. ==, <, nerd.min/max, and sort now all compare exactly.
  • nap.rest no longer crashes on a duration of exactly 2^64 seconds — it raises a catchable ValueError like every other out-of-range duration.

Install

cargo install dogelang

Full Changelog: v0.3.5...v0.3.6