Repository navigation
Releases
v0.4.0
What's New in v0.4.0
Much exact, very helpful, wow.
Doge 0.4.0 makes the language more powerful and more predictable. It adds lambdas, comprehensions, error classes, cleanup blocks, and format specs. Every error points at
the exact spot with a concrete fix, the tools are complete, and a script prints the same output whether it is compiled or run directly.
Breaking changes and migration
- Rust 1.86 or newer is required (was 1.74). Run
rustup update stable. akaandanywayare keywords. Rename a variable, function, or field with either name.showandequalsare hooks. A methodshowwith parameters, orequalswithout exactly one, no longer compiles, andshowmust return its text. Rename the
method or return the text.- A second
suchof a name in the same scope is an error (E0302) instead of a reassignment. Dropsuchto reassign. - Reading a variable that some path has not set is a compile error (E0311) instead of
none. Declare it before the block (such found = none). - Loop variables and caught errors live only inside their loop or handler. Read a value after the loop through a variable declared before it.
- A binding with a builtin's name shadows it in its whole scope (warning W0303). Rename the binding to keep the builtin.
- A
soconstant cannot be bound again in its scope (E0304). Pick another name. - A caught error is an object of its error class:
type(err)is"KeyError"rather than"Error". Compareerr.typeor useisa(err, KeyError). err.messagesays only what went wrong; the fix moved toerr.hint. Code that matched the old message text must drop the fix part.range(...)is a lazy Range, not a List.for,len,in, indexing, and slicing work as before; writelist(range(n))where a List is needed.List.index_ofgivesnonefor a missing item instead of raising. Test the result with== none.x in dwith a value that cannot be a Dict key is aTypeErrorinstead offalse. Convert first withint(x)orstr(x).x.name(args)calls a field holding a function before a method of that name. Rename the field to keep calling the method.- A Str inside a List or Dict prints as an escaped literal (
["a\"b"]). Print the items themselves for their raw text. 010is a compile error: write0o10or10. A number glued to a keyword (1if) is one too.- Mixing an Int with a Float stays exact or raises
Overflow; it never turns a huge Int into infinity.Int / Intdivides exactly and rounds once. - A Decimal and a Float compare exactly:
dec("0.1") == 0.1isfalse. Convert to one type first. - NaN follows IEEE 754: comparisons with NaN are
false, and sorting puts NaN last. - Huge numbers and sizes raise a catchable
Overflowinstead of exhausting memory (a number past 32 MiB, a hugerangeor repetition);crypto.tokentakes at most 1
MiB per call. - Two bound methods are equal only when bound to the very same List or Dict.
nap.parsereads RFC 3339 and rejects text without a zone and dates that do not exist. Add the zone to the text you parse.json.parserejects a number with a leading zero (01).doge check, the language server, and the REPL report every call error a build reports, so they reject programs they used to accept.doge checkprints nothing for a clean script. Rely on the exit status;doge check --aststill prints the tree.doge testruns a file's top-level code first and captures test output, showing it only for a failing test (--nocaptureshows all). Move code that must not run
underdoge testinto a function.- A bare
dogewith piped stdin runs it as a script. Usedoge replto drive the REPL from a pipe. doge.tomlis validated (SemVerversion, a validname, anentryinside the project, unique dependency aliases). Fix the line the error names.doge newrefuses a name that does not start with a letter.Bytes.findis removed. Useb.index_of(needle, start), which givesnoneinstead of-1.
Language
- Lambdas:
much x, y: x + yis a function value with defaults andmany rest. - Comprehensions:
[x * 2 for x in xs if x > 0], plus Dict and Set comprehensions with any number offorandifclauses. - Spread:
f(1, many xs)passes a List's items as separate arguments,superincluded. - Keyword arguments on every call, including methods,
super.init, lambdas, and the optional parameters of builtins and stdlib functions (sorted(xs, reverse = true)). anyway: a cleanup block afterplsthat runs once on every way out.- Error classes:
many DogMissing much Error:defines your own,bonk DogMissing("walter")raises it,oh no err!binds the same object,isa(err, KeyError)
catches a family, and every error haserr.hint. - Class constants, empty class bodies, parents from an imported module, and
superinside lambdas, nested functions, and comprehensions. - Display and equality hooks:
such show:andsuch equals much other:. - Import aliases:
so nerd aka n. - Sets:
{1, 2},set(),add/remove/is_subset, and|,&,-,^. - Dict keys may be an Int, Bool, or
noneas well as a Str. - Raw strings
r"…", multiline strings"""…""", and format specs in interpolation:"{price:,.2f}","{n:>6}","{share:.1%}". - Number literals in hex, octal, and binary,
_between digits, and exponents. - Lists compare with
<in sort order, and a collection that holds itself prints[...]instead of recursing forever.
Builtins and standard library
type(x)andisa(x, Class);sorted,sum,min,max,enumerate,zip,list,char;rangewith a step;int(text, base).- Str methods:
split,lines,trim,starts_with,ends_with,index_of,count,replace,upper,lower, padding, character tests, andparts.join(sep). - List, Dict, and Bytes methods:
pop,extend,copy,count,index_of,sort(key, reverse),get(key, default),update, and more. nerd:log,exp, trigonometry,isnan,isinf,inf,nan, andround(x, digits).env:exit,whine(a line to stderr), andslurp(all of stdin).crypto:sha512, and password hashing with Argon2id.chase.runoptions for timeout, working directory, environment, and Bytes;howl.requestoptions for timeout, size limit, and Bytes, with proxy support;
pack.closeand a timeout onpack.sniff.
Errors and diagnostics
- Every compile diagnostic has a code,
file:line:column, a caret under the exact range, and an entry thatdoge explain <code>prints. - Every error in a file is reported in one run, with warnings for unreachable code and unused imports and locals.
- "Did you mean" hints for misspellings, and doge spellings for another language's syntax (
print(x),&&,else if,null, …). - An uncaught runtime error names its type, points a caret at the failing expression, lists the calls that led there, and ends with a
such fix:hint.
Tools
- New commands:
doge init,doge update,doge explain,doge cache clean, anddoge help. doge checkanddoge fmttake several files and directories;doge check --format jsonand--deny-warnings;doge fmt --diffand stdin.doge testfinds every test file in the project and takes--filter,--nocapture, and--junit.doge build -oand--target;--coloron every command;--lockedkeepsdoge.lockas it is.- The REPL is a full line editor with history, search, completion,
:load,:reload, and:reset. - The language server adds hover, go to definition, find references, rename, outline, formatting, and quick fixes.
Faster and sturdier
- Faster programs and builds: in-place string appends, constant-time string indexing, and large programs build on every core.
- File, network, and HTTP failures are explained in plain words with a fix.
- Built binaries contain none of your comments or local paths.
- Many fixes across the REPL,
doge test,doge fmt, the language server, and the standard library. See the changelog.
Deprecated
- The
stringsmodule: each call warns with its method replacement (s.upper(),s.trim(),parts.join(sep), …), which editors apply as a quick fix. It goes away in
the next release. nerd.minandnerd.max: use the builtinsmin([a, b])andmax([a, b]).Dict.remove(key): used.pop(key).
VS Code extension
- Hover, go to definition, find references, rename, outline, formatting, and quick fixes through
doge lsp. - Highlighting for raw and multiline strings and format specs, and better indentation and folding.
- A restart command, a trace setting, install help when
dogeis missing, and Workspace Trust support. - The extension's version now follows doge's and is attached to every release.
Install
Download the archive for your platform below, or:
cargo binstall dogelang # prebuilt binary
cargo install --locked dogelang
code --install-extension doge-vscode-0.4.0.vsix # the VS Code extension
Verify a download:
sha256sum --check --ignore-missing SHA256SUMS
gh attestation verify doge-v0.4.0-<target>.tar.gz --repo DogeLanguage/doge
Full Changelog: v0.3.6...v0.4.0
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
v0.3.5
What's New in v0.3.5
Much exact, very server, wow.
Money from the wire stays money, and the editor finally talks back: JSON numbers can parse straight to Decimal, and the VS Code language server starts up.
Stdlib
json.parse(text, {"numbers": "decimal"})(#73) — every JSON number with a fraction or exponent parses straight to an exactDecimal, so rates and amounts from
external APIs never pass through aFloat. Whole numbers stayInt;"float"is the default. An unknown option or mode raises a catchableValueError.
Tooling
- Faster releases — CI now also runs on every push to
main, and the release workflow reuses that run when the tagged commit already passed instead of re-running the full
suite. Contributor-facing; no change to the language or thedogebinary.
Fixes
- VS Code language server starts again — the extension launches
doge lsp --stdio, which the CLI used to reject with a usage error, so the server crashed on every
("write EPIPE").doge lsp --stdiois now accepted. Works with the existing extension; just update thedogebinary.
Install
cargo install dogelang
Full Changelog: v0.3.4...v0.3.5
v0.3.4
What's New in v0.3.4
Much repeat, very socket, wow.
A small language treat and a networking convenience: sequences you can multiply, and a way to ask a connection who's on the other end.
Language & operators
- Sequence repetition with
*—*now repeats aStrorListwhen the other operand is anInt, in either order:"ab" * 3and3 * "ab"are both"ababab", and[0] * 3is[0, 0, 0]. A zero or negative count gives an empty sequence. List repetition is shallow — repeated nested Lists and Objects still refer to the same values. An out-of-range
count or a too-large result raises a catchableOverflowrather than panicking.
Stdlib
howl.peer(sock)— returns a connection's remote endpoint as{"host": Str, "port": Int}. Calling it on a listener raises aTypeError.
Install
cargo install dogelang
Full Changelog: v0.3.3...v0.3.4
v0.3.3
What's New in v0.3.3
Much bytes. Very carriage. Wow.
This release is about talking to the wire: raw-binary parsing and CRLF-framed
text protocols both get first-class support, so binary-framing and HTTP/SMTP/RESP
code reads naturally instead of hand-rolling scans and byte constants.
Language & types
- New string escapes:
\r\0\xNN\u{...}(#67) —\r(carriage
return) and\0(NUL) join the known set;\xNNtakes two hex digits for an
ASCII scalar (00–7f, e.g.\x0d);\u{...}takes 1–6 hex digits naming
any Unicode scalar (e.g.\u{1f436}→ 🐶). CRLF wire strings are now just
"HTTP/1.1 200 OK\r\n". Bad escapes get a precise, doge-framed lex error.
Stdlib
- Bytes sub-sequence search (#68) —
b.find(needle[, start])→ Int offset
(or-1),b.split(sep)→List<Bytes>,b.contains(needle)→ Bool, so
binary-framing parsers (multipart boundaries, length-delimited protocols) stop
hand-rolling an O(n·m) scan. Its Str counterpartstrings.index(s, sub)
returns a char-based offset.
Tooling
- Codex integration — a two-model planner→executor (Sol/Luna) workflow, a
rootAGENTS.mdas the single source of project instructions with per-crate
guides, and.agents/skill mirrors. Contributor-facing; no change to the
language or thedogebinary.
Install
cargo install dogelang
Full Changelog: v0.3.2...v0.3.3
v0.3.2
What's New in v0.3.2
Much bytes, very network, wow.
This release rounds out Doge's networking and binary-data story: raw byte sockets,
a general HTTP client, a crypto module, and base64/hex round-tripping for Bytes.
Networking
- Binary-safe sockets (#60) —
howl.recv_bytes/howl.send_bytesmove raw
Bytesover a socket with no UTF-8 assumptions, so a pure-Doge server can frame
binary bodies byContent-Lengthand handle file uploads. howl.request(#62) — the general HTTP(S) client: any method
(GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS), custom request headers, and abody
(Str or rawBytes). Every response now carries a lowercasedheadersDict.
New stdlib modules
crypto— hashing & secrets (#61):sha256,hmac_sha256,token(OS-CSPRNG
random bytes), andsame(constant-time compare). Everything speaksBytes
(render with.hex()); wrong types are a catchableTypeError, never a crash.
Language & types
Bytesbase64/hex round-trip (#63) —Bytes.b64()encodes to base64;
Str.from_b64andStr.from_hexdecode back toBytes, with a catchable
ValueErroron malformed input.
Fixes
doge testconstant init (#65) — top-levelsoconstants declared in the test
file itself now initialize before tests run, instead of stayingnone.- Relative script paths in a project (#64) —
doge check/bark/test lib/x.doge
now resolves the project root correctly instead of failing with "could not open
the project directory";discover_rootcanonicalizes the path before the walk.
Install
cargo install dogelang
Full Changelog: v0.3.1...v0.3.2
v0.3.1
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) —
Intis 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,rangebound), where a too-large value is a catchable error, never a crash.
Adds an exact base-10Decimalviadec(...)for money and exact fractions —
Int↔Decimal mix exactly; Float↔Decimal in arithmetic is a catchableTypeError.
iteration yields Ints,+concatenates, slicing yieldsBytes. Build with the
bytes(x)builtin; decode withbytes.decode(), hex withbytes.hex(), and read
or write binary files withfetch.read_bytes/fetch.write_bytes.
New stdlib modules
hunt— regex (#52): pattern matching overStr—test,find,
find_all,groups, andreplace, backed by a pure-Rust, linear-time engine
(no ReDoS). Invalid patterns raise a catchableValueError; a no-match reads back
asnone.chase— subprocess (#49):chase.run(cmd, args, stdin)spawns an external
program, feeds it optional stdin, and returns{"code", "stdout", "stderr"}.
Launch failures are catchableIOErrors; stdin is written off-thread so a chatty
child can't deadlock.
Improvements
fetchgrows (#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 helpersjoin,basename, andext(always
/-separated, identical on every platform). Every filesystem failure is a
catchableIOError; the path helpers never touch the disk.- VS Code highlighting (#54) — builtins (
len,str,int,float,bytes,
dec,range,gib), the method receiverself, 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
v0.3.0
What's New in v0.3.0
Much stdlib, very batteries, wow.
This release grows Doge's standard library with five new modules: networking,
concurrency, time, randomness, and serialization.
New modules
howl— networking (#44): TCP sockets and an HTTP client.pack— concurrency (#45): threads (pups) and channels (bowls) for
parallel execution, with a Send-safe value boundary so pups never shareRc.nap— time (#46): monotonic clock, timestamps, sleep, and UTC dates.roll— randomness (#47): RNG, sampling, and shuffling.- Serialization — JSON & DSON (#48): parse and emit for both formats.
Fixes & maintenance
- CI no longer runs twice per merge (#43).
- Dependabot no longer bumps the
rust-toolchainMSRV pin.
Install
cargo install dogelang
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's New in v0.2.0 - much release, very ship
Much release, very ship, wow.
This release makes Doge installable, packageable, and testable — plus real I/O and a language server.
Highlights
cargo install dogelang— Doge is now on crates.io. The CLI crate isdogelang; it installs thedogebinary. (#36)- Projects & dependencies — a
doge.tomlmanifest turns a directory into a project with dependencies by local path or git, resolved through one shared
loader (stdlib > dependency > sibling). Scaffold withdoge new. (#6)
Features
- I/O & environment access (#17) — the input half of the language:
gib()/gib("prompt")— read a line of stdin (noneat EOF)fetchstdlib —read/write/append/exists/deletefilesenvstdlib —args()andget(name)for CLI args and env vars- new catchable
IOErrorfor every file/stdin failure doge bark script.doge [args…]forwards trailing args to the program
doge test(#39) — discover and run tests: top-level zero-argtest*functions asserting withamaze.doge test <file>runs one file,doge test <dir>runs everytest_*.dogerecursively. Runs on the interpreter (no rustc build); exits non-zero on any failure or an empty suite.- Language server (#25) —
doge lspserves diagnostics and completion over LSP, wired into the VS Code extension via adoge.serverPathsetting.
Diagnostics reuse the exactdoge checkfront end; completion reads from the single-source keyword/builtin/module tables. - String-path imports (#21) —
so "sub/dir/mod.doge"imports a module by a/-separated path relative to the importing file. The loader dedups and
detects cycles by canonical path, so one file reached two ways loads once.
Fixes & hardening
doge testis now project-aware — test files canso <alias>a declared dependency through the same resolverbark/build/checkuse.doge new <name>validates the name to a single safe path segment (letters, digits,-,_), preventing../evilor/etc/xfrom escaping the working
directory.- Install gap closed — the generated crate depends on
doge-runtimeby path in a dev checkout, else by published version, so an installeddogebuilds
scripts without the source tree.
Packaging
- All crates carry crates.io metadata; internal deps centralized in
[workspace.dependencies]. - Gated
publish-cratesrelease job publishes in dependency order:runtime → compiler → interp → lsp → dogelang.
Install: cargo install dogelang
Full Changelog: v0.1.5...v0.2.0
v0.1.5
What's New in v0.1.5
Features
- REPL / interpreter mode —
doge replstarts an interactive session backed by a tree-walking interpreter over the checked AST (#4) amazekeyword — in-language assertions (#11)doge fmt— a formatter CLI command for.dogescripts (#40)- Class names as first-class values — reference a class by name and pass it around like any other value (#35)
- Bound methods as first-class values — grab a method off an instance and call it later (#34)
Fixes
- Cache resolver now has a Windows-native
LOCALAPPDATAfallback, sodoge bark/buildwork on a default Windows setup (#37)
Maintenance
- README cleanup
- Bump
actions/checkout4 → 7 andactions/setup-node4 → 6
Closed issues: #4, #11, #34, #35, #37, #40
Full Changelog: v0.1.4...v0.1.5