The Tyrion Programming Language

Small but
capable

Forge native binaries from .ty source.

I compile and I knows things. That's what I do.

macOS ARM64 Linux ARM64 Linux AMD64
hello.ty
class Stark:
    def __init__(self, name):
        self.name = name

    def greet(self, other):
        print("Hello", other, "I'm", self.name)

arya = Stark("Arya")
arya.greet("Sansa")
$ tyrionic --build hello.ty --out hello
$ ./hello Hello Sansa I'm Arya
Install with Homebrew brew install dennisvink/tyrion/tyrion

Try Tyrion

Write. Run.
Compile.

One small program. Two Linux targets.

playground.ty Ready
Output
Run the code. See what the Hand reports.

64 KiB source limit. Sandboxed. No ravens leave the worker.

Why Tyrion

Everything you need.
Not much you don’t.

Compiler. Interpreter. Native output.

Native binaries

Standalone executables for macOS and Linux.

Built with itself

Tyrion builds its own compiler.

Compiler + interpreter

Compile with tyrionic. Interpret with tyrion.

Familiar syntax

Functions. Classes. Collections. Generators.

The language

Familiar syntax.
Native output.

Write ordinary programs. Ship ordinary executables.

  • Lists, dictionaries, slices, and generators
  • Native process, terminal, TCP, and extension support
  • Command-line programs and standalone tools
collections.ty # a very small council
def square(value):
    return value * value

values = [1, 2, 3, 4, 5]
squares = []

for value in values:
    squares.append(square(value))

print("squares", squares)
print("sum", sum(squares))
squares [1, 4, 9, 16, 25]
sum 55

The toolchain

A deliberately small council.

Get started

From source to native
in one command.

Homebrew installs the compiler and interpreter. No oaths required.

1
Install brew install dennisvink/tyrion/tyrion
2
Compile tyrionic --build app.ty --out app
3
Or interpret tyrion app.ty