This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/gates

Gate symbols and orthogonal wiring, for drawing a schematic

The distinctive shapes of IEEE Std 91: AND is a D with a flat back and a semicircular nose, OR has a concave back and a pointed nose, XOR is an OR with a second arc behind it, and an inverting output is a small circle on the nose. Each one comes back as a closed outline to hand to curve, so a schematic is line art.

The wiring helpers build orthogonal paths: a wire leaves a gate horizontally, turns once, and arrives horizontally, which is how a schematic is drawn and read. A net that feeds two gates is one path that retraces itself, so it can be drawn, and lit, as one thing.

Used with import gates. The drawing calls stay in the post, because the ids they need are string literals.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 20–179