4 ms·
Congrats on releasing this! I could compile & run this on my machine, works just fine. I'm a but confused about the use case. Bat opens a larger file in less or
by roetlich 4y ago
Congrats on releasing this! I could compile & run this on my machine, works just fine. I'm a but confused about the use case. Bat opens a larger file in less or something, so I can jump through there and search for stuff. Clp doesn't do that, it just prints the files content with syntax highlighting. But sure, I can just type this:
clp sqlite3.c | less -r
But when I do this, at least on my machine, bat feels a lot faster! The file reader opens up way faster. I guess what you're measured is something like:
time bat --color=always sqlite3.c > /dev/null
time clp sqlite3.c > /dev/null
With these commands, clp is actually 15 times faster, so I get the same measurement as you. But what is the use case for this? Are you piping the output of bat into something? In the beginning you explained your use case, but I didn't really get it.
Anyways, cool project! Should totally have a click bait title like "rewriting rust apps in lua makes them 15x faster."
- jpe90 4y agoThank you for the kind words! The use case for me is for a fzf preview window- you can see it in the last image in the blog post with the shell script used just above it. If I use bat as my fzf previewer and move to a big file it’ll hang. If you use bat standalone at the command line with it’ll open its built in pager instantly like you observed, but that doesn’t help with fzf. Also if you try to search or scroll to the bottom of the pager you’ll have a bad time. https://github.com/junegunn/fzf#preview-window https://github.com/junegunn/fzf#preview-window My hat’s off to you on that title, that is masterful clickbait