Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ack to the future!
Search
Andy Lester
June 14, 2012
Programming
2
350
Ack to the future!
Why you should use ack, and what's coming in ack 2.0 and beyond.
Andy Lester
June 14, 2012
Tweet
Share
More Decks by Andy Lester
See All by Andy Lester
Resumes and Interviews from the Hiring Manager's Perspective
petdance
1
11k
29 ways to get started in open source
petdance
2
610
29 ways to get started in open source
petdance
2
150
Projects, Community and Github
petdance
1
450
Development lessons from the world of open source software
petdance
2
150
A Field Guide to the Perl Command Line
petdance
1
750
Resumes and Interviewing for tech jobs
petdance
2
260
Preventing Crisis: Project Estimation and Tracking That Works
petdance
2
210
Other Decks in Programming
See All in Programming
15年目のiOSアプリを1から作り直す技術
teakun
1
600
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
200
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
530
Unity6.3 AudioUpdate
cova8bitdots
0
110
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
310
Ruby x Terminal
a_matsuda
7
580
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
310
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
210
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.5k
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
140
Un-Boring Meetings
codingconduct
0
220
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Mind Mapping
helmedeiros
PRO
1
110
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Rails Girls Zürich Keynote
gr2m
96
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
The SEO identity crisis: Don't let AI make you average
varn
0
400
Statistics for Hackers
jakevdp
799
230k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Transcript
ack to the future Andy Lester & Rob Hoelz YAPC::NA
2012, June 14, Madison, WI Thursday, June 14, 12
Searching large trees of source code Thursday, June 14, 12
In the beginning... there was find+grep Thursday, June 14, 12
Search only Perl files Thursday, June 14, 12
So I created ack Thursday, June 14, 12
Recognizes filetypes • --perl matches *.pm, *.pl, *.t • and
scripts without extensions that begin with a #!...perl shebang line • Same with Python, PHP, Ruby, etc Thursday, June 14, 12
Ignores junk • .git, .svn, .hg, etc • coredumps •
binary files • blib, _build, nytprof • *~ backups Thursday, June 14, 12
Perl regexes • True Perl regexes, not PCRE. • Use
$1, $&, etc ‣ ack '#include\s*"(.+)"' --output='$1' Thursday, June 14, 12
Portable, Windows • Works back to Perl 5.8.8 • Only
one dependency, File::Next • Works on Windows when you have no other Unixy tools Thursday, June 14, 12
Easy install • Install as App::Ack from CPAN • -or-
• Install a package (might be "ack-grep" for your distro) • -or- • DL single file from betterthangrep.com Thursday, June 14, 12
Pretty output Thursday, June 14, 12
--passthru Thursday, June 14, 12
Optimized for laziness • Typing grep switches is slow •
DIY aliases + shell configs are not portable Thursday, June 14, 12
"It turns out that Defaults Matter. Who knew?" http://news.ycombinator.com/item?id=830731 Thursday,
June 14, 12
Popular! Useful! Many contributors! Thursday, June 14, 12
And now.... Thursday, June 14, 12
Thursday, June 14, 12
Less-surprising re: non-code searching Thursday, June 14, 12
Flexible file/dir selectors • Making types is easier! • --type-add=make:match:/^[mr]akefile/i
• --type-add=perl:firstlinematch:/perl/ • Making exclusions is easier! • --ignore-file=Makefile.PL • --ignore-dir=cache/ Thursday, June 14, 12
Per-project ackrc Thursday, June 14, 12
Going to alpha tonight! Thursday, June 14, 12
Paving the way for 2.x Thursday, June 14, 12
Ack becomes a search framework Thursday, June 14, 12
Plugins! Thursday, June 14, 12
What could we do with ack plugins? Thursday, June 14,
12
Searching in tarballs Thursday, June 14, 12
Search a git repo as of a given commit Thursday,
June 14, 12
Select only unstaged files to search Thursday, June 14, 12
Search for text in a PDF, or Word doc, or...
Thursday, June 14, 12
Only select files newer than 10 days ago. Thursday, June
14, 12
(Snazzy plugins not included!) Thursday, June 14, 12
Join us for the future! • http://betterthangrep.com/ • ack-users on
Google Groups Thursday, June 14, 12