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
490
29 ways to get started in open source
petdance
2
140
Projects, Community and Github
petdance
1
440
Development lessons from the world of open source software
petdance
2
140
A Field Guide to the Perl Command Line
petdance
1
680
Resumes and Interviewing for tech jobs
petdance
2
230
Preventing Crisis: Project Estimation and Tracking That Works
petdance
2
190
Other Decks in Programming
See All in Programming
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
130
私のEbitengineの第一歩
qt_luigi
0
440
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
160
今インフラ技術をイチから学び直すなら
yuhta28
1
130
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
290
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
160
Amebaチョイス立ち上げの裏側 ~依存システムとの闘い~
daichi_igarashi
0
230
Our Websites Need a Lifestyle Change, Not a Diet
ryantownsend
0
140
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
670
Go Code Generation at newmo / 2024-08-27 #newmo_layerx_go
genkey6
0
560
月間4.5億回再生を超える大規模サービス TVer iOSアプリのリアーキテクチャ戦略 - iOSDC2024
techtver
PRO
1
800
Featured
See All Featured
The Mythical Team-Month
searls
218
43k
The Language of Interfaces
destraynor
153
23k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
Infographics Made Easy
chrislema
239
18k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
36
2k
Rails Girls Zürich Keynote
gr2m
93
13k
Code Reviewing Like a Champion
maltzj
518
39k
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