<commit_before># The Silver Searcher #

My attempt to make something better than ack, which itself is better than grep. Right now it's nowhere close.

1. Make it compile.
2. Make it run.
3. Make it behave correctly.
4. Make it fast.

It's somewhere between 2 and 3 right now. Although it's much faster than ack in my benchmarks.

    ack -i SOLR ~/cloudkick/reach  2.89s user 0.77s system 97% cpu 3.765 total

    ag -i SOLR ~/cloudkick/reach  0.37s user 0.15s system 88% cpu 0.590 total

You can use this with [my fork](https://github.com/ggreer/AckMate) of the popular ackmate plugin, which lets you use both ack and ag for searching in textmate. You can also just move or delete `"~/Library/Application Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack"` and run `ln -s /usr/local/bin/ag "~/Library/Application Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack"`


## TODO ##
* print out matches in ackmate-compatible format (this is still buggy)
* parse more ack options correctly (context and --ackmate aren't obeyed right now)
* colorize output. paths should be green, lines white except for matches which are black with yellow background
<commit_msg>More better readme<commit_after># The Silver Searcher #

My attempt to make something better than ack, which itself is better than grep. Right now it's nowhere close.

## Why use ag? ##

* The binary name 33% shorter than ack!
* It searches through code about 3x-5x faster.
* It's written in C instead of perl.
* It ignores files matched by patterns in your .gitignore and .hgignore.
* If there are files in your source repo that you don't want to search, just add their patterns to a .agignore file. \*cough\* extern \*cough\*


## Current development status ##
1. Make it compile.
2. Make it run.
3. Make it behave correctly.
4. Make it fast.

It's somewhere between 2 and 3 right now. Although it's much faster than ack in my benchmarks.

    ack -i SOLR ~/cloudkick/reach  2.89s user 0.77s system 97% cpu 3.765 total

    ag -i SOLR ~/cloudkick/reach  0.37s user 0.15s system 88% cpu 0.590 total

You can use this with [my fork](https://github.com/ggreer/AckMate) of the popular ackmate plugin, which lets you use both ack and ag for searching in textmate. You can also just move or delete `"~/Library/Application Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack"` and run `ln -s /usr/local/bin/ag "~/Library/Application Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack"`


## TODO ##
* print out matches in ackmate-compatible format (this is still buggy)
* parse more ack options correctly (context and --ackmate aren't obeyed right now)
* colorize output. paths should be green, lines white except for matches which are black with yellow background

{'fraction_non_alphanumeric': 0.08303635067712045, 'fraction_numerical': 0.022808267997148968, 'mean_word_length': 3.8902439024390243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3326362', 'n_tokens_mistral': 912, 'n_tokens_neox': 826, 'n_words': 387}