Reading, Writing, 'Rithmetic by Michael Swaine:
[...] In that same September issue [of Summer Reading], Gregory Wilson reviewed the book Code Reading. I had a personal reaction to the book [...].
That sounds painful. A doctor should be consulted immediately!
I've uploaded 5 dists to PAUSE for CPAN in the past few hours. (Note that the links below won't work accurately for a little while yet --- have to wait for search.cpan.org to sync.)
Share and enjoy!
(In case you are wondering, my initial version numbers for things are indeed semi-random, typically being based on the day of the month when I started writing the module; additionally, I skip versions ending in noughts due to a bug in my build process that I've been too [wrong] lazy to fix, thus the previous Yahoo module was 1.89, not 1.90)
I wanted to find a particular FAQ entry, so I thought: why not have full text searching?
So I added it. And optional case sensitivity.
It's very nice, even if I do say so myself.
Actually, the subject is a lie.
Google, for some reason, isn't indexing faq.perl.org.
On IRC, I tend to point people to the FAQ a fair bit. The problem is that `perldoc -q flub` will given them the answer that's in their version of the FAQ.
I'm used to a newer version of the FAQ.
So I could point them to faq.perl.org. But that's a pain as it has no search.
So: I wrote my own. Code is there too, if anyone is that interested =)
As with so many of my little projects, there is a grand plan: I'd like the FAQ to be easier for people to contribute to. So, later, editing.
Also need to write something to quickly generate appropriate URLs while in irc. Or something.
I've had a fun few hours. I was getting bored playing the default Dune Emperor maps so decided to get some more from dune2k.com. However, they're big files and I'm on a slow connection. So I wrote some Perl to sort out their nonsensical URLs, parse their web pages and download the map files. I even use a progress bar in LWP (courtesy Spidering Hacks).
While waiting for an initial few maps to download I decided to write up my programs, explaining what they do and, well, really I'm just showing them off because I like them.
So, first we have the program to parse the pages and work out what to download, and then we have the program to do the download with the cool progress bar.
Please read and enjoy =) I'm off to enjoy some Harkonnen death.
With perl 5.8 having libnet as standard and the generally appalling state of firewalls and default configurations, it can be irritating when CPAN spends 5 minutes trying Net::FTP when if it had tried, say, wget it would have been over quickly.
'dontload_hash' => { 'Net::FTP' => 1 },
in your CPAN/Config.pm (or wherever you keep your config)
The docs don't elaborate on it much so I guess I'll have to submit a patch to the firewall section.
dontload_hash anonymous hash: modules in the keys will not be
loaded by the CPAN::has_inst() routine
foreach @{$arrayref}
keys %{$hashref}
length ${$scalarref}
note the pattern, so you don't have trouble with hashrefs later
(noted here for my future reference when I write about refs)
I'm disappointed in the vi/vim part of "Regular Expression Pocket Reference" (new from ORA). It's not very thorough. It does, at least, mention vim and list some of its more common bits of syntax, but it doesn't go far enough. It doesn't provide a full summary of the vim's regex options. Which is a shame because, out of the flavours covered by the book, it's the most different. The others are all more or less the same with minor quirks.
A vim reference should at least try to cover it all.
That said, vim has excellent builtin help (
On the other hand, the perl section didn't seem too bad (note that I'm the guy who contributed perlreref to 5.8.1). Points of interest: gives a nice reference to the Unicode properties (I think Perl's docs is missing a nice comprehensive list, expecting you to look elsewhere); it notes the different return values of the operators/functions in scalar vs list contexts; isn't aware of the changes in Perl to make $`, $&, and $' faster (though the outer two are only faster in a blead compiled with copy-on-write (as far as I can see); the composite unicode properties to character class equivalent mapping is somewhat more enthusiastic; the references don't mention a lot of the perl docs that I do; doesn't mention the \p{IsSpacePerl}. Other than that, quite good =)
Also, it doesn't cover Ruby regex, which have some
amusing quirks of their own (in particular, the meanings
applied to
Meanwhile, I've been collecting links and such for various regex related bits and have put a wiki page up on the topic in my kwiki.
My Perl svn repository is available via
http://dellah.org/svn/perl/
As it's svn, it's also a happily valid web page. I'm currently in the process of transferring my CVS repository to svn, with all the perl bits ending up at that URL. Feel free to check stuff out (it's not just my modules), and Patches are Welcome. There isn't free commit access though.