Date: Mon, 27 Mar 2017 20:58:29 -0700
From: Bret Victor
Subject: Re: Logic Circuit Jam
I was thinking about how good it felt to hold and deal playing cards, especially laying out cards in a solitaire-like layouts. 


I was also observing how easy it was to draw little glyphs on our dry-erase cards, smudge them out with a thumb, and draw different ones.

Here's an XOR gate.  (Or, as us 6502 children still sometimes think of it, EOR.)


 A card with a "-" is a NOT, an "x" is an AND, and a "+" is an OR.  The "A" and "B" are input nodes -- the object closest to the "A" or "B" is considered the input.  The entire card itself is the output -- it's either lit or not.  ("Lit" meaning highlighted by the projector -- the word "highlighted" was too clumsy to keep writing out in the rules.)

Here are the rules, written on "rule cards" that associate the symbol on the card with a particular rule:


The natural-language rules are hand-wavy, although you could probably get something very close to this in Inform.

The go stones were an attempt at "connecting" two nodes (all nodes with the same color stone have the same value), although that's also pretty hand-wavy.

Here's a 3-inverter ring oscillator:


One realization here was, when it got awkward to position the cards correctly, I could just smudge out the "A" on one of the cards and redraw it somewhere  more convenient.  The rule is just looking for the closest object to the "A" on its card -- it doesn't care where on the card the "A" is drawn.

Some key ideas:

 - Laying out playing cards (in portrait orientation), picking them up, spreading them around, are really enjoyable-feeling actions.

 - Writing and smudging individual symbols with dry-erase marker is quick and natural-feeling.  I can imagine doing this when improvising an activity with someone.  Writing out words or sentences is more tedious.

 - Indicating the "kind" of a card by marking it with a symbol seems like a sweet spot of being quick, fun, not requiring additional objects such as stickers, easily changed or erased, probably machine-readable, and somewhat mnemonic (as opposed to using arbitrary colors or shapes or barcodes).

 - Writing a symbol on a card and referring to objects in relation to that symbol (the object closest to my "A", all objects within 3 inches of my "A", all stones vertically aligned with my "A", etc.) is interesting.  Especially because you can reposition the "A" (or draw multiple "A"s if that makes sense) it's more versatile than forms with pre-printed slots, or even referring to the corners of the card etc.  

- Just the concept of "my A" and "my B" -- a rule referring to sub-parts of its object -- seems like it could go really deep, if we have versatile ways of making and rearranging sub-parts.  Toby was also getting at this with his "red mark and black mark" wire.

 - Computing using the object's "lit" property (with its built-in real-world side-effect) as input and output is interesting.  I wonder if there are other such properties we could define.  Etoys uses color a lot, but maybe there are others.

 - I wanted a more compact NOT gate, so I cut one down to size with scissors.  As long as it's still recognized as a card, it's shape and size shouldn't matter.  What does matter?  (i.e what attributes is the recognizer actually recognizing?)  Luke was talking about ways of having the system list out all of the attributes or relationships that it sees with an object or objects, and the person would select which ones it wants a recognizer to use.