Live data from Hacker News

Show HN: Gat – cat alternative written in Go

github.com

11–20 of 46 posts

Re: Show HN: Gat – cat alternative written in Go

#13

Great to have alternatives, but wish there was a “Why” section in readme

Right, does it do things faster? Or somehow more efficiently?

It seems that this is probably slower and consumes far more resources than cat. It also does pretty printing and syntax highlighting. From a Unix standpoint, I would say this is not a cat replacement but a pretty replacement.

Re: Show HN: Gat – cat alternative written in Go

#16
post #15

I would be curious to see how it compares to similar tools: https://github.com/sharkdp/bat/blob/master/doc/alternatives....

Nitpick about bat: it bothers me that they call it a drop in cat replacement. It is not.

But it's a very useful tool that I use often.

I'm not familiar with ccat but at a quick glance it does not appear to be a drop in cat replacement either.

Re: Show HN: Gat – cat alternative written in Go

#18

Great to have alternatives, but wish there was a “Why” section in readme

Right, does it do things faster? Or somehow more efficiently? It seems that this is probably slower and consumes far more resources than cat. It also does pretty printing and syntax highlighting. From a Unix standpoint, I would say this is not a cat replacement but a pretty replacement.

I just tried both gat and bat to see if they could really replace cat (spoiler: they cannot — unlike cat they soak up all input before outputting anything, and crash with out of memory very quickly).

A cat alternative would have to handle this correctly:

  $ /dev/null
or it's not really a cat alternative. (Yes, variations on this theme are very useful in scripts and daily shell hacking).

Re: Show HN: Gat – cat alternative written in Go

#19
post #5

If I read the command `gat myfile` I would definitely assume you were trying to delete it with prejudice. I would be surprised to see it print to my terminal. Edit: why downvotes? You can’t use words as commands that invoke a completely different set of connotations than the commands execution does

Given that a `gat` has both an input-side and an output-side, I think it resembles `cat` reasonably well. I'd expect some kind of buffering difference so that the output is "faster" than the input in some way.
Post reply on HN