Sanguis Documentation
How to write Sanguis, and how it works underneath.
Sanguis 4.0 · Iteration:BigBang
Sanguis is a programming language. When you compile a Sanguis program, it becomes BloodCode, a small set of instructions that runs the same way on every machine.
In 4.0, Sanguis builds itself. The compiler is written in Sanguis, and when it compiles its own source, it gets the exact same file back. Every time.
Here's what's new:
- The compiler rebuilds itself in about 11 seconds, and your copy checks that it came out the same.
- One command does it all. sanguis bleed compiles, sanguis drip runs, and sanguis verify checks the whole kit.
- Cells that give back a u64 or i64 run straight on your processor, with real 64-bit numbers. A checker reads their machine code before anything runs it.
- Sanguis runs inside web pages, with the same answers as your computer. See Sanguis in Web Pages .
- It reads PNG, BMP and GIF pictures on its own. We checked it against 95 test images.
- On Windows, one double-click installs everything.
Where to start
| Page | What's there |
|---|---|
| Getting Started | Install it, check it, and run your first program. |
| Language Reference | Every keyword, how a program is put together, system cells and layouts. |
| Builtins | The functions that come with the language. |
| Execution Model | The two kinds of cells, and how numbers behave. |
| Compiler Pipeline | How your source becomes something that runs. |
| Sanguis in Web Pages | Run Sanguis inside a page. |
| Examples | The programs that come in the kit, and the pieces they're made of. |