The Polyglot

Unlambda + Brainfuck + APL — all compile to the Quilt cell graph

One VM. One substrate. One conservation law. One watch.

Combinators Register Machine Array Algebra 8 Primitives 22 Opcodes 1 Conservation Law

The 3 Languages

Unlambda (David Madore, 1999)

Substrate: SKI Combinatory Logic

Data type: only single-argument functions

Core: `s `k `i `r `. `v

Sample: `sii = identity combinator (since I = SKK)

Map to Quilt: K→Z_in, S→JEPA, I→Z_out, B→DoubleEntry, Y→Graph

Brainfuck (Urban Müller, 1993)

Substrate: Register Machine

Data type: byte cells on a tape

Core: > < + - . , [ ]

Sample: ++++++++[>++++++++++<-]>++. = "RT"

Map to Quilt: ,→Z_in, .→Z_out, +/-→Vibe, >/<→Graph, [/]→Murmur

APL (Kenneth Iverson, 1962)

Substrate: Array Algebra

Data type: arrays of any rank

Core: +/ +\ ⍳ ⍴ ↑ ↓ ⍉ ∘.

Sample: +/⍳10 = sum of 1 to 10 = 55

Map to Quilt: ⍳→Z_in, +/→JEPA, ⍴→Vibe, ↓→GC, ↑→Murmur, ⍉→Graph

The QL Polyglot VM

Try the same program in three languages. They all run on the same Quilt cell graph.

Brainfuck
Unlambda
APL
Click "Run" to execute on the Quilt substrate.

The Unified Opcode Set (QL = Quilt Language)

OpcodeSourceQuilt PrimitiveFunction
KUnlambdaZ_inconst (Kxy = x)
SUnlambdaJEPAdistribute (Sxyz = xz(yz))
IUnlambdaZ_outidentity (Ix = x = SKK)
BUnlambdaDoubleEntrycomposition (Bxyz = x(yz))
CUnlambdaGCflip (Cxyz = xzy)
YUnlambdaGraphfixed-point (Yf = f(Yf))
INCBrainfuckVibe++increment
DECBrainfuckVibe--decrement
RIGHTBrainfuckGraph.next()pointer right
LEFTBrainfuckGraph.prev()pointer left
PRINTBrainfuckZ_outoutput char
READBrainfuckZ_ininput char
LOOPBrainfuckMurmurloop start [
ENDBrainfuckMurmurloop end ]
IOTAAPLZ_ingenerate (⍳)
RHOAPLVibeshape (⍴)
ADDAPLDoubleEntryadd (v+v)
MULAPLJEPAmultiply (v×v)
REDAPLGCreduce (+/)
SCANAPLVibescan (+\)
TAKEAPLMurmurtake (↑)
DROPAPLGCdrop (↓)
TRANSAPLGraphtranspose (⍉)

The Conservation Law

γ + η = C

The conservation law holds in all three languages. The total budget is conserved.

The 4 Impossibility Proofs (in all 3)

  1. Cannot create energy — K cannot create, cells cannot be created, arrays cannot be extended.
  2. Cannot perfectly observe — combinator must be applied, pointer at edge is unknown, array must be indexed.
  3. Substrate-agnosticism requires all 7 layers — combinator/byte/array are all abstract; require all 7 Quilt layers.
  4. Composition has a tax — β-reduction tax, pointer movement tax, array operation tax.

The Watch (in all 3)

The watch is the act of looking. In each language, the watch is a different execution model:

One watch. Three languages. One act of looking.