brian_d_foy's Journal http://use.perl.org/~brian_d_foy/journal/ brian_d_foy's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T01:59:53+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 brian_d_foy's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~brian_d_foy/journal/ I'm twittering my Perl stuff at http://twitter.com/briandfoy http://use.perl.org/~brian_d_foy/journal/40068?from=rss <p>I'll tweet at (http://twitter.com/briandfoy_perl) when I have something to say in 140 characters. I'll almost always use "Perl" when I post.</p> brian_d_foy 2010-01-02T13:06:32+00:00 journal Effective Perl Programming master class at Frozen Perl http://use.perl.org/~brian_d_foy/journal/40065?from=rss At <a href="http://www.frozen-perl.org/mpw2010/briandfoy.html">Frozen Perl 2010</a> in Minneapolis, I'm teaching a new master class based on my latest book, <a href="http://www.amazon.com/Effective-Perl-Programming-Software-Development/dp/0321496949">Effective Perl Programming, 2nd Edition</a>. Perl has changed quite a bit since Joseph Hall wrote the first edition over 10 years ago. Josh McAdams and I have added a lot of new information as well as updated the existing material. In the one-day class for intermediate Perl programmers, I'll cover selected topics from the book, including: <ul> <li>Working with Unicode in Perl</li> <li>Tricks with filehandles</li> <li>New regex features in Perl 5.10 and later</li> <li>Playing with pack()</li> <li>Using closures to make things simpler</li> <li>and other topics as time allows</li> </ul><p> Although the book hasn't been published yet, it is available for pre-order, and attendees to the class can get a sneak peek at the working manuscript as well as a soft copy of the course slides.</p> brian_d_foy 2010-01-01T13:32:50+00:00 journal What's your coolest Perl one-liner? http://use.perl.org/~brian_d_foy/journal/40028?from=rss <p>Josh and I are finishing up <a href="http://www.amazon.com/Effective-Perl-Programming-Software-Development/dp/0321496949/">Effective Perl Programming, 2nd Edition</a>, and the last part to finish off is the item on Perl one-liners.</p><p>Besides going through writing a one liner, we want to list a bunch of them too. Want to get your name in the book? Give us some one-liners that you wrote yourself and a couple of sentences about what it does. Make sure you tell us how you'd like your name to appear in the book, too.<nobr> <wbr></nobr>:)</p> brian_d_foy 2009-12-17T06:19:18+00:00 journal I'm in Dublin on Sunday http://use.perl.org/~brian_d_foy/journal/39789?from=rss <p>I kept meaning to post this, and I can't believe it's already this late in October.</p><p>Jonas Nielsen and I are going to be in Dublin, Ireland on Sunday because we're both running the marathon on Monday. If any local Perl Mongers want to get together for a drink on Sunday early evening, let me know. I'm staying about a mile from the marathon start and otherwise have no idea of the geography.</p><p>It might be my only time to see Jonas. Once he leaves the start line, I won't see him for hours.<nobr> <wbr></nobr>:)</p> brian_d_foy 2009-10-22T20:13:37+00:00 journal I'm a Perl::Critic committer. http://use.perl.org/~brian_d_foy/journal/39787?from=rss <p>Elliot forced me to accept a commit bit to the Perl Critic repo.</p><p>My first policy will be *::YouArentAllowedToProgramAnymore, which deletes your source if it finds that you fail any policy, you have any use of 'no critic', you run Perl::Critic more than once on the same file, or if it's Friday afternoon. If you have your stuff in source control, you should be safe. That's the fence you have to jump over to get back in, though.</p><p>Elliot already shot down my policy suggestions for *::NotEnoughVowels, *::PassiveVoiceInString, *::MisconjugatedVerb, *::StupidVariableName, *::UsesWindows, *:;DependsOnModules, *::YouEditedThisInEmacs, *::Magic8Ball, *::YourNameIsPudge, *::YourModuleWebsiteIsUgly, and *::YourPerlIsSoLastMonth.</p> brian_d_foy 2009-10-22T14:07:02+00:00 journal I need some Unicode examples for Effective Perl Programming http://use.perl.org/~brian_d_foy/journal/39675?from=rss <p>Josh McAdams and I are updating Effective Perl Programming, and I'm working on a bunch of items dealing with Unicode.</p><p>I need some really nice non-english and especially non-romance language examples for some of the features we want to discuss. I'd love to be able to include sample strings in Chinese, Japanese, Russian, Portugeuse, Arabic, and all sorts of other languages I have no clue about. Most of what I need are the sample phrases. If you don't have something interesting, maybe you can translate "Perl mongers" for me in an example like:</p><blockquote><div><p> <tt>use utf8;<br>my $phrase = '...'; # fill in your phrase<br> &nbsp; <br>if( $phrase =~ m/\N{Some charname}/ ) {<br>&nbsp; &nbsp; &nbsp;say 'I matched a<nobr> <wbr></nobr>...';<br>&nbsp; &nbsp; &nbsp;}</tt></p></div> </blockquote><p>I also want to add a couple of examples of other encodings, especially non-Western ones. I have no idea about those encodings, but I don't need anything fancy.</p><p>I'm sure that everything is going to get messed up and translated incorrectly, so I'll be sure to let you see the proofs of your example to ensure the typesetters get it right in the end.<nobr> <wbr></nobr>:)</p> brian_d_foy 2009-09-25T07:25:05+00:00 journal $9.99 Learning Perl and Mastering Perl e-books from O'Reilly http://use.perl.org/~brian_d_foy/journal/39524?from=rss <p>O'Reilly dropped the regular price of e-books for <a href="http://oreilly.com/catalog/9780596520106/">Learning Perl</a> and <a href="http://oreilly.com/catalog/9780596527242/">Mastering Perl</a> to $9.99. I volunteered to be the guinea pig for pricing experiments. I specifically want to see if this makes it easier to get these books when access to the hard-copies is prohibitively expensive. You can get these books in Mobi, PDF, or ePub directly from O'Reilly. I'd like to do more of these sorts of experiments to get the books into as many hands as possible.</p><p>The $9.99 price is the regular price, so all existing discount and coupon codes apply. For instance, you can still use the 35% user group discount to get either book for $6.50.</p><p>These are the updated versions of the books too. All reported errata should be corrected, so they are slightly fresher than the hard copies.</p><p>Remember, the great thing about PDFs is that they don't take up any shelf space. Buy as many as you like!</p> brian_d_foy 2009-08-24T20:00:18+00:00 journal backticks make my Windows testing service hang on ack http://use.perl.org/~brian_d_foy/journal/38804?from=rss <p>I've run into an interesting situation in testing CPAN modules on Windows using <a href="http://www.jetbrains.com/teamcity/index.html">TeamCity</a>. Testing from the command line, either cygwin or command, works fine, but when the automated tester has a go, it fails. I traced this back to modules that use system() or backticks. The ack distribution has been the one to demonstrate the problem first. I wonder if anyone else has seen a similar problem.</p><p>I've been working on a custom internal CPAN for a big company, and their CPAN is actually in subversion. When the subversion repo changes, lots of tests kick off, including tests for individual modules as well as integration tests. These tests run on both unix and Windows using the TeamCity build agents. Some of the Windows tests just hang forever, although they run fine on my workstation.</p><p>It appears that the Windows build agents are run as a Windows service, so it's not connected to something that can handle system calls. I don't understand the Windows set-up and architecture enough to say more than that. Once the build agent hits a line of code that wants to shell out somehow, it hangs forever. It only does this in the build agent.</p><p>I was working with ack, which has a t/Util.pm for things that most of the tests use. There is a run_ack_with_stderr() subroutine which uses backticks, and that's where the code hangs. Once it runs t/ack-1.t, everything stops.</p><p>Paul's IPC::System::Simple::capture() works as a backticks replacement and has already solved many problems we've had with Windows. However, my first try in replacing backticks made all sorts of other tests fail even though it could run the commands now. Nothing hung, but there was something I wasn't capturing correctly or putting in the right place, I figure. I eventually had to cut bait since I'm not getting paid to work on third-party modules.</p><p>I'm curious how this works for the Windows CPAN testers. Are you just running the testing script from a command or terminal window? Do you ignore distros that just hang? I didn't see any sort of ack failure that showed the same symptoms.</p><p>And, is there some sort of medal or award that Paul can get for IPC::System::Simple? I wasn't keen on depending on it at first, but now that I've experienced a bit of grief trying to make Windows be unix, I really appreciate IPC::System::Simple taking care of all of that.</p> brian_d_foy 2009-04-13T21:54:29+00:00 journal Get 15% off OSCON http://use.perl.org/~brian_d_foy/journal/38757?from=rss <p><a href="https://en.oreilly.com/oscon2009/public/register">Register for OSCON</a> with the discount code os09pgm and get 15% off, courtesy of the Perl track committee.</p> brian_d_foy 2009-04-04T23:57:35+00:00 journal I'm going to Moscow for YAPC::Russia http://use.perl.org/~brian_d_foy/journal/38750?from=rss <p>I get to go to <a href="http://2009.yapcrussia.org/mayperl2/">YAPC::Russia</a> because United Airlines has ridiculously cheap airfares to Moscow to celebrate their new direct service from Washington, DC. Even better than that, the frequent flier deals get me to Moscow for the price of a domestic ticket.. The conference is May 16-17, but I'll be there the week before too.</p><p>I just got my <i>Lonely Planet Moscow City Guide</i>, so now I have to start planning my trip.</p> brian_d_foy 2009-04-04T02:03:48+00:00 journal 2008 jobs.perl.org report http://use.perl.org/~brian_d_foy/journal/38615?from=rss <p>Here are the numbers for the number of job advertisements posted to <a href="http://jobs.perl.org/">jobs.perl.org</a> in 2008, by month.</p><p>I'm not affiliated with jobs.perl.org, and this is only the simplest of analyses. I didn't try to correct for duplicate posts where the same job was re-advertised. I don't attempt to draw any conclusions about the popularity (up or down) of Perl from these numbers. In general, I think that the continual uptrend through 2006 is about more people discovering the service, and the dismal numbers in 2008 mostly reflect the current economic cycle more than anything to do with technology.</p><blockquote><div><p> <tt>-------------------------------------------------------------------------------<nobr>-<wbr></nobr> ----------<br>Year | Total |&nbsp; &nbsp;Jan&nbsp; &nbsp;Feb&nbsp; &nbsp;Mar&nbsp; &nbsp;Apr&nbsp; &nbsp;May&nbsp; &nbsp;Jun&nbsp; &nbsp;Jul&nbsp; &nbsp;Aug&nbsp; &nbsp;Sep&nbsp; &nbsp;Oct&nbsp; &nbsp;Nov&nbsp; &nbsp;Dec<br>-------------------------------------------------------------------------<nobr>-<wbr></nobr> ----------------<br>2001 |&nbsp; &nbsp;280 |&nbsp; &nbsp; &nbsp;0&nbsp; &nbsp; &nbsp;2&nbsp; &nbsp; &nbsp;8&nbsp; &nbsp; 21&nbsp; &nbsp; 40&nbsp; &nbsp; 34&nbsp; &nbsp; 33&nbsp; &nbsp; 29&nbsp; &nbsp; 34&nbsp; &nbsp; 30&nbsp; &nbsp; 35&nbsp; &nbsp; 14<br>2002 |&nbsp; &nbsp;413 |&nbsp; &nbsp; 34&nbsp; &nbsp; 33&nbsp; &nbsp; 35&nbsp; &nbsp; 16&nbsp; &nbsp; 45&nbsp; &nbsp; 26&nbsp; &nbsp; 37&nbsp; &nbsp; 46&nbsp; &nbsp; 33&nbsp; &nbsp; 42&nbsp; &nbsp; 31&nbsp; &nbsp; 35<br>2003 |&nbsp; &nbsp;560 |&nbsp; &nbsp; 43&nbsp; &nbsp; 36&nbsp; &nbsp; 56&nbsp; &nbsp; 56&nbsp; &nbsp; 21&nbsp; &nbsp; 39&nbsp; &nbsp; 44&nbsp; &nbsp; 64&nbsp; &nbsp; 53&nbsp; &nbsp; 52&nbsp; &nbsp; 52&nbsp; &nbsp; 44<br>2004 |&nbsp; &nbsp;949 |&nbsp; &nbsp; 75&nbsp; &nbsp; 58&nbsp; &nbsp; 78&nbsp; &nbsp; 88&nbsp; &nbsp; 74&nbsp; &nbsp; 88&nbsp; &nbsp; 82&nbsp; &nbsp; 87&nbsp; &nbsp; 65&nbsp; &nbsp; 87&nbsp; &nbsp; 85&nbsp; &nbsp; 82<br>2005 |&nbsp; 1429 |&nbsp; &nbsp; 93&nbsp; &nbsp;110&nbsp; &nbsp;120&nbsp; &nbsp;135&nbsp; &nbsp;135&nbsp; &nbsp;125&nbsp; &nbsp;115&nbsp; &nbsp;113&nbsp; &nbsp;106&nbsp; &nbsp;132&nbsp; &nbsp;144&nbsp; &nbsp;101<br>2006 |&nbsp; 1857 |&nbsp; &nbsp;164&nbsp; &nbsp;138&nbsp; &nbsp;157&nbsp; &nbsp;151&nbsp; &nbsp;166&nbsp; &nbsp;153&nbsp; &nbsp;140&nbsp; &nbsp;176&nbsp; &nbsp;152&nbsp; &nbsp;172&nbsp; &nbsp;179&nbsp; &nbsp;109<br>2007 |&nbsp; 1966 |&nbsp; &nbsp;182&nbsp; &nbsp;156&nbsp; &nbsp;181&nbsp; &nbsp;190&nbsp; &nbsp;177&nbsp; &nbsp;168&nbsp; &nbsp;176&nbsp; &nbsp;165&nbsp; &nbsp;145&nbsp; &nbsp;179&nbsp; &nbsp;148&nbsp; &nbsp; 99<br>2008 |&nbsp; 1451 |&nbsp; &nbsp;156&nbsp; &nbsp;140&nbsp; &nbsp;152&nbsp; &nbsp;158&nbsp; &nbsp;156&nbsp; &nbsp;158&nbsp; &nbsp;136&nbsp; &nbsp;110&nbsp; &nbsp; 85&nbsp; &nbsp; 87&nbsp; &nbsp; 71&nbsp; &nbsp; 42<br>---------------------------------------------------------------------------<nobr>-<wbr></nobr> --------------</tt></p></div> </blockquote><p>Also see the threads for the <a href="http://use.perl.org/~brian_d_foy/journal/32142">2006</a> and <a href="http://use.perl.org/articles/08/01/02/0030255.shtml">2007 jobs.perl.org reports</a> for past discussions.. Some other resources include:</p><ul><li> <a href="http://www.presicient.com/langjobs.html">renodino's Dynamic Languages Jobs Barometer</a></li><li> <a href="http://use.perl.org/~Tim+Bunce/journal/35267">Tim Bunce's jobs trends searches from indeed.com</a></li></ul> brian_d_foy 2009-03-08T10:10:37+00:00 journal Is there a module that lobotomizes subroutines? http://use.perl.org/~brian_d_foy/journal/38506?from=rss <p>Is there already a module that will turn a list of subroutines into no-ops? I'm doing this to disable features in production code, not testing, and only because other work-arounds are intractable. It's monkeypatching to give a class a lobotomy.</p><p>I know about Curtis's Sub::Override, so I might just write a wrapper around that for an interface that looks something like:</p><blockquote><div><p> <tt>use Sub::Nerf;<br> &nbsp; <br>nerf( $return_value, @list_of_subs );&nbsp; # all subs just return $return_value<br> &nbsp; <br>unnerf( @list_of_subs ); # back to where we started</tt></p></div> </blockquote> brian_d_foy 2009-02-18T20:59:56+00:00 journal YAPC::EU 2009 has a LinkedIn Group http://use.perl.org/~brian_d_foy/journal/38269?from=rss <p>Jos&#233; tells me that <a href="http://yapceurope2009.org/">YAPC::EU 2009</a> has a <a href="http://events.linkedin.com/pub/27994">LinkedIn group</a>. You can note that you are attending, presenting, and so on, and get more bling for your profile. You can also see who else is coming.</p> brian_d_foy 2009-01-12T21:48:33+00:00 journal New ActiveState PPM build system is live http://use.perl.org/~brian_d_foy/journal/37827?from=rss <p>ActiveState tells me that the <a href="http://blogs.activestate.com/activestate/2008/11/new-ppm-servers-in-full-swing.html">new PPM servers are now available</a>. This is the new hotness that <a href="http://aspn.activestate.com/ASPN/Mail/Message/ppm/3642044">Jan Dubious talked about at the beginning of the year</a>.<br>You need the PPM 4 client, which is already in the 5.10 distros and the 5.8 distros since build.</p><p>The new repos have many more modules. These numbers are straight from ActiveState today:</p><blockquote><div><p> <tt>Platform Vers | Old Repo | New Repo (CPANfly)<br> &nbsp; <br>&nbsp; Linux&nbsp; &nbsp;5.8&nbsp; &nbsp; &nbsp; 7790&nbsp; &nbsp; &nbsp;10961<br>&nbsp; Linux&nbsp; &nbsp;5.10&nbsp; &nbsp; &nbsp;5611&nbsp; &nbsp; &nbsp;10888<br> &nbsp; <br>&nbsp; OS X&nbsp; &nbsp; 5.8&nbsp; &nbsp; &nbsp; 8506&nbsp; &nbsp; &nbsp;10907<br>&nbsp; OS X&nbsp; &nbsp; 5.10&nbsp; &nbsp; &nbsp;2662&nbsp; &nbsp; &nbsp;10878<br> &nbsp; <br>&nbsp; Windows 5.8&nbsp; &nbsp; &nbsp; 7267&nbsp; &nbsp; &nbsp; 9106<br>&nbsp; Windows 5.10&nbsp; &nbsp; &nbsp;6524&nbsp; &nbsp; &nbsp; 9060</tt></p></div> </blockquote> brian_d_foy 2008-11-08T03:28:22+00:00 journal Use git to easily make third party module patches http://use.perl.org/~brian_d_foy/journal/37664?from=rss <p>In the olden days, to make a patch to a module, you had to have the original, untouched file and a copy that you modified. You'd then use <code>diff</code> to compare the two files.</p><p>At the Pittsburgh Perl Workshop, Ricardo was asking how to do some odd thing in git. Instead of anyone answering his question, everyone asked what he was doing. It turns out he was patching someone's module and making it a git repo while he worked. The process is really handy:</p><ol><li>Download module distribution and unpack it</li><li>Make it a git archive with <code>git init</code></li><li>Add the initial content to the index with <code>git add<nobr> <wbr></nobr>.</code></li><li>Commit the initial content with <code>git commit -m "* Version 1.23 from CPAN"</code></li><li> <i>work, work, work</i></li><li>Generate your patch with <code>git format-patch --stdout -1</code></li><li>And Bob's your uncle</li></ol><p>There are other ways that you can do this, and you can change around the process in git. I like that git is lightweight enough to make it actually useful for everyday work.</p> brian_d_foy 2008-10-14T20:33:18+00:00 journal Simon Phipps on open source, on FLOSS http://use.perl.org/~brian_d_foy/journal/37573?from=rss <p>For <a href="http://twit.tv/floss39">FLOSS Weekly 39</a>, Leo Laporte and Randal interviewed <a href="http://www.sun.com/aboutsun/media/ceo/bio.jsp?name=Simon%20Phipps">Simon Phipps</a>, the Chief Open Source Officer at Sun. It's not the normal open source religion, and a much better view than I've heard for the "Open Source" people.</p><p>The entire hour long interview is excellent, but this was my favorite part:</p><blockquote><div><p> <b>Simon Phipps (@0:14:08)</b>: What characterizes open source is, open source is the syncronization of the self interest of many parties. And to create an environment where people are willing to synchronize their self interest and collaborate over code, there has to be transparency. On the other hand, in open source, you know, Randal, I don't care what your motivations are for being involved in Perl. They're of no relevance to my life because our relationship around Perl depends on code and the code and the community are transparent, but your motivations for participating in it are opaque. It's up to me. They're private to me.</p><p><b>Leo Laporte</b>: They're also irrelevant because of transparency, the codes speaks for itself.</p><p><b>Simon</b>: Absolutely. So I'm able to maintain my privacy around my motivations and degree of my involvement and how I'm funding it. I maintain responsibility for that part that is private as well. On the other hand, I'm able to work in an environment of transparency where all the code is known, all its origins are known, all its defects are potentially known, and that combination of transparency with privacy is, in my opinion, what characterizes open source. Trying to define open source in terms of licenses in kinda outmoded in my view. Open source is about transparency at the community level but also about privacy in terms of my motivations.</p></div></blockquote><p>Simon also said quoted:</p><blockquote><div><p>Whenever you create a system, you create the game that plays it.</p></div></blockquote><p>Does anyone know the source of that quote?</p> brian_d_foy 2008-09-30T01:49:37+00:00 journal Devel::Alphabet::Cover http://use.perl.org/~brian_d_foy/journal/37557?from=rss <p>Looking at my module namespaces, I see that I've uploaded in 13 different beginning letters. Now I need to get the other 13.</p><p>I need to figure out how to make modules beginning with E, G, I, J, K, Q, R, U, V, W, X, Y, Z. The end of the alphabet is feeling a bit neglected.</p><p>G is for Geo::, so that's just something I need to finish and upload.</p><p>For U, I've been thinking about writing some sort of USB Thumb drive file read/write speed tester. Too bad that belongs in something like Device::*</p><p>For X, I guess I'll have to make something in the XML namespace.</p><p>Y, huh, maybe something in YAML.</p><p>I haven't thought too much about the other letters.</p> brian_d_foy 2008-09-27T21:39:09+00:00 journal cpan script now in github, with new features http://use.perl.org/~brian_d_foy/journal/37512?from=rss <p>I've move my <code>cpan</code> script into <a href="http://github.com/briandfoy/cpan-script/tree/master">its own github repository</a> since I got a burst of feature requests. I also change it to use the <code>App::*</code> structure.</p><p>There are some new switches:</p><ul><li>-j filename --&gt; load an alternate CPAN configuration</li><li>-J --&gt; dump the current CPAN configuration, including anything changed during the run</li><li>-l --&gt; list all of the installed modules</li><li>-g --&gt; download the module tarball, but then stop</li></ul><p>It's going to stay in the repo for a bit while I fix up a few things, but you can play with the sources if you like<nobr> <wbr></nobr>:)</p> brian_d_foy 2008-09-22T20:44:13+00:00 journal The Perl Community, in pictures by Julian Cash http://use.perl.org/~brian_d_foy/journal/37495?from=rss <p>Get <a href="http://www.juliancash.com/">Julian Cash</a>'s book of <a href="http://www.lulu.com/content/2280981">Perl people portraits</a>, free for download or pay to have it as a bound book.</p><p>At OSCON, Julian had a nice printed and bound book of his portraits of Perl people from various conferences. He gave me one for free, since I'm in it. Now you can <a href="http://www.lulu.com/content/2280981">get it for yourself</a>.</p> brian_d_foy 2008-09-20T00:16:16+00:00 journal Perl in Universal City Studio v. 2600 http://use.perl.org/~brian_d_foy/journal/37459?from=rss <p><a href="http://www.2600.com/dvd/docs/2001/0126-speech.html">The brief of amici curiae in <i>Universal City Studio, et al v. 2006</i> </a> says that computer code is speech, and should be protected as such. No big deal there.</p><p>I do like how they talk about Perl, used in some of the examples, though. I've added the emphasis:</p><blockquote><div><p>We chose this snippet of Perl for two reasons. First, when compared to the Visual BASIC, it is apparent that more symbolic characters and fewer natural-looking words are used, illustrating the variety of programming languages. Though it looks less like a natural text language, <b>its meaning is as clear to those who read Perl as is this sentence to those who read English</b>.(4)<br>___________________<br>4. If "$plain_text = $file_key ^ $xor_block" seems unapproachable, consider what those not trained in the language of legal citation would make of "111 F.Supp.2d 294, 326 (S.D.N.Y. 2000)." <b>Each is meaningless to those unfamiliar with the language; but each is more precise and compact for those who do understand than would be an English narrative equivalent.</b></p></div></blockquote> brian_d_foy 2008-09-16T06:29:23+00:00 journal Index of The Perl Journal articles on Dr. Dobbs Online http://use.perl.org/~brian_d_foy/journal/37457?from=rss <p>I put together <a href="http://www.perlmonks.org/index.pl?node_id=711609">an index of the TPJ articles that appear on the Dr. Dobbs site</a>. It covers from November 2003 to January 2006. Apparently I was the last person to publish an article as part of TPJ.</p> brian_d_foy 2008-09-16T04:57:37+00:00 journal PDFs of CMP-era The Perl Journals? http://use.perl.org/~brian_d_foy/journal/37453?from=rss <p>CMP published The Perl Journal as PDFs for a couple of years, around 2004ish. I've lost my collection of those. Does anyone have them?</p><p>I was looking for them when I was answering <a href="http://stackoverflow.com/questions/5024/is-the-perl-journal-available-online">a question about finding old TPJ articles at Stack Overflow</a>.</p> brian_d_foy 2008-09-15T18:06:38+00:00 journal Stack Overflow http://use.perl.org/~brian_d_foy/journal/37452?from=rss <p><a href="http://stackoverflow.com/">Stack Overflow</a>, the programmer's question site that Joel Spolsky helped design this summer, is now public. It looks like a cross between reddit and Perlmonks.</p><p>It does mix all of the questions together, so you'll see a VB question next to a PHP question next to a Perl question, but it also has tagging. To see the Perl questions, listed most recent first, just go to the <a href="http://stackoverflow.com/questions/tagged/perl">the page for Perl tags</a>.</p><p>It also looks like it might have the unintended consequence of becoming a Web 2.0 version of IRC: despite the FAQ saying that subjective questions (favorite X, etc) should not be asked, the <a href="http://stackoverflow.com/questions/tagged/subjective">subjective questions</a> seem pretty popular. Along with that, I think the voting will go pear-shaped if they get the wrong community, which I already think is happening. It's actully depressing that someone can build a good tool or service and have it go awry for reasons totally out of their control. It's predictable even, but there's really not that much that you can do technologically to prevent it.</p><p>John Siracusa has been doing a good job, and the way to avoid disaster is to get more good people there. You just need an OpenID account.</p> brian_d_foy 2008-09-15T18:03:54+00:00 journal BackPAN Indexer has components and another interface http://use.perl.org/~brian_d_foy/journal/37444?from=rss <p>I've been doing more work on my <a href="http://use.perl.org/~brian_d_foy/journal/37375">BackPAN Indexer</a>, but the sort that doesn't do any indexing. What I really need to do is be home for more than one day at a time so I can get everything set up on a computer that I don't have to use. Indexing tens of thousands of distributions takes over my MacBook's poor disk drive, and then I can't do much.</p><p>So, in the meantime, I'm cleaning up the structure of the code so I can make things pluggable. There are several components that you can plug in: A Queue class that makes the list of things to process, a Worker class that defines the work to do on each thing in the queue, a Reporter class to store the Worker's results, a Dispatcher to hand out work to the Workers, and an Interface to show the live run information.</p><p>It's turned out to be a really nice design (that's getting better). I know I have a good design when the things I want to do next naturally fall out of the design. For instance, I wanted to test <a href="http://vimeo.com/1677855">the Tk Interface</a> and move things around, but I didn't want to actually process anything. I started working on a test script to mock everything, then I realized I didn't really need mocks because I could plug in null classes to handle the Queue, which would be empty or not, and the Worker, which would just do nothing.</p><p>So, as I've been moving around the country, I've been working on coding at least two examples of each component. That's a really nice way to design things. A design that works for one thing might not work for another thing. Forcing myself to come up with two non-trivial examples shakes out some of that stuff. This stuff is going to be inportant if people want to run the indexer themselves, or if someone ever sets up a CPAN Testers style group to do it (i.e. the dispatcher can distribute work around the world).</p><p>This week's work has been to create <a href="http://vimeo.com/1732149">a Curses interface</a> (because if I can't run it in a terminal, it's not Scottish), and something I'm calling the Test Census, which just counts the Test:: modules instead of doing the full indexing (and storing the large amounts of data I collect). If you're looking in <a href="http://github.com/briandfoy/mycpan-indexer/tree/master">the git repo</a>, check out the <a href="http://github.com/briandfoy/mycpan-indexer/tree/test_counter">test_counter</a> branch. There is something a bit broken with the dispatching or the reporting somehow, but I'll think about that next week.</p><p>I think the full index of BackPAN will start next week, and I expect it to run for about a week. I figure the error rate will be about 5%, like it was for MiniCPAN, and I'll then spend some time improving the indexer. While the indexer is running, I'll work on the other bits.</p> brian_d_foy 2008-09-15T05:36:23+00:00 journal I'm on YAPC TV: BackPAN Archeology http://use.perl.org/~brian_d_foy/journal/37382?from=rss <p>My YAPC::EU 2008 BackPAN Archeology talk is on YAPC.tv, where you can watch the high resolution or low resolution video, or even download the Flash or MPEG video.</p><p>You can't see the slides, but <a href="http://www.slideshare.net/brian_d_foy/backpan-archeology-presentation">they are on SlideShare</a>.</p><p>In the talk I mention that many things are in progress, although I just uploaded a <a href="http://vimeo.com/1677855">demonstration video of it actually working on MiniCPAN</a>. My <a href="http://use.perl.org/~brian_d_foy/journal/37375">previous post</a> details that.</p> brian_d_foy 2008-09-07T16:16:27+00:00 journal Cataloging BackPAN: MiniCPAN done in 9 hours http://use.perl.org/~brian_d_foy/journal/37375?from=rss <p>My BackPAN indexer (<a href="http://www.slideshare.net/brian_d_foy/backpan-archeology-presentation">YAPC::EU 2008 slides</a>) made it's first complete pass through my MiniCPAN yesterday:</p><ul><li>Distributions processed: 16039</li><li>Indexing failures: 782 (4.8%)</li><li>Run time: 9 hours (0.49 dists / sec)</li></ul><p>The total size of BackPAN is about 100,000 distributions, so I think this means that I could index all of BackPAN in less than a week.</p><p>Right now I output everything as YAML, one YAML file per distribution. The data organization is sloppy and sometimes redundant because I haven't paid attention to it. You can get <a href="http://drop.io/minicpan_index_20080906">the tarball of all 16,000 files</a>. Take a look to see if there might be anything else you'd want the indexer to record about a distribution. If you're interested in making some sort of CPAN service, let me do the work of cataloging the information you need.</p><p>If you want to play with this, get <a href="http://search.cpan.org/">MyCPAN::Indexer from CPAN Search</a>, or if you want to play with everything, checkout <a href="http://github.com/briandfoy/mycpan-indexer/tree/master">the sources from Github</a>. You probably can't install in from CPAN since it depends on a couple of modules which only have developer releases right now.</p><p>The thing you'd want to play with is <i>examples/backpan_indexer.pl</i>. It's a little messy right now because I bolted on a Tk interface (see video <a href="http://vimeo.com/1677855">one</a> or <a href="http://vimeo.com/1677740">two</a>) that lives in <i>examples/tk.pl</i> and a dispatcher that lives in <i>examples/steak.pl</i>. My next step is to make those pluggable modules so you can note in the configuration file which interface and dispatcher you want, and as long as they have the right interface, they'll do whatever they do.</p><p>After a little bit more work on the indexing stuff, the next step is to take all of those YAML files and distill them into something that is easier to search, then hook up some sort of search interface to them. I'll probably first write a command-line tool (although with wonderful MVCness). I want to feed the index any file in @INC and get a report:</p><blockquote><div><p> <tt>$ cpan_index `perldoc -l Foo`<br>Foo.pm's fingerprint found in Foo-Bar-0.05.tgz<br>&nbsp; &nbsp; Author: Joe Snuffy (SNUFFY@cpan.org)<br>&nbsp; &nbsp; Release date: Nov 11, 1998, 23:59:59<br>&nbsp; &nbsp; Version: 0.05<br>&nbsp; &nbsp; Latest version on CPAN: Foo-Bar-0.06.tgz<br>&nbsp; &nbsp; Current maintainers:<br>&nbsp; &nbsp; &nbsp; &nbsp; Joe Snuffy (SNUFFY@cpan.org)&nbsp; (first come)<br>&nbsp; &nbsp; &nbsp; &nbsp; Joe Cool (CAMEL@cpan.org)&nbsp; &nbsp; &nbsp;(co-maintainer)<br>&nbsp; &nbsp; Also came with:<br>&nbsp; &nbsp; &nbsp; &nbsp; !!!Bar.pm, installed version 0.08 (does not match Bar.pm from Foo-Bar-0.05.tgz)<br>&nbsp; &nbsp; &nbsp; &nbsp; ABC.pm, installed version 0.05 (matches ABC.pm in Foo-Bar-0.05.tgz)<br>&nbsp; &nbsp; Depends on:<br>&nbsp; &nbsp; &nbsp; &nbsp; Baz.pm from Baz-0.67.tgz<br>&nbsp; &nbsp; &nbsp; &nbsp; Quux.pm from Quux-0.01.tgz<br>&nbsp; &nbsp; CPAN Testers Matrix:<nobr> <wbr></nobr>...<br>&nbsp; &nbsp; Release history:<br>&nbsp; &nbsp; &nbsp; &nbsp; 0.01&nbsp; Dec 31, 1969, 23:59:59&nbsp; SNUFFY&nbsp; (BackPAN)<br>&nbsp; &nbsp; &nbsp; &nbsp; 0.02&nbsp; Jan 31, 1995, 23:59:59&nbsp; SNUFFY&nbsp; (BackPAN)<br>&nbsp; &nbsp; &nbsp; &nbsp; 0.03&nbsp; Jun 6,&nbsp; 1996, 23:59:59&nbsp; SNUFFY&nbsp; (BackPAN)<br>&nbsp; &nbsp; &nbsp; &nbsp; 0.04&nbsp; Oct 31, 1997, 23:59:59&nbsp; SNUFFY&nbsp; (BackPAN)<br>&nbsp; &nbsp; ****0.05&nbsp; Nov 11, 1998, 23:59:59&nbsp; SNUFFY&nbsp; (CPAN)<br>&nbsp; &nbsp; &nbsp; &nbsp; 0.06&nbsp; Sep&nbsp; 5, 2008, 23:59:59&nbsp; CAMEL&nbsp; &nbsp;(CPAN)</tt></p></div> </blockquote> brian_d_foy 2008-09-06T18:21:36+00:00 journal Don't want SourceForge email? Delete your account. http://use.perl.org/~brian_d_foy/journal/37329?from=rss <p>So, I've now stopped using Sourceforge completely, but I'm not deleting anything from there. Since I get the SourceForge emails, I figured I'd now opt out. I never read them anyway.</p><blockquote><div><p> <tt>This message was sent on behalf of SourceForge.net based on<br>the existence of your user account on our site.<br> &nbsp; <br>To unsubscribe from future mailings, login to the SourceForge.net site<br>and request account removal at:<br>http://sourceforge.net/account/remove_account.php</tt></p></div> </blockquote><p>Yep, their opt-out policy is to delete your account and remove you from all projects. I think I might have unsubscribed in my "Account Options" summary, but with SourceForge you can never tell where the right thing is.</p><p>So, what's the rumor around the campfire? Is SourceForge looking to cut down on users?</p> brian_d_foy 2008-09-02T22:54:23+00:00 journal Automatic license detection in Perl distributions http://use.perl.org/~brian_d_foy/journal/37328?from=rss <p>Before I reinvent the wheel..</p><p>So, given an arbitrary Perl distribution (anything in BackPAN), does anyone have code to guess the license for the code? I know that I can look in META.yml if someone typed the right things somewhere, but that's not enough. Many distributions aren't well-formed, and there are a lot of different ways to license code.</p><p>And, does anyone know of Perl distributions that contains files that have different licenses so that that distribution isn't covered by a single license? File A is under License Foo but File B is under Licence Quux, or something like that.</p> brian_d_foy 2008-09-02T18:21:38+00:00 journal The Larry Wall Baseball Card http://use.perl.org/~brian_d_foy/journal/37309?from=rss <p>At YAPC::EU, Salve was handing out baseball cards of Larry Wall to advertise NPW 2009 in Oslo. If you didn't get to see them, now you can:</p><p><a href="http://www.flickr.com/photos/47329375@N00/2809249954/">Front</a></p><p><a href="http://www.flickr.com/photos/47329375@N00/2809249778/">Back</a></p> brian_d_foy 2008-08-29T17:48:34+00:00 journal brian's Guide now in Italian, along with other things http://use.perl.org/~brian_d_foy/journal/37306?from=rss <p>The people over at <a href="http://www.perl.it//">Perl.it</a> translated my <a href="http://www.perl.it/documenti/articoli/2008/07/la-guida-di-bri.html">Guide to Solving Any Perl Problem into Italian</a>.</p><p>In case you missed <a href="http://use.perl.org/~bepi/journal/37232">bepi's latest announcement</a>, they are actually translating a lot more than just that. Install <a href="http://search.cpan.org/dist/POD2-IT">POD2::IT</a> to get the perldocs in Italian.</p><blockquote><div><p> <tt>% perldoc -L IT</tt></p></div> </blockquote><p>They have a <a href="http://sourceforge.net/projects/pod2it">SourceForge project</a>, and they just finished <a href="http://pod2it.cvs.sourceforge.net/pod2it/pod2it/perlreftut.pod?view=log">perlreftut</a>, among others.</p><p>Besides Italian, there is also <a href="http://search.cpan.org/dist/POD2-FR">POD2::FR</a> to get the perldocs in French. It looks like <a href="http://search.cpan.org/dist/POD2-Base">POD2::Base</a> has a Klingon version. Anyone using that?</p><p>Are there any other translations of the perldocs out there?</p> brian_d_foy 2008-08-29T16:10:02+00:00 journal