3 ms·
I wrote[0] something similar to the first part of this post a while back for one of the AoC 2019 puzzles. However, it didn't strike me that you can represent ea
by K0nserv 4y ago
I wrote[0] something similar to the first part of this post a while back for one of the AoC 2019 puzzles. However, it didn't strike me that you can represent each frame as a set and use the difference to figure out the resulting render commands, that's super neat.
Something strange that I found was: If you redraw only two characters in the terminal, neither iTerm nor macOS's terminal would render the update. In my solution I always rendered some characters redundantly to get around this.
EDIT: I went back and looked at this code again based on the insights from this blog post and figured out a few more issues I had and fixed them.
0: https://hugotunius.se/2019/12/29/efficient-terminal-drawing-in-rust.html https://hugotunius.se/2019/12/29/efficient-terminal-drawing-...