Efficient Collaborative Text Editing: A CRDT Implementation

2025-08-20

This article presents a collaborative text editing algorithm based on CRDTs, similar to approaches used in popular libraries like Yjs and Automerge. Each character is assigned a unique identifier (site ID and clock), and a tree-based index with counters orders characters. Deletion involves adding the character's identifier to a deleted set (tombstones). Efficiency is boosted by optimizations such as merging successive inserts, storing blocks contiguously, and using a range-based representation for the deleted set. This ensures efficient handling of large text pastes and simultaneous edits.

Read more
Development

Stunning WebGL Water Simulation: Ray Tracing and Heightfield

2025-05-10

Evan Wallace's WebGL water simulation demo is breathtaking. It uses ray tracing for realistic reflections and refractions, combined with analytic ambient occlusion and heightfield water simulation, creating a lifelike, shimmering water surface. Users can interactively create ripples, rotate the camera, and even control lighting and gravity. This demo requires a powerful graphics card and up-to-date drivers, but the visual results are stunning, showcasing the capabilities of WebGL.

Read more
Development Water Simulation