Skip to content

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 15 Jul 10:42
· 494 commits to main since this release
d84845b

What's New in v0.3.1

Much numbers, very bytes, wow.

This release deepens Doge's core value types — arbitrary-precision integers, exact
decimals, and a real binary Bytes type — and adds two stdlib modules plus a
broader fetch.

Language & types

  • Extended numerics (#53) — Int is now arbitrary precision (2 ** 200, big
    factorials, and literals past i64 are all exact); arithmetic never overflows, it
    just grows. Overflow is confined to the few machine-int-only spots (index, shift
    count, range bound), where a too-large value is a catchable error, never a crash.
    Adds an exact base-10 Decimal via dec(...) for money and exact fractions —
    Int↔Decimal mix exactly; Float↔Decimal in arithmetic is a catchable TypeError.
    iteration yields Ints, + concatenates, slicing yields Bytes. Build with the
    bytes(x) builtin; decode with bytes.decode(), hex with bytes.hex(), and read
    or write binary files with fetch.read_bytes / fetch.write_bytes.

New stdlib modules

  • hunt — regex (#52): pattern matching over Str — test, find,
    find_all, groups, and replace, backed by a pure-Rust, linear-time engine
    (no ReDoS). Invalid patterns raise a catchable ValueError; a no-match reads back
    as none.
  • chase — subprocess (#49): chase.run(cmd, args, stdin) spawns an external
    program, feeds it optional stdin, and returns {"code", "stdout", "stderr"}.
    Launch failures are catchable IOErrors; stdin is written off-thread so a chatty
    child can't deadlock.

Improvements

  • fetch grows (#50) — nine new members for walking trees and inspecting files:
    list, make_dir, remove_dir, rename, copy, stat (size / modified /
    is_dir), plus the pure-string path helpers join, basename, and ext (always
    /-separated, identical on every platform). Every filesystem failure is a
    catchable IOError; the path helpers never touch the disk.
  • VS Code highlighting (#54) — builtins (len, str, int, float, bytes,
    dec, range, gib), the method receiver self, and stdlib module members
    (nerd.abs, fetch.read, …) are now themed, including inside string interpolation.

Install

cargo install dogelang

Full Changelog: v0.3.0...v0.3.1