simpatico

Lab

pathlab
datetitletagsdescription
2026-10-31A Field of Falling ObjectsAn interactive toy for the question: what happens when we keep dropping objects into a field? The field is a plain SVG box. Every object is a <circle>. Gravity pulls them down, the walls and floor bounce them back, and y
2026-10-31Exported AssetsA markdown file is not only a page and not only a JavaScript module. The same @module directive works for CSS, HTML, and SVG, and the fenced language decides the content type the reflector serves:
2026-10-31Input You Can SeeA second lab built on the field from A Field of Falling Objects. The field itself did not change. What changed is the meaning given to input.
2026-10-01Secure WebSocket TestwebsocketExercising the secure websocket client against the server.
2026-08-11STreestreeAn n-arry tree that associates a reduction-from-root (called 'residue') with each node. Allows visualizable multiverse programming.
2026-08-11STree MapstreeRepresenting parent/child relationships between plain objects to model ordered input as a tree.
2026-02-03SVG in the BrowsersvgLet us explore SVG in the browser. The default svg is 300x150 pixels, and it is scaled with the page.
2026-02-03SVG with D3.jssvgD3 (Data-Driven Documents) provides a powerful API for manipulating SVG elements.
2026-02-01Event Loop FoundationsExploring call chain propagation, event loop mechanics, and reentrancy prevention in functional JavaScript applications
2026-01-30Visual CPU Instruction Simulator
2025-09-04SHA-256 Proof of WorkwebsocketThis document implements a complete SHA-256 based proof-of-work system in the browser. The system asks clients to find a nonce such that when combined with a challenge string and hashed with SHA-256, the result has a spe
2025-08-29WebCryptowebsocketIn recent months WebCrypto has gained X25519 asymmetric functions, and so has node 24+.
2025-08-28EncodingswebsocketThe question of which encoding to use and when is a surprisingly complex topic in the context of writing a secure socket protocol. In particular, there is an asymmetry with data that originates as uint8array and that whi
2025-08-28NaClwebsocketA keypair and Diffie-Hellman walkthrough using tweetnacl instead of the WebCrypto API.
2025-08-27Secure WebSocketwebsocketA secure websocket encrypts all messages such that the server cannot read them. The server in this scenario verifies clients and routes messages between connected clients.
2025-08-27Simple WebSocketwebsocketA websocket is a browser-provided class that takes an endpoint string and provides a persistent object with 4 events (open, message, close, error) and 2 methods (send, close). In this example we wrap the browser websocke
2025-08-27WebSocket Simplewebsocket, exercisesA promise-based websocket facade, simple but with rough edges around message structure and asynchronous construction.
2025-08-25STree VisualizationstreeVisualizing the stree data structure with D3 and other tools
2025-07-21Virtual HostsThis file is me thinking out loud about the support of virtual hosts. The way I've always done this in the past is with nginx.
2025-05-21SVGsvgScalable Vector Graphics (SVG) is a powerful, low-entropy, programmable representation of images. This is an exploration of the tech and an experiment in a novel "scatter/gather" method of doing animation.
2025-05-04Callback-based WebSocketwebsocket, callback-basedA websocket built from callbacks, with encryption on top of the crypto primitives.
2025-05-04FSM-based WebSocketwebsocket, fsm-basedModeling the websocket handshake and message flow as a finite state machine.
2025-05-04Protocol-based WebSocket Authwebsocket, protocol-basedA websocket auth exercise expressed as an explicit message protocol.
2025-05-04Simpatico Socketwebsocket, stree-basedThe stree-based implementation of the secure socket protocol.
2025-05-04WebSocket Basicswebsocket, exercisesExercising the basic WebSocket API.
2025-04-06Combine and Friendly FunctionsHow combine() and friendly functions fit together for validating handler arguments.
2025-04-05Simpatico ChatchatEnd-to-end encrypted peer-to-peer chat for up to 4 peers. Each browser tab generates an ephemeral X25519 keypair. Share your invite link to add peers.