Project genesis · Open source · Apache 2.0

A language and its compiler,
built with AI.

Amalgame is a statically typed language that compiles to portable C, then to a real native binary. Self-hosted, cross-platform — and yes, designed hand in hand with AI. Here's the story.

01 — The stance

The best of every language, without the usual trade-off.

Modern languages offer pattern matching, null-safety, lambdas, list comprehensions — but often at the cost of a virtual machine, a heavy runtime, or slow compilation.

Amalgame takes the opposite path: modern ergonomics, at the speed of C. The source translates cleanly into readable C, which gcc turns into a standard native executable — deployable like any C program, with no Amalgame installed on the target machine.

02 — The language

Familiar at first glance.

namespace App
import Amalgame.IO

public enum Shape {
    Circle(int)
    Rect(int, int)
}

public class Program {
    public static void Main(string[] args) {
        // match as an expression, with guards and ranges
        let n = 42
        let bucket = match n {
            0          => "zero"
            x if x < 0 => "negative"
            1..9        => "small"
            _          => "large"
        }

        // list comprehension
        let squares = [i * i for i in 0..10 if i % 2 == 0]

        // null-safe member access
        let maybe: Greeter? = null
        let label = maybe?.Hello()
    }
}

Pattern matching · null-safety · lambdas · comprehensions · generics · string interpolation

03 — Three pillars

What makes Amalgame solid.

Self-hosted

The amc compiler is written in Amalgame and rebuilds itself in five seconds, test suite included.

Compiles to C, then a real binary

amc emits readable C, gcc turns it into a standard native executable. No Amalgame runtime required on the user's machine.

Cross-platform

Linux, macOS, Windows. Binaries published on every version tag, automatically via CI.

04 — Genesis

AI isn't a secret. It's a method.

Amalgame embeds AI right inside the compiler — amc generate, amc migrate, amc explain. And AI also helped build it. Rather than hiding it, we own it: here's the machine's share and the human's share.

34days of development, from the first commit to today
5 sfor the compiler to recompile itself
500+commits, 13 versions published
480passing tests
21languages migratable to Amalgame

What AI accelerated

  • The skeleton of the lexer, parser and C generator
  • The repetitive boilerplate of the AST and runtime
  • A large share of the 480 tests, written in parallel
  • Fast exploration of several syntax designs

What stayed human

  • The language design decisions — AI proposes, I decide
  • Reviewing and understanding every line shipped
  • The self-hosted bootstrap and debugging the gnarly cases
  • The vision: what Amalgame is for, and for whom

The proof that it stands up: Amalgame is self-hosted. The compiler compiles itself, and it has to be correct to pull that off. A language that reproduces itself isn't « generated and abandoned » code — it's a system that loops back on its own rigor.

« AI saved me weeks of plumbing. But Amalgame remains my language: I understand every line it's made of. » — Bastien Mouget, creator of Amalgame

05 — Your move

Try Amalgame in five minutes.

Whether you're writing a compiler or your first script — the AI behind its creation changes nothing about the use: it's a real language, and it's yours.

curl -sSL https://amalgame.me/install.sh | sh