From yahgrp at poplarware.com Fri Jul 6 09:50:28 2007 From: yahgrp at poplarware.com (Jennifer Hodgdon) Date: Fri, 06 Jul 2007 09:50:28 -0700 Subject: SPUG: Wiki spammed Message-ID: <468E72D4.9010402@poplarware.com> Someone edited the main wiki.seattleperl.org page to be a spam page -- I put it back, but it happened several days ago... someone needs to disable that user too, but I don't have permission. --Jennifer -- Jennifer Hodgdon Poplar ProductivityWare * www.poplarware.com Web Databases/Scripts * Modeling/Analysis/Palm OS Software From yahgrp at poplarware.com Fri Jul 6 10:02:06 2007 From: yahgrp at poplarware.com (Jennifer Hodgdon) Date: Fri, 06 Jul 2007 10:02:06 -0700 Subject: SPUG: Wiki spammed In-Reply-To: <468E72D4.9010402@poplarware.com> References: <468E72D4.9010402@poplarware.com> Message-ID: <468E758E.6030006@poplarware.com> Jennifer Hodgdon wrote: > Someone edited the main wiki.seattleperl.org page to be a spam page -- > I put it back, but it happened several days ago... someone needs to > disable that user too, but I don't have permission. Several other edits fixed too -- I think the Wiki is back to OK... Is anyone monitoring the Recent Changes page? There seems to be an RSS feed link on the left sidebar. I'll volunteer to subscribe and monitor it for now. -- Jennifer -- Jennifer Hodgdon Poplar ProductivityWare * www.poplarware.com Web Databases/Scripts * Modeling/Analysis/Palm OS Software From yahgrp at poplarware.com Fri Jul 6 10:08:59 2007 From: yahgrp at poplarware.com (Jennifer Hodgdon) Date: Fri, 06 Jul 2007 10:08:59 -0700 Subject: SPUG: Wiki spammed In-Reply-To: <468E758E.6030006@poplarware.com> References: <468E72D4.9010402@poplarware.com> <468E758E.6030006@poplarware.com> Message-ID: <468E772B.8070904@poplarware.com> > Several other edits fixed too -- I think the Wiki is back to OK... Is > anyone monitoring the Recent Changes page? There seems to be an RSS feed > link on the left sidebar. I'll volunteer to subscribe and monitor it for > now. I take that back. My RSS reader doesn't like either of those feeds for some reason. Sigh. -- Jennifer -- Jennifer Hodgdon Poplar ProductivityWare * www.poplarware.com Web Databases/Scripts * Modeling/Analysis/Palm OS Software From MichaelRWolf at att.net Sat Jul 7 15:51:02 2007 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Sat, 7 Jul 2007 15:51:02 -0700 Subject: SPUG: dos2apache_unix and unix2apache_dos Message-ID: <002e01c7c0e9$51d699c0$0500a8c0@mlaptop> Apache cares about the shebang line on Unix- and Windows-derived OS's. I have to maintain classroom labs that can be run on either OS. I don't want to maintain two variants whose only differences are line endings and the perl path on the shebang line. Anyone know of a program that does dos2unix and unix2dos while also correcting the shebang lines? I've started writing it, but there are edge cases with permissions, and incorrect line endings (because we have a heterogeneous development environment with chaotic source control). -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From jobs-noreply at seattleperl.org Tue Jul 10 09:56:45 2007 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Tue, 10 Jul 2007 09:56:45 -0700 (PDT) Subject: SPUG: JOB: Mod_Perl Proffessional at Classmates.com Message-ID: I'd like to bring awareness to the members of the Seattle Perl Users Group about a new full time position with Classsmates.com. This is a permanent position with Classmates located in Renton, WA. The person hired for this role will be working on a site outside of Classmates.com that will encompass a team of less than 10 but will have the support of the 200+ FTE's of Classmates as needed. At this time we are not looking for outside vendor assistance. We are not able to hire candidates that require work sponsorship at this time. The work for this role would be required to be completed onsite at our corporate headquarters in Renton. The Opportunity: United Online's Classmates.com owns several social networking sites. We're looking for an experienced software engineer to maintain, develop and eventually re-implement a legacy web and email production application. This particular position is part of a very small, narrowly focused team. You get the small team working environment with the HR benefits of a large corporation. The First Three Tasks: * Update email bounce processing to logically delete members associated with hard bounces. * Update email bounce processing to increment soft bounces, eventually treating soft bounces over a threshold as a hard bounce. * Increment web application to recognize one-to-many relationships between members. Role Evolution: * Refactor web, email and administrative applications. * Support RDBMS change from PostgreSQL to Oracle. The Job Requirements: * Mod_PERL experience. * Template Tookit experience a plus. * PostgreSQL experience a plus. * FreeBSD experience a plus. * Email application experience a plus. * BS/BA from an accredited college or university. Commensurate level of experience may waive the educational requirement. All interested professionals should contact me directly via the email and/or phone number provided below. Thank you in advance, Chad Monson Recruiter Classmates Online, Inc. 2001 Lind Avenue SW, Suite 500 Renton, WA 98055 T: 425.917.4931 F: 425.917.5001 cmonson at classmates.com From haircut at gmail.com Thu Jul 12 08:03:10 2007 From: haircut at gmail.com (Adam Monsen) Date: Thu, 12 Jul 2007 08:03:10 -0700 Subject: SPUG: OT: OSCON 2007: Wherefore not The Damian? I beseech thee! In-Reply-To: <46830596.5080303@conway.org> References: <9ebd65110706271555k65a2f5e7ia38cbde77fe571a2@mail.gmail.com> <46830596.5080303@conway.org> Message-ID: <9ebd65110707120803k4217914el54883035c1acbb2e@mail.gmail.com> On 6/27/07, Damian Conway wrote: [...] > I'm certain O'Reilly will happily refund your money, if you prefer not to > take > the class now that I'm not teaching it. If you decide on that course and > experience any difficulties, please don't hesitate to contact me directly > and > I'll do my best to help sort it out. > [...] Thank you, I sincerely appreciate that. My Vim devotion appears to have superseded my angst from missing my favorite speaker. I was able to contact Steve and he wrote me back with some useful information, and I've subsequently decided to attend the tutorial after all. At the risk of spiraling even further off-topic, I will provide my correspondence with him. My query (not verbatim): ------------------------------------------8<------------------------------------------ I've used Vim for many years and I look forward to the tutorial. Do you have an outline to share? I couldn't find one on the OSCON Web site. I'd like to study up on whatever you'll be presenting so I can get the most out of your tutorial. What should I be able to do when I leave the tutorial? I'm familiar with all the basic Vim commands and I hope to become a better Vim script writer. And I want to be challenged. I appreciated your Vim Cookbook, but I am quite fluent with the concepts presented there and would love to go a little deeper with Vim. Could you tell me if your tutorial will be more advancedthan your Vim Cookbook? ------------------------------------------>8------------------------------------------ His answer (not verbatim): ------------------------------------------8<------------------------------------------ 1. Programming the syntax engine 2. Basic Function Writing 3. Hooking your Function into Vim (This is actually more complex than you might think) 4. Debugging scripts. 5. Working with syntax coloring and scripts. 6. Adding perl scripts to vim. 7. Advanced features. ------------------------------------------>8------------------------------------------ -- Adam Monsen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20070712/acaa2158/attachment.html From dwilburn at whitepages.com Thu Jul 12 20:25:45 2007 From: dwilburn at whitepages.com (Daina Wilburn) Date: Thu, 12 Jul 2007 20:25:45 -0700 Subject: SPUG: Meeting Announcement -- 17 July, 2007 Message-ID: <99EC30D21F5A8A44B1369983D2D9529997D770@netmail.corp.w3data.com> July 2007 Seattle Perl Users Group (SPUG) Meeting ==================================================== Topic: New Features in Perl 5.10 Speaker: Yitzchak Scott-Thoennes Meeting Date: Tuesday, 17 July 2007 Meeting Time: 6:30 - 8:30 p.m. Location: Whitepages.com offices, downtown Seattle Cost: Admission is free and open to the public Info: http://seattleperl.org/ ==================================================== This coming Tuesday, July 17th, marks the next coming together of all things Perl, as we hold the next meeting of the THE SEATTLE PERL USERS GROUP. This month, Yitzchak Scott-Thoennes will be describing what's new in Perl 5.10. It promises to be an interesting, informational and even entertaining discussion. So, be sure to bring your friends, and don't forget to bring yourself! Come one. Come all... to the next SPUG meeting! ================ Thanks again to all the SPUG members that show up at meetings or participate on the list to make the group worthwhile in the first place, and all the JAPHs out there for just being. Meeting Location ================ Whitepages.com is located on the 16th floor of the Rainier Square Tower (1301 5th Avenue, Seattle) which is across from the 5th Avenue Theater. See the directions[1] for a quick primer on how to reach us from various locations across Puget Sound. There are plenty of locations to park in the area, including on the street. If you're looking for off-street parking, you can park in the Rainier Square garage which has an entrance on Union St. After 6PM, the building management restricts access to most floors. Our host is trying to take care of this, but if unsuccessful, they will station someone on the 1st floor near the elevator bank and 5th Avenue entrance to let people in. Worst case scenario, give the host a call on his cell phone[2] or [3] and he'll run down to let you in. Our hosts are providing a generous assortment of free sodas, fruit drinks, teas, and coffee, and also have some snacks. You definitely won't dehydrate here. See you there! -DW [1] - http://www.whitepagesinc.com/locations [2] - 206 354 7789 - Colin Meyer [3] - 206-271-9267 - Daina Wilburn _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays WEB PAGE: http://seattleperl.org/ From cconnoll at u.washington.edu Fri Jul 13 22:12:43 2007 From: cconnoll at u.washington.edu (Charles Connolly) Date: Fri, 13 Jul 2007 22:12:43 -0700 (PDT) Subject: SPUG: conditional module loading Message-ID: Hi, I would like to load one of two modules depending on the value of an environment variable. It looks like both modules are loaded in spite of the 'use' statements being in an if/else block, and the 'elsif' part not being entered. Any ideas what's going on? I'm stumped. Thanks for your thoughts. Chuck Connolly Here's the test script test.plx: #! /usr/bin/perl -w use strict; BEGIN { if ( $ENV{ test_status } == 1 ) { use TestMod; warn "using TestMod\n"; } elsif ( $ENV{ test_status } == 2 ) { use Test2Mod; warn "using Test2Mod\n"; } else { die "unknown value of test_status: $ENV{ test_status }\n"; } } print "status is $ENV{ test_status }\n"; print_id(); # Here's me setting an environment variable and the output of the script: > setenv test_status 1 > test.plx Subroutine main::print_id redefined at /usr/lib/perl5/5.8.5/Exporter.pm line 65. at /home/chuck/bin/perllib/test.plx line 9 using TestMod status is 1 I'm Test2Mod # It looks like both modules are loaded, even though only the print statement in # the if block is called. # Here's TestMod.pm: #!/usr/bin/perl -w use strict; package TestMod; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( print_id ); sub print_id { print "I'm TestMod\n"; } 1; # Here's Test2Mod.pm: #!/usr/bin/perl -w use strict; package Test2Mod; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( print_id ); sub print_id { print "I'm Test2Mod\n"; } 1; From david.dyck at fluke.com Fri Jul 13 22:38:59 2007 From: david.dyck at fluke.com (David Dyck) Date: Fri, 13 Jul 2007 22:38:59 -0700 (PDT) Subject: SPUG: conditional module loading In-Reply-To: References: Message-ID: On Fri, 13 Jul 2007 at 22:12 -0700, Charles Connolly wrote: > I would like to load one of two modules depending on the value of an > environment variable. It looks like both modules are loaded in spite of the > 'use' statements being in an if/else block, and the 'elsif' part not being > entered. Any ideas what's going on? I'm stumped. Thanks for your thoughts. > > Here's the test script test.plx: > #! /usr/bin/perl -w > use strict; > > BEGIN { > if ( $ENV{ test_status } == 1 ) { > use TestMod; > warn "using TestMod\n"; > } elsif ( $ENV{ test_status } == 2 ) { > use Test2Mod; > warn "using Test2Mod\n"; > } else { > die "unknown value of test_status: $ENV{ test_status }\n"; > } > } The use statement is evaluated at compile time (so you are on the right track to start with a BEGIN block.) try changing your use statements to eval "use TestMod"; and eval "use Test2Mod"; From krahnj at telus.net Fri Jul 13 22:49:13 2007 From: krahnj at telus.net (John W. Krahn) Date: Fri, 13 Jul 2007 22:49:13 -0700 Subject: SPUG: conditional module loading In-Reply-To: References: Message-ID: <469863D9.2000300@telus.net> Charles Connolly wrote: > Hi, Hello, > I would like to load one of two modules depending on the value of an > environment variable. It looks like both modules are loaded in spite of the > 'use' statements being in an if/else block, and the 'elsif' part not being > entered. Any ideas what's going on? I'm stumped. Thanks for your thoughts. > > Chuck Connolly > > Here's the test script test.plx: > #! /usr/bin/perl -w > use strict; > > BEGIN { > if ( $ENV{ test_status } == 1 ) { > use TestMod; > warn "using TestMod\n"; > } elsif ( $ENV{ test_status } == 2 ) { > use Test2Mod; > warn "using Test2Mod\n"; > } else { > die "unknown value of test_status: $ENV{ test_status }\n"; > } > } use if $ENV{ test_status } == 1, TestMod; use if $ENV{ test_status } == 2, Test2Mod; perldoc if John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall From charles.e.derykus at boeing.com Sat Jul 14 10:28:30 2007 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Sat, 14 Jul 2007 10:28:30 -0700 Subject: SPUG: conditional module loading In-Reply-To: References: Message-ID: On Fri, 13 Jul 2007 at 22:12 -0700, Charles Connolly wrote: > I would like to load one of two modules depending on the value of > an environment variable. It looks like both modules are loaded in > spite of the 'use' statements being in an if/else block, and the > 'elsif' part not being entered. Any ideas what's going on? I'm stumped. Thanks for your thoughts. > > Here's the test script test.plx: > #! /usr/bin/perl -w > use strict; > > BEGIN { > if ( $ENV{ test_status } == 1 ) { > use TestMod; > warn "using TestMod\n"; > } elsif ( $ENV{ test_status } == 2 ) { > use Test2Mod; > warn "using Test2Mod\n"; > } else { > die "unknown value of test_status: $ENV{ test_status }\n"; > } > } As another alternative, you could just load at runtime before the call to print_id() occurs: #!/usr/bin/perl ... if ( $ENV{ test_status } == 1 ) { require TestMod; import TestMod qw/print_id/; elsif ( $ENV{ test_status } == 2 ) { require Test2Mod; import Test2Mod qw/print_id/; ... } ... print "status is $ENV{ test_status }\n"; print_id(); -- Charles DeRykus From twists at gmail.com Sat Jul 14 21:48:42 2007 From: twists at gmail.com (Joshua ben Jore) Date: Sat, 14 Jul 2007 21:48:42 -0700 Subject: SPUG: conditional module loading In-Reply-To: References: Message-ID: On 7/14/07, DeRykus, Charles E wrote: > As another alternative, you could just load at runtime > before the call to print_id() occurs: > > #!/usr/bin/perl > ... > if ( $ENV{ test_status } == 1 ) { > require TestMod; > import TestMod qw/print_id/; > elsif ( $ENV{ test_status } == 2 ) { > require Test2Mod; > import Test2Mod qw/print_id/; > ... > } Oooh, argh! If you use the "method invocant args" syntax you're semi-likely to get the wrong result especially if you end up with method names in common. The most common thing to get wrong is "new," I guess but I suppose import would easily be possible. That is... if you're doing OO or writing a module. The thing is, if during compilation perl sees an indirect object it has to enter this nice bit of code. Here's the comments for S_intuit_method in toke.c. /* * S_intuit_method * * Does all the checking to disambiguate * foo bar * between foo(bar) and bar->foo. Returns 0 if not a method, otherwise * FUNCMETH (bar->foo(args)) or METHOD (bar->foo args). * * First argument is the stuff after the first token, e.g. "bar". * * Not a method if bar is a filehandle. * Not a method if foo is a subroutine prototyped to take a filehandle. * Not a method if it's really "Foo $bar" * Method if it's "foo $bar" * Not a method if it's really "print foo $bar" * Method if it's really "foo package::" (interpreted as package->foo) * Not a method if bar is known to be a subroutine ("sub bar; foo bar") * Not a method if bar is a filehandle or package, but is quoted with * => */ There's more rules scattered through toke.c. Here's more guessing on the part of perl: /* If not a declared subroutine, it's an indirect object. */ /* (But it's an indir obj regardless for sort.) */ /* Also, if "_" follows a filetest operator, it's a bareword */ In short... using indirect object syntax is ambiguous and requires perl to do a pile of work just to guess at what you mean. You *hope* perl's guess matches your expectations. I certainly can't remember that entire list of rules all the time. The best, unambiguous syntax uses the pointy arrow. TestMod2->import( ... ) Josh From dwilburn at whitepages.com Mon Jul 16 16:14:11 2007 From: dwilburn at whitepages.com (Daina Wilburn) Date: Mon, 16 Jul 2007 16:14:11 -0700 Subject: SPUG: Meeting Announcement -- 17 July, 2007 - Reminder Message-ID: <99EC30D21F5A8A44B1369983D2D9529997D872@netmail.corp.w3data.com> Just a reminder, this month's SPUG meeting is tomorrow! See you then and see below. -thanks! July 2007 Seattle Perl Users Group (SPUG) Meeting ==================================================== Topic: New Features in Perl 5.10 Speaker: Yitzchak Scott-Thoennes Meeting Date: Tuesday, 17 July 2007 Meeting Time: 6:30 - 8:30 p.m. Location: Whitepages.com offices, downtown Seattle Cost: Admission is free and open to the public Info: http://seattleperl.org/ ==================================================== This coming Tuesday, July 17th, marks the next coming together of all things Perl, as we hold the next meeting of the THE SEATTLE PERL USERS GROUP. This month, Yitzchak Scott-Thoennes will be describing what's new in Perl 5.10. It promises to be an interesting, informational and even entertaining discussion. So, be sure to bring your friends, and don't forget to bring yourself! Come one. Come all... to the next SPUG meeting! ================ Thanks again to all the SPUG members that show up at meetings or participate on the list to make the group worthwhile in the first place, and all the JAPHs out there for just being. Meeting Location ================ Whitepages.com is located on the 16th floor of the Rainier Square Tower (1301 5th Avenue, Seattle) which is across from the 5th Avenue Theater. See the directions[1] for a quick primer on how to reach us from various locations across Puget Sound. There are plenty of locations to park in the area, including on the street. If you're looking for off-street parking, you can park in the Rainier Square garage which has an entrance on Union St. After 6PM, the building management restricts access to most floors. Our host is trying to take care of this, but if unsuccessful, they will station someone on the 1st floor near the elevator bank and 5th Avenue entrance to let people in. Worst case scenario, give the host a call on his cell phone[2] or [3] and he'll run down to let you in. Our hosts are providing a generous assortment of free sodas, fruit drinks, teas, and coffee, and also have some snacks. You definitely won't dehydrate here. See you there! -DW [1] - http://www.whitepagesinc.com/locations [2] - 206 354 7789 - Colin Meyer [3] - 206-271-9267 - Daina Wilburn _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays WEB PAGE: http://seattleperl.org/ From MichaelRWolf at att.net Tue Jul 17 23:33:01 2007 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Tue, 17 Jul 2007 23:33:01 -0700 Subject: SPUG: Yitzchak and his warm up act Message-ID: <001401c7c905$8432f520$0500a8c0@mlaptop> For those who missed it, Yitzchak did a good job of highlighting some 5.10 new features. Heck, I even learned a bunch from what's being *deprecated* in 5.10. I guess I'll have to use it pretty quick since the release will be out by September. Which September? (Oops, that's a Perl 6 joke. Never mind.) And I think he has the distinction of being the first speaker to have a "warm-up act". For those who missed it, here's Pudge. You may know him as a Perl hacker, but he's also a singer/songwriter.... http://www.youtube.com/watch?v=Mxk5RMQF6Js Now that he's done a warm-up, perhaps he'll make good on his promise to come back as a headliner. :-) -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From sthoenna at efn.org Tue Jul 17 23:49:15 2007 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Tue, 17 Jul 2007 23:49:15 -0700 (PDT) Subject: SPUG: Old biased arguments against defined-or operator Message-ID: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> As promised at the meeting, here're the arguments advanced against the defined-or operator (orignally proposed as ??, hookhook, now //) that delayed it for so very long. Watch out for the strawmen; they come on thick and fast: http://www.perl.com/tchrist/defop/defconfaq.html http://www.perl.com/tchrist/defop/defprofaq.text From sthoenna at efn.org Wed Jul 18 00:02:15 2007 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Wed, 18 Jul 2007 00:02:15 -0700 (PDT) Subject: SPUG: Yitzchak and his warm up act In-Reply-To: <001401c7c905$8432f520$0500a8c0@mlaptop> References: <001401c7c905$8432f520$0500a8c0@mlaptop> Message-ID: <4266.207.108.208.180.1184742135.squirrel@webmail.efn.org> On Tue, July 17, 2007 11:33 pm, Michael R. Wolf wrote: > For those who missed it, here's Pudge. You may know him > as a Perl hacker, but he's also a singer/songwriter.... > > http://www.youtube.com/watch?v=Mxk5RMQF6Js The following song in his concert also has a Perl theme: http://www.youtube.com/watch?v=cb-ZAtGI_dQ (though, as the page notes, "CONTENT ADVISORY: some bad words contained herein. "KLB" is a song I wrote about the #perl IRC channel on EFNet, years ago.") From charles.e.derykus at boeing.com Wed Jul 18 08:26:10 2007 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Wed, 18 Jul 2007 08:26:10 -0700 Subject: SPUG: Old biased arguments against defined-or operator In-Reply-To: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> References: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> Message-ID: > As promised at the meeting, here're the arguments advanced against the > defined-or operator (orignally proposed as ??, hookhook, now //) that > delayed it for so very long. > Watch out for the strawmen; they come on thick and fast: > http://www.perl.com/tchrist/defop/defconfaq.html > http://www.perl.com/tchrist/defop/defprofaq.text Interestingly, Larry's 'first' suggestion is now available in the core: use List::Util qw/first/; $var = first { defined } $foo, $bar, $baz; : Larry has not spoken on this matter in about a year. Some quotes : of his from back then are from : http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=393749501&fmt=text : I'd much rather see something on the grep/sort/map pattern: : first {defined} $foo, $bar, $baz : That's much more readable to me, and doesn't lose the really important : bit of information down at the end of a block that might be arbitrarily : long. -- Charles DeRykus -----Original Message----- From: Yitzchak Scott-Thoennes [mailto:sthoenna at efn.org] Sent: Tuesday, July 17, 2007 11:49 PM To: spug-list at pm.org Subject: SPUG: Old biased arguments against defined-or operator _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays WEB PAGE: http://seattleperl.org/ From MichaelRWolf at att.net Wed Jul 18 11:37:42 2007 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Wed, 18 Jul 2007 11:37:42 -0700 Subject: SPUG: first vs // In-Reply-To: References: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> Message-ID: <002d01c7c96a$ba94aa90$0500a8c0@mlaptop> > Interestingly, Larry's 'first' suggestion is now available in the core: > > use List::Util qw/first/; > > $var = first { defined } $foo, $bar, $baz; In the world of TMTOWTDI, I like.... *both*. I initially liked the use of 'first' as more intuitive (for my definition of intuitive). In reading the "old arguments", I realized that the 'first' subroutine does not (in fact, cannot) do short circuiting, in which case the // operator is better. $var = $foo // $bar // $baz; Short circuiting (lazy evaluation) makes much more sense when functions are called since they could have a non-trivial cost and side-effects that may need to be avoided. In some cases the later functions must be guarded against execution if earlier ones succeed. $var = foo() // bar() // baz(); A mixed example might be $me_a_name_I_call_myself = $ENV{USERNAME} // $ENV{USER} // getlogin() || getpwuid($UID) || qx( whoami | tr -d '\012' ) || qx( id --user --name | tr -d '\012' ) || 'nobody'; This example mixes on two dimensions: variable reference vs function call || vs // As I was creating it, I realized that the arguments to qx() would have to have the newlines removed to be consistent with the variable contents. And I also realized that if they failed, they'd return an empty string. I decided (arbitrarily, I'm open to suggestions) that an empty string would be OK (i.e. defined-ness) from an environment variable, but NOT from a qx(). Kinda' arbitrary, I realize, but if someone went to the trouble of setting an environment variable to be an empty string, it was probably for a reason. I could argue the other side, too. Empty strings in variables should be ignored in deference to a better choice. $my_favorite_editor = qw(vi emacs)[rand 2]; $editor = $ENV{EDITOR} || $ENV{VISUAL} || $my_favorite_editor; From cmeyer at helvella.org Wed Jul 18 13:19:05 2007 From: cmeyer at helvella.org (Colin Meyer) Date: Wed, 18 Jul 2007 13:19:05 -0700 Subject: SPUG: first vs // In-Reply-To: <002d01c7c96a$ba94aa90$0500a8c0@mlaptop> References: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> <002d01c7c96a$ba94aa90$0500a8c0@mlaptop> Message-ID: <20070718201904.GE26029@infula.helvella.org> On Wed, Jul 18, 2007 at 11:37:42AM -0700, Michael R. Wolf wrote: > > Interestingly, Larry's 'first' suggestion is now available in the core: > > > > use List::Util qw/first/; > > > > $var = first { defined } $foo, $bar, $baz; > > In the world of TMTOWTDI, I like.... *both*. > > I initially liked the use of 'first' as more intuitive (for my definition of > intuitive). In reading the "old arguments", I realized that the 'first' > subroutine does not (in fact, cannot) do short circuiting, in which case the > // operator is better. > > $var = $foo // $bar // $baz; > > Short circuiting (lazy evaluation) makes much more sense when functions are > called since they could have a non-trivial cost and side-effects that may > need to be avoided. In some cases the later functions must be guarded > against execution if earlier ones succeed. > > $var = foo() // bar() // baz(); Short circuiting with first: $var = first { $_->() } \( &foo, &bar, &baz ); -Colin. From cxreg at pobox.com Wed Jul 18 13:27:40 2007 From: cxreg at pobox.com (Dave O) Date: Wed, 18 Jul 2007 15:27:40 -0500 (CDT) Subject: SPUG: first vs // In-Reply-To: <20070718201904.GE26029@infula.helvella.org> References: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> <002d01c7c96a$ba94aa90$0500a8c0@mlaptop> <20070718201904.GE26029@infula.helvella.org> Message-ID: And if one or more of your list elements are scalars $var = first { $_->() } \( &foo, sub { $bar }, &baz ); :) On Wed, 18 Jul 2007, Colin Meyer wrote: > On Wed, Jul 18, 2007 at 11:37:42AM -0700, Michael R. Wolf wrote: > > > Interestingly, Larry's 'first' suggestion is now available in the core: > > > > > > use List::Util qw/first/; > > > > > > $var = first { defined } $foo, $bar, $baz; > > > > In the world of TMTOWTDI, I like.... *both*. > > > > I initially liked the use of 'first' as more intuitive (for my definition of > > intuitive). In reading the "old arguments", I realized that the 'first' > > subroutine does not (in fact, cannot) do short circuiting, in which case the > > // operator is better. > > > > $var = $foo // $bar // $baz; > > > > Short circuiting (lazy evaluation) makes much more sense when functions are > > called since they could have a non-trivial cost and side-effects that may > > need to be avoided. In some cases the later functions must be guarded > > against execution if earlier ones succeed. > > > > $var = foo() // bar() // baz(); > > Short circuiting with first: > > $var = first { $_->() } \( &foo, &bar, &baz ); > > -Colin. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ > > > From cxreg at pobox.com Wed Jul 18 16:38:53 2007 From: cxreg at pobox.com (Dave O) Date: Wed, 18 Jul 2007 18:38:53 -0500 (CDT) Subject: SPUG: first vs // In-Reply-To: References: <4198.207.108.208.180.1184741355.squirrel@webmail.efn.org> <002d01c7c96a$ba94aa90$0500a8c0@mlaptop> <20070718201904.GE26029@infula.helvella.org> Message-ID: Actually, two things about this: 1) \() makes everything a reference and since sub{} returns a code reference, it then passes a scalar reference to first and chokes, so it would really need to be ( \&foo, sub { $bar }, \&baz ) 2) first does not return the result of the block (ala map), but $_ itself (ala grep) so you'd either need to chain it to map, or dereference it directly ($var) = map { $_->() } first { $_->() } ( \&foo, sub { $bar }, \&baz ); $var = (first { $_->() } ( \&foo, sub { $bar }, \&baz ))->(); which probably is bad since you're running the sub twice now, or do an assignment in the block $var = first { $_ = $_->() } ( \&foo, sub { $bar }, \&baz ); which looks odd, but is probably the closest you can get to $var = foo() // $bar // baz(); without // //++ :) Dave On Wed, 18 Jul 2007, Dave O wrote: > And if one or more of your list elements are scalars > > $var = first { $_->() } \( &foo, sub { $bar }, &baz ); > > :) > > On Wed, 18 Jul 2007, Colin Meyer wrote: > > > On Wed, Jul 18, 2007 at 11:37:42AM -0700, Michael R. Wolf wrote: > > > > Interestingly, Larry's 'first' suggestion is now available in the core: > > > > > > > > use List::Util qw/first/; > > > > > > > > $var = first { defined } $foo, $bar, $baz; > > > > > > In the world of TMTOWTDI, I like.... *both*. > > > > > > I initially liked the use of 'first' as more intuitive (for my definition of > > > intuitive). In reading the "old arguments", I realized that the 'first' > > > subroutine does not (in fact, cannot) do short circuiting, in which case the > > > // operator is better. > > > > > > $var = $foo // $bar // $baz; > > > > > > Short circuiting (lazy evaluation) makes much more sense when functions are > > > called since they could have a non-trivial cost and side-effects that may > > > need to be avoided. In some cases the later functions must be guarded > > > against execution if earlier ones succeed. > > > > > > $var = foo() // bar() // baz(); > > > > Short circuiting with first: > > > > $var = first { $_->() } \( &foo, &bar, &baz ); > > > > -Colin. > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list at pm.org > > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays > > WEB PAGE: http://seattleperl.org/ > > > > > > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ > > > From bill at celestial.com Thu Jul 19 12:26:54 2007 From: bill at celestial.com (Bill Campbell) Date: Thu, 19 Jul 2007 12:26:54 -0700 Subject: SPUG: Perl humor Message-ID: <20070719192654.GA8105@ayn.mi.celestial.com> The URL below has an amusing strip which I haven't seen mentioned on the SPUG list. It's worthwhile going back to the first strip and following through to the end. There aren't many yet. http://www.oreillynet.com/wateringhole/blog/ Bill -- INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Our Foreign dealings are an Open Book, generally a Check Book. Will Rogers From bill at celestial.com Thu Jul 19 12:26:54 2007 From: bill at celestial.com (Bill Campbell) Date: Thu, 19 Jul 2007 12:26:54 -0700 Subject: SPUG: Perl humor Message-ID: <20070719192654.GA8105@ayn.mi.celestial.com> The URL below has an amusing strip which I haven't seen mentioned on the SPUG list. It's worthwhile going back to the first strip and following through to the end. There aren't many yet. http://www.oreillynet.com/wateringhole/blog/ Bill -- INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Our Foreign dealings are an Open Book, generally a Check Book. Will Rogers From jobs-noreply at seattleperl.org Fri Jul 20 15:00:59 2007 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Fri, 20 Jul 2007 15:00:59 -0700 (PDT) Subject: SPUG: JOB: Perl Programmer, Seattle, Contract Message-ID: Bradson Technology Professionals is recruiting for Perl Programmers for a Seattle based client of ours. 2 month contract position with extensions W-2 or 1099, No Telecommuting. Our Seattle-based client is an early-stage medical device company pioneering new technologies that will revolutionize the management and treatment of a neurological medical condition. They currently have a need for an experienced Perl Programmer that can maintain and improve a well-organized, but complex Perl/mySQL/Apache HTML application. The application will be controlling software for a high-performance computing cluster, and supporting algorithms related to the management of medical situations. Qualifications: * SQL database programming experience, preferably MySQL. * HTML and XML (DOM, XPath). * Experience developing Perl in Windows environment. * Desired but not required: C#, NUnit, testing experience. Please send your resume to: Michael Whalen Bradson Technology (425) 456-8900 Office (206) 852-7922 Cell mike at bradsontech.com http://www.bradsontech.com/ From kmeyer at blarg.net Fri Jul 20 17:28:06 2007 From: kmeyer at blarg.net (Ken Meyer) Date: Fri, 20 Jul 2007 17:28:06 -0700 Subject: SPUG: Notice: Organizational Meeting to Revive GSLUG Message-ID: >>> A GSLUG REVIVAL IS STIRRING <<< ---------------------------------- * Purpose: Meeting to discuss what and how to restart GSLUG * When: Saturday, July 28th 2007 from 2:00 PM - 3:30 PM * Where: University of Washington Campus in Seattle Suzzallo library, Room 328 * Directions: Campus map with library noted: http://www.washington.edu/home/maps/northcentral.html?SUZ * Agenda * Introductions Discussion of the agenda # Planning the Revival # Venue possibilities Define Purpose / Mission Lessons learned Identify other known issues Possible solutions or alternatives Identify Responsibilities Volunteers? How can other members help Next steps --------------------------------------- Here is more background information and another link. http://wiki.gslug.org/index.php/Revival_Announcement The new prospective group of organizers who have sponsored this meeting recently held an Installfest at the King County Library's Shoreline Branch that was well attended, even without publicity that reached the majority of our community. I personally believe that they have the enthusiasm and expertise to make things happen, if they receive reasonable support from the community. It is also encouraging that I have recently received half a dozen inquiries about LUG meetings in the area, so it appears that interest does exist, and some folks are experiencing "withdrawal symptoms". Your attendance at this organizational meeting is solicited. Yes, organizational meetings may typically not be the most exciting; and of course, someone might ask you to assist in some small way in the significant effort that is required to maintain such a group. Consider though, that these core organizers are beginning from a virtually clean slate, so your input about the direction of the group could be very significant, just as the launch customers for a new Boeing airplane exert substantial influence in its initial design and configuration. If you value the opportunity to meet with your peers and learn about the latest developments in the OSS domain, hear presentations by industry drivers such as the founder of MySQL and the head of the SAMBA project, have the chance to win raffle prizes ranging from current books to expensive software to $100 Amazon gift certificates, get troubleshooting and installing assistance on all levels, and contribute to the enhancement of the community by helping newbies -- well GSLUG has provided all of that, and can again with your participation and assistance. If you cannot be there, please express your questions, ideas, comments, and willingness to participate via the "gslug-general" mail list, which you can join at: http://lists.gslug.org/mailman/listinfo/gslug-general Or on the GSLUG wiki at: http://wiki.gslug.org/index.php/Talk:Main_Page (don't get hung-up with the obviously out-of-date stuff) Also, stay tuned to the wiki for future notifications and information of interest. For those of you new to the local LUG scene: GSLUG -- the Greater Seattle Linux User Group -- has had a long and illustrious history, serving the Linux community with education and social interaction. Review t the history of GSLUG at: http://www.gslug.org However, about a year and a half ago, it ran out of available organizers, and in view of diminished interest by the participants in contributing the necessary effort, it has been dormant since then. In fact, there has been a serious apparent malaise in the entire local OSS and Linux UG community of late. Now, a group of enthusiastic and knowledgeable folks have approached Brian Hatch and I about rejuvenating the organization. Perhaps it would even be possible to coalesce the interests of more than one of the recently dormant organizations in a reborn GSLUG. Ken Meyer Former Chief Organizer for GSLUG From tim at consultix-inc.com Fri Jul 20 19:48:27 2007 From: tim at consultix-inc.com (Tim Maher) Date: Fri, 20 Jul 2007 19:48:27 -0700 Subject: SPUG: Notice: Organizational Meeting to Revive GSLUG In-Reply-To: References: Message-ID: <20070721024827.GA10362@jumpy.consultix-inc.com> [This is a repost of the message I submitted to the Linux List, before I noticed that Ken had SPUGly posted his Call to Arms also.] Fellow Linux Fans, As indicated in my "History of SPUG" interview (see http://www.TeachMeLinux.com/interviews), one of the reasons the Seattle Perl Users Group was so successful for so long was because I was available to "pinch-hit" whenever we couldn't find another speaker. In consequence, we never missed a meeting in the first 5 years or so of the group's existence, allowing us to maintain and build momentum, instead of facilitating attrition by causing members to wonder "Is there a SPUG meeting this month?". Even better, we eventually launched a Bellevue franchise, resulting in the Seattle area having /two/ monthly technical meetings on Perl for 2 years! I've been laying low for the last couple years, attempting to repair the damage to my personal life caused by a 2+ year immersion in the writing of my Perl book 8-{, but starting soon I'll be looking for ways to remain involved in the local F/OSS community. One possibility is I could reprise my role as the designated pinch hitter for the rejuvenated GSLUG, and give talks on Shell Programming, UNIX/Linux utilities, Perl Programming, Sys Admin, and the like on short notice, to help keep the group alive. -Tim P.S. Quite coincidentally, I've got a class on Shell Programming coming up soon, and today's officially the last day to get the early registration discount. But I'll extend the deadline until Wednesday to readers of this list. Web servers are waiting to process your form submissions! 8-} *--------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX http://www.consultix-inc.com | | tim at ( Consultix-Inc, TeachMeLinux, or TeachMeUnix ) dot Com | | CLASSES: 8/6: Perl/CGI; 8/20: Shell; 8/23: UNIX/Linux Utilities | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--* | >> My "Minimal Perl for UNIX People" is an Amazon Best Seller! << | | # Download chapters, read reviews, and order at MinimalPerl.com # | *--------------------------------------------------------------------* From MichaelRWolf at att.net Tue Jul 24 08:27:11 2007 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Tue, 24 Jul 2007 08:27:11 -0700 Subject: SPUG: Wanted: One-way ride to OSCON tonight Message-ID: <001d01c7ce07$1c143dd0$0500a8c0@mlaptop> Anyone going to Portland today? Want company and a free lunch/dinner? I'll take the train if I don't get a ride. I'll be staying with a friend, and return via Amtrak on Sunday morning. -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From andrew at sweger.net Fri Jul 27 08:04:41 2007 From: andrew at sweger.net (Andrew Sweger) Date: Fri, 27 Jul 2007 08:04:41 -0700 (PDT) Subject: SPUG: 2007 Perl Survey Message-ID: (The following is forwarded from Kirrily "Skud" Robert. Be sure to read the privacy statement, available on the survey website, before taking the survey. Thanks for participating.) Take part in the 2007 Perl Survey! The Perl Survey is an attempt to capture a picture of the Perl community in all its diversity. No matter what sort of Perl programmer you are, we'd love to hear from you. The survey can be found at: http://perlsurvey.org It only takes about 5 minutes to complete. The survey will be open until September 30th, 2007. After that, we'll be reporting on the results and making the data freely available. Please feel free to forward this email to anyone other Perl programmers you know. Thanks for your help! Yours, Kirrily "Skud" Robert The Perl Survey info at perlsurvey.org -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From kmeyer at blarg.net Sat Jul 28 07:44:20 2007 From: kmeyer at blarg.net (Ken Meyer) Date: Sat, 28 Jul 2007 07:44:20 -0700 Subject: SPUG: REMINDER+ DIRECTIONS - GSLUG Org Meeting Saturday, July 28th Message-ID: This is just a follow-up with some directions to the library and then the room. Sorry it's late. Blarg/Avvanta was down for 12 hours on Friday. Hope you will see this in a timely manner. HTML format is to accommodate the map of the library. Ken Meyer ---------------------------------------------------- * When: Saturday, July 28th 2007 from 2:00 PM - 3:30 PM * Where: University of Washington Campus in Seattle Suzzallo library, Room 328 More details at: http://wiki.gslug.org/index.php/Meeting_Info Some directions for the unfamiliar: * The target: 15th Ave NE runs down the west side of the UW from NE 45th Street virtually all the way to the Montlake Cut I-5 exits are at NE 45th and NE 50th Streets; head east to 15th Otherwise, I assume that you know where the UW is, or you have a map. The Suzzallo Library main entrance faces west at the far (east) end of Red Square; it is the most imposing gothic building. The west entrance to Red Square is opposite the "T" ending of Campus Parkway, the very wide street with a plaza in the middle. It would be NE 40th Street if there were one. Head east to the library * Parking: Ah, yes, parking. The maw of an underground garage is on the east side of 15th, at the "T' ending of NE 40th Street Parking is $5 on Saturday (well, it's $11 during the week!) Inside the garage, turn left and go through the catacombs all the way to the east end. On the right side (south) wall, you will see stairs to the Suzzallo Library. Remember what level you parked on. The layout is confusing, at it always has been to me. Stairs emerge at the right side of the front of the library. ----------------- Parking on the street (everywhere within range, I believe) is via those wretched window stickers . $3 for 2 hours; bring change or a credit card. Good luck! Lots of buses prowl the area, blocking traffic: http://tripplanner.metrokc.gov/ * In the library: A map of the 3rd floor with Room 328 identified is at the end of this; hope your service handles HTML messages and graphics Through the entryway Climb the right side segment of the Grand Staircase (shaped like a parenthesis) At the top, keep right straight ahead (east) along the wall to the big open double doors that lead to an alcove and hallway Inside the hallway, turn right and look for 328. Hope you can make it. Ken Meyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20070728/e1c6e365/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 22983 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20070728/e1c6e365/attachment-0001.gif