From raanders at acm.org Fri Feb 1 12:28:39 2008 From: raanders at acm.org (Roderick A. Anderson) Date: Fri, 01 Feb 2008 12:28:39 -0800 Subject: [Pdx-pm] Unwind module dependencies Message-ID: <47A380F7.8050302@acm.org> Is there another method besides CPAN::Unwind to determine what prerequisite modules are needed to install a module? I am building a Catalyst server install on a CentOS 5 system; actually a CentOS 5 guest of a CentOS 5 Linux-Vserver host. Since rpmforge and the CentOS repositors have many perl-* modules already built as RPMs I'd like to install them first before doing the rest of the cat-install. The install of CPAN::Unwind is failing. Haven't figured out why despite following the instructions. 8-| I'm getting error(s) during 'Running make test' with what looks like the important one being. No files found for tar.tgz at /root/.cpan/build/CPAN-Unwind-0.05-ydzMe9/blib/lib/CPAN/Unwind.pm line 211 Running: reports MSCHILLI/CPAN-Unwind-0.05.tar.gz gives results that mostly agree with the last cpamtesters report. Any suggestions? Both quick way to get the module dependencies and/or fix CPAN::Unwind? Thanks, Rod -- From schwern at pobox.com Fri Feb 1 12:58:48 2008 From: schwern at pobox.com (Michael G Schwern) Date: Fri, 01 Feb 2008 12:58:48 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <47A380F7.8050302@acm.org> References: <47A380F7.8050302@acm.org> Message-ID: <47A38808.6070600@pobox.com> Roderick A. Anderson wrote: > Is there another method besides CPAN::Unwind to determine what > prerequisite modules are needed to install a module? Just one level down? http://search.cpan.org/meta/Some-Thing/META.yml There's also "CPAN Dependencies" which can dump out XML. http://cpandeps.cantrell.org.uk/ http://cpandeps.cantrell.org.uk/?module=CPAN%3A%3AUnwind&perl=any+version&os=any+OS Chance of successful install: 33% -- On error resume stupid From raanders at acm.org Fri Feb 1 13:07:35 2008 From: raanders at acm.org (Roderick A. Anderson) Date: Fri, 01 Feb 2008 13:07:35 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <47A38808.6070600@pobox.com> References: <47A380F7.8050302@acm.org> <47A38808.6070600@pobox.com> Message-ID: <47A38A17.1030402@acm.org> Michael G Schwern wrote: > Roderick A. Anderson wrote: >> Is there another method besides CPAN::Unwind to determine what >> prerequisite modules are needed to install a module? > > Just one level down? > http://search.cpan.org/meta/Some-Thing/META.yml Excellent! This will work! Thanks, Rod -- > > There's also "CPAN Dependencies" which can dump out XML. > http://cpandeps.cantrell.org.uk/ > > http://cpandeps.cantrell.org.uk/?module=CPAN%3A%3AUnwind&perl=any+version&os=any+OS > > Chance of successful install: 33% > > From scratchcomputing at gmail.com Fri Feb 1 13:17:17 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Fri, 1 Feb 2008 13:17:17 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <47A380F7.8050302@acm.org> References: <47A380F7.8050302@acm.org> Message-ID: <200802011317.17348.ewilhelm@cpan.org> # from Roderick A. Anderson # on Friday 01 February 2008 12:28: >Is there another method besides CPAN::Unwind to determine what >prerequisite modules are needed to install a module? With or without running the code? END {warn join("\n", sort keys %INC);} Also see Module::ScanDeps, Devel::TraceLoad, and http://scratchcomputing.com/svn/Devel-TraceDeps/trunk/. Note that CPAN::Unwind is just using Module::Depends::Intrusive. This tells you what a distribution will install, but not necessarily what it needs. --Eric -- "Unthinking respect for authority is the greatest enemy of truth." --Albert Einstein --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From raanders at acm.org Fri Feb 1 15:18:54 2008 From: raanders at acm.org (Roderick A. Anderson) Date: Fri, 01 Feb 2008 15:18:54 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <200802011317.17348.ewilhelm@cpan.org> References: <47A380F7.8050302@acm.org> <200802011317.17348.ewilhelm@cpan.org> Message-ID: <47A3A8DE.1090301@acm.org> Eric Wilhelm wrote: > # from Roderick A. Anderson > # on Friday 01 February 2008 12:28: > >> Is there another method besides CPAN::Unwind to determine what >> prerequisite modules are needed to install a module? > > With or without running the code? At this point I don't care. I'm hoping to come up with a list and compare it to the perl-* RPMs and install those first. And if that works out I'm going to try to build RPMs for as many of the others as I can using cpan2rpm. The reason I'm going through all this is because I prefer using a ... _package managed_ distribution but the Redhat based ones have for me had problems with the compiling required for some (XS) modules. I think it has a bit to do with the (so I've heard) mess made of the Redhatian Perl RPM. And sometimes the module wants non-Perl stuff installed that I don't. > > END {warn join("\n", sort keys %INC);} Interesting. So each 'use Package' statement may modify %INC? > Also see Module::ScanDeps, Devel::TraceLoad, and > http://scratchcomputing.com/svn/Devel-TraceDeps/trunk/. Starting looking at these but haven't tried them yet. > Note that CPAN::Unwind is just using Module::Depends::Intrusive. This > tells you what a distribution will install, but not necessarily what it > needs. Unwind will look at what the module knows it needs and but not necessarily what those need? Thanks, Rod -- > > --Eric From chromatic at wgz.org Fri Feb 1 15:25:29 2008 From: chromatic at wgz.org (chromatic) Date: Fri, 1 Feb 2008 15:25:29 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <47A3A8DE.1090301@acm.org> References: <47A380F7.8050302@acm.org> <200802011317.17348.ewilhelm@cpan.org> <47A3A8DE.1090301@acm.org> Message-ID: <200802011525.29561.chromatic@wgz.org> On Friday 01 February 2008 15:18:54 Roderick A. Anderson wrote: > Eric Wilhelm wrote: > > END {warn join("\n", sort keys %INC);} > Interesting. So each 'use Package' statement may modify %INC? Any successful require (implied by a use) will add an entry to %INC, where the key is the path to the .pm file loaded by that require. -- c From raanders at acm.org Fri Feb 1 15:38:55 2008 From: raanders at acm.org (Roderick A. Anderson) Date: Fri, 01 Feb 2008 15:38:55 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <200802011525.29561.chromatic@wgz.org> References: <47A380F7.8050302@acm.org> <200802011317.17348.ewilhelm@cpan.org> <47A3A8DE.1090301@acm.org> <200802011525.29561.chromatic@wgz.org> Message-ID: <47A3AD8F.2030002@acm.org> chromatic wrote: > On Friday 01 February 2008 15:18:54 Roderick A. Anderson wrote: > >> Eric Wilhelm wrote: > >>> END {warn join("\n", sort keys %INC);} > >> Interesting. So each 'use Package' statement may modify %INC? > > Any successful require (implied by a use) will add an entry to %INC, where the > key is the path to the .pm file loaded by that require. Thanks. That will make some of what I'm trying to do easier. Rod -- > > -- c From scratchcomputing at gmail.com Thu Feb 7 01:59:39 2008 From: scratchcomputing at gmail.com (Seven till Seven) Date: Thu, 7 Feb 2008 01:59:39 -0800 Subject: [Pdx-pm] Meeting next Wednesday -- "Skimmable Code" Message-ID: <200802070159.39277.ewilhelm@cpan.org> Wed. February 13th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. speaker: Michael Schwern topic: Skimmable Code "Skimmable" meaning code that you can confidently read and work with just a small part of without having to study the whole. Why it's important, what the key traits of skimmability are, how you can tell if you have skimmable code and how you can write skimmable code. A lot of this gets into "lexical encapsulation" which is a term I like to throw around and assume everyone else understands why it's REALLY IMPORTANT but don't actually know if other folks Get It. -- http://pdx.pm.org From schwern at pobox.com Thu Feb 7 02:16:44 2008 From: schwern at pobox.com (Michael G Schwern) Date: Thu, 07 Feb 2008 02:16:44 -0800 Subject: [Pdx-pm] Unwind module dependencies In-Reply-To: <47A3A8DE.1090301@acm.org> References: <47A380F7.8050302@acm.org> <200802011317.17348.ewilhelm@cpan.org> <47A3A8DE.1090301@acm.org> Message-ID: <47AADA8C.7050000@pobox.com> Roderick A. Anderson wrote: > Eric Wilhelm wrote: >> # from Roderick A. Anderson >> # on Friday 01 February 2008 12:28: >> >>> Is there another method besides CPAN::Unwind to determine what >>> prerequisite modules are needed to install a module? >> With or without running the code? > > At this point I don't care. I'm hoping to come up with a list and > compare it to the perl-* RPMs and install those first. And if that > works out I'm going to try to build RPMs for as many of the others as I > can using cpan2rpm. > > The reason I'm going through all this is because I prefer using a ... > _package managed_ distribution but the Redhat based ones have for me had > problems with the compiling required for some (XS) modules. I think > it has a bit to do with the (so I've heard) mess made of the Redhatian > Perl RPM. And sometimes the module wants non-Perl stuff installed that > I don't. If I understand you just want to take CPAN modules and put them into rpms and then install from the rpm so all your CPAN stuff is under package management? Considered cpan2rpm? Or CPANPLUS is supposed to be able to do this. There's CPANPLUS::Dist::Mdv to make Mandriva RPMs and CPANPLUS::Dist::Deb to make Debian packages. -- On error resume stupid From selenamarie at gmail.com Tue Feb 12 11:05:57 2008 From: selenamarie at gmail.com (Selena Deckelmann) Date: Tue, 12 Feb 2008 11:05:57 -0800 Subject: [Pdx-pm] PDXPUG meeting: Extreme Database Makeover: RT Message-ID: <2b5e566d0802121105j406421e1j2542f8340aa70772@mail.gmail.com> Topic: Extreme Database Makeover: RT Speakers: Jeff Davis, Mark Wong, David Wheeler When: Thursday, February 21, 2008, 7:00pm Where: FreeGeek, 1731 SE 10th Ave Come join us for a little fun with RT - http://bestpractical.com/rt/. Jeff Davis recently went through an implementation of RT and had a few suggestions for their database schema. David Wheeler and Mark Wong promised to come help "refactor". For full details, see: http://pugs.postgresql.org/node/154 -- Selena Deckelmann PDXPUG - Portland PostgreSQL Users Group http://pugs.postgresql.org/pdx http://www.chesnok.com/daily From scratchcomputing at gmail.com Tue Feb 12 14:42:32 2008 From: scratchcomputing at gmail.com (Seven till Seven) Date: Tue, 12 Feb 2008 14:42:32 -0800 Subject: [Pdx-pm] Meeting tomorrow -- "Skimmable Code" Message-ID: <200802121442.32235.ewilhelm@cpan.org> Wed. February 13th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. speaker: Michael Schwern topic: Skimmable Code: Fast to Read, Safe to Change Many people dismiss "best coding practices" as just making code pretty. Often times the practices are justified by hazy ideas of "readability" and "maintainability". One concrete reason is to make code "skimmable". We rarely read and understand an entire project, instead we read just enough to get something done. Skimmable code makes it fast to read and safe to change. You can understand only a small part of the total project and yet know all you need to know about it. It allows one to work very efficiently on unfamiliar code. You will learn the art of skimming and the role of best practices in writing skimmable code. Fuzzy issues such as encapsulation and function naming will be brought into focus. You will be shown tools to help see when a function is too complex or when code is too tangled up with itself. -- http://pdx.pm.org From mikeraz at patch.com Wed Feb 13 09:07:54 2008 From: mikeraz at patch.com (Michael Rasmussen) Date: Wed, 13 Feb 2008 09:07:54 -0800 (PST) Subject: [Pdx-pm] Schwern, you sexy devil Message-ID: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> Working on a new system at work. No cpan use yet (broken lynx on the Solaris system) so I'm attempting to download all the modules we need. Attempting: http://cpan.mirror.facebook.com/authors/id/M/MS/MSCHWERN/Test-Simple-0.74.tar.gz Yidlds: Employee Internet Access Error - #403 Forbidden The item you are attempting to access generated a user error indicating that you are not an authorized user. Some sites and content types are blocked from access due to HR and/or Information Security policies. If this site is required by your business line, please submit an approved request to the Information Security shared mailbox (Security-Information Security Services Shared/XX/XXX) requesting its availability. Please include the complete web address and your business justification in the email. You were denied access because: Access denied by SmartFilter content category. The requested URL belongs to the following category: Dating. DATE: Wed, 13 Feb 2008 16:55:26 GMT URL: http://cpan.mirror.facebook.com/authors/id/M/MS/MSCHWERN/Test-Simple-0.74.tar.gz USERNAME: my_id NETCACHE BOX: internal_proxy_hostname CATEGORY: Dating Employees may access the Internet consistent with established bank policies. The use of the Internet and the information available on it is for conducting My Employer business only and is not intended to be used for personal activities. In addition, all use of the Internet is to be consistent with existing HR and Information Security policies. All use is governed by these policies and monitored for violations or attempted violations. Hmmm, I wonder how many attempted violations I get before someone from security drops by for a chat? -- Michael Rasmussen, Portland, Ore, USA Be Appropriate && Follow Your Curiosity http://www.patch.com/words/ From andy at petdance.com Wed Feb 13 09:13:29 2008 From: andy at petdance.com (Andy Lester) Date: Wed, 13 Feb 2008 11:13:29 -0600 Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> References: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> Message-ID: <204187A2-C660-42F9-9D02-7DB36F39DCA0@petdance.com> On Feb 13, 2008, at 11:07 AM, Michael Rasmussen wrote: > Attempting: > http://cpan.mirror.facebook.com/authors/id/M/MS/MSCHWERN/Test-Simple-0.74.tar.gz > > Yidlds: > Employee Internet Access Error - #403 Forbidden There's a mirror on playboy.com, too. Try that one instead. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From publiustemp-pdxpm at yahoo.com Wed Feb 13 09:20:27 2008 From: publiustemp-pdxpm at yahoo.com (Ovid) Date: Wed, 13 Feb 2008 09:20:27 -0800 (PST) Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> Message-ID: <885801.76159.qm@web60822.mail.yahoo.com> --- Michael Rasmussen wrote: > Hmmm, I wonder how many attempted violations I get before someone > from security drops by for a chat? I think that's what ssh forwarding is for :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/ From joshua at keroes.com Wed Feb 13 11:51:49 2008 From: joshua at keroes.com (Joshua Keroes) Date: Wed, 13 Feb 2008 11:51:49 -0800 Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <885801.76159.qm@web60822.mail.yahoo.com> References: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> <885801.76159.qm@web60822.mail.yahoo.com> Message-ID: If you can't find a sane mirror, give ftp.cpan.org a try. If that one's blocked on account of Dating then maybe there really is hope for a new generation of Perl programmers. Tongue. Cheek. Cheers, Joshua On Feb 13, 2008 9:20 AM, Ovid wrote: > --- Michael Rasmussen wrote: > > > Hmmm, I wonder how many attempted violations I get before someone > > from security drops by for a chat? > > I think that's what ssh forwarding is for :) > > Cheers, > Ovid > > -- > Buy the book - http://www.oreilly.com/catalog/perlhks/ > Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ > Personal blog - http://publius-ovidius.livejournal.com/ > Tech blog - http://use.perl.org/~Ovid/journal/ > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20080213/34f5e91f/attachment.html From schwern at pobox.com Wed Feb 13 11:57:47 2008 From: schwern at pobox.com (Michael G Schwern) Date: Wed, 13 Feb 2008 11:57:47 -0800 Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <204187A2-C660-42F9-9D02-7DB36F39DCA0@petdance.com> References: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> <204187A2-C660-42F9-9D02-7DB36F39DCA0@petdance.com> Message-ID: <47B34BBB.7050202@pobox.com> Andy Lester wrote: > On Feb 13, 2008, at 11:07 AM, Michael Rasmussen wrote: > >> Attempting: >> http://cpan.mirror.facebook.com/authors/id/M/MS/MSCHWERN/Test-Simple-0.74.tar.gz >> >> Yidlds: >> Employee Internet Access Error - #403 Forbidden Start trying to download http://cpan.mirror.facebook.com/authors/id/M/MS/MSCHWERN/Sex-0.69.tar.gz and then they can fire you for looking for Sex on Facebook on company time. > There's a mirror on playboy.com, too. Try that one instead. mirror.playboy.com was my favorite, but it is, alas, pining for the fjords. I'm too sexy for this mirror... -- Robrt: People can't win Schwern: No, but they can riot after the game. From chromatic at wgz.org Wed Feb 13 11:59:16 2008 From: chromatic at wgz.org (chromatic) Date: Wed, 13 Feb 2008 11:59:16 -0800 Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: References: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> <885801.76159.qm@web60822.mail.yahoo.com> Message-ID: <200802131159.16865.chromatic@wgz.org> On Wednesday 13 February 2008 11:51:49 Joshua Keroes wrote: > If you can't find a sane mirror, give ftp.cpan.org a try. If that one's > blocked on account of Dating then maybe there really is hope for a new > generation of Perl programmers. They meant the calendar part of CPAN, unfortunately. -- c From Peter at PSDT.com Wed Feb 13 12:51:26 2008 From: Peter at PSDT.com (Peter Scott) Date: Wed, 13 Feb 2008 12:51:26 -0800 Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <200802131159.16865.chromatic@wgz.org> References: <30821.170.135.241.46.1202922474.squirrel@mail.patch.com> <885801.76159.qm@web60822.mail.yahoo.com> <200802131159.16865.chromatic@wgz.org> Message-ID: <6.2.3.4.2.20080213124836.02c160f0@mail.webquarry.com> On Wednesday 13 February 2008 11:51:49 Joshua Keroes wrote: > If you can't find a sane mirror, give ftp.cpan.org a try. If that one's > blocked on account of Dating then maybe there really is hope for a new > generation of Perl programmers. When you do, let us know whether your prudish proxy will let you download Schwern's Sex module. If it objects, I'm sure it will encourage him to create more salaciously named modules. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ http://www.perlmedic.com/ From alan at clueserver.org Wed Feb 13 14:40:16 2008 From: alan at clueserver.org (Alan) Date: Wed, 13 Feb 2008 14:40:16 -0800 (PST) Subject: [Pdx-pm] Speakers needed for PLUG Advanced Topics Message-ID: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> PLUG Advanced Topics meetings need speakers. I am looking for peope to speak on Advanced Topics of your choice for upcoming meetings, including this month and excluding next month. (Randal is speaking on a non-Perl topic.) The next meeting is either Monday or Wednesday. (We have a weird scheduling issue I won't go into.) You get to pick which night. We are also looking for speakers for the April, May meetings and beyond. Those meetings will be the third Wednesday of the month. Any takers? From chromatic at wgz.org Wed Feb 13 14:44:18 2008 From: chromatic at wgz.org (chromatic) Date: Wed, 13 Feb 2008 14:44:18 -0800 Subject: [Pdx-pm] Speakers needed for PLUG Advanced Topics In-Reply-To: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> References: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> Message-ID: <200802131444.18964.chromatic@wgz.org> On Wednesday 13 February 2008 14:40:16 Alan wrote: > PLUG Advanced Topics meetings need speakers. I am looking for peope to > speak on Advanced Topics of your choice for upcoming meetings, including > this month and excluding next month. (Randal is speaking on a non-Perl > topic.) > > The next meeting is either Monday or Wednesday. (We have a weird > scheduling issue I won't go into.) You get to pick which night. > > We are also looking for speakers for the April, May meetings and beyond. > Those meetings will be the third Wednesday of the month. > > Any takers? What makes a topic Advanced? -- c From alan at clueserver.org Wed Feb 13 15:10:51 2008 From: alan at clueserver.org (Alan) Date: Wed, 13 Feb 2008 15:10:51 -0800 (PST) Subject: [Pdx-pm] Speakers needed for PLUG Advanced Topics In-Reply-To: <200802131444.18964.chromatic@wgz.org> References: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> <200802131444.18964.chromatic@wgz.org> Message-ID: <42091.75.164.221.130.1202944251.squirrel@clueserver.org> > On Wednesday 13 February 2008 14:40:16 Alan wrote: > >> PLUG Advanced Topics meetings need speakers. I am looking for peope to >> speak on Advanced Topics of your choice for upcoming meetings, including >> this month and excluding next month. (Randal is speaking on a non-Perl >> topic.) >> >> The next meeting is either Monday or Wednesday. (We have a weird >> scheduling issue I won't go into.) You get to pick which night. >> >> We are also looking for speakers for the April, May meetings and beyond. >> Those meetings will be the third Wednesday of the month. >> >> Any takers? > > What makes a topic Advanced? Anything that would seem too complicated for the regular meeting. I tend to prefer topics that leave at least one person lost at the end, but I am just a bit cruel in my old age. (I had a comp.sci prof give a talk about completions a year or two back. It was distilled version of a quarter's worth of data in 1.5 hours. It was quite interesting. About 3-4 people kept up.) At this point, I am not going to be picky. From schwern at pobox.com Thu Feb 14 00:03:24 2008 From: schwern at pobox.com (Michael G Schwern) Date: Thu, 14 Feb 2008 00:03:24 -0800 Subject: [Pdx-pm] Speakers needed for PLUG Advanced Topics In-Reply-To: <42091.75.164.221.130.1202944251.squirrel@clueserver.org> References: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> <200802131444.18964.chromatic@wgz.org> <42091.75.164.221.130.1202944251.squirrel@clueserver.org> Message-ID: <47B3F5CC.9060609@pobox.com> Alan wrote: > Anything that would seem too complicated for the regular meeting. I tend > to prefer topics that leave at least one person lost at the end, but I am > just a bit cruel in my old age. (I had a comp.sci prof give a talk about > completions a year or two back. It was distilled version of a quarter's > worth of data in 1.5 hours. It was quite interesting. About 3-4 people > kept up.) > > At this point, I am not going to be picky. How about a solution to the year 2038 problem for localtime() on 32 bit time_t machines that makes use of the system libraries for DST and time zone calculations? -- 91. I am not authorized to initiate Jihad. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/ From publiustemp-pdxpm at yahoo.com Thu Feb 14 02:31:08 2008 From: publiustemp-pdxpm at yahoo.com (Ovid) Date: Thu, 14 Feb 2008 02:31:08 -0800 (PST) Subject: [Pdx-pm] Schwern, you sexy devil In-Reply-To: <200802131159.16865.chromatic@wgz.org> Message-ID: <31378.5719.qm@web60818.mail.yahoo.com> --- chromatic wrote: > > If you can't find a sane mirror, give ftp.cpan.org a try. If that > one's > > blocked on account of Dating then maybe there really is hope for a > new > > generation of Perl programmers. > > They meant the calendar part of CPAN, unfortunately. Haiku for everyone! (I know it's a senryu. Shut up.) Was Y2K Real? The problem was solved by the Men who can't find dates. Hugs, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/ From alan at clueserver.org Thu Feb 14 09:50:01 2008 From: alan at clueserver.org (Alan) Date: Thu, 14 Feb 2008 09:50:01 -0800 (PST) Subject: [Pdx-pm] Speakers needed for PLUG Advanced Topics In-Reply-To: <47B3F5CC.9060609@pobox.com> References: <53207.75.164.221.130.1202942416.squirrel@clueserver.org> <200802131444.18964.chromatic@wgz.org> <42091.75.164.221.130.1202944251.squirrel@clueserver.org> <47B3F5CC.9060609@pobox.com> Message-ID: <53470.198.182.194.170.1203011401.squirrel@clueserver.org> > Alan wrote: >> Anything that would seem too complicated for the regular meeting. I >> tend >> to prefer topics that leave at least one person lost at the end, but I >> am >> just a bit cruel in my old age. (I had a comp.sci prof give a talk >> about >> completions a year or two back. It was distilled version of a quarter's >> worth of data in 1.5 hours. It was quite interesting. About 3-4 people >> kept up.) >> >> At this point, I am not going to be picky. > > How about a solution to the year 2038 problem for localtime() on 32 bit > time_t > machines that makes use of the system libraries for DST and time zone > calculations? Well, I have already sent the announcement. The meeting is moved to Feb 20th and we are going to have a variation on lightening talks. I will forward a copy of the announcement to the PerlMongers list when I get a chance. From scratchcomputing at gmail.com Mon Feb 18 01:35:07 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Mon, 18 Feb 2008 01:35:07 -0800 Subject: [Pdx-pm] File-Fu Message-ID: <200802180135.07481.ewilhelm@cpan.org> Hi all, As I mentioned last week, I'm engaging in a rethink of how we handle file and directory names (ultimately in a cross-platform way.) Basically, I've never been able to force myself to use File::Spec because it is so wordy compared to constructing unix paths (which actually works most of the time on most of the platforms.) But, unix paths as simple strings tend to have their own troubles. For example, "did I get the trailing slash into that directory variable?" and basename()/dirname() as functions still really make you wish for an object. So, here's an object (in a slightly different way than Path::Class -- In particular, I like to embrace the fact that perl does have error handling, so things like open() throw errors.) http://search.cpan.org/search?module=File%3A%3AFu It does need refinement, and I haven't exactly decided how to handle the cross-platformness (because the directory object is a list (not a string), so stringifying it just to call File::Spec methods seems awfully clunky.) (I think it might involve dis-entangling the File::Spec logic from the string assumption.) Any thoughts on what is glaringly missing? If you want to play with it, most of what is there is probably api-stable so long as you're on unix. Anybody want to hammer-through the windows issues with me? Also on the todo list is creating methods for File::Find, File::Temp, and File::Path features. --Eric -- software: a hypothetical exercise which happens to compile. --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From selenamarie at gmail.com Mon Feb 18 19:42:34 2008 From: selenamarie at gmail.com (Selena Deckelmann) Date: Mon, 18 Feb 2008 19:42:34 -0800 Subject: [Pdx-pm] other RT folks Message-ID: <2b5e566d0802181942s7d8d7755k19ef8892c073b07f@mail.gmail.com> Hello! Our extreme database makeover guinea pig is going to have dinner with Matz on Thursday. Any other RT folks out there who have experience with the database and are willing to show up for a meeting on Thursday night? Beer's (or your beverage of choice) on me. -selena -- Selena Deckelmann PDXPUG - Portland PostgreSQL Users Group http://pugs.postgresql.org/pdx http://www.chesnok.com/daily From igal at pragmaticraft.com Mon Feb 18 21:27:27 2008 From: igal at pragmaticraft.com (Igal Koshevoy) Date: Mon, 18 Feb 2008 21:27:27 -0800 Subject: [Pdx-pm] other RT folks In-Reply-To: <2b5e566d0802181942s7d8d7755k19ef8892c073b07f@mail.gmail.com> References: <2b5e566d0802181942s7d8d7755k19ef8892c073b07f@mail.gmail.com> Message-ID: <47BA68BF.70506@pragmaticraft.com> Selena Deckelmann wrote: > Our extreme database makeover guinea pig is going to have dinner with > Matz on Thursday. Any other RT folks out there who have experience > with the database and are willing to show up for a meeting on Thursday > night? > I'm sorry that the Ruby dinner event collided with the make over, and I recognize this doesn't leave you much time to find a replacement. Would it be possible to reschedule the makeover to another night that works for the guinea pig and I'll also try hard to make it there to lend a hand? -igal From selenamarie at gmail.com Tue Feb 19 06:16:51 2008 From: selenamarie at gmail.com (Selena Deckelmann) Date: Tue, 19 Feb 2008 06:16:51 -0800 Subject: [Pdx-pm] other RT folks In-Reply-To: <47BA68BF.70506@pragmaticraft.com> References: <2b5e566d0802181942s7d8d7755k19ef8892c073b07f@mail.gmail.com> <47BA68BF.70506@pragmaticraft.com> Message-ID: <2b5e566d0802190616s5da25877rcb99d8665429253d@mail.gmail.com> Hi Igal, On Feb 18, 2008 9:27 PM, Igal Koshevoy wrote: > Selena Deckelmann wrote: > > Our extreme database makeover guinea pig is going to have dinner with > > Matz on Thursday. Any other RT folks out there who have experience > > with the database and are willing to show up for a meeting on Thursday > > night? > > > I'm sorry that the Ruby dinner event collided with the make over, and I > recognize this doesn't leave you much time to find a replacement. Would > it be possible to reschedule the makeover to another night that works > for the guinea pig and I'll also try hard to make it there to lend a hand? Thanks for the offer! I wasn't meaning to call you out :) I'm going to consult the PDXPUG folks and see what they think. -selena -- Selena Deckelmann PDXPUG - Portland PostgreSQL Users Group http://pugs.postgresql.org/pdx http://www.chesnok.com/daily From selenamarie at gmail.com Wed Feb 20 09:27:03 2008 From: selenamarie at gmail.com (Selena Deckelmann) Date: Wed, 20 Feb 2008 09:27:03 -0800 Subject: [Pdx-pm] Still meeting on Thursday (tomorrow), but also TUESDAY 2/26/08 -- Extreme Database Makeover rescheduled! Message-ID: <2b5e566d0802200927k5f220817yf937dc92f81d0c9b@mail.gmail.com> PDXPUG will still meet on Thursday to discuss MONITORING TOOLS! woo! We'll meet at FreeGeek, Thursday (2/21/08), 7pm. Topic: Monitoring Tools Who: YOU (and me, Mark, etc) When: 7pm, Thursday 2/21/08 Where: FreeGeek, 1731 SE 10th Avenue, Portland, OR I will bring my latest horrific collection of Perl scripts. Mark will bring something more impressive. We can talk about ptop! THEN, on TUESDAY (2/26/08), Extreme Database Makeover:RT will happen at Cubespace, 6:30pm. Topic: Extreme Database Makeover: RT Who: Jeff Davis, Mark Wong, David Wheeler When: 6:30pm, Tuesday 2/26/08 Where: Cubespace, 622 SE Grand Avenue We will be sharing meeting time with Code-n-Splode, a group designed to increase women's participation in programming. Several current and past users of RT have spoken up that they'd like to join in the fray. Should be good fun for all! Whew. -selena -- Selena Deckelmann PDXPUG - Portland PostgreSQL Users Group http://pugs.postgresql.org/pdx http://www.chesnok.com/daily From gabrielle.roth at xo.com Fri Feb 22 15:29:49 2008 From: gabrielle.roth at xo.com (Roth, Gabrielle) Date: Fri, 22 Feb 2008 16:29:49 -0700 Subject: [Pdx-pm] FW: Newsletter from O'Reilly UG Program, February 22 Message-ID: This month's books. > For book review writing tips and suggestions, go to: > > > > *** Augmented Reality? (Pragmatic Bookshelf) > ISBN10: ?1934356034 > > > *** C# 3.0 Pocket Reference, Second Edition > ISBN10: ?0596519222 > > > *** CRAFT: Volume 06 > ISBN10: ?0596518196 > > > *** Enterprise Application Development with Flex > ISBN10: ?0596514409? > > > *** Groovy Recipes (Pragmatic Bookshelf) > ISBN10: ?0978739299 > > > *** Hacking: The Art of Exploitation, Second Edition (No Starch) > ISBN10: ?1593271441? > > > *** iPhone Open Application Development: Rough Cuts Version > ISBN10: ?0596519516 > > > *** The LEGO MINDSTORMS NXT Zoo! (No Starch) > ISBN10: ?1593271700 > > > *** LINQ Pocket Reference > ISBN10: ?0596519249 > > > *** Rails for PHP Developers (Pragmatic Bookshelf) > ISBN10: ?1934356042 > > > *** ScreenOS Cookbook > ISBN10: ?0596510039? > > > *** Sound Mixing Tips and Tricks (PC Publishing) > ISBN10: ?1906005044 > > > *** Subject To Change: Creating Great Products & Services for > an Uncertain World > ISBN10: ?0596516835? > > > *** Switching to the Mac: The Missing Manual, Leopard Edition > ISBN10: ?0596514123? > > > *** Take Control of Your iPhone (TidBITS) > ISBN10: ?1933671343 > > > *** The Ultimate CSS Reference (Hard Cover) (SitePoint) > ISBN10: ?0980285852 > > > *** Up and Running with Joomla > ISBN10: ?0596515847? > > > *** Wicked Cool PHP (No Starch) > ISBN10: ?1593271735 > > > > ***MAKE Magazine Subscriptions > The annual subscription price for four issues is $34.95. When you > subscribe with this link, you'll get a free issue--one plus four? > more for $34.95. So subscribe for yourself or friends with this > great offer for UG Members: five volumes for the cost of four. > Subscribe at: > > > > ***Craft Magazine Subscriptions > The annual subscription price for four issues is $34.95. When you > subscribe with this link, you'll get a free issue--one plus > four more for $34.95. So subscribe for yourself or friends with this > great offer for UG Members: five volumes for the cost of four. > Subscribe at: > From scratchcomputing at gmail.com Sat Feb 23 12:21:37 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Sat, 23 Feb 2008 12:21:37 -0800 Subject: [Pdx-pm] File-Fu overloading: '*' replaces '.' Message-ID: <200802231221.37905.ewilhelm@cpan.org> Hi all, Perl's overloading of "$obj\n" calls the '.' method, so it looks like the File::Fu inner append has to be changed. Note: the operators are pronounced: / "slash" (not "divide") + "plus" (not "add") * "glue" (not "multiply") Before: my $dir = File::Fu->dir("bar"); # "bar/" my $alsodir = $dir . 'bat'; # "barbat/" my $subdir = $alsodir / 'baz'; # "barbat/baz/" my $subdir2 = ($dir . 'bat') / 'baz'; # "barbat/baz/" my $file = $subdir + 'file.txt'; # "barbat/baz/file.txt" After: my $dir = File::Fu->dir("bar"); # "bar/" my $alsodir = $dir * 'bat'; # "barbat/" my $subdir = $alsodir / 'baz'; # "barbat/baz/" my $subdir2 = $dir * 'bat' / 'baz'; # "barbat/baz/" my $file = $subdir + 'file.txt'; # "barbat/baz/file.txt" Notice the bump in precedence eliminates the need for parens on the "inner append 'bat'" in the $subdir2 line. Unfortunately, the '+' precedence is still low, so this won't work: my $file = $dir * 'bat' / 'baz' + 'file' * '.txt' Because of that, I'm considering involving "%" ("mod") and shuffling things around a bit. But, perl6 fixes the ".=" and "=~" bits, right? (If so, then I would like to keep the interface closer to that.) Another alternative is to dualize "&", but that would mean breaking the map() nature. --Eric -- The reasonable man adapts himself to the world; the unreasonable man persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. --George Bernard Shaw --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From pagaltzis at gmx.de Sat Feb 23 14:48:28 2008 From: pagaltzis at gmx.de (Aristotle Pagaltzis) Date: Sat, 23 Feb 2008 23:48:28 +0100 Subject: [Pdx-pm] File-Fu overloading: '*' replaces '.' In-Reply-To: <200802231221.37905.ewilhelm@cpan.org> References: <200802231221.37905.ewilhelm@cpan.org> Message-ID: <20080223224827.GA19059@klangraum> Hi Eric, * Eric Wilhelm [2008-02-23 21:25]: > my $dir = File::Fu->dir("bar"); # "bar/" > my $alsodir = $dir * 'bat'; # "barbat/" > my $subdir = $alsodir / 'baz'; # "barbat/baz/" > my $subdir2 = $dir * 'bat' / 'baz'; # "barbat/baz/" > my $file = $subdir + 'file.txt'; # "barbat/baz/file.txt" I find the basic File::Fu interface interesting? but operator overloading always makes me just ever so slightly queasy, and this example is no exception. I get the desire for syntactic sugar, I really do? but looking at this, I think the sane way to accommodate that desire is to attach overloaded semantics to a specially denoted scope rather than hang them off the type of an object. Err, OK, I am going off on a trail that is no longer directly relevant to your inquiry. Sorry. I shall muse about that by myself for a while. Regards, -- Aristotle Pagaltzis // From scratchcomputing at gmail.com Sat Feb 23 16:59:53 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Sat, 23 Feb 2008 16:59:53 -0800 Subject: [Pdx-pm] File-Fu overloading In-Reply-To: <20080223224827.GA19059@klangraum> References: <200802231221.37905.ewilhelm@cpan.org> <20080223224827.GA19059@klangraum> Message-ID: <200802231659.54107.ewilhelm@cpan.org> # from Aristotle Pagaltzis # on Saturday 23 February 2008 14:48: >I find the basic File::Fu interface interesting? but operator >overloading always makes me just ever so slightly queasy, and >this example is no exception. Is that because of the syntax, the concepts, or the fact that perl5 doesn't quite get it right? Does it help to know that error messages will be plentiful and informative? (Not to mention the aforementioned disambiguation between mutations and stringifications.) >I get the desire for syntactic >sugar, I really do? but looking at this, I think the sane way >to accommodate that desire is to attach overloaded semantics >to a specially denoted scope rather than hang them off the type >of an object. I can't picture that without an example. I suspect though that having the object carry the semantics around with it is still going to be preferred. The essential motivation is that "if I can't make this interface work, I'm just going to slap strings together and be done with it." The converse is that if I can make this interface work then cross-platform pathname compatibility becomes far less tedious. Consider the "load a group of files to be found in a given directory" task: my $dir = File::Fu->dir("foo"); ... foreach my $fn (qw(bar baz bat)) { my $file = $dir + $fn; my $fh = $file->open; while(my $line = <$fh>) { ... } } If you're uncomfortable with the lexical distance, you could put the dir() constructor inside (or next to) the loop, but that (IMO) places too much importance on the "specialness" of $dir. I'm looking at it from the point of view that something named "$dir" which _isn't_ a File::Fu::Dir is an anomaly. --Eric -- hobgoblin n 1: (folklore) a small grotesque supernatural creature that makes trouble for human beings --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From pagaltzis at gmx.de Sun Feb 24 07:00:27 2008 From: pagaltzis at gmx.de (Aristotle Pagaltzis) Date: Sun, 24 Feb 2008 16:00:27 +0100 Subject: [Pdx-pm] Musings on operator overloading (was: File-Fu overloading) In-Reply-To: <200802231659.54107.ewilhelm@cpan.org> References: <200802231221.37905.ewilhelm@cpan.org> <20080223224827.GA19059@klangraum> <200802231659.54107.ewilhelm@cpan.org> Message-ID: <20080224150027.GJ26323@klangraum> [Cc to perl6-language as I think this is of interest] [Oh, and please read the entire thing before responding to any one particular point. There are a number of arguments flowing from one another here. (I am guilty of being too quick with the Reply button myself, hence this friendly reminder.)] * Eric Wilhelm [2008-02-24 02:05]: > # from Aristotle Pagaltzis > # on Saturday 23 February 2008 14:48: > >I find the basic File::Fu interface interesting? but operator > >overloading always makes me just ever so slightly queasy, and > >this example is no exception. > > Is that because of the syntax, the concepts, or the fact that > perl5 doesn't quite get it right? It?s a matter of readability. It?s the old argument about, if not to say against, operator overloading: you?re giving `*` a completely arbitrary meaning that has nothing in common in any way with what `*` means in contexts that the reader of the code had previously encountered. > Does it help to know that error messages will be plentiful and > informative? (Not to mention the aforementioned disambiguation > between mutations and stringifications.) It has nothing to do with any of these factors. > >I get the desire for syntactic sugar, I really do? but looking > >at this, I think the sane way to accommodate that desire is to > >attach overloaded semantics to a specially denoted scope > >rather than hang them off the type of an object. > > I can't picture that without an example. Something like path { $app_base_dir / $conf_dir / $foo_cfg . $cfg_ext } where the operators in that scope are overloaded irrespective of the types of the variables (be they plain scalar strings, instances of a certain class, or whatever). Note that I?m not proposing this as something for File::Fu to implement. It would be rather difficult, if at all possible, to provide such an interface in Perl?5. You need macros or access to the grammar or something like that in order to implement this at all. Although I think that even if you have those, you wouldn?t want to use them directly, but rather as a substrate to implement scope-attached operator overloading as an abstraction over them. But I think it?s desirable to use this abstraction instead of using grammar modifications or macros directly, since it vastly more limited power than the former and still much less power than the latter. It should therefore be easier both in use by the programmer who designs the overloading scope and in readability for the maintenance programmer who reads code that uses overload scopes. It would particularly help the latter, of course, because the code?s behaviour does not vary based on the types that happen to pass through; the source code is explicit and direct about its meaning. > I suspect though that having the object carry the semantics > around with it is still going to be preferred. There are cases where it would be. When the object is a mathematical abstraction in some broad sense, e.g. it?s a complex number class, or it implements some kind of container such as a set, then being able to overload operators based on the type of that object would be useful. But note that in all of these examples, it is very much self-evident what the meaning of an overloaded `+` would be: that meaning comes from the problem domain ? a problem domain that has the rare property of having concepts such as operators and operands. When you leave the broader domain of mathematical and ?para-? mathematical abstractions behind and start to define things like division on arbitrary object types that model aspects of domains which have nothing even resembling such concepts, you?re rapidly moving into the territory of obfuscation. A lot of C++ programmers could sing a song about that. However, I think the way that Java reacted to this (?only the language designer gets to overload operators!!?) is completely wrong. I agree fully with the underlying desire you express: > The essential motivation is that "if I can't make this > interface work, I'm just going to slap strings together and be > done with it." The converse is that if I can make this > interface work then cross-platform pathname compatibility > becomes far less tedious. Absolutely it is very, very useful to be able to define syntactic sugar that makes it as easy and pleasant to do the right thing (manipulate pathnames as pathnames) as it is to do the wrong thing (use string operations to deal with pathnames). That is precisely why I said that I do get why you?d want to overload operators. And this contradiction ? that being able to declare sugar is good, but the way that languages have permitted that so far leads to insanity ? is what sent me thinking along the lines that there has to be some way to make overloading sane. And we all know that all is fair if you predeclare. And that led me to the flash of inspiration: why not make overloading a property of the source (lexical, early-bound) rather than of the values (temporal, late- bound)? And what we need to do that is a way to say ?this scope is special in that the operators herein follow rules that differ from the normal semantics.? There you have it. Note that even with mathematical abstractions, there are cases where scope-bound overloading is a win over type-bound overloading. Consider a hypothetical Math::Symbolic that lets you do something like this: my $x = Math::Symbolic->new(); print +( $x**2 + 4 * $x + 3 )->derivative( $x ); I hope it?s obvious how such a thing would me implemented. Now, if you used type-bound overloading, then the following two expressions cannot yield the same result: ( 2 / 3 ) * $x 2 * $x / 3 But if overloading was scope-bound, they would! (I have to credit and thank Kragen Sitaker for this example. I spent a while last night chatting with him on IRC about this, and he helped me clear up the idea a little in my head. He also convinced me that type-bound operator overloading is important for modeling concepts from the mathematical domain.) > Consider the "load a group of files to be found in a given > directory" task: > > my $dir = File::Fu->dir("foo"); > > ... > > foreach my $fn (qw(bar baz bat)) { > my $file = $dir + $fn; > my $fh = $file->open; > while(my $line = <$fh>) { > ... > } > } > > If you're uncomfortable with the lexical distance, you could > put the dir() constructor inside (or next to) the loop, but > that (IMO) places too much importance on the "specialness" of > $dir. I'm looking at it from the point of view that something > named "$dir" which _isn't_ a File::Fu::Dir is an anomaly. This is all precisely to my point: the lexical distance *is* (potentially) too great, but reducing it *does* emphasise the wrong thing. What?s *more*, you have to use this File::Fu class and its instance methods to ensure that it all works properly. I?ve seen Path::Class used extensively in the context of Catalyst, and one thing that struck me is how often you must explicitly stringify, because there?s this tension between APIs that expect filenames as strings or objects of certain kinds, where you can?t continue just pretending that your Path::Class objects are mostly like strings ? even though Path::Class does make some effort to allow this. My counterproposal, were it possible in Perl?5, which it isn?t, would be something like this: my $dir = 'foo'; # no object at all! # ... foreach my $fn (qw(bar baz bat)) { my $file = path { $dir / $fn }; open my $fh, '<', $file or die "$!\n"; while(my $line = <$fh>) { # ... } } This *really would* work regardless of whether you pass strings or any kind of pretends-to-be-a-string path objects, it makes the spot that does something unusual explicit about its unusualness, and so avoids creating a desire to serve readability by skewing lexical distance in a way not actually warranted by the intent of the program. It would also be a terrifically awesome way to cure the batshit insanity of IO::All without losing the deliciousness that is its very raison d??tre. -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1} &Just->another->Perl->hack; #Aristotle Pagaltzis // From perl at aaroncrane.co.uk Sun Feb 24 08:26:03 2008 From: perl at aaroncrane.co.uk (Aaron Crane) Date: Sun, 24 Feb 2008 16:26:03 +0000 Subject: [Pdx-pm] Musings on operator overloading (was: File-Fu overloading) In-Reply-To: <20080224150027.GJ26323@klangraum> References: <200802231221.37905.ewilhelm@cpan.org> <20080223224827.GA19059@klangraum> <200802231659.54107.ewilhelm@cpan.org> <20080224150027.GJ26323@klangraum> Message-ID: <20080224162603.GB7204@aaroncrane.co.uk> Aristotle Pagaltzis writes: > [Cc to perl6-language as I think this is of interest] [I agree with that, but since this response has nothing to do with Perl 6 or its design, I'm deleting p6l again.] > My counterproposal, were it possible in Perl?5, which it isn?t, > would be something like this: > > my $dir = 'foo'; # no object at all! > > foreach my $fn (qw(bar baz bat)) { > my $file = path { $dir / $fn }; > open my $fh, '<', $file or die "$!\n"; > while(my $line = <$fh>) { > # ... > } > } With only a little fiddling, that does seem at least mostly possible to me. Making the "no object at all!" bit work is obviously hardest; overload::constant is the typical hammer for such nails, as long as its deficiencies can be accepted. The biggest deficiency here is that you end up needing the appropriate overload::constant applied to every string constant in your program. Perhaps autoboxing could help with that. If that can of worms can be overlooked, scoped operator overloading seems like it could be done something like this: #! /usr/bin/perl use strict; use warnings; use Test::More tests => 2; use Sub::Name qw; { package File; use base qw; use overload '/' => 'slash'; sub slash { my ($self, $rhs) = @_; my $class = ref $self; die "Division impossible on $class; did you mean path { ... }?" if !main::in_distinguished_scope(); return $class->new($self->dir, $rhs, $self->basename); # ... or whatever semantics are deemed appropriate } } { my %in_scope; my $n; sub path (&) { my ($block) = @_; $n++; my $name = "File::.call.path.$n"; subname($name, $block); local $in_scope{$name} = 1; $block->(); } sub in_distinguished_scope { return $in_scope{ (caller 2)[3] }; } } my $f = File->new(qw); my $d = Path::Class::Dir->new('c'); my $using_scoped_op = path { $f / $d }; is($using_scoped_op, File->new(qw), 'correct result with scoped op'); my $using_global_op = eval { $f / $d }; my $err = $@; cmp_ok(!defined $using_global_op, '&&', $err, 'no result with global op'); __END__ -- Aaron Crane From scratchcomputing at gmail.com Sun Feb 24 12:56:40 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Sun, 24 Feb 2008 12:56:40 -0800 Subject: [Pdx-pm] Musings on operator overloading (was: File-Fu overloading) In-Reply-To: <20080224150027.GJ26323@klangraum> References: <200802231221.37905.ewilhelm@cpan.org> <200802231659.54107.ewilhelm@cpan.org> <20080224150027.GJ26323@klangraum> Message-ID: <200802241256.40352.ewilhelm@cpan.org> # from Aristotle Pagaltzis # on Sunday 24 February 2008 07:00: Note that I didn't have to type the 'or die' message, and that the croak() built into File::Fu includes the filename in the error message. >> my $fh = $file->open; >? ? ? open my $fh, '<', $file or die "$!\n"; I think there is a usefulness in having the filename be an object. This means it then has to at least be able to stringify. And then we're left with the perl5 overload issues. >I?ve seen Path::Class used extensively in the context of >Catalyst, and one thing that struck me is how often you must >explicitly stringify, because there?s this tension between APIs >that expect filenames as strings or objects of certain kinds, ... Well, they are like strings for anything that doesn't understand them as path objects. If you're passing them to code that wants a string but croaks if ref($str), the bug is in that code. >it makes the spot that does something unusual explicit about its >unusualness By that principle, shouldn't all lines of perl start with an "unusual" keyword? >But note that in all of these examples, it is very much >self-evident what the meaning of an overloaded `+` would be... >When you leave the broader domain of mathematical and ?para-? >mathematical abstractions behind and start to define things like >division on arbitrary object types ... Well, I'm not "defining division". The '/' as a directory separator is just a "slash" character. The operators don't want you to think of the operands as numbers, and the reader who can't accept that might as well complain that matrix multiplication is non-commutative -- that's just the way the convention is defined. I see what you're saying about the scoped overloading, but I don't think its actually as useful as objects in this case. If the conventions I'm defining for manipulating these objects with operators don't work for you, I would love to hear alternatives. (I've considered '|', '^', '&', and combinations involving '<<', '>>', but I don't think I can go below '<<' because I'm using & as the map(), so it's pretty slim pickings to choose a set with the correct precedence.) The feedback on operator overloading has been mixed. At present, the '+' opinions outnumber the '-' ones, so I'm at least certain that I've created sufficient controversy. Try the method API? --Eric -- Issues of control, repair, improvement, cost, or just plain understandability all come down strongly in favor of open source solutions to complex problems of any sort. --Robert G. Brown --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From chromatic at wgz.org Sun Feb 24 13:29:14 2008 From: chromatic at wgz.org (chromatic) Date: Sun, 24 Feb 2008 13:29:14 -0800 Subject: [Pdx-pm] Musings on operator overloading (was: File-Fu overloading) In-Reply-To: <200802241256.40352.ewilhelm@cpan.org> References: <200802231221.37905.ewilhelm@cpan.org> <20080224150027.GJ26323@klangraum> <200802241256.40352.ewilhelm@cpan.org> Message-ID: <200802241329.14241.chromatic@wgz.org> On Sunday 24 February 2008 12:56:40 Eric Wilhelm wrote: > Well, they are like strings for anything that doesn't understand them as > path objects. ?If you're passing them to code that wants a string but > croaks if ref($str), the bug is in that code. See also just about everything written in Perl from 1994 through at least 2005. For all that people complain about how non-typeful Perl 5 is, there's a lot of code that tries to enforce memory-layout-based-typing at runtime. -- c From jaleto at gmail.com Sun Feb 24 15:14:17 2008 From: jaleto at gmail.com (Jonathan Leto) Date: Sun, 24 Feb 2008 18:14:17 -0500 Subject: [Pdx-pm] Musings on operator overloading Message-ID: <9aaadf9c0802241514t3cad0e08k8b84e5e910a4eb79@mail.gmail.com> Howdy Folks, [snip] > Note that even with mathematical abstractions, there are cases > where scope-bound overloading is a win over type-bound > overloading. Consider a hypothetical Math::Symbolic that lets you > do something like this: > > my $x = Math::Symbolic->new(); > print +( $x**2 + 4 * $x + 3 )->derivative( $x ); > > I hope it?s obvious how such a thing would me implemented. Now, > if you used type-bound overloading, then the following two > expressions cannot yield the same result: > > ( 2 / 3 ) * $x > 2 * $x / 3 > > But if overloading was scope-bound, they would! [snip] This piqued my interest, so I attempted to exhibit the problem with Math::MatrixReal (which uses a fair bit of op overloading) : #!/usr/bin/perl -w use strict; use Math::MatrixReal; # Example code to show type bound operator overloading # that returns the same stuff my $matrix = Math::MatrixReal->new_from_rows([[3,6,9]]); my $a = (2/3) * $matrix; my $b = 2 * $matrix / 3; my $c = 2 * (+$matrix) / 3; my $d = (2/3) * (+$matrix); print "\$a is a " . (ref $a) . "\n"; print "\$b is a " . (ref $b) . "\n"; print "\$c is a " . (ref $c) . "\n"; print "\$d is a " . (ref $d) . "\n"; print "\$a=\n"; print $a; print "\$b=\n"; print $b; print "\$c=\n"; print $c; print "\$d=\n"; print $d; Which outputs: $a is a Math::MatrixReal $b is a Math::MatrixReal $c is a Math::MatrixReal $d is a Math::MatrixReal $a= [ 2.000000000000E+00 4.000000000000E+00 6.000000000000E+00 ] $b= [ 2.000000000000E+00 4.000000000000E+00 6.000000000000E+00 ] $c= [ 2.000000000000E+00 4.000000000000E+00 6.000000000000E+00 ] $d= [ 2.000000000000E+00 4.000000000000E+00 6.000000000000E+00 ] Am I missing something? The current source for Math::MatrixReal is at http://leto.net/svn/Math-MatrixReal/ and the source to that example can be found at http://leto.net/svn/util/trunk/examples/ . -- [---------------------] Jonathan Leto jaleto at gmail.com 503.928.0609 From selenamarie at gmail.com Tue Feb 26 07:56:18 2008 From: selenamarie at gmail.com (Selena Deckelmann) Date: Tue, 26 Feb 2008 07:56:18 -0800 Subject: [Pdx-pm] TONIGHT! Extreme Database Makeover at Cubespace Message-ID: <2b5e566d0802260756p10e93e54g93878f8b8cb1a62e@mail.gmail.com> Topic: Extreme Database Makeover: RT Speakers: Jeff Davis, Mark Wong, David Wheeler When: Tuesday, February 26, 2008, 6:30pm Where: Cubespace, 622 SE Grand Avenue, Portland, OR 97214 (In assocciation with Code-n-Splode http://pdx.codensplode.org/) Come join us for a little fun with RT. Jeff Davis recently went through an implementation of RT and had a few suggestions for their database schema. David Wheeler and Mark Wong promised to come help "refactor". There is a .dot representation of their schema out on the web, and I figured I/we could print this out, and maybe bring in a few sheets of paper to document our changes. If anyone has a printer and a few moments to volunteer, I'd appreciate help with the printing. At the end of the meeting, we'd like to pass on some of our suggestions to the good folks at Best Practical. Afterward, we'll seek refreshments at the Side Door Pub! -- Selena Deckelmann PDXPUG - Portland PostgreSQL Users Group http://pugs.postgresql.org/pdx http://www.chesnok.com/daily From allison at perl.org Tue Feb 26 09:50:21 2008 From: allison at perl.org (Allison Randal) Date: Tue, 26 Feb 2008 09:50:21 -0800 Subject: [Pdx-pm] Perl training in Portland Message-ID: <47C4515D.6070105@perl.org> I'm looking for local Perl training, for a friend's coworker. Any suggestions? "She has a programming background, and would prefer an overview course that is 1 - 3 days long, she'd ideally like to stay away from a week-long course." Allison From FedraY at parkerservices.com Tue Feb 26 13:35:56 2008 From: FedraY at parkerservices.com (Fedra Y. Yazdi) Date: Tue, 26 Feb 2008 13:35:56 -0800 Subject: [Pdx-pm] R U Mod_PERL? Message-ID: Hello This is Fedra, I am a member of SPUG in Seattle, and wanted to take this opportunity to introduce myself. I have an opportunity here in SEATTLE, WA and I thought you would like to hear about it. It's a with a local company here in Seattle, they have been around about 8+ years and they are a smaller company with a casual attitude but they work and play hard. I have the details for the position included here in this email, please let me know if you have any questions, or if you may be interested in this position please don't hesitate to contact me. I have my full contact info included . Duration: 12 month then goes perm or possibly soon for the PERM option Location: Seattle, WA Hourly Comp: DOE Salary: DOE R U MOD-PERL? We are looking for an experienced PERL DEV with experience implementing a functional test automation framework to help our team validate the -------- websites and related applications and tools. This position will work in an agile Dev team to write automated regression and acceptance tests. Software Developer Take your next step with a cutting edge company as a SOFTWARE DEVELOPER The right candidate will be working closely with a team of dedicated engineers focused on building outstanding software solutions. If so, we are looking for you. There's great career growth opportunity with us, and we can't wait to hear from you. A career at --------is about being excited every day about your role, your team and the company. At ------------------- you will interact with smart, passionate, committed people. We thrive on each other's energies and ideas, and challenge each other to make the "impossible" into "eminently feasible". We'd love to hear what you want to do. We're certain you want to be here while you are doing it! Responsibilities * Write scalable, maintainable code, unit, functional, and acceptance tests * Contribute to system design and architecture decisions * Assist in QA and firefighting efforts as necessary Qualifications * Thorough understanding of object-oriented methodology * Thorough understanding of MVC architectures * Experience with coding database-backed web applications * Expert knowledge in either mod_perl or Ruby on Rails * Intermediate knowledge of a mod_perl templating language * Intermediate CSS and Javascript skills * Willingness to work in an Agile development environment * Ability to clearly and concisely communicate technical ideas This is a contract position with a strong possibility of it going perm, with a competitive pay and benefits. If you are interested in this opportunity please contact me: Fedra fedray at ParkerServices.com 206-652-1583 DIRECT 206-930-5339 Thank you Fedra Yazdi Sr. Technical Recruiter Parker Technical | 605 Fifth Ave S, Suite 850 | Seattle, WA 98104 fedray at parkerservices.com | p: 206-652-1583 | f: 206-223-8227 | m: 206-930-5339 Talk to me on GTALK, YAHOO or MSN fedrayazdi at yahoo.com yazdi04 at hotmail.com fybraun at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20080226/396c0a5f/attachment.html From scratchcomputing at gmail.com Tue Feb 26 15:26:52 2008 From: scratchcomputing at gmail.com (The Dread Parrot) Date: Tue, 26 Feb 2008 15:26:52 -0800 Subject: [Pdx-pm] recruitment policy In-Reply-To: References: Message-ID: <200802261526.52589.ewilhelm@cpan.org> # from Fedra Y. Yazdi # on Tuesday 26 February 2008 13:35: >This is Fedra, Hi Fedra, >I am a member of SPUG in Seattle, Good, then you'll understand our job posting policy, which is rather similar to SPUG's. Direct posting must be by principals only. If we are not applying for the opportunity to sit in the cube next to yours, please do not post the job directly. Recruiters are welcome to send job postings for relay via moderation. >We are looking for an experienced PERL DEV For example, a moderator would have helpfully suggested that "Perl" is the preferred spelling. You would also have had the benefit of having your mail helpfully forwarded rather than being followed by this friendly public reminder that we do not have an open-season recruitment policy. Thanks, Eric -- http://pdx.pm.org From rootbeer at redcat.com Tue Feb 26 18:46:47 2008 From: rootbeer at redcat.com (Tom Phoenix) Date: Tue, 26 Feb 2008 18:46:47 -0800 Subject: [Pdx-pm] Perl training in Portland In-Reply-To: <47C4515D.6070105@perl.org> References: <47C4515D.6070105@perl.org> Message-ID: <31086b240802261846h337617e1s16ab03e72e44f99d@mail.gmail.com> On Tue, Feb 26, 2008 at 9:50 AM, Allison Randal wrote: > I'm looking for local Perl training, for a friend's coworker. Any > suggestions? Here's the page on the course I'm teaching in early June: http://www.cpd.ogi.edu/course.asp?n=08-SD-42 Cheers! --Tom Phoenix From scratchcomputing at gmail.com Wed Feb 27 01:34:53 2008 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Wed, 27 Feb 2008 01:34:53 -0800 Subject: [Pdx-pm] solving File::Temp API friction Message-ID: <200802270134.53650.ewilhelm@cpan.org> Hi all, I always have trouble remembering how to operate the File::Temp API. Does the directory delete automatically or do I have to set the cleanup flag, where is it and what is it named, why do I have to specify TMPDIR if I give it a template, etc, etc. With directory objects, the temporary directory is always explicit. File::Fu->tmp is your friendly File::Spec->tmpdir, so when you call temp_dir/temp_file on the toplevel package, it uses /tmp/ for the parent. If you have or create a directory object, that's the parent. File::Fu->temp_dir; # '/tmp/' File::Fu->dir->temp_dir; # './' File::Fu->dir("foo")->temp_dir; # 'foo/' File::Fu->temp_file; # '/tmp/' File::Fu->dir->temp_file; # './' File::Fu->dir("foo")->temp_file; # 'foo/' Now you always know where it is, but without all that extra typing. You can also pass the "first part" of a template with $dir->temp_file("foo") instead of "foo" . "X"x10. But I don't know what to say about the sysopen binmode win32 issue here: http://use.perl.org/~jarich/journal/35761 File::Fu v0.0.2 just hit CPAN with a whole pile of new features including builtins like readlink() and such, the aforementioned temp bits, create(), remove(), find(), and read() (with File::Slurp if you have it.) I'll probably break the .= brokenness later this week and then release v0.1.0. Anyone see anything missing? --Eric -- [...proprietary software is better than gpl because...] "There is value in having somebody you can write checks to, and they fix bugs." --Mike McNamara (president of a commercial software company) --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From allison at perl.org Thu Feb 28 18:43:12 2008 From: allison at perl.org (Allison Randal) Date: Thu, 28 Feb 2008 18:43:12 -0800 Subject: [Pdx-pm] Perl training in Portland In-Reply-To: <31086b240802261846h337617e1s16ab03e72e44f99d@mail.gmail.com> References: <47C4515D.6070105@perl.org> <31086b240802261846h337617e1s16ab03e72e44f99d@mail.gmail.com> Message-ID: <47C77140.5060504@perl.org> Tom Phoenix wrote: > > Here's the page on the course I'm teaching in early June: > > http://www.cpd.ogi.edu/course.asp?n=08-SD-42 Perfect. She's planning to enroll. Allison From scratchcomputing at gmail.com Fri Feb 29 18:34:30 2008 From: scratchcomputing at gmail.com (Seven till Seven) Date: Fri, 29 Feb 2008 18:34:30 -0800 Subject: [Pdx-pm] Ben Rides a Moose -- March Meeting 2 weeks from a couple days ago Message-ID: <200802291834.31041.ewilhelm@cpan.org> Wed. March 12th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. Topic: Moose - objects and antlers Speaker: Ben Hengst Moose is a cute, fuzzy module (which just happens to share its name with a big smelly creature.) Er, it is a postmodern object system which allows you to remove much of the hairiness from your object-oriented Perl code. Moose borrows features from Perl 6, CLOS (LISP), Smalltalk, Java, BETA, OCaml, Ruby and more. Ben will present a brief introduction to Moose, followed by an overview of (and real-world examples from) a database-linked search/results system built on Moose. * Saddle the Moose (intro) * a perl object system * meta syntax for object/class declaration * simple example * not *that* weird * Ride the Moose (code in "the real world") * Constructors for free * BUILD * under the hood - the meta() method * getters and setters * example * possible name space collisions * 'rw' vs 'ro' * timing issues ( lazy => 1 ) * strict types * things die if they are wrong, just like they should (assertion) * roles * less code to test * Love the Moose (techniques and practices) * composition / modularization / encapsulation * layout of logical file structure with roles * easier team workflow / merging * QA notes -- http://pdx.pm.org