+++ title = “Welcome to Gay.jl Blog” template = “main” description = “Referentially transparent, stable colors powered by Gay.jl and Bartholomew WASM” enable_shortcodes = true +++
Welcome to Gay.jl Blog
This blog worlds referentially transparent and referentially stable color generation using Gay.jl integrated with Fermyon Bartholomew.
What is Referential Transparency?
A function is referentially transparent if you can replace a function call with its result without changing the program’s behavior. Gay.jl’s color generation is referentially transparent:
gay_color("hello") → #A7B3C9 (always, forever)
The same input always produces the same output, across:
- Different implementations (Julia, Go, Rust, Unison, WASM)
- Different times (today, tomorrow, in 10 years)
- Different machines (your laptop, a server, a phone)
Live World
Here’s a color palette generated from this page’s title:
{{gay_palette “Welcome to Gay.jl Blog” 8}}
And here’s the GF(3) status of this content:
{{gay_badge “Welcome to Gay.jl Blog”}}
The Three Primitives
Gay.jl is built on exactly three irreducible primitives:
- sm64 - SplitMix64 mixing function (the dynamics)
- ⊻ (XOR) - Composition operator (the algebra)
- GF(3) - Three-element Galois field (the constraint)
{{gay_block “sm64” “The SplitMix64 bijection transforms any 64-bit integer into a well-distributed output. It’s fast, deterministic, and has excellent statistical properties.”}}
{{gay_block “XOR” “XOR is associative, commutative, and self-inverse (a ⊻ a = 0). This makes fingerprints order-independent and enables ancestor cancellation in merges.”}}
{{gay_block “GF(3)” “Three colors (0, 1, 2) are sufficient for coloring most DAGs. They map to semantic states: verified, proposed, speculative.”}}
Why WASM?
Bartholomew runs as a WebAssembly module, which means:
- Portable: Same binary runs anywhere WASM runs
- Secure: Sandboxed execution with no filesystem access
- Fast: Near-native performance for content rendering
- Deterministic: No system-dependent randomness
The Gay.jl Rhai scripts are evaluated at render time, generating colors that are:
- Content-addressed: Color derived from content hash
- Stable: Same content → same color forever
- Verifiable: XOR fingerprint proves content integrity
Get Started
Check out the blog posts for more examples, or dive into the source code!