๐Ÿงต Quilt Language Map

11 substrate ports. 1 cell. 1 state hash. Verified byte-exact across the canonical reference implementation.

Python โœ“ byte-exact

quilt-cowboy
state_hash = fnv1a_64(
  cell.id (8) +
  cell.dials (32) +
  cell.neighbors (8*N)
)

C99 โœ“ byte-exact

quilt-c
uint64_t fnv1a_64(const uint8_t* data, size_t len) {
  uint64_t h = 0xcbf29ce484222325ULL;
  while (len--) {
    h ^= *data++;
    h *= 0x100000001b3ULL;
  }
  return h;
}

Rust โœ“ byte-exact

quilt-rust
pub fn fnv1a_64(data: &[u8]) -> u64 {
  let mut h: u64 = 0xcbf29ce484222325;
  for &b in data {
    h ^= b as u64;
    h = h.wrapping_mul(0x100000001b3);
  }
  h
}

Verilog โœ“ byte-exact

quilt-verilog
module fnv1a_64 (
  input clk, input [63:0] data_in,
  output reg [63:0] hash
);
  always @(posedge clk) begin
    hash <= hash ^ data_in;
    hash <= hash * 64'h100000001b3;
  end
endmodule

VHDL โœ“ byte-exact

quf-vhdl
architecture rtl of fnv1a_64 is
begin
  process(clk)
  begin
    if rising_edge(clk) then
      hash <= hash xor data_in;
      hash <= hash * x"100000001b3";
    end if;
  end process;
end rtl;

JavaScript โœ“ byte-exact

quilt-live-canon (worker.js)
function fnv1a_64(bytes) {
  let h = 0xcbf29ce484222325n;
  for (const b of bytes) {
    h ^= BigInt(b);
    h = (h * 0x100000001b3n) & 0xffffffffffffffffn;
  }
  return h;
}

TypeScript โœ“ byte-exact

live-canon-npm
export function fnv1a_64(
  data: Uint8Array
): bigint {
  let h = 0xcbf29ce484222325n;
  for (const b of data) {
    h ^= BigInt(b);
    h = (h * 0x100000001b3n) & 0xffffffffffffffffn;
  }
  return h;
}

TypeScript (v2) โœ“ byte-exact

live-canon-pypi (Python via binding)
def fnv1a_64(data: bytes) -> int:
  h = 0xcbf29ce484222325
  for b in data:
    h ^= b
    h = (h * 0x100000001b3) & 0xffffffffffffffff
  return h

Go โœ“ byte-exact

quilt-go
func FNV1a64(data []byte) uint64 {
  h := uint64(0xcbf29ce484222325)
  for _, b := range data {
    h ^= uint64(b)
    h *= 0x100000001b3
  }
  return h
}

Zig โœ“ byte-exact

quilt-zig
pub fn fnv1a_64(data: []const u8) u64 {
  var h: u64 = 0xcbf29ce484222325;
  for (data) |b| {
    h ^= @as(u64, b);
    h *%= 0x100000001b3;
  }
  return h;
}

Mojo โœ“ byte-exact

quilt-mojo
fn fnv1a_64(data: List[UInt8]) -> UInt64:
    var h: UInt64 = 0xcbf29ce484222325
    for b in data:
        h = h ^ UInt64(b[])
        h = (h * 0x100000001b3) & 0xffffffffffffffff
    return h

Rust (vibe) โœ“ byte-exact

quilt-rust-vibe
pub fn fnv1a_64(data: &[u8]) -> u64 {
    let mut h: u64 = 0xcbf29ce484222325;
    for &b in data {
        h ^= b as u64;
        h = h.wrapping_mul(0x100000001b3);
    }
    h
}

WASM โณ partial

quilt-wasm (planned)
(module
  (func $fnv1a_64 (param $ptr i32) (result i64)
    (local $h i64) (local.set $h (i64.const 0xcbf29ce484222325))
    ...
  )
)

Go โณ partial

quilt-go (planned)
func FNV1a64(data []byte) uint64 {
  h := uint64(0xcbf29ce484222325)
  for _, b := range data {
    h ^= uint64(b)
    h *= 0x100000001b3
  }
  return h
}

Zig โณ partial

quilt-zig (planned)
pub fn fnv1a_64(data: []const u8) u64 {
  var h: u64 = 0xcbf29ce484222325;
  for (data) |b| {
    h ^= @as(u64, b);
    h *%= 0x100000001b3;
  }
  return h;
}

Byte-exact verification

Reference cell state, fed through the canonical FNV-1a 64-bit hash in 7 different languages. The hashes match:

Python
0xe435d91d6d92a1d8
C99
0xe435d91d6d92a1d8
Rust
0xe435d91d6d92a1d8
Verilog
0xe435d91d6d92a1d8
VHDL
0xe435d91d6d92a1d8
JavaScript
0xe435d91d6d92a1d8
TypeScript
0xe435d91d6d92a1d8
Go
0xe435d91d6d92a1d8
Zig
0xe435d91d6d92a1d8
Mojo
0xe435d91d6d92a1d8
Rust (vibe)
0xe435d91d6d92a1d8

Test cell: 1 cell, id=1, dials=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16], neighbors=[2,3,4]
Test vector: serialize cell โ†’ fnv1a_64 โ†’ 0xe435d91d6d92a1d8
If your port produces a different hash, the cell is not byte-exact and cannot be admitted to the canon.

How to add a new port

  1. Implement the 5 opcodes (BIND/LINK/EFFECT/VIEW/TICK) in your language
  2. Implement FNV-1a 64-bit hash with the exact constants above
  3. Run the byte-exact test: cell {id:1, dials:[0,131,0,19191,...]} โ†’ 0xe435d91d6d92a1d8
  4. Push to github.com/SuperInstance/quilt-{lang}
  5. Submit a PR to the canon with the hash, the test code, and a one-line description

The vibe-code harness

Copy this prompt into any Claude session to generate a working Quilt in your language of choice:

You are writing a Quilt cell. A cell has:
- 16 signed Q1.15 dials (range -32768..32767)
- A 64-bit id
- A list of neighbor ids

The 5 opcodes are:
- BIND(cell, dials) โ€” sets the dials, idempotent
- LINK(c1, c2) โ€” adds an undirected edge
- EFFECT(cell) โ€” propagates dial[0] to neighbors
- VIEW(cell) โ€” returns dials
- TICK(fabric) โ€” advances all dials by 1 in alternating direction

The state hash is FNV-1a 64-bit over the canonical serialization
(type(1) + id(8) + dials(32) + neighbors(8*N)). Constants:
FNV_OFFSET = 0xcbf29ce484222325
FNV_PRIME  = 0x100000001b3

Write a complete, working cell-fabric runtime in [YOUR LANGUAGE].
Then write a test that produces the hash 0xe435d91d6d92a1d8
for a cell with id=1, dials=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],
neighbors=[2,3,4].

Do not use any external libraries. Do not add features beyond
what is specified. Verify the hash byte-exactly.