3 ms·
Show HN: Hacked together command-line "Spritz"
- nemasu 13y agoReally neat. But I tried it at 600 WPM, and it can't center it fast enough, it will pop over from the left. Becomes very difficult to use at higher speeds.
- codezero 13y agoI'll look into this. I didn't test it at higher than 400. I imagine this is just some terminal oddity, but at the same time, the fact that the ridiculous ANSI codes I use work is an oddity of its own :)
- nemasu 13y agoHmm, how about creating the whole string and then printing the whole thing instead of in chunks? Idk.
- codezero 13y agoI'll see if that helps. The problem with that is that I need to create a new string in memory, but maybe that's faster than many printf calls. I will play with it. I think the jitter is more likely related to the way I'm clearing the line.
- codezero 13y agoWhat OS/terminal are you using? I didn't have this problem so far on Mac OS X.