This project isn’t particularly new (2008), however, besides its merits of having conquered the Hacker News front page (which brought this to my attention), it combines two topics some of us seem to like here: the mostly unfulfilled promises of ternary computing and the simplicity and accessibility of the 6502 processor:
Tunguska is a ternary computer emulator. On a good day, it’s performance it is roughly equivalent with that of a personal computer from the 1980’s, with peak speeds around 1,000,000 operations per second, on a more normal day roughly 250,000 ops/sec.
It is loosely based on the excellent design of the (binary) 6502-processor by MOS Technology, but entirely ternary. So instead of having two memory cell states (0, 1), it has three (-1, 0, 1).
The machine uses tryte-width (tryte = ternary analog to “byte”) 6, with 3⁶=729 states per tryte.
The name is both a tip of the hat to the predominantly russian heritage of ternary computing, and an (obsolete) in-joke about the stability of an earlier version.
Apparently, it isn’t just an emulator, but an entire suite consisting of, besides of the emulator itself, of an assembler, a C-compiler and an operating system providing core functionality like IO. About everything required in order to provide a playground for exploring ternary computing:
“I wonder how it would be if my computer was ternary?”, I asked myself a while back. I googled around, and found a few stub-ish wikipedia articles, a few pages explaining why ternary computing is vastly superior to everything, and some documents discussing russian experiments in the 1950’s.
Obviously, this wouldn’t do. I wanted a hands-on computer I could play with. So I got to work, and a few months later, this is the result.
So, the purpose is to provide a simple and accessible, yet powerful playground for ternary computing for the man in the street (with a decent understanding of assembly programming and general computer infrastructure).
Also, the design goals listed on the pages are rather attractive:
The goal of the project is primarily enjoyment, but undirected programming won’t really produce anything useful, so some sort of priorities and goals need to be defined. In descending order of importance:
- Simplicity / usability
- Speed
- Beautiful code
- Experimentation
Is “charming” an appropriate attribute for a software project?
Tunguska is available for GNU/Linux, FreeBSD, and MS Windows.
(A proper build requires SDL, zlib, bison and flex.)
http://tunguska.sourceforge.net/about.html
HN discussion: Tunguska: Ternary Computer Emulator (2008) | Hacker News