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
640
Resumes and Interviewing for tech jobs
petdance
2
210
Preventing Crisis: Project Estimation and Tracking That Works
petdance
2
180
Other Decks in Programming
See All in Programming
document.write再考
brn
5
2.5k
複雑なドメインを扱うプロダクトの探索フェーズではいつどのようにテストをするのか / How to testing during exploratory phase
boykush
2
150
「コンパイル時のユニットテスト」導入するとユニットテストを 書かなくてよくなるのか?
tomohisa
9
2.2k
Some Quick Ideas To Improve Your Tests ( #jassttokyo )
teyamagu
PRO
2
2.3k
WasmOS: Wasmを実行する自作Microkernel
riru
0
370
【KMC春合宿2024】実装視点で見るNeural Radiance Fields
runningoutrate
0
150
品質とスピードを両立: TypeScriptの柔軟な型システムをバックエンドで活用する
kosui
5
1.2k
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
Compiling Python to WebAssembly with py2wasm
syrusakbary
0
140
Deep Dive 大規模システムアーキテクチャ/開発組織エンジニアリング / Deep Dive Large-Scale System Architecture, Development Organization Engineering
nrslib
15
2.9k
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
25
15k
Open Source Swiftc Workshop
kitasuke
1
290
Featured
See All Featured
Statistics for Hackers
jakevdp
789
220k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
153
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
1.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
219
21k
Why You Should Never Use an ORM
jnunemaker
PRO
50
8.6k
[RailsConf 2023] Rails as a piece of cake
palkan
21
3.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
113
18k
Gamification - CAS2011
davidbonilla
76
4.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
350
18k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
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