Thursday, November 3, 2011

some command line shortcuts

dig for missed dependencies

egrep -r '^\s*(use|with|extends)\s+' * \
| awk '{print $2}' | awk '{sub(/\;/, ""); print}' \
| sort -u

jumpstart a "00-load.t"

egrep -r '^\s*package ' * \
| awk '{ print $2}' \
| awk '{sub(/\;/, ""); print "use_ok(\""$1"\")"}' \
| sort -u

quick syntax checks

for i in `find ./  | egrep '\.(pm|pl|cgi|t)$'`; do perl -wc $i; done

Monday, October 24, 2011

bad tests

bad tests are worse than no tests, and it's better to have no tests than to have tests designed to pass

there it is, I've said it publicly

Friday, July 15, 2011

fuck iso-8859-16

... and the ignorant bastards that cannot distinguish between an aesthetic choice when designing font faces and character encoding.

iso-8859-16 is not for Romanian, and the traditional and correct way to write in Romanian is with s+cedilla, t+cedilla ... which means iso-8859-2. Want ş with a tiny comma below the "s" ? Fucking design a new font face and give the rest of us a break. Rumanians wrote with s+cedilla for 150 years and did not lose sleep over it, but now we have to deal with two fucking character sets that don't translate and which look so much alike on screen that you need fucking glasses to distinguish between them.

Yes, you know who you are.

Tuesday, July 12, 2011

Net::SSH::Perl install

Very nice module but a bit of a pain to install: the pain will be caused by Math::Pari wich fails automatic installation with cpan(m).

To fix it get the Math::Pari archive from CPAN, then and extract pari-2.1.7.tgz in the same folder where the Math-Pari-2.* folder is, then perl Makefile.PL Configure, make, make install. pari-2.5.0 won't work.

Tuesday, March 15, 2011

getting started with Perl and BASH

... was asked for pointers in a private mail; here is my quick and dirty answer:

I am no shell expert (have read and modified lots of scripts, but have not written any advanced stuff from scratch); for BASH I recommend;

for Perl: the documentation packaged as man pages is very good (do a "man perl" to get the index), and in book form almost anything from O'Reilly is good (they are the unofficial sponsors of Perl ;) ) , this one is a must , this one is a good place to start , and as soon as you're done with "Learning Perl" .

Anything signed by Randal Schwartz, Damian Conway, chromatic, Larry Wall, Tom Christiansen (and others, but those are the names I remember now) is worth reading, whether in print or on the web.

you can find books online here , and some other links here

If you're on windows get Active Perl or Strawberry Perl , both are very good. Indigo Perl used to be in vogue years ago, might not be a bad choice ... a long time ago I used to use Indigo Perl when exiled in M.S. land, so I am a bit partial to them :), but Strawberry Perl appears to be the "official" Windows port of Perl.

If you know Unix/Linux reasonably well, you could try : you get a lot of unix tools running on windows including perl, or install Linux in a virtual machine (I recommend VirtualBox, but Parallels and VMWare make good tools, too).