Tungsten — The Native Language of Agents

4 min read Original article ↗

PUBLIC PREVIEW · v2026.07.04

The Native
Language of Agents

Models write pseudocode. Tungsten runs it.

1# Currency and percentages 2price = $499.99 3 4<< price - 15% # => ≈$424.99 5<< price - 15% + 8.25% # => ≈$460.05 6 7# Units of measurement 8c = 299_792_458 m/s 9m = 1 kg 10 11<< e = m·c² # => ≈8.988×10¹⁶ J 12 13<< 3 ft + 12 in # => 4 ft 14<< 10 ft * 10 ft # => 100 ft² 15<< 2 m + 2 lbs # => error: dimension mismatch

One-line install

Clone, build, and link

Installs into ~/.tungsten, builds the compiler, and links tungsten onto your path.

curl -fsSL https://tungsten-lang.org/install | sh

From a source checkout

Bootstrap, then brief the agent

Build a stage-one compiler, then emit the compact language primer and absolute paths to agent tooling.

bin/tungsten bootstrap && bin/tungsten start --agent

  • Argon

    A manpage-driven CLI parser: define options once in the documentation and parse them without a second schema.

  • Flame

    A profiler that turns Tungsten or arbitrary process stacks into interactive SVG flame graphs, diffs, and trace exports.

  • Forge

    A multi-threaded HTTP server for Tungsten and Carbide, with TLS and HTTP/1.1, HTTP/2, and HTTP/3 support.

  • Hammer

    An M:N HTTP load generator that reports throughput, latency percentiles, and errors across concurrent workers.

  • Koala

    DataFrames, linear algebra, preprocessing pipelines, metrics, and sklearn-style machine learning in Tungsten.

  • wasSAT + WRAT

    A native CDCL SAT solver paired with an independent streaming checker for WRAT, LRAT, and DRAT refutations.

  • Metaflip

    An exact-gated CPU and Metal search fleet for low-rank matrix-multiplication decompositions over GF(2).

💰

Tungsten Makes Cents

First-class support for dollars, cents, and percentages. No more money bugs from floats.

<< $3.50 - 25¢ # => $3.25

📐

Units of Measurement

Meters, feet, kilograms - with automatic conversion and dimensional analysis. Mismatched units caught at compile-time.

<< 1 cm * 1 cm * 1 cm # => 1 cm³

🎯

Decimals by Default

3.14 is an exact decimal, not an IEEE float. Approximation is opt-in with ~ — so the default never surprises your accountant.

exact = 3.14 # Decimal
approx = ~3.14 # Float

A Touch of Class

Define a class with +, a method with ->, and output with <<.

Arity after the slash defines anonymous arguments.

Instance variables are assigned in the constructor with @. The ro suffix makes them read-only.

The prime notation (x') refers to the same-named property on the argument: x - x' means "my x minus their x."

Δx compacts it further.

1+ Point 2 -> new(@x, @y, @z) ro 3 4 -> distance/1 5 dx = x - x' 6 dy = y - y' 7 dz = z - z' 8 9 (dx.sq + dy.sq + dz.sq).sqrt 10 11 # or, if you prefer 12 -> distance/1 13 (Δx² + Δy² + Δz²) 14 15<< Point(3, 4, 0).distance(Point(0, 0, 0)) # => 5

Feature Tungsten Python Ruby
Output << x print(x) puts x
Class + Point class Point: class Point...end
Method -> distance/1 def distance(self, other): def distance(other)...end
Map list/sq [x**2 for x in list] list.map { it ** 2 }
Generics Complex<f64> (monomorphized) complex (boxed) Complex (boxed)
GPU kernel @gpu fn — in the language CUDA / Triton DSL FFI to C
Interpolation "[name]" f"{name}" "#{name}"
Block ending (dedent) (dedent) end

74

W

tungsten183.84

m.p. 3695 K

Element 74: born on 7/4

Tungsten is made in America - my semiquincentennial gift to you.

element 74 version 2026.07.04 ships 07·04

W · 183.84 u · m.p. 3695 K · version 2026.07.04

Bit Package Manager

Find, install, and share Tungsten packages. Dependency resolution, semantic versioning, and the package layout are part of the preview toolchain.

Explore packages

Specification 2026.07.04

The language specification: lexical structure, semantics, floating-point math modes, units of measurement, and the WValue encoding.

Read the spec

REPL wit

An interactive REPL that plots. Type ? Σ(2x⁷ + 3x²) and get a rendered curve in your terminal — then scrub coefficients live with the arrow keys, ∫ shades the area under it.

Meet wit — watch a real session

Community GitHub

Questions, ideas, and collaboration. File issues, start design discussions, and follow the preview work in the open.

Join the discussion

Start your next agent in Tungsten

Give the model the primer. Give the compiler its answer.

$ curl -fsSL https://tungsten-lang.org/install | sh

✓ stage 1 ≡ stage 2 — the compiler reproduces itself

✓ linked ~/.local/bin/tungsten

$ echo '<< "Hello, W!"' > hello.w

$ tungsten hello.w

Hello, W!

Public preview · macOS (Apple silicon) & Linux · requires clang/LLVM · Metal GPU features require supported macOS and Apple hardware