xiaohongshu
xiaohongshu
ewig-editor
The eternal text editor — Didactic Ersatz Emacs demonstrating immutable
Full skill instructions
The eternal text editor — Didactic Ersatz Emacs demonstrating immutable data-structures and the single-atom architecture.
Ewig demonstrates how to build a text editor using:
// Single atom state
atom<editor_state> state;
// All mutations are pure transformations
state.update([](editor_state s) {
return s.insert_char('x'); // Returns new state, doesn't mutate
});
┌─────────────────────────────────────────────────────┐
│ Ewig │
├─────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Single Atom │ │
│ │ (immutable editor_state) │ │
│ └─────────────────────────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ │
│ │ immer │ structural │ lager │ │
│ │ vectors │ sharing │ cursors │ │
│ └─────────┘ └─────────┘ │
│ │
└─────────────────────────────────────────────────────┘
Persistent immutable data structures for C++:
#include <immer/vector.hpp>
immer::vector<char> buffer = {'h', 'e', 'l', 'l', 'o'};
auto new_buffer = buffer.push_back('!'); // O(log n), shares structure
Unidirectional data-flow architecture:
auto store = lager::make_store<action>(
model{},
lager::with_reducer(update),
lager::with_effect(effect)
);
Ewig's immutable architecture aligns with CRDT principles:
| Ewig Concept | CRDT Parallel |
|---|---|
| Immutable state | Operation-based CRDT |
| Structural sharing | Delta-state CRDT |
| Single atom | Causal consistency |
| Pure transformations | Commutative operations |
The single-atom pattern can be applied to terminal state:
// Terminal state as immutable atom
struct terminal_state {
immer::flex_vector<line> lines;
cursor_pos cursor;
gf3_trit trit; // GF(3) assignment
};
atom<terminal_state> term_state;
git clone https://github.com/bmorphism/ewig
cd ewig
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
./ewig
code-refactoring - Immutable refactoring patternsbisimulation-game - State equivalencegay-mcp - Deterministic UI coloringThis skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
general: 734 citations in bib.duckdbThis skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience