The Ternary Stack Is Public
A programming language whose integers are balanced ternary, a compiler that emits both ordinary binaries and a 27-trit instruction set, an emulator that executes the latter, and a microkernel operating system written in that language. All of it is released, all of it builds, and none of it needs hardware that does not exist yet.
Two Repositories
maniTC — the ManiT language and compiler
Roughly 46,000 lines of Rust. One front end, two independent back ends: LLVM IR, so ManiT programs run as ordinary binaries on the machine on your desk, and T3ISA, the 27-trit instruction set designed for balanced ternary hardware. Ships with a cycle-accurate ternary emulator and an interactive debugger that steps through execution one trit at a time, a twelve-module standard library, seventeen example programs, a language server and the full documentation set.
Three-valued logic is native rather than emulated: a comparison yields −1, 0 or +1 and a three-way branch consumes it directly, instead of producing a bit and testing twice.
thatteOS — a microkernel that thinks in threes
Written entirely in ManiT: scheduler, processes, three-ring security, trit-addressed virtual memory, a ternary file system, three IPC mechanisms, capability-based security, an interactive shell and thirteen userspace programs — a text editor, a file manager and a web browser among them.
Privilege is one trit deep: kernel, supervisor and user are −1, 0 and +1 of a single digit, and a permission check is the ternary minimum function. Escalation is excluded by an algebraic identity rather than by a code path that has to be got right.
Two Ways to Run It Tonight
Natively. The LLVM back end turns ManiT into ordinary binaries; the thatteOS shell and its userspace run hosted on Linux from the same kernel source. No exotic hardware, no simulator, no waiting.
On the emulator. The T3ISA back end targets the balanced ternary instruction set, and the bundled cycle-accurate emulator executes it. The debugger lets you watch a three-way branch resolve, which is the moment the whole idea stops being abstract.
The Getting Started handbook goes from a clean checkout to a running ternary operating system in under an hour.
AGPL-3.0, With Two Deliberate Carve-Outs
- Programs you write in ManiT are yours. The
Runtime
Library Exception means compiling with
manitcand linking the runtime and standard library places no licence on your output — closed, open or commercial, exactly as with GCC. - Programs that run on thatteOS are yours. Using the kernel's services across the syscall boundary is normal use, not derivation — the principle Linux has always applied.
The copyleft protects the commons itself: modify the compiler or the kernel, including running a modified version as a network service, and those modifications come back. Organisations that need proprietary derivatives of the stack take a commercial licence instead. The asymmetry is the point.
The patents and the code are not in tension. The twelve specifications establish authorship and stop anyone else fencing off what is released here; releasing the software is what the protection was for. Thatte6 covers the language, compiler and microkernel as hardware-facing inventions; Thatte3 covers the processor and instruction set the T3ISA back end targets.
Built to Outlive Its Links
Both releases carry a permanent identifier independent of GitHub and of this site. maniTC v0.1.0 is archived as 10.5281/zenodo.21894912 and thatteOS v0.1.0 as 10.5281/zenodo.21894914; both repositories, commit history included, are preserved by Software Heritage. The evaluation paper, Three != Two: A Complete Balanced Ternary Software Stack, is deposited alongside them under CC BY 4.0. Everything is listed, with copyable citations, on publications.
The papers state the limitations in full, and the repositories carry
KNOWN_ISSUES.md as the living version of that list. Nothing here
claims a speed or efficiency result: the target hardware does not physically
exist yet, and the emulator's timings measure interpretation overhead. What
is claimed is that the same program expresses in fewer instructions with less
enforcement machinery — and that claim is checkable against the code.
Full Technical Brief Available Under NDA
Simulation data, quantum transport results, fabrication specifications, and complete patent claims are shared under mutual NDA only.
Follow maniTLab
New research, patent updates and essays, as a feed your reader collects for you. No list to join, no address to hand over, nothing to unsubscribe from.
RSS Feed →Write to Manish
Research collaboration, licensing enquiries, technical questions, or press requests.