Wednesday January 31, 2007
February Chicago.PM: It's a dynamic language hootenanny
Chris McAvoy will be rounding up the big four dynamic languages in a rootin'-tootin' look at what's what in the world of Perl, PHP, Python and Ruby. Is PHP just for script-slinging marketdroids? Do Python's whitespace rules really suck as much as you'd think? Is Ruby more than Rails? What can we learn from them for Perl?
Chris promises to make this a no-BS, no-bashing, honest look at the strengths and weaknesses of each of these languages. Come with an open mind and we'll explore the limitless frontiers of awesome programming.
Chris will be presenting both in the city and the suburbs this month:
Come on out and learn some new tricks!
Wednesday December 06, 2006
I'm so proud
Tuesday December 05, 2006
Socialtext hackathon 12/6/2006
Wednesday, December 6th is Wiki Hackathon day, at the home office of my employer, Socialtext.
Join us from remote or in our offices in Palo Alto to hack your Wiki project to your heart's content. We'll showcase all projects on this site and elsewhere, provide beer and pizza, and might even have some nifty giveaways for the day's coolest hacks. Virtual participants can join us in IRC channel #socialtext on irc.freenode.net. Visit the wikithon workspace at http://www.socialtext.net/wikithon.
Wednesday November 29, 2006
Top 10 reasons to use ack
Yesterday I posted about a snazzy trick with ack
, but people pinged me asking what ack is and why they should use it.
ack is the replacement I wrote for grep, aimed at large trees of heterogeneous code.
Using it will change your life, but why? Here's my top 10 list:
- Searches recursively through directories by default, while ignoring .svn, CVS and other VCS directories.
- Which would you rather type?
$ grep pattern $(find . | grep -v .svn)
$ ack pattern
- ack ignores most of the crap you don't want to search
- VCS directories
- blib, the Perl build directory
- backup files like foo~
- binary files
- Lets you specify file types to search, as in --perl or --nohtml.
- Which would you rather type?
$ grep pattern $(find . -name '*.pl' -or -name '*.pm' -or -name '*.pod' | grep -v .svn)
$ ack --perl pattern
Note that ack's --perl also checks the shebang lines of
files without suffixes, which the find command will not.
- File-filtering capabilities usable without searching with ack -f. Want a list of all Perl files in a tree? Use ack -f --perl.
- Color highlighting of search results.
- Uses real Perl regular expressions, not a GNU subset.
- Allows you to specify output using Perl's special variables
- Example: ack '(Mr|Mr?s). (Smith|Jones)' --output='$&'
- Many command-line switches are the same as in GNU grep:
-w does word-only searching
-c shows counts per file of matches
-l gives the filename instead of matching lines
- ack is pure Perl, so consistent across all platforms.
- Command name is 25% shorter. :-) Heck, it's 50% shorter compared to grep -r.
To install it, install the Perl module App::Ack. Your coding life will never be the same.
Visit the home page at http://petdance.com/ack
Today's handy ack trick
andy@mel[~/src/st/trunk]$ ack -w 'XXX|REVIEW|FIXME' -o | sort | uniq -c
What, you don't know what ack is? Get to http://petdance.com/ack and install it now. Even better, just do this:
Tuesday November 21, 2006
New Text::Balanced removes $&
Over in the land of Socialtext Open, we found that we were having big slowdowns because of $&
somewhere in the code base. Turns out it was in Text::Balanced. I fired off mail to Damian and within half an hour he'd put out a new version that didn't use the evil variable.
If you don't know why $& is bad, see the docs for Devel::SawAmpersand. http://search.cpan.org/dist/Devel-SawAmpersand/
Sunday November 19, 2006
Friday October 20, 2006
Krugle at the Chicago Hackathon
The Chicago Hackathon (http://hackathon.info
) is excited to have Krugle part of the proceedings. Krugle (http://krugle.com
) is a search engine for source code, projects, and technical information across the web, and they want your feedback. The Krugle team wants to hear from Perl programmers about how Krugle can be more useful to the Perl community.
On Saturday, Krugle will be hosting a demo of Krugle, as well as feeding us pizza. They're looking for content advisors, feature feedback, and other interesting ideas. If you're interested, plan on stopping in the main meeting room. If you're not, just come by, grab some pizza, and head back to hacking.
Ken Krugler, the founder, will be hosting the demo and conversation. He first cut his coding teeth in the Lisa/Mac vortex, and then spent 15 years solving I18N problems. For the past 18 months he's been obsessing about exploratory vertical search for code. In his spare time, he fiddles with cellular automata.
Monday September 18, 2006
WWW::Mechanize tries to support REST
I've had to do some REST work and I was shocked to see that LWP::UserAgent doesn't have a put() method for doing PUT calls.
Until Gisle puts it in there for us, I've added one to WWW::Mechanize 1.21_01, which I just put up on CPAN.
HTML::Tidy overhaul work is commencing
Jonathan Rockway, Robert Bachmann and I are starting work in earnest on making HTML::Tidy better, mostly setting up access to much of the tidy API.
http://code.google.com/p/html-tidy/ is the project home page. We have a mailing list set up there, and the Subversion repository is hosted at Google as well.