james's Friends' Journals
http://use.perl.org/~james/journal/friends/
james's Friends' use Perl Journalsen-ususe Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners.2012-01-25T02:04:20+00:00pudgepudge@perl.orgTechnologyhourly11970-01-01T00:00+00:00james's Friends' Journalshttp://use.perl.org/images/topics/useperl.gif
http://use.perl.org/~james/journal/friends/
use Perl; Shutting Down Indefinitely
http://use.perl.org/~pudge/journal/40525?from=rss
<p>See <a href="http://use.perl.org/article.pl?sid=10/09/08/2053239">here</a>.</p>pudge2010-09-08T22:07:47+00:00useperlFlore Louise Apolline Bruhat-Souche
http://use.perl.org/~BooK/journal/40510?from=rss
<p>On Thursday, August 19, 2010 at 9:30, Flore Louise Apolline Bruhat-Souche was born.
She weighs 3.02 kg and measures 48 cm.
</p><p>
Word already spread through IRC (#perlfr and #yapc mostly) and via email and telephone.
</p><p>
The mother is fine, the father is slightly tired and the <a href="http://use.perl.org/~BooK/journal/33509">big sister</a> is happy.
</p><p>
There is <a href="http://flore.bruhat-souche.net/">one photo online</a>.
</p>BooK2010-08-20T22:17:07+00:00journaluse Perl;
http://use.perl.org/~pudge/journal/40493?from=rss
<p>I am no longer working for Slashdot/Geeknet as of September 30. I am actively seeking new employment. Unless you want to hire me, you don't need to care, unless you also care about <a href="http://use.perl.org/">use Perl;</a>, because it has been generously hosted by Geeknet since I started the site over 10 years ago, shortly after I was hired by Andover.Net to work on Slashdot.</p><p>Long story short, I have not done much with the site in recent years, so my options at this point are to do nothing; migrate the site to a new server and keep it running as-is; or take the data and do something with it on a new site. Or something I haven't thought of.</p><p>I am hereby accepting proposals for what to do with use Perl;. In short, I would like to donate it to someone who will give it a good home. If you're interested, give me your best pitch.</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/08/use-perl.html"><pudge/*></a>.</p>pudge2010-08-11T23:34:11+00:00journalMatt Trout, aka mst, is insane
http://use.perl.org/~pudge/journal/40492?from=rss
<p>Wow. I occasionally, but not too often, go into #perl. Very busy with family and life. So I go in today, and for no reason, <a href="http://www.trout.me.uk/">mst</a> bans me and tells me to not come back.</p><p>What's up with him being such an irrational dick?</p>pudge2010-08-11T16:41:54+00:00journalSummary of Celtics vs. Lakers NBA Finals History
http://use.perl.org/~pudge/journal/40370?from=rss
<p>There have been 60 NBA Finals. The Boston Celtics have won 17, and the Minneapolis/Los Angeles Lakers have won 15, which amounts to those teams winning more than half of all NBA Finals. This year, they play each other in the Finals again, making it 33 champions out of 61 being either the Lakers or the Celtics.</p><p>Additionally, 39 of the 61 Finals have included either the Lakers or the Celtics. Including this year, the Celtics and Lakers have played each other in the Finals a whopping 12 times (just under one-fifth of all Finals have been these two teams).</p><p>The Celtics have made 21 total Finals appearances, so have faced the Lakers more than half of the times they've been in the Finals. The Lakers have made 30 Finals appearances, facing the Celtics in two-fifths of those.</p><p>The Celtics won nine of those against the Lakers, which accounts for more than half of all their 17 championships. The Lakers' two victories over the Celtics came after the Celtics won their first eight encounters.</p><p>The longest streak without either team in the Finals was eight years from '92-'99. The longest streak <b>with</b> either the Lakers or Celtics in the Finals was 10 years, done twice (from '57-'66, in which the Celtics appears all 10 years, and the Lakers five of those; and '80-'89, in which the Lakers appeared eight times, the Celtics five).</p><p>The longest streak for one team appearing in the Finals was, as noted, Boston, in the 10 years from '57-'66. Boston won nine of those 10 years, including eight in a row (the longest winning streak from any one team) from '59-'66, and also won 10 in 12 years, from '57-'69.</p><p>The Lakers' longest appearance streak is "only" four, from '82-'85, winning twice; but they have also appeared three times in a row five additional times (including the current three-year streak). In two of those, they won all three years; in one, they lost all three.</p><p>The only other team to "threepeat" was the Bulls, winning three years in a row twice in eight years ('91-'98). No other team but the Celtics and Lakers have had four consecutive appearances. The only other team to have three consecutive appearances was the Knicks, losing all three from '51-'53.</p><p>The 2010 NBA Finals begin in Los Angeles on Thursday.</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/05/summary-of-celtics-vs-lakers-nba-finals-history.html"><pudge/*></a>.</p>pudge2010-05-30T05:25:50+00:00journalUnique
http://use.perl.org/~pudge/journal/40329?from=rss
<p>I wonder how long it will be before people start just putting together random letters for names of companies, bands, and so on, so they can be unique in Google searches.</p><blockquote><div><p>Your search - fobhwueufg8 - did not match any documents.</p></div></blockquote><p>^^ my new band name</p><p>(Hm, "Did Not Match Any Documents" would be a fun band name. Or the name of the debut album of the band fobhwueufg8.)</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/04/unique.html"><pudge/*></a>.</p>pudge2010-04-26T17:45:28+00:00journalBob Jacobsen interview on FLOSS Weekly
http://use.perl.org/~merlyn/journal/40324?from=rss
Last week, I interviewed Bob Jacobsen for FLOSS Weekly. Bob used Perl's Artistic 1.0 license on some Java code to manage model trains. The code was later patented by an Oregon-based company(!) and then Bob got sued(!!) for Bob distributing the other company's patented code(!!!). The good part of the story is that this is the first test at the US Federal Appeals Court level for an open source license to be enforceable even if no money exchanges hands, and... we won!
<p>
Bob spent a lot of time and money on the case though. Listen to <a href="http://twit.tv/floss117">the podcast</a> and contribute to <a href="http://jmri.sourceforge.net/donations.shtml">his legal defense</a> if you care about open source.</p>merlyn2010-04-23T03:55:11+00:00journalMy Slashroulette Videos
http://use.perl.org/~pudge/journal/40290?from=rss
<p>Today Slashdot did a spoof of Chatroulette, that we called Slashroulette. We prerecorded videos of ourselves and others. Here's five of the six I did (the sixth was me tuning the guitar, I didn't post that one on YouTube): <a href="http://www.youtube.com/watch?v=qHwz6sG37_Q">video 1</a>, <a href="http://www.youtube.com/watch?v=IQYgAxVo050">video 2</a>, <a href="http://www.youtube.com/watch?v=IlJBlObJnJY">video 3</a>, <a href="http://www.youtube.com/watch?v=GWxewYtRc48">video 4</a>, <a href="http://www.youtube.com/watch?v=TkVisbPXHVo">video 5</a>.</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/04/my-slashroulette-videos.html"><pudge/*></a>.</p>pudge2010-04-02T05:15:16+00:00journalFixing Mailman with Perl
http://use.perl.org/~BooK/journal/40266?from=rss
<p>Mailman is useful. Mailman works. Mailman is ubiquitous.
I am subscribed to over 50 mailing-lists managed by Mailman.</p><p>
But Mailmand is software, and therefore <a href="http://hates-software.com/">hateful</a>.
</p><p>My particular Mailman hate is the <code>nodupes</code> parameter.</p><blockquote><div><p> <i> <b>Avoid duplicate copies of messages?</b> </i> </p><p> <i>When you are listed explicitly in the To: or Cc: headers of a list
message, you can opt to not receive another copy from the mailing
list. Select Yes to avoid receiving copies from the mailing list; select
No to receive copies.</i> </p><p> <i>If the list has member personalized messages enabled, and you elect to
receive copies, every copy will have a X-Mailman-Copy: yes header added
to it.</i> </p></div>
</blockquote><p>I like duplicate email. Moreover, I like the <code>List-Id</code> header that makes
emails sent through a list <i>special</i> (at least in the sense that they
can be filtered <i>automatically</i> by more tools, and I can just delete
the stuff that piles up in my Inbox). And by the way, how could Mailman
be really sure that I got that other copy? Just because the headers say
so? Bah.</p><p>Oh, and I also hate the fact that <i>Set globally</i> never worked for me
with this option.</p><p>So, because I'm lazy, and I don't want to go clikety-click to first,
get a reminder of the random password that was assigned to me years ago,
and two, login and change that annoying option, and because
<b>I don't want to do that fifty times, over and over again</b>...</p><p>
I wrote and put on CPAN <a href="http://search.cpan.org/dist/WWW-Mailman/">WWW::Mailman</a>, designed to automate that kind of tedious task out of my life
(and hopefully yours). Examples included, I know you're lazy too.
</p><p><small>PS: I've been told there <i>is</i> a command-line interface to Mailman,
but it is reserved to people managing Mailman on the server.</small></p>BooK2010-03-25T01:07:02+00:00journalMy Netgear Router is Dumber Than It Thinks It Is
http://use.perl.org/~pudge/journal/40163?from=rss
<p>I upgraded the firmware on my Netgear router today and it wouldn't let me use the LAN IP I usually use for it, 10.0.1.1, because it thinks my ISP uses that subnet, because I set the router to read from my own internal DNS. Took me awhile to figure out <b>why</b> it thought what it did, because it didn't occur to me that it would care what DNS addresses I gave it.</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/02/my-netgear-router-is-dumber-than-it-thinks-it-is.html"><pudge/*></a>.</p>pudge2010-02-07T02:09:27+00:00journalFranchise Tag Whiners
http://use.perl.org/~pudge/journal/40146?from=rss
<p>There's a long line of players in the NFL who claim that it is a personal offense when their teams place the franchise tag on them.</p><p>These players are big fat babies.</p><p>The players agreed to the franchise tag for the owners, as a compromise. The players take advantage of everything available to them under the contract; why shouldn't the owners do the same?</p><p>Stop crying. Stop whining. Sure, you don't like it, but so what? Grow up. Those are the rules that you agreed to.</p>pudge2010-01-30T18:52:27+00:00journalah, dreams...
http://use.perl.org/~Matts/journal/40130?from=rss
<p>I just woke from a dream where it was rjbs' birthday and we got him an onion cake. Only the person who made the cake misunderstood, and instead of a cake shaped like an onion he cooked it WITH onions in it.</p><p>Bizarro.</p>Matts2010-01-26T10:31:17+00:00journalTime::Piece test failures on Win32
http://use.perl.org/~Matts/journal/40129?from=rss
<p>Can someone with Time::Piece test failures on Win32 please contact me offlist? I have a proposed patch I'd like to test, but no Win32 perl to test it on.</p>Matts2010-01-25T23:23:53+00:00journalnote to self
http://use.perl.org/~TeeJay/journal/40099?from=rss
<p>note to self.. if puzzled why changes to a function/sub/method seem to have no effect make sure you don't have *any* warnings disabled, but especially the redefined sub one.. otherwise you'll never spot the accidentally pasted duplicate of the sub you want to change</p>TeeJay2010-01-13T12:20:00+00:00journalMoving 32-bit Intel Perl to Mac OS X 10.6
http://use.perl.org/~pudge/journal/40097?from=rss
<p>Dear Google,</p><p>When you move a 32-bit x86 perl installation to a 64-bit Mac OS X 10.6 environment, you should edit $ARCH/Config_heavy.pl and add "-arch i386" to lddlflags, ldflags, and ccflags. The compiler and tools in Mac OS X 10.6 assume 64 bits unless you explicitly tell it otherwise, but some 32-bit installs don't bother putting in an -arch flag, because at the time it wasn't necessary.</p><p>Cross-posted on <a href="http://pudge.net/glob/2010/01/moving-32bit-intel-perl-to-mac-os-x-106.html"><pudge/*></a>.</p>pudge2010-01-12T17:39:58+00:00journalPink stinks
http://use.perl.org/~BooK/journal/40076?from=rss
<p>I still like wearing pink T-shirts, though. And not just at Perl conferences. (My love of pink basically comes from pushing a "joke" from the YAPC Europe 2002 auction way beyond its scope.)</p><p>Some very interesting reads:</p><ul>
<li> <a href="http://www.guardian.co.uk/theguardian/2009/dec/12/pinkstinks-the-power-of-pink">http://www.guardian.co.uk/theguardian/2009/dec/12/pinkstinks-the-power-of-pink</a> </li><li> <a href="http://www.pinkstinks.co.uk/">http://www.pinkstinks.co.uk/</a> (I bought the T-shirt and buttons)</li><li> <a href="http://pinkstinks.wordpress.com/">http://pinkstinks.wordpress.com/</a> (the blog)</li></ul><p>A little more than a week ago, it was the second Christmas of my daughter... I guess it shows. Raising children brings all kinds of new interesting issues and questions to one's attention.</p>BooK2010-01-05T00:35:05+00:00journalWarning compiling perl stuff on Snow Leopard
http://use.perl.org/~Matts/journal/40075?from=rss
<p>I've searched but can't find any reference to this...</p><p>Compiling IO::KQueue on Snow Leopard I get the following warning:</p><blockquote><div><p> <tt>KQueue.xs: In function 'XS_IO__KQueue_kevent':<br>KQueue.xs:71: warning: format not a string literal and no format arguments</tt></p></div> </blockquote><p>Yet that line is just:</p><blockquote><div><p> <tt> Newxz(ke, max_events, struct kevent);</tt></p></div> </blockquote><p>Which seems to me pretty standard perl, and no format strings involved (though Newxz expands quite a few macros).</p>Matts2010-01-04T22:13:57+00:00journalgit-move-dates
http://use.perl.org/~BooK/journal/40024?from=rss
<p>As a Perl programmer and Open Source enthousiast, you probably sometimes
contribute to Open Source projects. Maybe even (gasp!) during work hours.
If your employer is jealous of your time, you probably do not want your
commits to <i>look</i> like they were done during work hours (especially
in tools like the GitHub Punch Card).</p><p>On the other hand, it doesn't make sense to not commit your changes,
and lose the benefits of using Git, just so that the reality of <i>when</i>
you worked on these tiny changes is not made public. (At that point,
it would probably also make more sense to have an open discussion with
your boss...)</p><p>The way Git handles history makes it really easy to change the date
of commits on a local branch. When I first thought about it, my idea
was to write some date manipulation code (move a bunch of commits from
a time range to another with all kinds of fancy nooks and crannies)
and manipulate the Git trees and commits myself.</p><p>Then I discovered <b>git filter-branch</b>, which is all about rewriting
commits. And I realized that in the situation above, moving commits a
few hours in the future (like ten minutes before actually using
<b>git push</b> or <b>git send-email</b>) is largely sufficient.</p><p>The problem is that the code to move a bunch of commits one hour in the
future looks like this:</p><blockquote><div><p> <tt> git filter-branch --commit-filter '\<br> GIT_AUTHOR_DATE=`echo "$GIT_AUTHOR_DATE"|perl -pe'\''s/\d+/$&+3600/e'\''`;\<br> GIT_COMMITTER_DATE=`echo "$GIT_COMMITTER_DATE"|perl -pe'\''s/\d+/$&+3600/e'\''`;\<br> git commit-tree "$@"' -- <rev-list></tt></p></div> </blockquote><p>Which is impossible to remember, and painful to write.</p><p>So, lazy as a Perl programmer should be, I just wrote <b>git-move-dates</b>,
that writes and runs the above type of command-lines for me. Useful
options include <i>--committer</i> and <i>--author</i> (to change only one of the
two existing dates), and options ranging from <i>--seconds</i> to <i>--weeks</i>
to define the exact timespan of your commits' time-travels.</p><p>As with my other Git gadgets, the source is available from
<a href="http://github.com/book/git-gadgets">http://github.com/book/git-gadgets</a>.</p><p>And remember: there's nothing wrong with rewriting history, as long
as it's <i>unpublished</i>, local history.<nobr> <wbr></nobr><code>;-)</code> </p>BooK2009-12-15T22:22:40+00:00journalMore Git gadgets
http://use.perl.org/~BooK/journal/39970?from=rss
<p>Last week on p5p, after noticing that the new way to name version
tags in perl5.git was to use <b>v<i>$version</i> </b>, I proposed to copy
the old <b>perl-<i>$version</i> </b> tags to the new scheme, going back at
least to 5.6.0 (which is when the Perl naming convention for version
changed).
I haven't done it yet for various reasons, but in order to do it,
I developped a small <b>git-copytag</b> tool, that copies (or moves)
the tag with all its annotations.
Clone it from <a href="http://github.com/book/git-gadgets">http://github.com/book/git-gadgets</a>.</p><p>I also started to check if the existing tags in perl5.git point to the
commit matching the published distribution, but my first attempt failed
miserably (creating Git <code>tree</code> objects from the distributions and trying
to find a commit pointing to the same <code>tree</code> id). I'll move on to a
different approach (<code>diff -r</code>, basically).</p><p>
In other news, I finally succeeded in creating the
<a href="/~BooK/journal/39919">Git fractals</a> I wanted.
I'll soon post more details about it on the
<a href="http://philippe.bruhat.net/stuff/git-fractals/sierpinski.html">page
dedicated to Sierpiński triangles</a> on
<a href="http://philippe.bruhat.net/">my personal site</a>.</p>BooK2009-12-03T08:55:03+00:00journalSpiteful spam
http://use.perl.org/~petdance/journal/39969?from=rss
<p>
I know that a lot of people are moving their blogs over to <a href="http://blogs.perl.org/">http://blogs.perl.org/</a>, leaving <a href="http://use.perl.org/">http://use.perl.org/</a> behind. Part of the frustration is that Chris Nandor, Pudge, hasn't done much to modernize use.perl.org, but hey, it's Pudge's choice, and he runs the site, and we're all here by grace of him running it. Beggars and choosers, y'know. If you're frustrated with a Perl news site, you can go <a href="http://perlbuzz.com/">start your own</a>.
</p><p>
So certainly, I think this spam I just received is just out of line.</p><blockquote><div><p> <tt>From: GreatestColonHealth <Kevin...@...by.com><br>Subject: With This Astounding Cleanser You May Eliminate Pudge</tt></p></div> </blockquote><p>That's just nasty!</p>petdance2009-12-01T16:53:59+00:00journalgit-mtime
http://use.perl.org/~BooK/journal/39932?from=rss
<p>Ever complained that on a checkout Git did not reset the <code>mtime</code> of your
files to the date when they were commited?</p><p>
My <a href="http://philippe.bruhat.net/">home page</a> is generated with
Template Toolkit but a script stored in the <tt>post-receive</tt> hook.
On a checkout Git only updates the files that have changed, so normally
I can trust <tt>template.modtime</tt> to be correct and use it to show
a <i>Last mofidied</i> date.
</p><p>But I'm a perfectionist, and I want to be extra sure.
So I created this little utility, that I called <b>git-mtime</b>:</p><blockquote><div><p> <tt> #!/bin/sh<br> git log --name-only --date=iso --reverse --pretty=format:%at "$@" \<br> | perl -00ln -e '($d,@f)=split/\n/;$d{$_}=$d for grep{-e}@f' \<br> -e '}{utime undef,$d{$_},$_ for keys%d'</tt></p></div> </blockquote><p>Note that it passes all parameters to <code>git log</code>, so you can apply it
on a subdirectory (using <code>--</code>), or even use the dates from another
branch (though I'm not sure what use this can have).</p><p> <small>And for extra bonus points, it uses the secret eskimo greeting
operator!</small> </p><p>Now that I have a few gadgets based on Git, I thought I might as well
publish them somewhere. A quick look on Github ruled out <b>git-tools</b>,
<b>git-utils</b> and <b>git-extras</b> (come on people, most of these things
could be done with Git aliases!). <b>git-aid</b> (especially the plural)
didn't seem like a good name either. So after looking around for synonyms,
I settled on <b>git-gadgets</b>.</p><p>Clone it from <a href="http://github.com/book/git-gadgets">http://github.com/book/git-gadgets</a>.</p>BooK2009-11-23T12:41:17+00:00journalPerl 5.11.2
http://use.perl.org/~acme/journal/39925?from=rss
<div><p>  The streets were pretty quiet, which was nice. They're always quiet here<br>  at that time: you have to be wearing a black jacket to be out on the<br>
  streets between seven and nine in the evening, and not many people in the<br>
  area have black jackets. It's just one of those things. I currently live<br>
  in Colour Neighbourhood, which is for people who are heavily into colour.<br>
  All the streets and buildings are set for instant colourmatch: as you<br>
  walk down the road they change hue to offset whatever you're wearing.<br>
  When the streets are busy it's kind of intense, and anyone prone to<br>
  epileptic seizures isn't allowed to live in the Neighbourhood, however<br>
  much they're into colour.<br>
                 - Michael Marshall Smith, "Only Forward"
</p><p>
It gives me great pleasure to announce the release of Perl 5.11.2.
</p><p>
This is the third DEVELOPMENT release in the 5.11.x series leading to a
stable release of Perl 5.12.0. You can find a list of high-profile changes
in this release in the file "perl5112delta.pod" inside the distribution.
</p><p>
You can download the 5.11.2 release from:
</p><p>  
<a href="http://search.cpan.org/~lbrocard/perl-5.11.2/">http://search.cpan.org/~lbrocard/perl-5.11.2/</a>
</p><p>
The release's SHA1 signatures are:
</p><p>  
2988906609ab7eb00453615e420e47ec410e0077  perl-5.11.2.tar.gz</p><div><p>  
0014442fdd0492444e1102e1a80089b6a4649682  perl-5.11.2.tar.bz2<br>
<br>
We welcome your feedback on this release. If you discover issues
with Perl 5.11.2, please use the 'perlbug' tool included in this
distribution to report them. If Perl 5.11.2 works well for you, please
use the 'perlthanks' tool included with this distribution to tell the
all-volunteer development team how much you appreciate their work.<br>
<br>
If you write software in Perl, it is particularly important that you test
your software against development releases. While we strive to maintain
source compatibility with prior stable versions of Perl wherever possible,
it is always possible that a well-intentioned change can have unexpected
consequences. If you spot a change in a development version which breaks
your code, it's much more likely that we will be able to fix it before the
next stable release. If you only test your code against stable releases
of Perl, it may not be possible to undo a backwards-incompatible change
which breaks your code.<br>
<br>
Notable changes in this release:</p><ul> <li>
It is now possible to overload the C operator</li><li>
Extension modules can now cleanly hook into the Perl parser to define new kinds of keyword-headed expression and compound statement</li><li>
The lowest layers of the lexer and parts of the pad system now have C APIs available to XS extensions</li><li>
Use of C<:=> to mean an empty attribute list is now deprecated</li></ul><p>
Perl 5.11.2 represents approximately 3 weeks development since Perl
5.11.1 and contains 29,992 lines of changes across 458 files from 38
authors and committers:<br>
<br>
Abhijit Menon-Sen, Abigail, Ben Morrow, Bo Borgerson, Brad Gilbert,
Bram, Chris Williams, Craig A. Berry, Daniel Frederick Crisman, Dave
Rolsky, David E. Wheeler, David Golden, Eric Brine, Father
Chrysostomos, Frank Wiegand, Gerard Goossen, Gisle Aas, Graham Barr,
Harmen, H.Merijn Brand, Jan Dubois, Jerry D. Hedden, Jesse Vincent,
Karl Williamson, Kevin Ryde, Leon Brocard, Nicholas Clark, Paul
Marquess, Philippe Bruhat, Rafael Garcia-Suarez, Sisyphus, Steffen
Mueller, Steve Hay, Steve Peters, Vincent Pit, Yuval Kogman, Yves
Orton, and Zefram.<br>
<br>
Many of the changes included in this version originated in the CPAN
modules included in Perl's core. We're grateful to the entire CPAN
community for helping Perl to flourish.<br>
<br>
Jesse Vincent or a delegate will release Perl 5.11.3 on December 20, 2009.
Ricardo Signes will release Perl 5.11.4 on January 20, 2010.
Steve Hay will release Perl 5.11.5 on February 20, 2010.<br>
<br>
Regards, Léon</p></div></div>acme2009-11-21T08:56:15+00:00journalGit fractals
http://use.perl.org/~BooK/journal/39919?from=rss
<p>
Last week (November 11) over dinner in Amsterdam, I
talked with a colleague about Git as a tool for creating
graphs. For some reason I started to think about a
<a href="http://en.wikipedia.org/wiki/Sierpinski_triangle">Sierpirński
triangle</a>, and we started trying to create such graphs with Git.
</p><p>The basic shape is a triangle (in the UTF-8 drawing below, the
arrows represent the parent → child relationship):</p><p>
<code> ⋅<br>
↓ ↘<br>
⋅ → ⋅</code>
</p><p>It is quite easy to create by hand. I did it using <code>git commit-tree</code>,
using always the same tree object (the empty tree), as we only care
about the graph that represents commit lineage, not about the content.</p><p>The next step basically repeats the same shape, attached to the low-level
nodes / commits of the previous graph:</p><p>
<code> ⋅<br>
↓ ↘<br>
⋅ → ⋅<br>
↓ ↘ ↓ ↘ <br>
⋅ → ⋅ → ⋅</code>
</p><p>I could create it in a couple of minutes, with a few more
<code>git commit-tree</code> commands.</p><p>After that, it stops being interesting to do by hand, and one wants to
program it. My goal has been to create the following shape, and larger
ones, using a Perl program.</p><p>
<code> A<br>
⋅<br>
↓ ↘<br>
⋅ → ⋅<br>
↓ ↘ ↓ ↘ <br>
B ⋅ → × → ⋅ C<br>
↓ ↘ ↓ ↘<br>
⋅ → ⋅ ⋅ → ⋅<br>
↓ ↘ ↓ ↘ ↓ ↘ ↓ ↘
<br>
⋅ → × → × → × → ⋅</code>
</p><p>Until now, I've been trying several recursive approaches, and failed
miserably each time. The big issue is the merge points, showed in the
graph above using ×.</p><p>In my recursive approaches, I usually first created the triangle (ABC),
usually and then started again from B and then C. But the last merge
of B (the × in the middle of the bottom line) can only be created once
the vertical line starting from C has been started. I should probably
keep state in some way, but haven't had much time to spend on this.</p><p>
I also thought about using the mapping from
<a href="http://en.wikipedia.org/wiki/Pascal's_triangle">Pascal's triangle</a>
(odd numbers as dots and even numbers as empty space, see both
Wikipedia pages for details), but haven't actually tried it yet.
</p><p>
In other news, I've started to take care of my personal web site again.
<a href="http://web.archive.org/web/20071217011738/http://www.bruhat.net/">It
hadn't been touched since 2002</a>, so <a href="http://philippe.bruhat.net/">I gave
it a facelift</a>.
Surprisingly enough, the only section yet is about
<a href="http://philippe.bruhat.net/stuff/git-fractals/">Git fractals</a>.<nobr> <wbr></nobr><code>;-)</code>
Links to Git repositories, GraphViz images and more successful attempts
with other fractals are also available there.
</p>BooK2009-11-20T00:43:58+00:00journalwww.perl.org - redesign
http://use.perl.org/~Ranguard/journal/39888?from=rss
<p>
Well, it's taken me 6 weeks of evenings and the odd weekend, but I'm proud to say the new <a href="http://www.perl.org/">http://www.perl.org/</a> site has just gone live.
</p><p>
This is a complete redesign and content review. Hopefully it's cleaner and easier for people to actually get the information they are after.
</p><p>
Whilst I was at it I also implemented this skin for <a href="http://dbi.perl.org/">http://dbi.perl.org/</a> and <a href="http://learn.perl.org/">http://learn.perl.org/</a> (which needs a lot more loving now you can actually see what's there... not much).
</p><p>
My work (<a href="http://www.foxtons.co.uk/">http://www.foxtons.co.uk/</a>) have donated some of my time, and also some of the designers on my team's time, without which it would have taken even longer.
</p><p>
So enjoy!
</p>Ranguard2009-11-12T22:33:25+00:00journalgit-dot
http://use.perl.org/~BooK/journal/39887?from=rss
<p>I'm currently experimenting with creating graphs using Git... I'm not
using historical data, or even data at all (I'll soon know the SHA1 of
the empty tree by heart), just nodes with <code>%s</code> as their label (I have yet
to find a use for the rest of the metadata).</p><p> <b>gitk</b> is nice to look at historical information, but not so good
for graphs. On the other hand, GraphViz is great for showing graphs.</p><p>What's best than Perl (and a tiny wrapping of shell on top) to produce
graphs?</p><blockquote><div><p> <tt> #!/bin/sh<br> # create a good looking graph with dot<br> echo "digraph G {"<br> git log --pretty=format:"%h %p" $* \<br> | perl -lna -e 'print qq("$F[0]";),map{qq("$_"->"$F[0]";)}@F[1..$#F]'<br> echo "}"</tt></p></div> </blockquote><p>The output of this is usually boring, so just but pipe it to
<code>dot -Tpng -ograph.png</code> and watch the pretty pictures.</p><p>Also, imagine a graph that has a full filesystem attached to each node.
This is exactly the kind of stuff that Git can give us.</p><p>Not that I have any idea what this could be used for...</p>BooK2009-11-12T16:50:11+00:00journalMaypole now Maint only
http://use.perl.org/~TeeJay/journal/39877?from=rss
<p>I've come to the conclusion that as I have neither the time nor inclination to spend my spare time working on Maypole, and I haven't used it for any paid work for several years, I won't be investing any more time on actively working on it.</p><p>However, I could be persuaded to work on it for a decent fee, and I would be happy to apply any patches applied and release new versions with fixes.</p><p>I'd also be happy to hand over the reins to anybody who wants to take over.</p><p>I do have a lot of ideas in this area, but family and work commitments mean that I'll more likely experiment on top of the newer frameworks that exist than try and rework Maypole beyond recognition.</p><p>I still think there is a large hole in the "market" for a more high-level app server than Catalyst, etc providing something more like Drupal in perl but I'm not entirely sure how to do it.</p><p>I guess I'll just see what happens, in the meantime I have plenty of other open source code I'm interested in and hacking on - from Autodia to Padre and Plack.</p>TeeJay2009-11-11T10:16:27+00:00journalnopaste
http://use.perl.org/~BooK/journal/39862?from=rss
<p>Just a quick post to show off a small and useful script I use whenever
I need to "nopaste" some text or code:</p><blockquote><div><p> <tt> #!/usr/bin/perl -w<br> use strict;<br> use WWW::Mechanize;<br> use Getopt::Long;<br> <br> my %SITE = (<br> snit => 'http://nopaste.snit.ch/',<br> scsys => 'http://paste.scsys.co.uk/',<br> );<br> <br> my %CONF = (<br> channel => '',<br> nick => '', # use your own<br> summary => '',<br> paste => '',<br> site => 'snit',<br> list => '',<br> );<br> <br> GetOptions( \%CONF, 'lang=s', 'nick=s', 'summary|desc=s', 'paste|text=s',<br> 'list!', 'site=s' )<br> or die "Bad options";<br> <br> die "No such paste site: $CONF{site}\nValid choices: @{[keys %SITE]}\n"<br> if !exists $SITE{ $CONF{site} };<br> <br> my $m = WWW::Mechanize->new;<br> $m->get( $SITE{ $CONF{site} } );<br> die $m->res->status_line unless $m->success;<br> <br> if ( $CONF{list} ) {<br> print "Possible channels for $CONF{site}:\n",<br> map {"- $_\n"} grep $_,<br> $m->current_form()->find_input('channel')->possible_values;<br> exit;<br> }<br> <br> unless ( $CONF{paste} ) {<br> $CONF{summary} ||= $ARGV[0] || '-';<br> $CONF{paste} = join "", <>;<br> }<br> <br> delete @CONF{qw( site list )};<br> $m->set_fields(%CONF);<br> $m->submit;<br> die $m->res->status_line unless $m->success;<br> <br> print +( $m->links )[0]->url, "\n";</tt></p></div> </blockquote><p>Since it works has a filter, I can call it from vim or pipe to it.
It also works with a file parameter, which is used to set the paste
title.</p><p>Just before posting this, I looked again on CPAN, and found the follwing:</p><ul>
<li>
<p> <b>App::NoPaste</b>: Seems really complete. But does much more than I need,
and I like depending only on WWW::Mechanize for such tools.</p></li><li>
<p> <b>WWW::Rafb</b>: Well, in an earlier version my script worked with rafb.net,
but the site itself is down.</p></li><li>
<p> <b>WWW::PasteBin</b>: Such a huge collection of distributions, I wouldn't
which to install first.</p></li><li>
<p> <b>WebService::NoPaste</b>: Found it years ago when looking for a nopaste
utility, but I preferred to write my own.</p></li></ul><p>Clearly, there is no lack of modules to nopaste stuff, so I'm not going to
add my own to the list.<nobr> <wbr></nobr><code>:-)</code> </p><p>I tried publishing scripts on CPAN, but I feel the toolchain is not really
targetting scripts, anyway.
Anyway, I have a few utility scripts like the above lying around, and I'm
thinking maybe the best way to go with them nowadays is to just publish
them on GitHub. Might happen someday.</p>BooK2009-11-08T16:34:56+00:00journalOOPSLA 2009
http://use.perl.org/~acme/journal/39846?from=rss
<div><p> <a href="http://www.oopsla.org/oopsla2009/">OOPSLA 2009</a> happened a few weeks ago. OOPSLA stands for Object-Oriented Programming, Systems, Languages & Applications and I've always been quite interested in the conference. The proceedings of the conference aren't put online, but I've managed to find two interesting papers:</p><p> <a href="http://www.eecs.harvard.edu/~malvika/ons00025-bacon.pdf">A Market-Based Approach to Software Evolution</a> (PDF) tries to imagine an open market which is targetted around fixing bugs and improving software. It's quite interesting as it's quite similar to a proposal from Nicholas on <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2009/05/msg146785.html">spending other people's money</a>. The authors point out many potential flaws.</p><p> <a href="http://dirkriehle.com/wp-content/uploads/2009/08/oni0017-arafat.pdf">The Commenting Practice of Open Source</a> (PDF) analyses projects on <a href="http://www.ohloh.net/">Ohloh</a> and tries to spot commenting trends. "We find that comment density is independent of team and project size", but they find that it varies from language to language. "Java has the highest mean of comment lines per source lines at.. one comment line for three source code lines" and "Perl has the lowest mean with.. one comment line for nine source code lines". They list as future work to find out why this might be the case.</p></div>acme2009-11-05T08:41:53+00:00journalbuildperl.pl
http://use.perl.org/~BooK/journal/39818?from=rss
<p>I'm trying to compile a bunch of old perls to test my modules against
them. I started with 5.8.9, and it went like this:</p><blockquote><div><p> <tt> $ git checkout -f perl-5.8.9<br> [git output]<br> $ git clean -xdf<br> [more git output]<br> $ sh Configure -Dprefix=/opt/perl/5.8.9 -des -Uinstallusrbinperl<br> [Configure output]<br> $ make && make test && make install<br> [make output]<br> [test output]<br> [install output]</tt></p></div> </blockquote><p>And, ta-da! After less than 15 minutes, Perl 5.8.9 was in<nobr> <wbr></nobr><i>/opt/perl/</i>,
ready to be used.</p><p>Encouraged by this, I went on to compile 5.8.8. I was a bit disappointed
when the same procedure (after a <code>s/5.8.8/5.8.9/g</code>) failed with:</p><blockquote><div><p> <tt> $ sh Configure -Dprefix=/opt/perl/5.8.8 -des -Uinstallusrbinperl<br> [Configure output]<br> Run make depend now? [y]<br> sh<nobr> <wbr></nobr>./makedepend MAKE=make<br> make[1]: Entering directory `/data/home/book/src/ext/perl'<br> sh writemain lib/auto/DynaLoader/DynaLoader.a > perlmain.c<br> rm -f opmini.c<br> cp op.c opmini.c<br> echo av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c reentr.c perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c globals.c perlio.c perlapi.c numeric.c locale.c pp_pack.c pp_sort.c miniperlmain.c perlmain.c opmini.c | tr ' ' '\n' >.clist<br> make[1]: Leaving directory `/data/home/book/src/ext/perl'<br> <nobr> <wbr></nobr>./makedepend: 1: Syntax error: Unterminated quoted string<br> make: *** [depend] Error 2<br> <br> If you compile perl5 on a different machine or from a different object<br> directory, copy the Policy.sh file from this object directory to the<br> new one before you run Configure -- this will help you with most of<br> the policy defaults.</tt></p></div> </blockquote><p>In the past, I had tried to compile older Perls, and Sébastien
Aperghis-Tramoni had pointed me to a few patches he had made to
be able to compile 5.004_05 with a more recent (3.x) gcc.</p><p>So, by looking at his patch again and the output of
<code>git diff perl-5.8.8 perl-5.8.9 -- makedepend.SH</code> I was able to produce
a patch, that looked exactaly like Sébastien's patches for 5.004_05.
The <code>Configure</code> step now worked!</p><p>But then it's the compilation phase that failed:</p><blockquote><div><p> <tt> $ make<br> [make output]<br> Making IPC::SysV (dynamic)<br> Checking if your kit is complete...<br> Looks good<br> Writing Makefile for IPC::SysV<br> make[1]: Entering directory `/data/home/book/src/ext/perl/ext/IPC/SysV'<br> make[1]: Leaving directory `/data/home/book/src/ext/perl/ext/IPC/SysV'<br> make[1]: Entering directory `/data/home/book/src/ext/perl/ext/IPC/SysV'<br> cp Msg.pm<nobr> <wbr></nobr>../../../lib/IPC/Msg.pm<br> cp Semaphore.pm<nobr> <wbr></nobr>../../../lib/IPC/Semaphore.pm<br> cp SysV.pm<nobr> <wbr></nobr>../../../lib/IPC/SysV.pm<br> <nobr> <wbr></nobr>../../../miniperl "-I../../../lib" "-I../../../lib"<nobr> <wbr></nobr>../../../lib/ExtUtils/xsubpp -typemap<nobr> <wbr></nobr>../../../lib/ExtUtils/typemap SysV.xs > SysV.xsc && mv SysV.xsc SysV.c<br> cc -c -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" -fpic "-I../../.." SysV.c<br> SysV.xs:7:25: error: asm/page.h: No such file or directory<br> make[1]: *** [SysV.o] Error 1<br> make[1]: Leaving directory `/data/home/book/src/ext/perl/ext/IPC/SysV'<br> make: *** [lib/auto/IPC/SysV/SysV.so] Error 2</tt></p></div> </blockquote><p>This looked a bit trickier. Luckily, Google informed me that the
<i>asm/page.h</i> file had moved in the Linux tree. Using git again,
I looked for changes involving <code>page.h</code>. The changes were a lot bigger,
and harder for me to understand.</p><p>By chance, the first interesting diff I found was for a change in
<i>ext/Devel/PPPort/devel/buildperl.pl</i>. Wow, this looked exactly like
the tool I needed to, erm, <i>build perl</i>.</p><p>So instead of adding complexity to my home-made perl-building script
by adding more cases where a patch was necessary, I tried my hand at
patching <b>buildperl.pl</b> to make it support newer gcc versions than the
ones that existed at the time the older perls were written.</p><p>Looking for the proper patches with git is extremely easy, and I was
quickly able to find the necessary patches. The longer part was to
actually compile all Perls from 5.6.0 to 5.9.5.<nobr> <wbr></nobr><code>:-)</code> </p><p>Since buildperl.pl works with perl archives, my test script ended up
like this:</p><blockquote><div><p> <tt> #!/bin/sh<br> <br> # blead has my local patch<br> git checkout blead<br> git clean -xdf<br> <br> # setup temporary directories<br> rm<nobr> <wbr></nobr>/tmp/buildperl.log<br> rm -rf<nobr> <wbr></nobr>/tmp/perl<br> mkdir<nobr> <wbr></nobr>/tmp/perl<br> mkdir<nobr> <wbr></nobr>/tmp/perl/source<br> <br> # compile and test all the tags given on command-line<br> for tag in $* ; do<br> <br> # get the version<br> version=`echo $tag|cut -d- -f 2`<br> <br> # make a tarball<br> echo "=== creating<nobr> <wbr></nobr>/tmp/perl/source/perl-$version.tar.gz"<br> git archive --format=tar --prefix=$tag/ $tag^{tree} \<br> | gzip ><nobr> <wbr></nobr>/tmp/perl/source/$tag.tar.gz<br> <br> perl cpan/Devel-PPPort/devel/buildperl.pl --config default --perl $version --test<br> <br> # check it was installed correctly<br> if [ -d<nobr> <wbr></nobr>/tmp/perl/install/default/$tag/ ] ; then<br> result="ok"<br> else<br> result="not ok"<br> fi<br> echo "$result - $version" >><nobr> <wbr></nobr>/tmp/buildperl.log<br> <br> done</tt></p></div> </blockquote><p>Then I just fed it with the appropriate git tags, and let it run for a while:</p><blockquote><div><p> <tt> $<nobr> <wbr></nobr>./compile_perl `git tag -l 'perl-5.8*'`</tt></p></div> </blockquote><p>So within one and a half hour, I was able to compile, test and install
all the 5.8.x versions of Perl.</p><p>I already have added the changes that allow 5.6.x, 5.8.x and 5.9.x
to compile again in modern environments, and just sent the patches
to P5P and Marcus Holland-Moritz.</p><p>Eventually, I'll work on adding the needed patches for versions 5.004,
5.005, and send another patch batch.</p>BooK2009-10-29T20:44:04+00:00journalSwitching perls
http://use.perl.org/~BooK/journal/39786?from=rss
<p>
I have a few perls compiled and installed in<nobr> <wbr></nobr><tt>/opt/perl</tt>:
</p><blockquote><div><p> <tt>$ ls<nobr> <wbr></nobr>/opt/perl<br>5.10.0 5.6.2 5.8.7 5.8.8</tt></p></div> </blockquote><p>
A long time ago, I tried to set up an environment that would setup the
proper PATH to always reach the perl I wanted when typing <tt>perl</tt>
on the command-line. That involved a shell script, which of course couldn't
change the environment of the outer shell, so it actually started another
shell, resulting in the following mess:
</p><blockquote><div><p> <tt>5271 pts/2 Ss 0:01 bash<br>6182 pts/2 S 0:00 \_<nobr> <wbr></nobr>/bin/bash<nobr> <wbr></nobr>./perlenv 5.10.0<br>6183 pts/2 S 0:00 \_<nobr> <wbr></nobr>/bin/bash</tt></p></div> </blockquote><p>
I could also have moved a canonical symlink around, but this had the
advantage that several independent shells could run different perls.
</p><p>
Anyway, that was unworkable until I realized I could change the current
shell environment using aliases or shell functions.
So, assuming my perl binaries live in<nobr> <wbr></nobr><tt>/opt/perl/$VERSION/bin</tt>,
the following bash shell function does the trick:
</p><blockquote><div><p> <tt>setperl ()<br>{<br> export PATH=`echo $PATH|sed -e "s:/opt/perl/[^/]*/bin:/opt/perl/$1/bin:"`<br>}</tt></p></div> </blockquote><p>
And my <tt>~/.bashrc</tt> points to the perl I want to use by default.
</p>BooK2009-10-22T08:13:55+00:00journal