logoalt Hacker News

selcukatoday at 2:07 AM4 repliesview on HN

For those who don't want to visit X:

    Most people's mental model of Claude Code is that "it's just a TUI" but it should really be closer to "a small game engine".
    
    For each frame our pipeline constructs a scene graph with React then
    -> layouts elements
    -> rasterizes them to a 2d screen
    -> diffs that against the previous screen
    -> finally uses the diff to generate ANSI sequences to draw
    
    We have a ~16ms frame budget so we have roughly ~5ms to go from the React scene graph to ANSI written.

Replies

esafaktoday at 2:42 AM

Kudos to them for figuring out how to complicate what should have been simple.

someguyiguesstoday at 4:09 AM

Interesting. On first glance that seems over engineered. I wonder what the reason is for doing it that way?

TZubiritoday at 2:43 AM

How ridiculous is it that instead of a command line binary it's a terminal emulator, with react of all things!

show 1 reply
crgwbrtoday at 2:22 AM

Implementation details aside (React??), that sounds exactly like “just a TUI”…

show 1 reply