Skip to content

Instantly share code, notes, and snippets.

View bmorphism's full-sized avatar
🦍
annealing information lattice since *2069*

Barton Rhodes bmorphism

🦍
annealing information lattice since *2069*
View GitHub Profile
@bmorphism
bmorphism / visualize-optimality.html
Created January 8, 2026 15:06
Gay-TOFU: Plastic constant optimality proof
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Why Plastic Constant is 2D Optimal</title>
<style>
body {
font-family: monospace;
background: #0a0a0a;
color: #e0e0e0;
@bmorphism
bmorphism / hamming-codec.html
Created January 8, 2026 15:06
Gay-TOFU: Error-correcting codec demo
<!DOCTYPE html>
<html>
<head>
<title>Hamming Swarm Error-Correcting Codec</title>
<style>
body {
margin: 0;
background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
color: #e0e0e0;
font-family: 'SF Mono', 'Consolas', monospace;
@bmorphism
bmorphism / alphabet-tensor.html
Created January 8, 2026 15:06
Gay-TOFU: 3×3×3 Hamming swarm visualization
<!DOCTYPE html>
<html>
<head>
<title>3×3×3 Alphabet Tensor with Hamming Swarm</title>
<script src="https://enkimute.github.io/ganja.js/ganja.js"></script>
<style>
body { margin: 0; background: #0a0a0a; color: #e0e0e0; font-family: 'SF Mono', monospace; }
.controls {
position: fixed; top: 10px; left: 10px; z-index: 100;
background: rgba(0,0,0,0.8); padding: 15px; border-radius: 8px;
@bmorphism
bmorphism / world.html
Created January 8, 2026 15:06
Gay-TOFU: Interactive color generation demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gay-TOFU Demo - Bijective Color Sequences</title>
<style>
* {
margin: 0;
padding: 0;
@bmorphism
bmorphism / gay-tofu.test.ts
Created January 8, 2026 15:06
Gay-TOFU: Test suite (45+ tests)
/**
* Tests for Gay-TOFU TypeScript implementation
* Run with: deno test gay-tofu.test.ts
* or with Node: npx tsx gay-tofu.test.ts
*/
import {
goldenAngleColor,
plasticColor,
haltonColor,
@bmorphism
bmorphism / gay-tofu.ts
Created January 8, 2026 15:06
Gay-TOFU: Bijective low-discrepancy color sequences (TypeScript)
/**
* Gay-TOFU: Low-Discrepancy Color Sequences for Visual Authentication
*
* TypeScript port of the Julia implementation for browser/Node.js use.
* Bijective color generation - you can recover the index from the color.
*
* @module gay-tofu
* @license MIT
*/
@bmorphism
bmorphism / CONTINUATION.md
Last active December 22, 2025 03:51
LocalSend MCP Skill - Live Session
@bmorphism
bmorphism / README.md
Created December 13, 2025 15:02
Cross-language color palette prototype using Gay.jl and JavaScript

Cross-Language Color Palette Prototype

This prototype demonstrates how to generate deterministic color palettes from seed strings in Julia and reproduce the same palettes in JavaScript. The Julia implementation uses Gay.jl, a lightweight wrapper around the Colors.jl ecosystem, to seed a random number generator from a string and then produce an array of RGB colors. By seeding the PRNG with a stable integer derived from the seed text, you can obtain consistent palettes across runs and across languages. The JavaScript snippet replicates the same algorithm, ensuring that identical seeds produce identical palettes in the browser.

Background

Julia’s Colors.jl library provides rich tools for creating colour maps. For example, sequential_palette in Colors.jl can build a sequential palette given a hue and several parameters (Colormaps and Colorscales · Colors - julia), and

(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.10 (2025-06-27)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Gay
ERROR: ArgumentError: Package Gay not found in current path.
- Run `import Pkg; Pkg.add("Gay")` to install the Gay package.
@bmorphism
bmorphism / output.md
Last active November 22, 2025 11:37
to become a Fokker-Planck...

On an Apple Silicon device do-be:

flox activate -- uvx --from mlx-lm mlx_lm.generate \
    --model Plurigrid/DR-Tulu-8B-MLX-6bit \
    --prompt "Write only one flowing paragraph, no preface, no notes, no <think>, no plan. Answer as
  a philosopher-poet of stochastic processes: what would it mean to become the Fokker-Planck equation—
  identity as probability flow?" \
    --max-tokens 4444 --temp 0.9