Hacker News new | ask | show | jobs
by ludicrousdispla 36 days ago
grep doesn't need tokens, so what is 98% fewer than zero?
2 comments

We might not be AI/agent enough for this product. I wondered about that as well, but it's not actually a grep problem, it's an ingest problem for agents. Apparently some agents use grep to navigate code and it's this "operation" that consume tokens, grep does in fact consume zero tokens.
You need readfile to do something with those tokens. Grep only gives you the matching lines, not the context.
`grep -C $NUM` ? ;)
Even so. Take a look at the NDCG numbers for grep. It's not pretty
ripgrep exists though
The comparison is with ripgrep, see the benchmarks.