PUBLIC PREVIEW · v2026.07.04
Object-oriented · self-hosted · LLVM + Metal

Pseudocode
that runs.

An object-oriented language that reads like the math on your whiteboard — then compiles, through a compiler written in itself, to native binaries via LLVM and GPU kernels via Metal. No end, no braces, no return. Fewer tokens for the humans and the models reading along.

demo.w
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
Why Tungsten

No ends. No braces.
Just the algorithm.

Tungsten strips programming to its mathematical essence. Write code that looks like the pseudocode you'd put on a whiteboard.

💰

Native Currency

First-class support for dollars, cents, and percentage operations. No more floating-point money bugs.

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

Units That Catch Your Mistakes

Meters, feet, kilograms — with automatic conversion and dimensional analysis, so mismatched units fail loudly instead of becoming bad numbers.

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

Math That Reads Like Math

Write mathematical notation directly. Square roots, superscript exponents, deltas — your code reads like the textbook.

(Δx² + Δy² + Δz²)
<< 3² + 4² # => 25
🧱

Classes Without Noise

Define classes with +, methods with ->, output with <<. Arity is explicit. Everything else melts away.

+ Point
-> new(@x, @y, @z) ro
🎯

Exact 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, opt-in
🌀

Complex, Quaternions & Beyond

Complex numbers, quaternions, octonions, sedenions — one generic implementation, specialized per scalar type, all the way out to 256-dimensional algebras.

z = Complex<f64>.new([~3.0, ~4.0])
<< z.abs # => 5

The GPU Is One Annotation Away

@gpu fn compiles a Tungsten function to Metal Shading Language — same file, same syntax, no FFI, no strings of C.

@gpu fn add_one(x, y, n)
i = gpu.thread_position_in_grid.x
🧠

Tensors, Zero-Copy on Metal

One allocation, three faces: a CPU array, a Metal buffer, and tensor views when the platform supports them — sharing the same bytes. Attention runs end-to-end on-device.

q = x.linear(wq) # bf16, on the GPU
attn = scores.softmax(1)
🤖

Dense by Design

No end, no braces, no self, no return. Every keyword the syntax omits is a token neither you nor a model has to spend — so more algorithm fits in the same context window.

# the whole method, not the ceremony
-> area w * h
By Example

Read it like pseudocode

Concrete examples from the language surface — nine features, one tab each.

Classes Without the Noise

Define a class with +, a method with ->, and output with <<. Arity after the slash tells you exactly how many arguments a method takes.

Instance variables are declared inline in the constructor with @. The ro suffix makes them read-only. No boilerplate getters, no verbose accessor declarations.

The prime notation (x') refers to the same-named property on the argument — so x - x' means "my x minus their x." And Δx is that difference in one glyph: √(Δx² + Δy² + Δz²) is a distance method that runs.

point.w
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
Comparison

Less ceremony,
more clarity

Side-by-side with the languages you know.

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.map -> item ** 2 [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, and our 250th birthday felt like the ideal moment. Tungsten is 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

Field Notes

Built in the open

Deep dives from building Tungsten — performance engineering, GPU work, and compiler internals, written while the paint was still wet.

Ecosystem

A real toolchain, day one

Tools, packages, and documentation designed with the same care as the language itself.

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 writing Tungsten

Install in seconds. Write your first program in minutes.
Fall in love before your mid-afternoon coffee.

$ 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