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
330
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
550
29 ways to get started in open source
petdance
2
140
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
730
Resumes and Interviewing for tech jobs
petdance
2
240
Preventing Crisis: Project Estimation and Tracking That Works
petdance
2
200
Other Decks in Programming
See All in Programming
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
480
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.1k
CSC509 Lecture 03
javiergs
PRO
0
330
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.3k
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
160
Advance Your Career with Open Source
ivargrimstad
0
390
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
240
Signals & Resource API in Angular: 3 Effective Rules for Your Architecture @BASTA 2025 in Mainz
manfredsteyer
PRO
0
110
止められない医療アプリ、そっと Swift 6 へ
medley
1
130
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
460
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
430
CSC509 Lecture 02
javiergs
PRO
0
410
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
A better future with KSS
kneath
239
17k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Building Adaptive Systems
keathley
43
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Building an army of robots
kneath
306
46k
Making Projects Easy
brettharned
119
6.4k
What's in a price? How to price your products and services
michaelherold
246
12k
A Modern Web Designer's Workflow
chriscoyier
697
190k
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