Repository navigation
v0.3.6
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 thenreverse(). 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 catchableTypeErrorthat says what it found and where.
Stdlib
nap.stamp(secs, zone)andnap.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", andoffsetgives 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 catchableValueError.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 catchableIOError
once the cap is passed, instead of being buffered in full. Answer431and close.howl.set_timeout(conn, secs)(#78) — laterrecv/recv_bytes/recv_linecalls that see no data forsecsraise a catchableIOError, so a server can drop idle
clients;noneclears it. The timeout is per wait for data, not per call.
Fixes
howl.set_timeout(conn, secs)(#78) — laterrecv/recv_bytes/recv_linecalls that see no data forsecsraise a catchableIOError, so a server can drop idle
clients;noneclears 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 ** 53wastrue, and sorting a mix of large
Ints and Floats could crash.==,<,nerd.min/max, andsortnow all compare exactly. nap.restno longer crashes on a duration of exactly 2^64 seconds — it raises a catchableValueErrorlike every other out-of-range duration.
Install
cargo install dogelang
Full Changelog: v0.3.5...v0.3.6