One language, every layer.

A programming language for scripts, tools and servers. It finds mistakes before your program runs, starts at once while you write, and builds a fast program when you ship.

Linux, macOS
$ curl -fsSL https://torb.dev/install.sh | sh
Windows
> irm https://torb.dev/install.ps1 | iex

Where do you want to start?

Change only what you mean to change#

Giving a list a second name makes a copy. Changing the copy leaves the original alone, so a value never changes behind your back - only where you change it. See value semantics.

const original = [1, 2]
var copy = original
copy.append 3
print "{original} {copy}"
// prints [1, 2] [1, 2, 3]

Mistakes show up before the program runs#

When something can be missing or can fail, its type says so, and the compiler makes you handle it before the program runs. A failure is an answer like any other: there is no null and no exception to forget.

match Int.tryFrom("forty-two") {
  Ok(number) => print number
  Fail(_) => print "That is not a number."
}
// prints That is not a number.

Instant while you write, fast when you ship#

torb run starts a program at once. torb build turns the same program into a program file of its own: fast (how fast), and runnable without TorbScript. The same one tool also tests, formats and publishes. See the torb command.

$ torb run hello.trb
Hello, World!
$ torb build hello.trb --output hello
wrote hello
$ ./hello
Hello, World!
Esc