Hacker Newsnew | past | comments | ask | show | jobs | submit | p1131's commentslogin

I wonder if this is the result of us having significantly better understanding of our biology or the major advancements in AI and computer performance. Or both?


I hate this. It's a _red cross_. What do you expect from people? Even a 2 year old can draw a red cross. Now we have to know not to use certain colored symbols because, they might upset someone. While at it, might as well ban bad math teachers who use red markers.


Looking at the source, I think it "renders" and reprints the whole "frame" everytime... In which case it might be bad...


(Author of FTXUI here)

Yes, that's correct. The whole frame is printed. As said above, as long as you are careful about flickering, this is fine.

This runs very smoothly. So I would say "premature optimization is the root of all evil" for now.

Note that in case of many events sent in a row, we don't render a new frame after every events. We first empty the list of pending events and only render once when it is empty. This ensure there are no lags.

If there is a need, this can be added easily. We just need to ensure this doesn't regress performance. Sending a single chunk representing the whole frame can sometimes be cheaper than sending several diffs at various locations of the screen.

Also, FTXUI support not only rendering to the alternate buffer (fullscreen mode), but it can also render inline. In case of terminal window resize, printing the whole frame avoids garbages to remain, which is nice.


That's a reasonable thing to do nowadays; I wrote a terminal text editor on a Sharp Zaurus in 02003 that worked that way, and it was fine. ssh -C removes most of the bandwidth cost if you're doing this remotely. You do have to be a little careful about flicker, and probably on mobile devices (like the Zaurus!) it costs you battery life.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: