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
320
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
470
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
650
Resumes and Interviewing for tech jobs
petdance
2
220
Preventing Crisis: Project Estimation and Tracking That Works
petdance
2
180
Other Decks in Programming
See All in Programming
Milestoner
bkuhlmann
1
410
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.1k
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
920
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
150
dbtのドメイン分割による データ基盤の改善とDigdagとの連携
sakama
0
350
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
GitHub Copilotのススメ
marcy731
1
200
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
430
What We Can Learn From OSS
inouehi
0
420
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
710
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
Featured
See All Featured
Building an army of robots
kneath
300
41k
It's Worth the Effort
3n
180
27k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Debugging Ruby Performance
tmm1
70
11k
Practical Orchestrator
shlominoach
182
9.7k
The Language of Interfaces
destraynor
151
23k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Unsuck your backbone
ammeep
663
57k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
Fireside Chat
paigeccino
21
2.6k
In The Pink: A Labor of Love
frogandcode
138
21k
Become a Pro
speakerdeck
PRO
11
4.5k
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