Mica

Mica

Compute you can see through.

From formula to GPU in one language.

Mica is a programming language and its compiler: a statically typed systems language with an optimizing native backend of its own, in which tensors, the autograd tape and the graphics card are parts of the language. It is made for computation that has to be right, small and reproducible — on a laptop, a GPU machine or a container — and it comes with two courses: one teaches machine learning from the first guess to your own GPT, the other teaches how a compiler is built. Three promises hold on every page of this site, and the facts page states each of them with figures generated from the repository, none typed by hand.

Verifiable. A result is reproducible to the bit, run after run, on the processor and on the graphics card. Memory and sharing are proven by the compiler before the program exists. A notebook's numbers are computed, never pasted.

Efficient. Native code from an optimizing backend of Mica's own, one static binary that carries no runtime you did not ask for, and the same formula on the CPU and on the GPU.

Immediate. Installed and running in minutes, on a laptop, a GPU machine or a container, with an editor whose answers come from the compiler itself.

The AI course

From the first guess to your own GPT

If you want to understand how machine learning works, you are in the right place. The course starts before any mathematics, with a machine that fits a rule to observations, and ends with a GPT you train yourself. Each chapter builds on what the one before it taught, and every example was compiled and run before it was published. Mica is the tool; the ideas are the subject.

The compiler course

Build a compiler with Mica

If you want to learn compiler construction, you are in the right place. You write Wirth's PL/0 compiler in Mica, part by part: the scanner, the parser, the symbol table, an oracle that proves each stage, and the Dragon road that turns your intermediate code into a native binary. Then the Dragon SDK gives a language of your own the same native backend the Mica compiler uses.

Or discover the Mica programming language

A systems and programming language in the structured tradition: readable declarations, explicit types, a failure channel that carries errors as values, tasks and streams, and a typed boundary to C. From an empty folder to your first debugged program in fifteen minutes.

The four cards below are a developer's first hour. Start puts the compiler on your machine in minutes, on a laptop, in a container or in the cloud. Learn the language walks it from your first program to programs in the large. The command line states every flag of the compiler, from the one-file run mode to the deployment classes. The facts state everything the compiler proves and ships, every figure generated from the repository.