
An unusual hardware architecture: APA (Associative Processing Array) - blasdel
http://www.yosefk.com/blog/an-unusual-hardware-architecture-apa-associative-processing-array.html
======
ctdonath
Such minimal computing designs are delightful. Ever since hearing of "reverse
subtract and skip if borrow" as a one instruction architecture, I've dabbled
in the study, if not progressed to my satisfaction. This is another wonderful
addition - if I could get my mind around it, having just suffered the effects
of watching "The Omega Man".

Any links to coding examples?

~~~
kragen
Like hugi-compo? The latest competition was in 2009, and the winner generated
a random ASCII-art maze with a 122-byte MS-DOS .COM file.
<http://www.fysnet.net/hugi/compoold.htm> A 2006 competition was for Sudoku
solvers; the winner was 67 bytes. And of course there's a whole demoscene with
32-byte, 64-byte, 128-byte, 256-byte, etc., categories. My dissection of a
16-byte graphics demo (the smallest!) is at
<http://www.canonical.org/~kragen/demo/fr-016.html>.

In April some of us were playing with bootstrapping a development environment
in MS-DOS from COPY CON: [http://lists.canonical.org/pipermail/kragen-
discuss/2011-Apr...](http://lists.canonical.org/pipermail/kragen-
discuss/2011-April/thread.html) [http://lists.canonical.org/pipermail/kragen-
hacks/2011-April...](http://lists.canonical.org/pipermail/kragen-
hacks/2011-April/000519.html) Dave Long put together a version where the
machine code was entirely printable ASCII.

Brian Raiter wrote a lovely article a few years back on the smallest possible
ELF executable, which turns out to be 45 bytes, which unfortunately has been
broken by recent Linuxes:
[http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...](http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html)

Based on Brian's work, I wrote a self-compiling compiler for a tiny dialect of
Forth: <https://github.com/kragen/stoneknifeforth> which is about two pages of
code if you remove the comments. I also wrote a PEG compiler-compiler in
JavaScript which is one page of code: <https://github.com/kragen/peg-
bootstrap/blob/master/peg.md> \--- ultimately I want to make a version that
generates StoneKnifeForth code instead of JS, but I haven't gotten around to
it.

I also designed a minimal CPU architecture:
<https://github.com/kragen/calculusvaporis> but I only have software
implementations for it so far, and no interesting code.

And I wrote a metacircular interpreter for Bicicleta in half a page of code,
which I guess is some kind of "minimal coding example":
[http://lists.canonical.org/pipermail/kragen-
hacks/2007-Febru...](http://lists.canonical.org/pipermail/kragen-
hacks/2007-February/000450.html)

<https://github.com/kragen/screenfuls> is a collection of tiny, _readable_
programs that do interesting things.

~~~
wtracy
Okay, now someone needs to build a Calculus Vaporis CPU in Minecraft.

------
wtracy
This would be an interesting starting point for a mechanical computer.

