A systems language with a shell

Expression-oriented, errors as values, a hybrid layout. Run thoxa with no file and you get a prompt: that prompt is Thoxa, not a second language. thoxa run, thoxa check, and thoxa lsp are the tools.

Sign up for newsSee the language

Where it is aimed, and where it is

Aimed at

A systems language with a serious type system and one value model from the shell to the metal. You write .thx files. thoxa run, thoxa check, and thoxa lsp are the surface — when there is a public build, those are the names.

Shipped today

The interactive prompt is Thoxa, not a separate dialect. thoxa run produces a native binary. std/ has files, sockets, HTTP, JSON, and SQLite, grown from samples. Heap is simple single-threaded RC. Linux x86_64 only. Windows is out of scope.

What a program looks like

A few slices. Layout is hybrid — a Point is two integers, not two heap boxes. Errors are values. Match takes sums apart. Logging is info; there is no ambient println.

# hybrid layout, errors as values
import { info } from "std/logging"
import { Pass, Fail, Trial } from "std/fallible"
type Point(x: Int64, y: Int64)
fn load(path: String) → Trial<Bytes, String> { … }
fn main() → Int64 {
let data = load("./cfg")?
match data.count {
0 | 1 { info("tiny") }
n { info("{n} bytes") }
}
0
}
# tagged unions; match takes them apart
type Roast = Light | Medium | Dark
fn name(roast: Roast) → String {
match roast {
Light { "light" }
Medium { "medium" }
Dark { "dark" }
}
}
# same name, different types → one function
fn show(n: Int64) → String {
"{n}"
}
fn show(ok: Bool) → String {
if ok {
"yes"
} else {
"no"
}
}
# May is a value. Import it; it is not ambient.
import { Has, Not, May } from "std/fallible"
fn first(xs: Array<String>) → May<String> {
if xs.count == 0 {
Not()
} else {
Has(xs[0])
}
}
# call libc from Thoxa
extern fn sysWrite(
fd: Int32, buf: Bytes, n: UInt64
) → Int64 from "c" "write"
fn put(text: String) {
let data = Bytes.fromString(text)
sysWrite(1, data, data.count)
}
# holes quote themselves
db.exec(sql"
INSERT INTO news (email)
VALUES ({email})
")?

What systems programmers look for

The type system is the point, not a garnish. Layout is hybrid — scalars stay scalars. RC is simple and single-threaded today; a smarter heap is later work, not a claim.

Native

A binary, not a VM

thoxa run produces a real program. Not a bytecode VM, not a tree-walk interpreter.

Types

Sums, clauses, match

User types, tagged unions, literal types, and multi-clause functions. Match is how you take them apart — including guards and or-patterns.

Errors

Values, not exceptions

Trial and May live in std/fallible. ? unwraps a success. Fail and Not stay in the type. You import them; they are not ambient.

Prompt

Interactive Thoxa

Run thoxa with no file and you get a prompt. That prompt is Thoxa — the same syntax as a .thx file — not a separate scripting dialect.

Interop

Talk to C

extern fn … from "c" calls libc and your own symbols. Same language, no wrapper dialect.

Editor

Check and hover

thoxa check and thoxa lsp. Hover shows types. The editor talks to the same compiler that runs your program.

Sign up for news

A short note when there is something to run. No install, no feed, no drip. Just an address.