dogelang 0.2.0

The Doge programming language — Python's ease, Rust's engine. Installs the `doge` CLI.
dogelang-0.2.0 is not a library.

Doge is a dynamically typed scripting language that reads alot like Python and runs as a native binary. Scripts transpile to Rust and compile ahead of time, so you write clear, low-ceremony code and ship real performance:

  • Native, cached builds — a .doge script becomes Rust source and compiles to a native executable. Builds are content-hashed and cached, so an unchanged script runs instantly.
  • No sharp edges — one string type with character-based indexing, automatic int/float promotion, and reference-counted values with no GC, no unsafe, and no ownership rules to learn.
  • Errors you can catch — every runtime fault is recoverable with pls/oh no, and diagnostics point at the exact line with a concrete fix — never a raw Rust error.
  • Doge-speak grammar — keywords borrow from the meme where it reads well (such to declare, much for parameters, bark to print, wow to close a block) and stay universal (if, for, while) where convention wins.

Example

so nerd

such greet much name:
    bark "much hello " + name
wow

for shibe in ["kabosu", "cheems", "walter"]:
    pls
        greet(shibe)
    oh no err!
        bark "very error: " + err

bark "sqrt of 16 is " + str(nerd.sqrt(16))
wow

Installation

Doge needs a Rust toolchain to install and to compile scripts.

cargo install dogelang

The first run pays the Rust compile time (a few seconds); the binary is then cached in ~/.cache/doge/, so an unchanged script runs instantly.

Usage

Command Effect
doge new <name> scaffold a new project (doge.toml + main.doge)
doge bark script.doge compile (cached) and run
doge build script.doge compile and copy the binary to ./<name>
doge check script.doge parse and check only, no build
doge repl (or bare doge) interactive interpreter — evaluate Doge with no build

The examples/ folder tours the language; start with examples/tour.doge. For a quick play, doge repl drops you into an interactive prompt.

Projects and dependencies

doge new my_app scaffolds a project — a directory with a doge.toml manifest. A project declares dependencies by local path or git, imported with so <alias>:

[package]
name = "my_app"
entry = "main.doge"

[dependencies]
greet = { path = "lib/greet" }
cool  = { git = "https://github.com/u/cool", tag = "v1.0.0" }

Inside a project, doge bark/build/check need no script path. See PACKAGING.md for the full manifest, dependency, and sharing story.

Documentation

Document Contents
SYNTAX.md Keywords, literals, variables, control flow, functions, error handling, objects, imports
GRAMMAR.md Grammar sketch (EBNF) and disambiguation rules
STDLIB.md Builtins, list/dict methods, and the nerd, strings modules
ERRORS.md Diagnostic and runtime error message style
ARCHITECTURE.md Compiler pipeline, crate layout, runtime model, codegen
CLI.md The doge binary and the build cache
PACKAGING.md Projects, the doge.toml manifest, dependencies, install, and sharing

License

Apache 2.0, see LICENSE.