Live data from Hacker News

Show HN: Grep with colours written in Go

github.com

11–20 of 90 posts

Re: Show HN: Grep with colours written in Go

#14

Do be sure to at least consider supporting no colour! http://no-color.org

Genuinely curious, why do some developers prefer not having colors for ls, grep, etc.? no-color.org mentions that many users prefer having colors disabled, but didn't list any reasons why.

Re: Show HN: Grep with colours written in Go

#15
post #4

Is this speed competitive with tools like the silver searcher (`ag`) or is the focus here on color?

I’m doubtful ag and rg use a lot of smart optimizations to get their speed.

Ummm...your kidding right?

I know ripgrep has a ton of fantastic optimizations by Burntsushi.

You might wanna check it out...before making such statements.

Re: Show HN: Grep with colours written in Go

#16
post #4

Is this speed competitive with tools like the silver searcher (`ag`) or is the focus here on color?

I'm okay with it being not as fast because speed is not the goal here, but rather highlighting specific patterns to make it easier to spot for the human eyes, especially when tailing log lines from your development webserver.

Re: Show HN: Grep with colours written in Go

#17

Do be sure to at least consider supporting no colour! http://no-color.org

Genuinely curious, why do some developers prefer not having colors for ls, grep, etc.? no-color.org mentions that many users prefer having colors disabled, but didn't list any reasons why.

I don't find that they add anything. I feel like they make it harder for me to do a coherent read of the screen, to suck in all the text & process it. I have my own mental algorithms to pick out relevant things, and having a bunch of glaringly contrasting blocks of color glaring out of the terminal at me just makes it harder to slurp in the screen. I don't want that segmentation. It's awful.

And the color themes for the terminal are godawful. No matter how you spin 16 colors, how solarized or other, everyone is kind of chained more or less to that attrocious 16 color pallet, which is always going to be way way higher contrast or low-fi than something like a vim theme that can pick some complementary colors to work with.

Colors feel like my terminal punching me in the face. No thanks.

Also have you ever logged into ubuntu? Holy shit colors were a TERRIBLE idea.

Re: Show HN: Grep with colours written in Go

#18

Earlier quoted context omitted.

I’m doubtful ag and rg use a lot of smart optimizations to get their speed.

Ummm...your kidding right? I know ripgrep has a ton of fantastic optimizations by Burntsushi. You might wanna check it out...before making such statements.

I could be wrong, but I read valarauca1's comment as "I’m doubtful. ag and rg use a lot of smart optimizations to get their speed."

Re: Show HN: Grep with colours written in Go

#19

Do be sure to at least consider supporting no colour! http://no-color.org

Genuinely curious, why do some developers prefer not having colors for ls, grep, etc.? no-color.org mentions that many users prefer having colors disabled, but didn't list any reasons why.

My guess is the ansi color escape codes mess with peoples parsing code of the output when scripting.

Re: Show HN: Grep with colours written in Go

#20
post #6

Useless use of cat candidate.

This is one of my pet peeves - complaining about technically unnecessary, but fully benign uses of cat.

Yes, 'cat FILENAME | blush "some text"' and 'blush "some text" So, yes, its unnecessary. And, yes, in a script using cat like that can complicate error handling. But, for interactive use, what advice exactly are you trying to convey?

Post reply on HN