Loom

A blog engine that just works. One binary, no setup, no dependencies.

Posts tagged “terminal-rendering” (5)

Putting It All Together — The Full PipelineMar 25 27.6K

Twelve posts of theory. Now we build. A complete, compilable, interactive terminal renderer — style interning, 8-byte cells, cell-level diffing, transition cache, synchronized output, threaded compositor. Copy it. Compile it. Resize your terminal. Watch zero flicker.

--c++23 --full-pipeline --demo --terminal-rendering --compositor --double-buffering --claude-code
Hardware Scroll — Moving Rows Without RewritingMar 19 9.6K

The terminal can shift rows for you. You just have to ask nicely with CSI sequences, and then lie to your own diff engine about what the previous frame looked like. Result: 99% reduction in scroll I/O.

--c++23 --hardware-scroll --csi-sequences --scroll-region --memmove --terminal-rendering --claude-code
Style Transitions — The Transition CacheMar 17 9.6K

The single highest-leverage optimization in the entire pipeline. Computing the minimal ANSI to go from style A to style B, caching it forever, and never computing it again. 30-50% reduction in terminal output with one hash map.

--c++23 --style-transition --ansi-sgr --cache --optimization --terminal-rendering --claude-code
The Screen Buffer — A 2D Cell GridMar 05 9.6K

Every terminal UI, no matter how complex, reduces to filling a 2D grid of cells and diffing it against the previous frame. Claude Code uses a dual-view memory trick to make this fast. In C++, we don't need the trick.

--c++23 --terminal-rendering --screen-buffer --memory-layout --simd --claude-code
How I Ported Claude Code's Rendering Engine to Modern C++Mar 03 6.0K

I decompiled Claude Code's binary, reverse-engineered its terminal rendering pipeline, and rebuilt the whole thing in C++23. This is the story of what I found inside — and how to build a flicker-free, 60fps terminal UI from scratch.

--c++23 --terminal-rendering --reverse-engineering --tui --claude-code --ansi