Hacker News new | ask | show | jobs
by laumars 4041 days ago
1. thats a moot point because it doesn't explain why other people might want to use it.

2. $ alias grep="grep --color"

3. it would be even easier to extend grep via pipes. Plus pipes are langauge agnostic where as extending this tool requires knowledge of Python

As a personal project, this is fine. But I really don't see the point in anyone else using it when it's slower than existing tools, no more user friendly, requires more dependancies, and isn't part of the default install like grep and find (Windows CLI) are. Plus this tool doesn't even support all instances where a TODO might appear (https://github.com/pgilad/leasot#comment-format) nor all programming languages (https://github.com/pgilad/leasot#supported-languages) like grep and find do.

1 comments

Leasot is written in Node.js. Regarding pretty output - that could definitely be argued, but Leasot also allows for different reporters, say you want the output in JSON/XML for an external tool. That is extendable, whereas grep over regex in CLI is fast & powerful but not as flexible
> Leasot is written in Node.js.

Ah yes, my mistake. Though being written in Javascript makes it even worse for requiring dependencies as at least Python ships with most distros default install.

> Regarding pretty output - that could definitely be argued, but Leasot also allows for different reporters, say you want the output in JSON/XML for an external tool. That is extendable, whereas grep over regex in CLI is fast & powerful but not as flexible

I'd already addressed that point. UNIX pipes allow you to extend grep using any language (including Javascript / node.js) you want. Leasot if only extendible if you already know Javascript and node.js. Plus there are plenty of CLI tools available that can read list input from STDIN and spit out JSON or XML - so you don't even need to learn how to program to convert data files.

I've lost count of the number of times I've seen people write multi-functional programs to solve problems that would have been quicker (both in development time, and execution) to pipe a couple of existing programs together. Heck, I've even fallen into this trap myself before.