- Jul
- 534
- 10
ANSI rendering is HORRIBLY inconsistent.
Easiest way to fix it? Pipe through cat.exe
Say you have this command, but the rendering glitches out 1 out of 5 times:
Simple fix: You just pipe it through the unix 'cat' command. Which for me was cygwin's cat.exe.
On super rare occasion with unnecessarily nested things, it may be necessary to do this twice.
Anyway — This slows things down.
So I gathered several different versions of cat.exe (64-bit, 32-bit, cygwin, non-cygwin, maybe even a 16-bit one) and did performance tests on them.
Big difference on some.
The one that worked fastest for me was this one:
Which as of this post is here, but may be replaced with a faster one if i find one:
github.com
A CONTEST:
Find a cat.exe that works even faster than the current winner I've selected here.
Easiest way to fix it? Pipe through cat.exe
Say you have this command, but the rendering glitches out 1 out of 5 times:
Code:
echo y | a.bat |:u8 a_python_script.py
rem (Try to use |:u8 pipe for anything with emoji)
rem (But not neessary when just echo'ing a 'y')
Simple fix: You just pipe it through the unix 'cat' command. Which for me was cygwin's cat.exe.
Code:
(echo y | a.bat |:u8 a_python_script.py) |:u8 cat.exe
rem the parens can be quite important
On super rare occasion with unnecessarily nested things, it may be necessary to do this twice.
Anyway — This slows things down.
So I gathered several different versions of cat.exe (64-bit, 32-bit, cygwin, non-cygwin, maybe even a 16-bit one) and did performance tests on them.
Big difference on some.
The one that worked fastest for me was this one:
Code:
cat (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
Which as of this post is here, but may be replaced with a faster one if i find one:
clairecjs_bat/BAT-and-UTIL-files-1/cat_fast.exe at main · ClaireCJS/clairecjs_bat
Claire's personal BAT files, often TCC.exe-specific - ClaireCJS/clairecjs_bat
A CONTEST:
Find a cat.exe that works even faster than the current winner I've selected here.
Last edited: