From tim at consultix-inc.com Tue Jan 7 12:10:49 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] List now on mailman! sub sub sub ! Message-ID: <20030107101049.B14350@timji.consultix-inc.com> SPUGsters, Well, as hoped, the 6th time was the charm, and our list is now being served by "mailman". The only change you should notice will be the new-found freedom to freely include subroutines in your postings. Enjoy! 8-} One other thing: the instructions on how to subscribe and unsubscribe at the bottom of each posting will be incorrect for a while, until I get a chance to update them. -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From pate at eylerfamily.org Tue Jan 7 12:17:51 2003 From: pate at eylerfamily.org (Pat Eyler) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: SPUG: Re: [Pdx-pm] Meeting (fwd) In-Reply-To: <24566BD2-226B-11D7-A95D-0003939161E2@zenspider.com> Message-ID: On Tue, 7 Jan 2003, Ryan Davis wrote: > > On Tuesday, January 7, 2003, at 09:34 AM, Pat Eyler wrote: > > > We could probably make this easier (or more interesting), and do a Ruby > > for Perl Programmers meeting for the February Seattle Ruby Brigade > > meeting > > ... it could be either a follow up to Phil's presentation or another > > intro > > for people who don't want to make the trip. > > Doug Beaver and I will be going down to tomorrow's perl/ruby meeting in > Portland! I hope it's a good turnout... I'd like to make this sort of > cross-pollination much more common between Seattle and Portland, maybe > even BC as well... Lots of driving, but lots of fun! It should be a blast. I've got other commitments Wednesday, but I wish I could go with you guys. -pate > > >> Anyone interested in a road trip to Portland? The Portland Perl > >> Mongers are having a meeting this Wednesday, January 8th. > >> > >> Topic: Ruby for Perl Programmers or What's all this Ruby stuff? > >> > >> Michael Wolf > >> > >> ================================================================ > >> > >> Joshua Keroes writes: > >> > >>> Looks like there's a meeting this Wedsnesday. > >>> http://portland.pm.org/ says: > >>> > >>> News > >>> > >>> The next meeting is Wednesday Jan 8th 2003, this will be the first > >>> meeting of 2003. Phil Tomson will be speaking on Ruby for Perl > >>> programmers > >>> > >>> Bio: Phil Tomson > >>> > >>> I've been programming in Ruby for about 2 years now - sometimes > >>> even > >>> for money! (though not currently) Prior to that I did a fair > >>> amount of > >>> Perl programming for about six years. Prior to that (about 10 years > >>> ago) I was an ASIC (hardware) engineer. > >>> > >>> Topic: Ruby for Perl Programmers or What's all this Ruby stuff? > >>> > >>> You can do object oriented Perl programming and I have, but, uh, > >>> ... > >>> how can I put this tactfully considering the audience... well, it > >>> just > >>> kind of began to make my eyes hurt ;-) After finding Ruby a couple > >>> of > >>> years back my eyes are feeling much better. > >>> > >>> So "Why should I learn Ruby?" you ask? Well, it has a lot of the > >>> same > >>> features you like about Perl - like regular expressions, strings, > >>> arrays, hashes - but they're used in a very object oriented, > >>> consistent manner. Ruby is different enough from Perl to so that > >>> learning it will help you to look at programming problems in a new > >>> light and that's always valuable. I've also found that Ruby is easy > >>> for Perl programmers to learn - it only took me a few days to > >>> become > >>> comfortable with Ruby. > >>> > >>> I'll present a quick introduction to Ruby and how it's similar to > >>> and > >>> yet different from Perl. > >>> > >>> Where and when > >>> > >>> Place: Onsite! Technology, Inc. > >>> Address: 333 SE 3rd, Portland, OR > >>> Date and Time: 2003-01-08 at 7:00 PM > >>> URL: www.onsitetech.com > >>> > >>> There will be a social meeting at Rose and Raindrop at 6:00 PM. The > >>> address is 532 S.E. Grand and it's about 3 blocks from the Onsite! > >>> Technology offices. > From tim at consultix-inc.com Tue Jan 7 13:12:29 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: List now on mailman! sub sub sub !TEST In-Reply-To: <20030107101049.B14350@timji.consultix-inc.com> References: <20030107101049.B14350@timji.consultix-inc.com> Message-ID: <20030107111229.A14690@timji.consultix-inc.com> Wayne, My posts aren't getting through to spug-list. Unless this one is the first to succeed. -Tim ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From tim at consultix-inc.com Tue Jan 7 13:19:31 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] testing Message-ID: <20030107111931.A14744@timji.consultix-inc.com> testing From asimjalis at acm.org Tue Jan 7 13:38:13 2003 From: asimjalis at acm.org (Asim Jalis) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] testing In-Reply-To: <20030107111931.A14744@timji.consultix-inc.com> References: <20030107111931.A14744@timji.consultix-inc.com> Message-ID: <20030107193813.GA53617@wokkil.pair.com> On Tue, Jan 07, 2003 at 11:19:31AM -0800, Tim Maher wrote: > testing Was the list meltdown related to someone bringing up the stick riddle? Asim From jay at scherrer.com Tue Jan 7 13:41:10 2003 From: jay at scherrer.com (Jay Scherrer) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Randal Swartz Message-ID: <200301071141.10848.jay@scherrer.com> I guess we're going to see Ranal Swartz :-) Jay From douglas at slugstone.net Tue Jan 7 13:47:28 2003 From: douglas at slugstone.net (Douglas Kirkland) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: List now on mailman! sub sub sub !TEST In-Reply-To: <20030107111229.A14690@timji.consultix-inc.com> References: <20030107101049.B14350@timji.consultix-inc.com> <20030107111229.A14690@timji.consultix-inc.com> Message-ID: <200301071948.h07JmQ306448@home.slugstone.net> On Tuesday 07 January 2003 11:12 am, Tim Maher wrote: > My posts aren't getting through to spug-list. ?Unless this > one is the first to succeed. Ok it is working. Douglas From jmates at sial.org Tue Jan 7 14:05:24 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM (fwd) Message-ID: <20030107200524.GM1006@darkness.sial.org> With any luck, no more mail loops today. Updated notice with meeting location details. ----- Forwarded message from Scott McDermott ----- From: "Scott McDermott" Date: Tue, 7 Jan 2003 10:49:50 -0800 (PST) To: Subject: Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM The next Seattle SAGE meeting is Thursday, January 9th, 2002 at 7pm. *** NOTE NOTE NOTE *** Due to the expected size of the meeting it will NOT be at the UW Rosen Building. It will be at: Greenwood Lodge No. 253 7910 Greenwood Ave N Seattle, WA 98103 Directions available at http://www.seattle-sage.org/directions_lodge.html *** This is a very special meeting: 1) Anyone in or near the Systems Administration or Programming professions will really want to attend. 2) Randal has requested we "PASS THE HAT" for his legal defense funds and to offset the costs of his coming up here. Please note he has refused direct reimbursement from Hero Network or the Seattle SAGE Group for coming up here to give this very important presentation. 3) The meeting WILL start at 7:30 PM. Hero Network will be providing some light refreshments (soda & cold cuts) starting at 7PM. 4) There will still be a late informal diner (NOT SPONSORED) after the meeting. Since this is a large meeting we would like a head count ahead of time so we can warn the restaurant if we have a larger than normal crowd going with us. Randal has not told us if he is coming to the diner. But, if he is Hero Network will be trying to buy him a dinner at least.... :^) Please make every effort to arrive by 7:15 P.M. to claim your seat. It will very likely be standing room only. --- Next meeting: Thursday January 9th, 2002 at 7:30 PM Title: Just Another Convicted Perl Hacker by: Randal L. Schwartz Location: Greenwood Lodge No. 253 Directions: http://www.seattle-sage.org/directions_lodge.html Web Site: http://www.seattle-sage.org/ --- This month's technical speaker is a very real, convicted felon and co-System Administrator (and to a lot of SAGE members "one of the good guys"). You may know him better as the author of two Nutshell books for O'Reilly and Associates: "Learning Perl" (aka the Llama Book) Available in English, Japanese, French, and German; and "Programming Perl" (aka the Camel Book). Randal also writes a many technical columns for magazines like Web Techniques & Dr. Dobbs Journal. However, Randal Schwartz, in late July 1995, was convicted, by a jury, of three felony counts under Oregon's Computer Crime Law. The charges related to his activities while working as a consultant (Systems Administrator) at an Intel Corporation facility in Beaverton, Oregon. His sentence issued in September includes 5 years of probation, 480 hours of community Service, 90 days of deferred (cancelable) jail time, and $68k of restitution to Intel. His legal bill exceeded $170k by the end of 1995. Randal Schwartz is respected on the Internet for his contributions to the progress of the Perl programming language through his two books, long-time participation in the comp.lang.perl(.misc) newsgroup, moderation of the newer comp.lang.perl.announce newsgroup, and training courses. The purpose of his talk is to describe both the events, his mistakes and the problems with modern computer crime laws. This talk is to help prevent what happened to him from happening to any other well-intentioned computing professional. Preventing similar incidents requires insight into this unforeseen application of a law that is intended to protect organizations against thieves, spies, and casual intruders to the enforcement of a corporation's internal rules of operation. To make sure we do not die of thirst or malnutrition Hero Network is sponsoring a refreshments table with soft drinks, and snacks available. This is a powerful presentation that you might consider bring others not normally in attendance (spouses, bosses, etc.). --- This is FREE and open to the public and a wonderful opportunity. The Seattle SAGE Group (SSG) is a local group for systems & network administrators in the Seattle and Pacific northwest areas (North Western Washington). We are a local chapter of SAGE, but SAGE / USENIX membership is not a requirement. We sponsor a regular monthly meeting open to the public on the second Thursday if each month at 7 p.m. Check out our Web site for more information: http://www.seattle-sage.org/ -- Scott McDermott Executive Vice President Hero Network LLC http://www.heronetwork.com/ ----- End forwarded message ----- -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) From tim at consultix-inc.com Tue Jan 7 14:29:42 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: List now on mailman! sub sub sub !TEST In-Reply-To: <20030107113539.A19483@hobart.helvella.org> References: <20030107101049.B14350@timji.consultix-inc.com> <20030107111229.A14690@timji.consultix-inc.com> <20030107113539.A19483@hobart.helvella.org> Message-ID: <20030107122942.B15065@timji.consultix-inc.com> On Tue, Jan 07, 2003 at 11:35:39AM -0800, Colin Meyer wrote: > On Tue, Jan 07, 2003 at 11:12:29AM -0800, Tim Maher wrote: > > Wayne, > > > > My posts aren't getting through to spug-list. Unless this > > one is the first to succeed. > > Your previous message was the first to succeed. > Now I've seen three, including your test message just after this one. > > -C. The good news is that everybody else can see my postings; the bad news is that I can't. It might be a procmail filtering problem, which I'm looking into. Apparently we're supposed to post to spug-list@mail.pm.org; I'm not sure if you can leave off the "mail." part, as we did before, but I wouldn't bet on it. -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* From tim at consultix-inc.com Tue Jan 7 15:05:27 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: List now on mailman! sub sub sub !TEST In-Reply-To: References: <20030107122942.B15065@timji.consultix-inc.com> Message-ID: <20030107130527.A15376@timji.consultix-inc.com> On Tue, Jan 07, 2003 at 12:41:34PM -0800, Jim Ludwig wrote: > >> The good news is that everybody else can see my > >> postings; the bad news is that I can't. > > It might also be that your list preferences are > set up that way. Go to... > > http://mail.pm.org/mailman/options/spug-list/tim%40consultix-inc.com > > ...and verify that "Receive posts you send to the > list?" is set to Yes. Aha! That could explain a lot. As soon as they give me a password for accessing the admin web site (the old SPUG one doesn't work) I'll test out your idea. Thanks! > > jim -- -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* From tim at consultix-inc.com Tue Jan 7 15:07:56 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: List now on mailman! sub sub sub !TEST In-Reply-To: <9B30436F511ED5118EDF0002A55C31800579048E@cairvexmb03.uswin.ad.vzwcorp.com> References: <9B30436F511ED5118EDF0002A55C31800579048E@cairvexmb03.uswin.ad.vzwcorp.com> Message-ID: <20030107130756.B15376@timji.consultix-inc.com> On Tue, Jan 07, 2003 at 12:39:55PM -0800, Pommert, Daniel wrote: > Maybe you could set up a test list to work out the bugs rather than testing > in production.... I'm getting an awfully high e-mails/value from this list, > lately. Also, I'm finding that Java can do many of the things that I like > Perl for. I'm sure I'm not alone in any of these sentiments. 'Nuf said. > > -- Daniel Pommert Sorry, but I don't think it's worth the trouble to ask the PM admin folks to set up a second list for us, just for testing purposes. This should all blow over in a short time, and then we'll be back to our main purpose: trying to suppress Stick-Riddle postings! 8-} Tim ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From ryand at zenspider.com Tue Jan 7 12:09:19 2003 From: ryand at zenspider.com (Ryan Davis) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Re: SPUG: Re: [Pdx-pm] Meeting (fwd) In-Reply-To: Message-ID: <24566BD2-226B-11D7-A95D-0003939161E2@zenspider.com> On Tuesday, January 7, 2003, at 09:34 AM, Pat Eyler wrote: > We could probably make this easier (or more interesting), and do a Ruby > for Perl Programmers meeting for the February Seattle Ruby Brigade > meeting > ... it could be either a follow up to Phil's presentation or another > intro > for people who don't want to make the trip. Doug Beaver and I will be going down to tomorrow's perl/ruby meeting in Portland! I hope it's a good turnout... I'd like to make this sort of cross-pollination much more common between Seattle and Portland, maybe even BC as well... Lots of driving, but lots of fun! >> Anyone interested in a road trip to Portland? The Portland Perl >> Mongers are having a meeting this Wednesday, January 8th. >> >> Topic: Ruby for Perl Programmers or What's all this Ruby stuff? >> >> Michael Wolf >> >> ================================================================ >> >> Joshua Keroes writes: >> >>> Looks like there's a meeting this Wedsnesday. >>> http://portland.pm.org/ says: >>> >>> News >>> >>> The next meeting is Wednesday Jan 8th 2003, this will be the first >>> meeting of 2003. Phil Tomson will be speaking on Ruby for Perl >>> programmers >>> >>> Bio: Phil Tomson >>> >>> I've been programming in Ruby for about 2 years now - sometimes >>> even >>> for money! (though not currently) Prior to that I did a fair >>> amount of >>> Perl programming for about six years. Prior to that (about 10 years >>> ago) I was an ASIC (hardware) engineer. >>> >>> Topic: Ruby for Perl Programmers or What's all this Ruby stuff? >>> >>> You can do object oriented Perl programming and I have, but, uh, >>> ... >>> how can I put this tactfully considering the audience... well, it >>> just >>> kind of began to make my eyes hurt ;-) After finding Ruby a couple >>> of >>> years back my eyes are feeling much better. >>> >>> So "Why should I learn Ruby?" you ask? Well, it has a lot of the >>> same >>> features you like about Perl - like regular expressions, strings, >>> arrays, hashes - but they're used in a very object oriented, >>> consistent manner. Ruby is different enough from Perl to so that >>> learning it will help you to look at programming problems in a new >>> light and that's always valuable. I've also found that Ruby is easy >>> for Perl programmers to learn - it only took me a few days to >>> become >>> comfortable with Ruby. >>> >>> I'll present a quick introduction to Ruby and how it's similar to >>> and >>> yet different from Perl. >>> >>> Where and when >>> >>> Place: Onsite! Technology, Inc. >>> Address: 333 SE 3rd, Portland, OR >>> Date and Time: 2003-01-08 at 7:00 PM >>> URL: www.onsitetech.com >>> >>> There will be a social meeting at Rose and Raindrop at 6:00 PM. The >>> address is 532 S.E. Grand and it's about 3 blocks from the Onsite! >>> Technology offices. From tim at consultix-inc.com Tue Jan 7 16:30:33 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:47 2004 Subject: [Spug-list] Changing subj. to SPUG from [Spug-list] Message-ID: <20030107143033.A15793@timji.consultix-inc.com> Now that I've got control over the new list configuration, I'm setting things back to the way they were, to make life easy for those who haven't changed their procmail filters yet, and, sadly, a little harder for the 3.5 people who already have. This means SPUG: will be at the beginning of all messages again, just like in the good-old-days. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From cmeyer at helvella.org Tue Jan 7 16:56:09 2003 From: cmeyer at helvella.org (Colin Meyer) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Re: [Spug-list] Changing subj. to SPUG from [Spug-list] In-Reply-To: <20030107143033.A15793@timji.consultix-inc.com>; from tim@consultix-inc.com on Tue, Jan 07, 2003 at 02:30:33PM -0800 References: <20030107143033.A15793@timji.consultix-inc.com> Message-ID: <20030107145609.C19687@hobart.helvella.org> On Tue, Jan 07, 2003 at 02:30:33PM -0800, Tim Maher wrote: > Now that I've got control over the new list configuration, I'm setting things > back to the way they were, to make life easy for those who haven't changed > their procmail filters yet, and, sadly, a little harder for the 3.5 people > who already have. This means SPUG: will be at the beginning of all > messages again, just like in the good-old-days. My (new) procmail rule greps for: * ^List-Id: which works nicely, regardless of the subject. Have fun, -Colin. From MichaelRunningWolf at att.net Tue Jan 7 16:14:00 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG: Re: [Pdx-pm] Meeting In-Reply-To: References: Message-ID: Pat Eyler writes: > We could probably make this easier (or more interesting), and do a Ruby > for Perl Programmers meeting for the February Seattle Ruby Brigade meeting > ... it could be either a follow up to Phil's presentation or another intro > for people who don't want to make the trip. I like this idea. Perhaps the Python folks would be interested, too? -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From cmeyer at helvella.org Tue Jan 7 17:15:38 2003 From: cmeyer at helvella.org (Colin Meyer) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Re: [Spug-list] Changing subj. to SPUG from [Spug-list] In-Reply-To: <20030107145609.C19687@hobart.helvella.org>; from cmeyer@helvella.org on Tue, Jan 07, 2003 at 02:56:09PM -0800 References: <20030107143033.A15793@timji.consultix-inc.com> <20030107145609.C19687@hobart.helvella.org> Message-ID: <20030107151538.A19821@hobart.helvella.org> On Tue, Jan 07, 2003 at 02:56:09PM -0800, Colin Meyer wrote: > On Tue, Jan 07, 2003 at 02:30:33PM -0800, Tim Maher wrote: > > Now that I've got control over the new list configuration, I'm setting things > > back to the way they were, to make life easy for those who haven't changed > > their procmail filters yet, and, sadly, a little harder for the 3.5 people > > who already have. This means SPUG: will be at the beginning of all > > messages again, just like in the good-old-days. > > My (new) procmail rule greps for: > * ^List-Id: > > which works nicely, regardless of the subject. Oops, except when the List-Id: header suddenly changes. Now it seems to be: List-Id: Seattle Perl Users Group Have fun, -Colin. From jay at scherrer.com Tue Jan 7 17:22:52 2003 From: jay at scherrer.com (Jay Scherrer) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Fwd: Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM Message-ID: <200301071522.52468.jay@scherrer.com> ---------- Forwarded Message ---------- Subject: Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM Date: Tue, 7 Jan 2003 11:35:21 -0800 (PST) From: "Scott McDermott" To: The next Seattle SAGE meeting is Thursday, January 9th, 2002 at 7pm. *** NOTE NOTE NOTE *** Due to the expected size of the meeting it will NOT be at the UW Rosen Building. It will be at: Greenwood Lodge No. 253 7910 Greenwood Ave N Seattle, WA 98103 Directions available at http://www.seattle-sage.org/directions_lodge.html *** This is a very special meeting: 1) Anyone in or near the Systems Administration or Programming professions will really want to attend. 2) Randal has requested we "PASS THE HAT" for his legal defense funds and to offset the costs of his coming up here. Please note he has refused direct reimbursement from Hero Network or the Seattle SAGE Group for coming up here to give this very important presentation. 3) The meeting WILL start at 7:30 PM. Hero Network will be providing some light refreshments (soda & cold cuts) starting at 7PM. 4) There will still be a late informal diner (NOT SPONSORED) after the meeting. Since this is a large meeting we would like a head count ahead of time so we can warn the restaurant if we have a larger than normal crowd going with us. Randal has not told us if he is coming to the diner. But, if he is Hero Network will be trying to buy him a dinner at least.... :^) Please make every effort to arrive by 7:15 P.M. to claim your seat. It will very likely be standing room only. --- Next meeting: Thursday January 9th, 2002 at 7:30 PM Title: Just Another Convicted Perl Hacker by: Randal L. Schwartz Location: Greenwood Lodge No. 253 Directions: http://www.seattle-sage.org/directions_lodge.html Web Site: http://www.seattle-sage.org/ --- This month's technical speaker is a very real, convicted felon and co-System Administrator (and to a lot of SAGE members "one of the good guys"). You may know him better as the author of two Nutshell books for O'Reilly and Associates: "Learning Perl" (aka the Llama Book) Available in English, Japanese, French, and German; and "Programming Perl" (aka the Camel Book). Randal also writes a many technical columns for magazines like Web Techniques & Dr. Dobbs Journal. However, Randal Schwartz, in late July 1995, was convicted, by a jury, of three felony counts under Oregon's Computer Crime Law. The charges related to his activities while working as a consultant (Systems Administrator) at an Intel Corporation facility in Beaverton, Oregon. His sentence issued in September includes 5 years of probation, 480 hours of community Service, 90 days of deferred (cancelable) jail time, and $68k of restitution to Intel. His legal bill exceeded $170k by the end of 1995. Randal Schwartz is respected on the Internet for his contributions to the progress of the Perl programming language through his two books, long-time participation in the comp.lang.perl(.misc) newsgroup, moderation of the newer comp.lang.perl.announce newsgroup, and training courses. The purpose of his talk is to describe both the events, his mistakes and the problems with modern computer crime laws. This talk is to help prevent what happened to him from happening to any other well-intentioned computing professional. Preventing similar incidents requires insight into this unforeseen application of a law that is intended to protect organizations against thieves, spies, and casual intruders to the enforcement of a corporation's internal rules of operation. To make sure we do not die of thirst or malnutrition Hero Network is sponsoring a refreshments table with soft drinks, and snacks available. This is a powerful presentation that you might consider bring others not normally in attendance (spouses, bosses, etc.). --- This is FREE and open to the public and a wonderful opportunity. The Seattle SAGE Group (SSG) is a local group for systems & network administrators in the Seattle and Pacific northwest areas (North Western Washington). We are a local chapter of SAGE, but SAGE / USENIX membership is not a requirement. We sponsor a regular monthly meeting open to the public on the second Thursday if each month at 7 p.m. Check out our Web site for more information: http://www.seattle-sage.org/ -- Scott McDermott Executive Vice President Hero Network LLC http://www.heronetwork.com/ ------------------------------------------------------- From jmates at sial.org Tue Jan 7 17:41:38 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Re: [Spug-list] Changing subj. to SPUG from [Spug-list] In-Reply-To: <20030107151538.A19821@hobart.helvella.org> References: <20030107143033.A15793@timji.consultix-inc.com> <20030107145609.C19687@hobart.helvella.org> <20030107151538.A19821@hobart.helvella.org> Message-ID: <20030107234138.GQ1006@darkness.sial.org> * Colin Meyer [2003-01-07T15:30-0800]: > Oops, except when the List-Id: header suddenly changes. Now it > seems to be: > > List-Id: Seattle Perl Users Group I use a lazy match, and also evict the subject tag to regain subject line real estate on my 80 column terminal. :0 * spug-list@.*pm.org { :0 Wf * ^Subject:[ ]+(Re:[ ]+)?SPUG:[ ]*\/.+ |formail -I"Subject: $MATCH" :0 spug-list } -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) From tim at consultix-inc.com Tue Jan 7 21:57:57 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Damian Conway Corporate Visits? Message-ID: <20030107195757.A17397@timji.consultix-inc.com> SPUGsters, As most of you know by now, Dr. Damian Conway, one of the world's foremost experts on Perl 5 and Perl 6, award winning CPAN "Modulator", author of the magnificent book "Object Oriented Perl", and popular speaker at Perl and BioInformatics conferences, will be in town later this week for a stay of one or possibly two weeks. He's interested in opportunities to share his knowledge with professional Perl programmers while he's here, through lectures, consultations, code reviews, mentoring sessions, etc. Also, professional schedule permitting, if any group would like to invite Damian for a social visit (book signing, recreational activity, Toga party, Concorde flight to Maxim's for lunch, etc.), that might be possible too! 8-} So please pass on the word about Damian's availability to your bosses and colleagues, and get in touch with me if you would like to arrange a visit. He'll be available from 1/11-18, and possibly the following week as well. -Tim P.S. We still have room in each of his four public classes listed below. But please register soon if you wish to attend. P.P.S. Don't forget that Damian's our SPUG speaker for 1/15; all are welcome - see http://seattleperl.org for details. *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | *----------------------------------------------------------------------------* From damian at conway.org Wed Jan 8 03:10:45 2003 From: damian at conway.org (Damian Conway) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Re: [Spug-list] Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM (fwd) In-Reply-To: <20030107200524.GM1006@darkness.sial.org> References: <20030107200524.GM1006@darkness.sial.org> Message-ID: <3E1BEB15.3000201@conway.org> Jeremy Mates wrote: > With any luck, no more mail loops today. Updated notice with meeting > location details. > > The next Seattle SAGE meeting is Thursday, January 9th, 2002 at 7pm. > > *** NOTE NOTE NOTE *** > Due to the expected size of the meeting it will NOT be at the UW Rosen > Building. It will be at: > Greenwood Lodge No. 253 > 7910 Greenwood Ave N > Seattle, WA 98103 Would anyone who's going to this event happen to be passing through the downtown area, and able to give a *seriously* jetlagged Aussie Perl guru a lift there and back? Damian From damian at conway.org Wed Jan 8 03:56:14 2003 From: damian at conway.org (Damian Conway) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Damian Conway Corporate Visits? Message-ID: <3E1BF5BE.4080206@conway.org> Tim Maher wrote: Also, professional schedule permitting, if any group would like to > invite Damian for a social visit (book signing, recreational > activity, Toga party, Concorde flight to Maxim's for lunch, etc.), > that might be possible too! 8-} In a bizarre coincidence, I downloaded Tim's message whilst sitting here in the lounge at Heathrow, watching the ground crews de-icing the wings of a Concorde. And just as I read it, over the PA came the final call for a BA flight to Paris. Spooky! > So please pass on the word about Damian's availability to your > bosses and colleagues, and get in touch with me if you would like > to arrange a visit. He'll be available from 1/11-18, and possibly > the following week as well. Now only available 1/12-18. Yes, indeed: supplies of Damian are run out fast, folks! ;-) And I'm definitely heading off to Boston the following week (much as I'd genuinely love to stay in sunny Seattle). Damian From damian at conway.org Wed Jan 8 10:49:13 2003 From: damian at conway.org (damian@conway.org) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Re: [Spug-list] Randal Schwartz Presentation to the Seattle SAGE Group is Thursday @ 7PM (fwd) Message-ID: <20030108084914.28719.h014.c000.wm@mail.conway.org.criticalpath.net> I wrote: > Would anyone who's going to this event happen to be passing through > the downtown area, and able to give a *seriously* jetlagged Aussie > Perl guru a lift there and back? Many thanks to everyone who has volunteered to pick me up. My ride is now arranged and will look forward to seeing you all there. (Unless, of course, I'm too jet-lagged to realize that *I'm* there ;-) Damian From asimjalis at acm.org Fri Jan 10 21:20:23 2003 From: asimjalis at acm.org (Asim Jalis) Date: Mon Aug 2 21:36:47 2004 Subject: SPUG:Designing Programs Message-ID: <20030111032023.GA61153@wokkil.pair.com> I have a question. How do people design large programs with Perl? Do you start typing code? Or do you spend some time designing it on paper? If you design it on paper, how do you do it? Do you define the functions and what they will do and then flesh this out till you have pinned down the whole program? Do you first break the program down into modules and then flesh out each module? Do you draw diagrams? Or is it something completely different? Do you use any kind of OO design ideas? I am particularly interested in Perl and Perl design experience and ideas. Asim From spug at ifokr.org Fri Jan 10 23:01:12 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> References: <20030111032023.GA61153@wokkil.pair.com> Message-ID: <20030111050112.GI17543@ifokr.org> > I have a question. How do people design large programs with Perl? > Do you start typing code? Or do you spend some time designing it > on paper? I'm pretty bad. I don't do much design ahead of time (mind you most of my projects seldom require lots of code, so it's not so bad to plan as you go, ~5000 lines is pretty high for me.) I tend to write starting with the 'main' code, using subroutines that aren't written as I go. So I might write #!/usr/bin/perl use strict; my $something = function1(something); if ($something == "something else" ) { my $tmp = function2(); my $filename="$DIR/blah"; sysopen FILE, $filename, O_RDWR|O_EXCL|O_CREAT or bail("Some error $?"); } Then I run a 'perl -c' and see that I haven't yet defined function1, function2, or bail, so I go and write them. In general, my main section of code is no more than 50 lines, calling functions which I then write. Those functions probably call more, which I write as needed. Eventually, there's nothing left to write, and I'm done. I tend to test the functions as I write them. So say I have the above code, I might modify it to test function1, ignoring the main code: #!/usr/bin/perl use strict; # test function1 while I debug it my $blah = funciton1(something); print $blah; exit 0; my $something = function1(something); if ($something == "something else" ) { my $tmp = function2(); By doing the exit 0, the actual main code is never reached, but the functions at the bottom are still compiled and available. This is a development method that has served me well for many years (in other languages as well) but I wouldn't say it's for everyone, and it certainly doesn't involve much forethought. It tends to come out well, because I'm good at telling when I should subroutineize something for reuse or to simplify the main code, and it ends up working out well down the road. This works for OO code just as well, and yes I use OO when appropriate, but the things I write are frequently better suited to procedural programming (sysadmin tasks, etc. Sure, I could write an OO object to describe /etc/passwd, but OO for OO's sake is a bad idea.) -- Brian Hatch ASCII stupid Systems and question, get Security Engineer a stupid ANSI. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030110/354631f3/attachment.bin From wyllie at newsof.com Sat Jan 11 00:41:12 2003 From: wyllie at newsof.com (Andrew Wyllie) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> References: <20030111032023.GA61153@wokkil.pair.com> Message-ID: <20030111064112.GA43889@newsof.com> Hi Asim, On Fri, 10 Jan 2003, Asim Jalis wrote: > I have a question. How do people design large programs with Perl? > Do you start typing code? Or do you spend some time designing it > on paper? > > If you design it on paper, how do you do it? Do you define the > functions and what they will do and then flesh this out till you > have pinned down the whole program? Do you first break the > program down into modules and then flesh out each module? > > Do you draw diagrams? > > Or is it something completely different? > > Do you use any kind of OO design ideas? > > I am particularly interested in Perl and Perl design experience > and ideas. > I spend a lot of time thinking about the problems I need to solve and looking around on the net to see how other people have solved the same/similar problems. I write most of this information down on paper with lots of little drawings and schema fragments. Moving forward, I try and break everything down into smaller parts so no one piece of project seems terribly overwhelming. I may write some small programs to test out functionality I may need from a 3rd party apps and modules. A lot of stuff on CPAN is version 0.01 so you really need to take a careful look at it before you just blindy assume it's going to do what you want in a way that makes sense. Once I feel like I have enough pieces and a good idea of what's going to be easy and hard, I start to draw out a large diagram that shouws how all the pieces will fit together. (Literally large, I go down to the local artist supply store and buy a big pad of 14x17 drawing paper). The big picture diagram basically becomes the test environment for my requirements doc. So each feature/function I need my app to do can be traced through the big diagram. For example, the project I'm working on right now is a community based website. It has three layers: + presentation + database interface/logic (the "object manager") + the database itself In the first layer I need to worry about all the forms, site content, the webserver and server modules. The second layer is like a relay between the presentation layer and the database. Here I have to make decisions about what kinds of databases I would like to interact with (RMDB, LDAP, BDB, flat files?), and things like, user/group permissions and ownership, how are we going to deal with the search engine, etc. I kind of stole the ideas for this layer from Corba (which I have never programmed in). The idea was to create XML objects for all the user content, serialize them, and do stuff with them (like store/retrieve them, parse them into the search engine, apply different style sheets to them (sort of like XSLT). The database has it's own set of problems and design issues (especially around performance and admin things like backups/replication). All these things are in the picture. Then I look at my requirements and try to figure out how the data (or whatever) will move through this system. (the drawing is in pencil - pick up a big eraser down at the art supply store). Finally once I get all the stuff figured out, I start piecing it together, trying to reuse code as much as possible, try not to be scared to throw stuff away when it gets to complicated or is just plain broken and lots of refactoring (and not enough testing). The core of the whole project is the ObjectManager it tells the Forms what data to get, and knows how to talk to all of the Storage/Viewing/SearchEngine or where ever else the data needs to go. So there are a number of APIs, and some OO things going on, and maybe some Klingon code way deep down... Our final (well mostly final) product probaly has 80,000 line of perl code ( I think that's the number someone came up with). We continually upgrade, refactor and learn new things as we move forward. You can see the site at http://www.acscsn.org - The Cancer Survivors Network. Not sure if that's the kind of stuff you were looking for or not, but maybe it's helpful somehow. andrew > > Asim > _______________________________________________ > spug-list mailing list > spug-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/spug-list From jay at scherrer.com Sat Jan 11 10:58:54 2003 From: jay at scherrer.com (Jay Scherrer) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> References: <20030111032023.GA61153@wokkil.pair.com> Message-ID: <200301110858.55083.jay@scherrer.com> Asim, All though I'm used to writing full programs in c, I have been trying my hand at creating a large program using Perl. You can access our latest cvs files at . The project computes the 1040 income tax using Perl and Perl::Tk. To run this version, use the command: [user] $ ./tenForty Jay Scherrer On Friday 10 January 2003 07:20 pm, Asim Jalis wrote: > I have a question. How do people design large programs with Perl? > Do you start typing code? Or do you spend some time designing it > on paper? > Actually this will depend on the project. What I've done is taken the 1040 and broke it down into sections ( Label, Filing Status, Exemptions, Income, Agi, etc). It is best to design the layout beforehand. Figuring how the over all program will flow. Here we use a Main screen that controls the other subroutines, and controls the final out put. Keep in mind when creating these larger programs the use of "use" and "require" when pulling in the different modules helps quite a bit. With Practical Tax we call: use Tenforty; # because this module will be used globally. require "agi.pl" # because this will only be used when needed and then discarded. I have found a big performance gain doing so, and it's a lot easier to keep control of the variables. > If you design it on paper, how do you do it? Do you define the > functions and what they will do and then flesh this out till you > have pinned down the whole program? Do you first break the > program down into modules and then flesh out each module? > If I'm writing from scratch, I will use the semantic programing style and write an outline of the overall function/program. Reviewing the outline the will reveal witch parts act globally and witch parts act temporally. > Do you draw diagrams? > Using fig and dia has helped tremendously especially when trying express my visions to the other developers. > Or is it something completely different? > > Do you use any kind of OO design ideas? > OO plays a big role. Especially when separating the GUI from the main module/ modules. > I am particularly interested in Perl and Perl design experience > and ideas. > > > Asim > _______________________________________________ > spug-list mailing list > spug-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/spug-list From Marc.M.Adkins at Doorways.org Sat Jan 11 13:03:11 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> Message-ID: > I have a question. How do people design large programs with Perl? > Do you start typing code? Or do you spend some time designing it > on paper? My goal in any project is to break out chunks until the main program is essentially one page of code. I rarely achieve this goal but it helps to prevent the dreaded monolith of doom. No one likes a 10,000 line main program. Since my formative coding years were during the OO boom of the 80s the chunks I break up into are often classes, I tend to think in terms of classes. This has the beneficial side effect of allowing me to search CPAN (or whatever) for existing classes that do things I need. Think LEGO bricks...is there one that does what I want or do I have to fake one on my own? The other major chunks are basic coding entities of various types. Another response to your email mentioned presentation vs. [business logic] vs. database. Not only do I slice things by what they do but by how it gets done. For example, in one project the working code ('business logic') may be in a class that gets called in the main process, in another it may be ensconced in a separate process on another machine. These decisions are based on requirements such as the scale of the system, tools available, and the schedule. With respect to the design process in real (people) time: there is always some design on paper or within my brain. My brain holds a lot of code (which is why I can't remember anyone's name after I meet them, or even my own telephone number on a bad day) but even so I usually end up with something on paper. I usually use small pieces of paper, just as I try to code in small modules/objects/functions, and before I start I tend to have a few sitting at my side that represent my 'design'. If I'm working with a group, I/we transfer this to a design document of some kind for the sake of the group. At some point, though, I do fall through to 'feeling my way' through the actual implementation. My first goal is always to implement what I call the 'skeleton' of the code. This is an end-to-end implementation whether that means writing the top-level loop of a simple filter or creating a basic GUI/backend/database process structure so that each bit of functionality can be placed in its overall context as I work on it. Within the skeleton I tend to do incremental development, with customer feedback as a constant input (where there is a customer, somewhat less so in these jobless days ;). I can't remember the last time I wrote anything more than a simple text filter in its entirety before testing anything ('big bang' testing). The purpose of the code skeleton is to allow me to test as I go along. In this fashion I avoid finding out at the end that my front-end/back-end communication mechanism is bogus and has to be replaced in all 82 places it is used. By the third small chunk of functionality I know that it works and don't have to think about it anymore. During implementation I often determine that I need more 'helper' classes/modules. These are often project-specific as opposed to generalized entities that can be gotten from CPAN. This tends to make the actual development process jerky or 'quantum' in practice as I'll be working smoothly on incrementally adding functions and then suddenly realize that I've written the same code eight times and stop and pull it out for reuse. The same for small development tools. This is a critical spot, though, for it is where many good programmers tend to over-engineer. Using the same code twice isn't reason to build a class that's engineered for the ages. That's a waste of time. Wait until you're sure that the cost of making the class/tool is less than the cost of just duplicating the code with a text editor for the rest of the project. All of this is really kind of vague. When coding on my own I vary all of this as I see fit and break my own rules for various reasons when the situation warrants. When I code with an established group I try to fit into their pattern of coding. Flexibility is important in delivering solutions on time and budget. The opposite of flexibility is usually how DOD projects end up costing so much. On the other hand, there are times when really extensive, fixed methods are justified. Like large DOD projects. Medical systems. Air traffic control systems. Anything big and/or mission/safety-critical. There is a limit to how many people can work in a flexible development environment without structured communication, documentation, methodology, etc. Above 7-10 people you suddenly need extra people just to manage the communications flow and extra people to manage them and so forth and suddenly you have a cast of thousands. There is a sudden drop-off in the number of lines of code per person-day that can be effectively generated and it's all about project scaling issues (just as many of our real problems are about system scaling issues). Finally, please take all of this with a grain of salt and read other responses. This is a brain dump and I'm on the 'cowboy' fringe of software development. Your mileage may vary. mma From Marc.M.Adkins at Doorways.org Sat Jan 11 14:41:19 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:PerlIO::via In-Reply-To: Message-ID: I finally got around to messing with the Perl IO layer mechanism. I have several output logging classes implemented as tied handles and I figured I would convert one to a layer and see how it worked. One characteristic of some of my tied handle classes is that they have various methods that allow control of the stream. For example, I have a log stream that supports indentation, and it has methods for incrementing or decrementing the current amount of indentation. I call these methods using the tied() method on the filehandle, which works just ducky. For example: tie $log, 'IndentLog', '>indented.log'; print $log "No indent\n"; tied($log)->push(2); print $log "Indented by two spaces\n"; tied($log)->push(4); print $log "Indented by six spaces\n"; tied($log)->pop(); print $log "Indented by two spaces\n"; tied($log)->pop(); print $log "No indent\n"; untie $log; [or something like that, not working code, please forgive any syntax errors] Anyway, I tried to implement one of my classes as a layer using PerlIO::via and much to my surprise (shock/horror) there is no way to get a pointer to the object after the fact. There isn't even a way to pass extra arguments into the layer creation. So I can't manipulate the streams on the fly (or even configure them at definition) as I wanted. It occurred to me that perhaps I was pushing the paradigm where it shouldn't go...that maybe the layer model was intended for relatively simple transformations such as :crlf versus :raw which wouldn't require access to the layer object...and that I should leave my code as tied handles. Then I found references in the perl5-porters mailing list to issues 'twixt layers and tied handles and the possibility that the latter might go away at some point in favor of the former. The PerlIO::via::LineNumber module (available on CPAN) solves this problem by using class methods to alter the characteristics of the stream. This would handle some cases but it wouldn't support having multiple streams of the same type at the same time with different characteristics. I don't do this much, but occasionally it is useful, especially with the indentation stream. Have I missed something? Am I abusing the paradigm? Any thoughts or comments? mma From lists at dansanderson.com Mon Jan 13 03:20:57 2003 From: lists at dansanderson.com (Dan Sanderson) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Gtk-Perl and Gnome 2, on RedHat 8 Message-ID: <1042449658.14376.33.camel@trinket> Hey all - Is Gtk-Perl 0.7008 (the latest) supposed to work with Gnome 2? I don't see any Gtk-Perl RPMs for RedHat 8, and the RPMs for RedHat 7.3 obviously complain about missing libraries, which I'm pretty sure are simply not present in Gnome 2 (as opposed to whatever Gnome 1.x RedHat 7.3 uses). When I try to build Gtk-Perl (through perl -MCPAN or manually using a download from www.gtkperl.org), linking Gtk.so fails, claiming to be unable to find several dozen .o files in Gtk/xs/. Those .o's appear to have built in Gtk/, but symlinking them into Gtk/xs/ (not necessarily the right thing to do) results in "Too many levels of symbolic links" for those files. I didn't see any other build failures... Anyone had any luck with Gtk-Perl on RedHat 8? Anyone know any reason why it shouldn't work? Thanks for any assistance you can provide! -- Dan From creede at penguinsinthenight.com Mon Jan 13 10:28:37 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Gtk-Perl and Gnome 2, on RedHat 8 In-Reply-To: <1042449658.14376.33.camel@trinket> References: <1042449658.14376.33.camel@trinket> Message-ID: <1042475317.1432.51.camel@svetlana.penguinsinthenight.com> Quick answer: Apparently not. I went to the Gtk-Perl home page and didn't find any updates since sometime in 2001 (which was version 0.7008), well before GNOME 2 came out. Gnome, and GTK, have changed significantly since then. I'm no expert, but in particular GTK2 seems to have changed the names on a bunch of things and maybe even how they're handled. I haven't tried Perl-GTK, but I've been messing around with Python's GTK modules, and I've found that stuff using Python's GTK bindings doesn't work on RH8 with GNOME 2, where GTK2 versions do. Really, you should probably think of GTK and GTK2 as two completely different animals. My guess is that Gtk-Perl and similar stuff will eventually catch up with the current state of the GNOME (or that someone will just write a Perl-GTK2 module or something). Eventually. On Mon, 2003-01-13 at 01:20, Dan Sanderson wrote: > Hey all - > > Is Gtk-Perl 0.7008 (the latest) supposed to work with Gnome 2? > (snip) > Anyone had any luck with Gtk-Perl on RedHat 8? Anyone know any reason > why it shouldn't work? > > Thanks for any assistance you can provide! > > -- Dan > > > _______________________________________________ > spug-list mailing list > spug-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/spug-list -- * .~. `( ----------------------------------------------------------- ` / V \ . Creede Lambard : Growing older is mandatory; /( )\ creede@penguinsinthenight.com : growing up isn't. ^^-^^ ----------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/spug-list/attachments/20030113/84bae49e/attachment.bin From jgardn at alumni.washington.edu Mon Jan 13 10:31:52 2003 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> References: <20030111032023.GA61153@wokkil.pair.com> Message-ID: <200301130831.52460.jgardn@alumni.washington.edu> On Friday 10 January 2003 19:20, Asim Jalis wrote: > I have a question. How do people design large programs with Perl? > Do you start typing code? Or do you spend some time designing it > on paper? > I'm going to be the troll today. ;-) When writing large programs, I often reconsider when I conclude perl is the best tool for the job. In my experience, perl is difficult to document, too flexible, and not a good solution when you may end up having several people working on the same thing. Most big perl programs I see have all evolved that way. They started small, and gradually grew until they became the big program they were never intended to be. Some big perl programs are really several separate programs that run together. Otherwise, it is probably a website. Now here comes the trollish part. I would rather use Python than perl for large projects. I think Python matches my style in more ways than one: - Like perl, it has weak typing. Think of perl with everything as a scalar, and you'll get Python. You still have hashes and arrays, but they are really hashrefs and arrayrefs. - Unlike perl, documentation is so easy to incorporate it is foolish not to. In fact, for a large project, you are shooting yourself in the foot when you supply poor or no documentation, because you will forget how you were supposed to use the objects you just wrote. - Unlike perl, refactoring seems to be easier, and is a much better solution than devising a hack to get things to work. I find that because there are only two ways to access the attributes of an object, writing regular expressions to find all access to attributes is incredibly easy and mindless. This is not so true for perl. Now, I don't want to sound as if I don't like perl. I love perl, almost as much as I love Python. In fact, I use perl as often as I can for things it is very good at doing - handling input and formatting output, and the occasional script, not to mention the glue to bind all you unix command line utilities together. Right now, I am putting together a solution for an optometrist. I am using Python for the GUI interface. GUI interfaces always turn into huge projects, no matter how small the intention was, so Python always wins in my mind. I use perl for the backend data processing. It is powerful and allows me to get to the point much quicker. Between the two, I use a database to store the data. As far as I how I do design work for perl, I said above that I like to use OO to do everything. However, OO and perl are really not comfortable with each other, so I try to use perl's strengths and avoid its weaknesses. I break things up into objects, and then spend the rest of the time deciding how to break up tasks among the objects. I look for tasks that are general enough that they can be reused, and start fleshing out the program in code. I leave stubs with comments or perldoc describing what the task is supposed to do and flesh it out when I really need it. I usually end up programming for thirty minutes, then tinkering to get the code to work, and then testing the code I just wrote until I am satisfied I got it right. Then I go on to another task and work on that one for a while. I try to keep the test code around so I can run it again later. This iterative approach doesn't fare well with a solid design. I have to be able to revise the design as I go, changing the tasks and moving things from one object to another on a whim, especially in the early stages. I find that rather than thinking really hard about what it is going to look like, and writing it out on paper, it is better to actually do it and then assess whether it is a viable solution or not. -- Jonathan Gardner jgardn@alumni.washington.edu Python Qt perl apache and linux From creede at penguinsinthenight.com Mon Jan 13 10:36:48 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Gtk-Perl and Gnome 2, on RedHat 8 In-Reply-To: <1042475317.1432.51.camel@svetlana.penguinsinthenight.com> References: <1042449658.14376.33.camel@trinket> <1042475317.1432.51.camel@svetlana.penguinsinthenight.com> Message-ID: <1042475808.6194.59.camel@svetlana.penguinsinthenight.com> On Mon, 2003-01-13 at 08:28, Creede Lambard wrote: > My guess is that Gtk-Perl and similar stuff will eventually catch up > with the current state of the GNOME (or that someone will just write a > Perl-GTK2 module or something). Eventually. Having sent that, I immediately went to the Gtk-Perl mailing list archives and found a pointer to this: http://sourceforge.net/projects/gtk2-perl/ It looks to be just barely beta but is an indication someone's working on the problem. -- * .~. `( --------------------------------------------------------- ` / V \ . Creede Lambard : Never rush a miracle man. /( )\ creede@penguinsinthenight.com : You get rotten miracles. ^^-^^ --------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/spug-list/attachments/20030113/671e5e3b/attachment.bin From tim at consultix-inc.com Mon Jan 13 11:02:38 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Damian's Available for Corp. Visits Message-ID: <20030113090238.B25817@timji.consultix-inc.com> SPUGsters, As you should all know by now, renowned Perl expert, OOP-Meister, and "Supreme Modulator" Dr. Damian Conway is in Seattle this week. What you might not have heard is that he *won't* be teaching any classes after all, so that opens up a lot of time in his schedule for "Corporate Visits". To help you understand what these visits are like, I've included below some comments on this special service from "The Damian" himself. To inquire about rates or book a visit, you can contact tim@teachmeperl.com. -Tim ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== What's a Corporate Visit? Pretty much whatever the paying customer wants. I can give inspirational and/or mind-altering talks to the troops (e.g. extended versions of SelfGOL or Quantum::Superpositions), I can teach practical half-day or day-long courses, I can do Q&A or brainstorming sessions, discuss programming techniques, lecture on presentation/communication techniques, advise on software engineering problems and solutions, take people very deeply into Perl 6, and into the principles of good design we're attempting to apply to its development, run master-classes in coding and algorithmic design, talk them through my own mental processes as I design and code ad-lib programs, bring a unique perspective to code reviews or design sessions, and tell scandalous stories about the leaders of the Perl community. I can be a reviewer, a reference, or a resource. But I suspect that I'm *best* used as a de-furrower of the en-rutted mind. That is, to shake a programming team up mentally, throw them off balance, wake them to different ways of looking at the world, of thinking about programming, challenge their assumptions and expectations, help them regain that sense of wonder and discovery than first drew them into IT. It might be by pushing their limits in my Advanced Module Development class, or by showing them the remarkable elegance with which we're fitting the pieces of Perl 6 together, or just in the simple act of inventing on the spur of the moment a cleaner way to code a particular loop. Whatever it takes to bounce them out of their everyday grind, and get them excited about their work again. It sounds a bit nebulous, I know, but it really works. Companies like Morgan Stanley and Amazon.com have me do a day or two of that kind of training every time I visit them, and generally rate it higher than anything else I do for them. -Damian Conway From pdarley at kinesis-cem.com Mon Jan 13 16:14:38 2003 From: pdarley at kinesis-cem.com (Peter Darley) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs In-Reply-To: <20030111032023.GA61153@wokkil.pair.com> Message-ID: Asim, I always start my programs with a lot of thinking about what I want the system to do, and then get to work without too much thinking about how to get it done. When I do start on actual code, I take a page from XP, and work on the feature that seems like it's the most important to do next. I do that small thing until it's done and then go on the next thing. For example, if it's a database driven application I will make a function that loads a specific piece of data from the database. Then I'll make another function that does whatever processing the data requires, then another for formatting the data, then another for outputting the data. I test each bit as I go, so I am always at most an hour or so away from a working system, tho it could easily be a working system that is missing so many features that it's not really good for anything yet. As I have continuous releases, this means that I can slip a bug fix or small feature into the system without having to worry too much about the code being in a state where it won't compile or something. Since I put everything together without a lot of pre-planning I often go back and refactor my old functions. One thing that I tend to do a lot of is extending functions to be able to do additional things. For example I have a function that splits text into pieces of certain sizes. It originally broke only on words, but I found that I needed to break sometimes on sentences or paragraphs, rather than words. I had to add a switch to the function to tell it what to break on, but needed to get the same result as originally without changing the function calls. In order to make this kind of change I've started to pass all arguments to my functions in a hash. For example: SplitString(String=>$StringToBeSplit, Method=>'ByLength', MaxLength=>40). This makes it very easy to read the resulting code, since it's always clear what the arguments to the function mean, even if you're passing it something like $Temp, and it makes it very easy to extend the function later by adding arguments. I also make sure to document the arguments of the function in case later on the name by its self isn't enough to tell what the heck it is. All of my functions end up looking like this: sub SplitString { my (%Args) = @_; # Args: String = the string to be split # MaxLength = OPTIONAL maximum length for a string segment # SplitBy = OPTIONAL Word or Sentince; defaults to Word # Method = OPTIONAL Half or ByLenght; defaults to Half Do Funcion Stuff } Um, kinda rambled on there, but it's the most important thing that keeps my code readable (at least to me) and easily extendable. Thanks, Peter Darley -----Original Message----- From: spug-list-admin@mail.pm.org [mailto:spug-list-admin@mail.pm.org]On Behalf Of Asim Jalis Sent: Friday, January 10, 2003 7:20 PM To: spug-list@pm.org Subject: SPUG:Designing Programs I have a question. How do people design large programs with Perl? Do you start typing code? Or do you spend some time designing it on paper? If you design it on paper, how do you do it? Do you define the functions and what they will do and then flesh this out till you have pinned down the whole program? Do you first break the program down into modules and then flesh out each module? Do you draw diagrams? Or is it something completely different? Do you use any kind of OO design ideas? I am particularly interested in Perl and Perl design experience and ideas. Asim _______________________________________________ spug-list mailing list spug-list@mail.pm.org http://mail.pm.org/mailman/listinfo/spug-list From lists at dansanderson.com Tue Jan 14 03:45:10 2003 From: lists at dansanderson.com (Dan Sanderson) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Gtk-Perl and Gnome 2, on RedHat 8 In-Reply-To: <1042475317.1432.51.camel@svetlana.penguinsinthenight.com> References: <1042449658.14376.33.camel@trinket> <1042475317.1432.51.camel@svetlana.penguinsinthenight.com> Message-ID: <1042537511.6362.20.camel@trinket> Hmph. There apparently is a Perl-Gtk 0.7008 RPM that comes with RedHat 8. I could have sworn I already tried installing it last night, but I just tried again and it installed. (Also required installing gtkglarea, but that also came with the distro.) A couple of short test programs seem to work fine. I presume RH8 installed some GTK 1.x libraries for backward compatibility (which I notice come with RH8 as well as the GTK2 libs) or something like that... Thanks! -- Dan On Mon, 2003-01-13 at 08:28, Creede Lambard wrote: > Quick answer: Apparently not. I went to the Gtk-Perl home page and > didn't find any updates since sometime in 2001 (which was version > 0.7008), well before GNOME 2 came out. > > Gnome, and GTK, have changed significantly since then. I'm no expert, > but in particular GTK2 seems to have changed the names on a bunch of > things and maybe even how they're handled. I haven't tried Perl-GTK, but > I've been messing around with Python's GTK modules, and I've found that > stuff using Python's GTK bindings doesn't work on RH8 with GNOME 2, > where GTK2 versions do. > > Really, you should probably think of GTK and GTK2 as two completely > different animals. > > My guess is that Gtk-Perl and similar stuff will eventually catch up > with the current state of the GNOME (or that someone will just write a > Perl-GTK2 module or something). Eventually. > > On Mon, 2003-01-13 at 01:20, Dan Sanderson wrote: > > Hey all - > > > > Is Gtk-Perl 0.7008 (the latest) supposed to work with Gnome 2? > > (snip) > > Anyone had any luck with Gtk-Perl on RedHat 8? Anyone know any reason > > why it shouldn't work? > > > > Thanks for any assistance you can provide! > > > > -- Dan > > > > > > _______________________________________________ > > spug-list mailing list > > spug-list@mail.pm.org > > http://mail.pm.org/mailman/listinfo/spug-list > -- > * .~. `( ----------------------------------------------------------- > ` / V \ . Creede Lambard : Growing older is mandatory; > /( )\ creede@penguinsinthenight.com : growing up isn't. > ^^-^^ ----------------------------------------------------------- > > Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. > GPG key at http://www.penguinsinthenight.com/creede_public_key.asc From Marc.M.Adkins at Doorways.org Tue Jan 14 14:15:58 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:wxPerl In-Reply-To: <1042449658.14376.33.camel@trinket> Message-ID: > Is Gtk-Perl 0.7008 (the latest) supposed to work with Gnome 2? Just a note...I responded directly (to the wrong person) the other day... Are you aware of wxPerl? The wxWindows library works with Gnome (wxWindows v3 will work directly with X-Windows, but currently Gnome is required for X platforms) and Windows. wxPerl is a Perl binding for wxWindows. Both have some history and seem to work swell. Having checked the wxWindows site, the list of target platforms is: Windows 95/98/ME, Windows NT/2K/XP, Linux/Unix with the GTK+ toolkit (or plain X11, or Motif), and MacOS Controls missing from specific target platforms are implemented as part of the package so the playing field is (supposedly) pretty much level. wxWindows itself is C++. I know of bindings to Perl (wxPerl) and Python (wxPython). wxWindows is open-source. The license is a L-GPL variant. I just built wxPerl for: Windows 2000 ActiveState 5.8 (804) VC++ 6 SP4 wxWindows 2.4 wxPerl 0.12 The instructions in docs/install.txt (wxPerl source) are important (must build wxWindows as DLL and so forth). In addition, for wxPerl 0.12, it is necessary to change files: ext/html/Html.xs ext/xrc/XRC.xs ext/filesys/FS.xs In each file there is a set of #undef statements at the beginning. At the end of each such block add: #undef Mkdir Apparently wxPerl 0.13 will be accompanied by an ActiveState 5.8 binary, so installation will become painless (again). If you build it there are sample programs demonstrating all of the dialogs and so forth. I just ran through them all with my 5.8/0.12 build and they work as always. On Windows this is all pretty impressive. On *NIX and other OSs I don't know, but would be interested in feedback. The only drawback I can think of is that wxWindows uses a Windows-like programming paradigm, so people with a lot of experience with GTK/X/Tk and so forth might have more to learn. On the other hand, the 'Hello, world' program is quite simple in Perl and isn't as Windows-centric as coding directly in C++. For more information: http://www.wxwindows.org http://wxperl.sourceforge.net/ mma From tim at consultix-inc.com Tue Jan 14 21:20:27 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Damianiacal Party, Sat. 1/18 Message-ID: <20030114192027.B3028@timji.consultix-inc.com> SPUGsters, Colin Meyer (cmeyer@helvella.org) has bravely volunteered (or was it the Giant Margarita speaking?) to host a party for Visiting Perl Guru Damian Conway this coming Saturday, 1/18, from approx. 7pm to midnight. All SPUGsters, and alternative language scripters (python, ruby, etc.) are invited. Spouses/friends are welcome as well, even if they program in Visual Basic or not at all (nearly the same thing 8-} ). Partiers are asked to bring some drinks and snacks. Smokers are welcome too, but they must indulge outside the house. Colin is out of town attending a conference, so please don't bombard him with emails or phone calls. When he has enough time, he'll probably post some more details, such as driving directions. In the meantime, you can figure out where he lives (near Southcenter Mall) by using maps.yahoo.com, mapquest.com, etc., with this address: Colin Meyer 722-6687 10729 57th Ave S., Seattle WA 98178-2233 Looking forward to a good turnout and a fun time, to give The Damian a great sendoff! (He leaves Sunday.) ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From thasone at yahoo.com Tue Jan 14 23:50:56 2003 From: thasone at yahoo.com (gest) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Re: [Spug-list] Randal Schwartz Presentation to the Seattle SAGE ... meeting minutes??? In-Reply-To: <20030108084914.28719.h014.c000.wm@mail.conway.org.criticalpath.net> Message-ID: <20030115055056.95586.qmail@web21002.mail.yahoo.com> Hi, Does anyone have the meeting minutes or know where I can view it? Or if there is a streaming video or something of the sort that be pretty cool too! Thanks in advanced. --- damian@conway.org wrote: > I wrote: > > > Would anyone who's going to this event happen to > be passing through > > the downtown area, and able to give a *seriously* > jetlagged Aussie > > Perl guru a lift there and back? > > Many thanks to everyone who has volunteered to pick > me up. > My ride is now arranged and will look forward to > seeing you all there. > (Unless, of course, I'm too jet-lagged to realize > that *I'm* there ;-) > > Damian > _______________________________________________ > spug-list mailing list > spug-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/spug-list __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From tim at consultix-inc.com Wed Jan 15 02:28:29 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Meeting: The Horror of ~damian/bin ! Message-ID: <20030115002829.A5024@timji.consultix-inc.com> SPUGsters, Don't miss Damian's latest show, which he'll be testing on a live SPUG audience Wednesday night (can you say "Room Full of Guinea Pigs"?). Also, those planning to "Dine with the Dame"--ian please RSVP to me on Wednesday, so I can reserve a spot for you. The dinner festivities will begin around 5:30, and end by 6:45, and all are welcome. Details of the location are included below. Bring checkbooks, charge-cards, and cash, just in case I come up with something to auction off for TPF. -Tim ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== January 2003 Seattle Perl Users Group Meeting ----------------------------------------------------- Speaker: Damian Conway, JAPWASM ("Just Another Perl Wizard and Supreme Modulator") Time: Wednesday, January 15, 2002 7-9pm NOTE: Usual location and time, but 3rd Wednesday, rather than 3rd Tuesday! Location: SAFECO bldg, Brooklyn St. and NE 45th St. Cost: Admission is free and open to the general public. Info: http://seattleperl.org/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "Everyday Perl - The Horror that is ~damian/bin" In this new talk, Damian walks us through his ~/bin directory, explaining the numerous home-spun Perl scripts that he uses on an everyday basis. Remember, we're dealing with "The Damian" here, so just because the scripts are short and practical, that doesn't mean they can't also be scary! Pre- and Post- Meeting Activities --------------------------------- The pre-meeting dinner will be at the Cedars restaurant, at 50th St. and Brooklyn, in the University District, near the Safeco building where the meeting will take place. The phone number is 527-5247. If you're planning to be there, please post a message to the list with your expected arrival time (5:30-5:45pm is recommended). As usual, those seeking liquid input before (and/or after) the meeting are invited to congregate at the nearby Finn MacCool's tavern, at 4217 University Ave. North, (206) 675-0885. (But if somebody has a *specific recommendation* for an alternative location that's more conducive to conversation, please let me know, and we'll consider trying it out.) See the web-site for more details. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== From tim at consultix-inc.com Thu Jan 16 01:21:33 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Free Damian Talk Thurs. Morning Message-ID: <20030115232133.A11290@timji.consultix-inc.com> Damian's SPUG talk just ended, in which he revealed the numerous shell, vi, and perl shortcuts that underly his amazing productivity. As usual, several people had their cerebral circuits conspicuously overloaded, complete with eye-rolling and drooling, and will need some time to return to normal neural parameters. So the talk was deemed a rousing success! 8-} For those of you who haven't heard yet, or still need the directions, the good folks at Geospiza have invited all interested parties to attend Damian Conway's corporate presentation tomorrow morning at their facility. This is a unique opportunity to learn about Regexes and Parsing from the master himself, and a bit about Bioinformatics to boot -- for free! You gotta love those Geospiza folks for this magnanimous gesture to the Perl community. The talk starts at 9:30, and runs until at least 1. They're located at 3411 Thorndyke Ave. W, Seattle 98119, in the Interbay district between Magnolia and Queen Anne. You can see maps at their web-site, at http://geospiza.com/contact/directions.htm. (206) 633-4403. Hope you can make it! -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Perl Modules: 2/13; | *----------------------------------------------------------------------------* From MichaelRunningWolf at att.net Thu Jan 16 03:07:59 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:want to help launch microship? Message-ID: Steve Roberts, a December SPUG speaker is looking for volunteers to join his newly mounted microship push toward a July 1 launch. I've appended a recent email with some techno-teasers. Dig around at microship.com to find more. You could get lost in his decades of technomadic madness -- he has. I've set the "reply-to" field so that you can reply directly back to Steve; make sure it works so you don't follow up here. You don't need a face that could launch a thousand ships. (1E3 ships) But your interface could help launch a micro ship. (1E-3 ship) Have fun, Michael Wolf, recently-landed technomadic land traveler "Steven K. Roberts" writes: > We're homing in on a final system spec; there will be a few embedded > packaging jobs, some networking between one or two units of the > Toshiba e740 class with a hacked iBook in the console, some > server-side Perl tools to provide tracking and virtual console > service, hands-on fabrication projects, drivers for things hanging > on USB-serial interfaces, communication software that can handle > various modes including ham radio packet, and a variety of front-end > tools in Squeak along with corresponding database servers (MySQL). > Lots to do by July 1! > > Cheers and hi to the group, > Steve -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Thu Jan 16 10:49:33 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Damian is still available for corporate visits Message-ID: But one day only -- Friday (tomorrow). If last night's talk inspired you, or gave you some insights, perhaps you could share them with the rest of your group. I've appended Damian's response to "What is a corporate visit?". If you can act quiickly, you can snarf up a great value for your company. Contact Tim Maher of Consultix on 206/781-UNIX for further details. What's a Corporate Visit? Pretty much whatever the paying customer wants. I can give inspirational and/or mind-altering talks to the troops (e.g. extended versions of SelfGOL or Quantum::Superpositions), I can teach practical half-day or day-long courses, I can do Q&A or brainstorming sessions, discuss programming techniques, lecture on presentation/communication techniques, advise on software engineering problems and solutions, take people very deeply into Perl 6, and into the principles of good design we're attempting to apply to its development, run master-classes in coding and algorithmic design, talk them through my own mental processes as I design and code ad-lib programs, bring a unique perspective to code reviews or design sessions, and tell scandalous stories about the leaders of the Perl community. I can be a reviewer, a reference, or a resource. But I suspect that I'm *best* used as a de-furrower of the en-rutted mind. That is, to shake a programming team up mentally, throw them off balance, wake them to different ways of looking at the world, of thinking about programming, challenge their assumptions and expectations, help them regain that sense of wonder and discovery than first drew them into IT. It might be by pushing their limits in my Advanced Module Development class, or by showing them the remarkable elegance with which we're fitting the pieces of Perl 6 together, or just in the simple act of inventing on the spur of the moment a cleaner way to code a particular loop. Whatever it takes to bounce them out of their everyday grind, and get them excited about their work again. It sounds a bit nebulous, I know, but it really works. Companies like Morgan Stanley and Amazon.com have me do a day or two of that kind of training every time I visit them, and generally rate it higher than anything else I do for them. -Damian Conway From tim at consultix-inc.com Thu Jan 16 13:18:46 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Job at Siemens Message-ID: <20030116111846.A14738@timji.consultix-inc.com> Associate Support Engineer II Job Description: You will be suing Perl to perform analysis on Novell users for the purpose of data migration and NDS to AD conversion. Provide support at the workstation level to technicians during and after PEZ deployment. Required skill set: Requires proficiency in Perl with at least 3 years experience writing Perl. Should have a basic understanding of Novell's bindery and command-line utilities. Should have basic knowledge of Windows XP with regards to connecting to Active Directory and Novell. Knowledge of Novell login scripts and Active Directory a plus. Contract position - starts immediately through June 2003 Pay range - $40-45/hr Candidates work directly with recruiter initially and then interview with hiring manager. Candidate will report directly to Siemens manager at client location. This is a W-2 position, you will be paid every 2 weeks. Location: Downtown Seattle, will physically work on-site Client product or service - Banking/financial services For immediate consideration, please forward your resume to: RecruiterNW@sbs.siemens.com. No third parties or individuals needing sponsorship need apply for this project. Local candidates only. For more information about Siemens Business Services, visit our web site at www.sbs-usa.siemens.com. From tim at consultix-inc.com Thu Jan 16 17:21:44 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Testing msg footer Message-ID: <20030116152144.A17213@timji.consultix-inc.com> SPUGsters, Go away, read a stick-riddle message or something! Sorry for this post, but there's no other way for me to get the feedback I need. I must know if the line-breaks I view in the ridiculously narrow text-box I've been given to compose within are really going to show up that way on the message footers. -Tim From tim at consultix-inc.com Thu Jan 16 17:34:27 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Testing msg footer In-Reply-To: <20030116152144.A17213@timji.consultix-inc.com> References: <20030116152144.A17213@timji.consultix-inc.com> Message-ID: <20030116153427.A17356@timji.consultix-inc.com> On Thu, Jan 16, 2003 at 03:21:44PM -0800, SPUG-list-owner wrote: Testing again. . . > SPUGsters, > > Go away, read a stick-riddle message or something! > > Sorry for this post, but there's no other way for me to get > the feedback I need. > > I must know if the line-breaks I view in the ridiculously narrow > text-box I've been given to compose within are really going to > show up that way on the message footers. > > -Tim > [INVALID FOOTER] -- -Tim From seppy at tanzatech.com Fri Jan 17 11:02:47 2003 From: seppy at tanzatech.com (September Nyang oro) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:DOS / BASIC Script Message-ID: SPUG-ers, I got a job in DataStage that runs once per day. It basically gets raw data from DB2, transforms it ( we do some calculations and other stuff here), and then dumps the data into an Oracle. So that part works perfectly. We need to be able to archive this raw data from the DB2 source for 14 days just incase something happens to our jobs, so we could go back and get that raw data from the archive and run it again. We're trying to archive this data in a flat file in Windows NT. Right now when we run the process we could only archive the raw data for 1 day. DataStage could only 'overwrite' or 'append' to an existing file. But we want separate files everyday. The challenge: I need to write a script in Basic / DOS that would put a timestamp in my jobs. Before it 'overwrites' yesterday's job in the system when it writes today's job, it should move 'yesterday's job into another directory/folder. And then keep that old job in the new folder for 14 days. After 14 days that job should be deleted. So a script that can perform those functions is something that would be useful to me. So ideally, I'll need to have a script that runs first on the system, moves the old file into the new directory, checks whether that new directory has files older than 14 days, if so then delete the older- than-14-days file(s). If no older than 14 days files are available, then just finish. Ideas are welcome. Thanks. ../seppy From mathin at mathin.com Fri Jan 17 11:32:50 2003 From: mathin at mathin.com (Dan Ebert) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:DOS / BASIC Script In-Reply-To: References: Message-ID: <1042824770.1382.4.camel@algernon.lan.enic.cc> Could you incoporate the date into the raw data filename? That way you wouldn't have to worry about creating directory or moving a file. A seperate script could then be written to look at the filenames and delete the old ones. -- Dan Ebert ---------------------------------------------------------- "If you're right 90% of the time, why quibble about the remaining 3%?" On Fri, 2003-01-17 at 09:02, September Nyang oro wrote: > SPUG-ers, > > I got a job in DataStage that runs once per day. It basically gets raw > data from DB2, transforms it ( we do some calculations and other stuff > here), and then dumps the data into an Oracle. So that part works > perfectly. > > We need to be able to archive this raw data from the DB2 source for 14 > days just incase something happens to our jobs, so we could go back and > get that raw data from the archive and run it again. We're trying to > archive this data in a flat file in Windows NT. Right now when we run > the process we could only archive the raw data for 1 day. DataStage > could only 'overwrite' or 'append' to an existing file. But we want > separate files everyday. > > The challenge: I need to write a script in Basic / DOS that would put a > timestamp in my jobs. Before it 'overwrites' yesterday's job in the > system when it writes today's job, it should move 'yesterday's job into > another directory/folder. And then keep that old job in the new folder > for 14 days. After 14 days that job should be deleted. So a script that > can perform those functions is something that would be useful to me. > > So ideally, I'll need to have a script that runs first on the system, > moves the old file into the new directory, checks whether that new > directory has files older than 14 days, if so then delete the older- > than-14-days file(s). If no older than 14 days files are available, > then just finish. > > Ideas are welcome. > > Thanks. > > ../seppy > > > > ______________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org From cwilkes-spug at ladro.com Fri Jan 17 12:17:52 2003 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex Message-ID: <20030117181752.GG75871@www.ladro.com> Having not looked into embedding code into regex before Damian's talk on Thursday I tried poking around and looking for docs on it, mainly going off of perlretut's perldoc page. Then I thought I would look around on the web for it. Google might be great, but when you're looking for "embedded code perl regex" you're getting a lot of junk like "removing embedded newline" and some people say "regexp" or "regular expressions" or such. If this process was somehow named something unique, like "perlembeddedcodeinregex" it would be easier to search for. Plus you can't look for things like "?{" on google. Anyway I found these items on the Perl6 RFCs from 2000: http://dev.perl.org/rfc/308.html http://dev.perl.org/rfc/348.html#Getting_rid_of_the_current_ Which are about getting rid of the (?{}) construct. Is this feature going to stick around? Am I thinking about the wrong thing, which is highly likely as my brain's still spinning from the talk. If you were at the talk I'm just trying to remember the syntax for getting the swiss-prot ID and seeing if that number is less than 1024 and a multiple of 7 and 13. Finally: thank you Geospiza for opening the talk up to the public. If there's a Karmic Tip Jar out there yours would be full. Chris From tim at consultix-inc.com Fri Jan 17 15:55:44 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Amazon Perl Job Message-ID: <20030117135544.C7743@timji.consultix-inc.com> Sr. Web Developer/Perl Guru Amazon.com Position # 03-007560 Email resumes to: xsite-techjobs@amazon.com Required Skills: We are looking for smart, driven, and articulate web developers who love to build websites, love to see their solutions in use, recognize the revolutionary nature of the internet, and thrive in small, cross functional teams. If you're an expert in standard web development languages (HTML, CSS, XML, Javascript) and have a solid background in programming (Perl, C, C++) and familiarity with object-orientation, database-driven websites, and UNIX, you qualify. Customer focus, an interest in business, experience in interface design and usability would be nice pluses. A bachelor's degree in computer science, or a relevant area, is icing on the cake. Multiple Permanent Positions Stock (Restricted Stock Units) Candidate deals with the Corporate Recruiter from Amazon.com. The candidate would work directly for Amazon.com Permanent employment on W2 basis Location: 1200 12th Avenue South Seattle, WA 98144-2734 No telecommuting Leading eCommerce Site From jmates at sial.org Fri Jan 17 16:28:19 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Re: Question from Damian's talk on embedded code in regex In-Reply-To: <20030117181752.GG75871@www.ladro.com> References: <20030117181752.GG75871@www.ladro.com> Message-ID: <20030117222819.GE72665@darkness.sial.org> * Chris Wilkes [2003-01-17T10:31-0800]: > Then I thought I would look around on the web for it. Google might be > great, but when you're looking for "embedded code perl regex" you're > getting a lot of junk like "removing embedded newline" and some people > say "regexp" or "regular expressions" or such. If this process was > somehow named something unique, like "perlembeddedcodeinregex" it would > be easier to search for. Plus you can't look for things like "?{" on > google. http://labs.google.com/sets Is an interesting google test feature to play around with. -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) From tim at consultix-inc.com Fri Jan 17 16:16:09 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex In-Reply-To: <20030117181752.GG75871@www.ladro.com> References: <20030117181752.GG75871@www.ladro.com> Message-ID: <20030117141609.A8795@timji.consultix-inc.com> On Fri, Jan 17, 2003 at 10:17:52AM -0800, Chris Wilkes wrote: > Having not looked into embedding code into regex before Damian's talk on > Thursday I tried poking around and looking for docs on it, mainly > going off of perlretut's perldoc page. I wasn't there, but I'm guessing you're talking about the MATCH-ME(?{code executed on match goes here}) syntax. It's documented in the Camel (p. 160, 3rd Edition), and in the on-line perl docs too (see: perldoc perlre) -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Perl Modules: 2/13; | *----------------------------------------------------------------------------* From cmeyer at helvella.org Fri Jan 17 17:46:54 2003 From: cmeyer at helvella.org (Colin Meyer) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Damianiacal Party, Sat. 1/18 In-Reply-To: <20030114192027.B3028@timji.consultix-inc.com>; from tim@consultix-inc.com on Tue, Jan 14, 2003 at 07:20:27PM -0800 References: <20030114192027.B3028@timji.consultix-inc.com> Message-ID: <20030117154654.B5944@hobart.helvella.org> On Tue, Jan 14, 2003 at 07:20:27PM -0800, Tim Maher wrote: > SPUGsters, Scroll down for driving directions... > > Colin Meyer (cmeyer@helvella.org) has bravely volunteered (or was > it the Giant Margarita speaking?) to host a party for Visiting Perl Although it was certainly the margarita speaking (it was as big as my head!), I'm very happy to have SPUGgers and other associated folks over for a Damianiacal hoedown. > Guru Damian Conway this coming Saturday, 1/18, from approx. 7pm > to midnight. > > All SPUGsters, and alternative language scripters (python, ruby, > etc.) are invited. Spouses/friends are welcome as well, even if > they program in Visual Basic or not at all (nearly the same thing 8-} ). > > Partiers are asked to bring some drinks and snacks. Smokers are > welcome too, but they must indulge outside the house. > > Colin Meyer > (206) 722-6687 > 10729 57th Ave S., Seattle WA > 98178-2233 Driving directions: South on I5 to exit 158 (says E Marginal Way and MLK way) Left at first light, over the freeway. Straight through next light, crossing MLK. Follow From Ryan directions. North on I5 to exit 157 (says MLK way) Head towards the right lane, to avoid getting back onto I5. Right at first light, onto Ryan Way. Follow From Ryan directions. From tim at consultix-inc.com Fri Jan 17 17:52:08 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Amazon Perl Job: CORRECTION In-Reply-To: <20030117135544.C7743@timji.consultix-inc.com> References: <20030117135544.C7743@timji.consultix-inc.com> Message-ID: <20030117155208.A9346@timji.consultix-inc.com> Job-seekers, Amazon now says you should send your resumes to the following address, rather than the one originally announced: nicnelso@amazon.com (I've asked them to set up an alias to forward from the old one, but who knows if that will happen.) -Tim ======================================================= | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White-Camel Award Recipient") | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ======================================================= On Fri, Jan 17, 2003 at 01:55:44PM -0800, Tim Maher wrote: > > Sr. Web Developer/Perl Guru > Amazon.com > Position # 03-007560 > Email resumes to: nicnelso@amazon.com > > Required Skills: > We are looking for smart, driven, and articulate web developers > who love to build websites, love to see their solutions in use, > recognize the revolutionary nature of the internet, and thrive in > small, cross functional teams. If you're an expert in standard > web development languages (HTML, CSS, XML, Javascript) and have > a solid background in programming (Perl, C, C++) and familiarity > with object-orientation, database-driven websites, and UNIX, you > qualify. Customer focus, an interest in business, experience in > interface design and usability would be nice pluses. A bachelor's > degree in computer science, or a relevant area, is icing on the cake. > > Multiple Permanent Positions > > Stock (Restricted Stock Units) > > Candidate deals with the Corporate Recruiter from Amazon.com. > The candidate would work directly for Amazon.com > > Permanent employment on W2 basis > > Location: > 1200 12th Avenue South > Seattle, WA 98144-2734 > > No telecommuting > > Leading eCommerce Site From MichaelRunningWolf at att.net Fri Jan 17 18:07:19 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: file timestamps and removal [was Re: SPUG:DOS / BASIC Script] In-Reply-To: <1042824770.1382.4.camel@algernon.lan.enic.cc> References: <1042824770.1382.4.camel@algernon.lan.enic.cc> Message-ID: Dan Ebert writes: > Could you incoporate the date into the raw data filename? That way you > wouldn't have to worry about creating directory or moving a file. A > seperate script could then be written to look at the filenames and > delete the old ones. I've done a similar thing, using Unix dates (useful for scripts) and also human readable dates encoded in the filename. How 'bout something like this (no warranty, completly untested..): # Name, create, use, close, and touch(1) a log file. my $unix_now = time; my $human_now = local_time($unix_now); my $file_name = sprintf("DB_trailings.%d.%s.txt", $unix_now, $human_now); open my $fh, $file_name or die "problem with trailings file $file_name: $!"; #use $fh... close $fh; utime ($unix_now)x2, $file_name; # To make name consistant with timestamp. #Then remove all old ones. $now = time; $threshhold = $now - 14*(24*60*60); @too_old = grep { /^DB_trailings\.(\d+)\./ && $1 > $threshhold } glob("DB_trailings.*.*.txt"); @unsucessful = unlink(@too_old); warn "could not unlink @unsucessful: $!" if @unsucessful; -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Sat Jan 18 09:53:31 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: file timestamps and removal [was Re: SPUG:DOS / BASIC Script] In-Reply-To: References: <1042824770.1382.4.camel@algernon.lan.enic.cc> Message-ID: "Michael R. Wolf" writes: [...] > @too_old = grep { /^DB_trailings\.(\d+)\./ && $1 > $threshhold } > glob("DB_trailings.*.*.txt"); # Of course, TMTOWTDI. These code frags look at the _real_ file # timestamp instead of the same information _encoded_ in the filename. # The reason I like the filename encoding is that it's not sensitive # to touch(1) or someone accidently changing the timestamp while # viewing it with their favorite editor. Of course, there's a case to # be made that that touch(1) is important, and therefore worth # preserving for another 2 weeks. If it weren't important for some # reason, it wouldn't have been touched. It's your environment; you # make the engineering decision. @too_old = grep { (stat($_))[9] > $threshhold } glob("DB_trailings.*.*.txt"); #or ================ use File::stat; @too_old = grep { stat($_)->mtime > $threshhold } glob("DB_trailings.*.*.txt"); #or ================ @too_old = grep { -M $_ > 14 } glob("DB_trailings.*.*.txt"); TMTOWTDI-ily, Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From doug at beaver.net Sat Jan 18 11:28:24 2003 From: doug at beaver.net (Doug Beaver) Date: Mon Aug 2 21:36:48 2004 Subject: file timestamps and removal [was Re: SPUG:DOS / BASIC Script] In-Reply-To: ; from MichaelRunningWolf@att.net on Fri, Jan 17, 2003 at 04:07:19PM -0800 References: <1042824770.1382.4.camel@algernon.lan.enic.cc> Message-ID: <20030118122824.A68347@beaver.net> On Fri, Jan 17, 2003 at 04:07:19PM -0800, Michael R. Wolf wrote: > > I've done a similar thing, using Unix dates (useful for scripts) and > also human readable dates encoded in the filename. > > How 'bout something like this (no warranty, completly untested..): > > # Name, create, use, close, and touch(1) a log file. > > my $unix_now = time; > my $human_now = local_time($unix_now); > > my $file_name = sprintf("DB_trailings.%d.%s.txt", $unix_now, $human_now); i want to share a few comments about log names... i think that putting localtime in the log name is messy. i don't know how dos feels about spaces in filenames, but it's annoying in unix. your naming scheme makes it difficult to sling around log files in a shell. say you want to find the log for 9am on 2/15. you'd have to do a directory listing and filter out the entries for february, searching for 'Feb' in order to find the proper matches. then you'd take the epoch that matched your date and use that to tab complete the filename. or, if you put the date first, you'd have to tab complete the string form of the date, but you'd have to know which day the log was made on, SatFeb1509. that scheme can get tedious once you have a lot of lot of logs. i suggest that you use a descending date like '20020215-090105'. if you ascii sort it, it's already in chronological order. it's easy for humans to tab complete in their shell, and it doesn't have any spaces in it. i included a code snippet below that shows how to create these types of log names. i also wanted to point out a difference in philosophy when it comes to reaping old log files. you're expiring logs based on the timestamp in the filename, which maps to the creation time of the log. that's one way to do it, but i prefer to expire the log after the last piece of data was written to it. if i want to archive logs 24 hours after they are written, i want to archive 24 hours after the last piece of data was written, not the first piece of data, because i have no idea how long the log was open for. if the log stays open long enough, i might end up expiring it while it's still being written to. using the last write time has a nice side benefit, you don't have to parse the name of the log to figure out how to reap it, you just stat it and add the appropriate number of seconds to its mtime. it's a small distinction and mostly philosophical, but i thought i'd provide a different viewpoint on that. doug #!/usr/bin/env perl use strict; use Date::Format; print "BEGIN\n"; printLog("hello-world1", time - 60); printLog("hello-world2", time - 60, "batch.log"); printLog("hello-world3"); printLog("hello-world4", "loggg"); print "END\n"; sub printLog { my $name = getLogName(@_); print "$name\n"; sleep 1; } sub getLogName { my ($prefix, $epoch, $suffix) = @_; return unless $prefix; if ($epoch && $epoch !~ /^\d+$/) { $suffix = $epoch; $epoch = time; } $suffix ||= 'log'; $epoch ||= time; my $timestamp = time2str("%Y%m%d-%H%M%S", $epoch); $timestamp ||= $epoch; my $name = "$prefix.$timestamp.$suffix"; return $name; } BEGIN hello-world1.20030118-122350.log hello-world2.20030118-122351.batch.log hello-world3.20030118-122452.log hello-world4.20030118-122453.loggg END > open my $fh, $file_name or die "problem with trailings file $file_name: $!"; > #use $fh... > close $fh; > > utime ($unix_now)x2, $file_name; # To make name consistant with timestamp. > > #Then remove all old ones. > > $now = time; > $threshhold = $now - 14*(24*60*60); > > @too_old = grep { /^DB_trailings\.(\d+)\./ && $1 > $threshhold } > glob("DB_trailings.*.*.txt"); > > @unsucessful = unlink(@too_old); > warn "could not unlink @unsucessful: $!" if @unsucessful; > > -- > Michael R. Wolf > All mammals learn by playing! > MichaelRunningWolf@att.net > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > -- Leela: Come on, Fry, walk like a robot! Fry: I can't. I have to go to the bathroom. Leela: Robots don't have bathrooms. Fry: Oh, riiight. I wonder where they smoke in high school. From MichaelRunningWolf at att.net Sat Jan 18 17:06:35 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Damianiacal Party, Sat. 1/18 In-Reply-To: <20030117154654.B5944@hobart.helvella.org> References: <20030114192027.B3028@timji.consultix-inc.com> <20030117154654.B5944@hobart.helvella.org> Message-ID: Colin Meyer writes: > On Tue, Jan 14, 2003 at 07:20:27PM -0800, Tim Maher wrote: > > SPUGsters, > > Scroll down for driving directions... Anyone interested in carpooling? I'm in Ballard. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Sat Jan 18 17:44:49 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: file timestamps and removal [was Re: SPUG:DOS / BASIC Script] In-Reply-To: <20030118122824.A68347@beaver.net> References: <1042824770.1382.4.camel@algernon.lan.enic.cc> <20030118122824.A68347@beaver.net> Message-ID: Doug Beaver writes: > On Fri, Jan 17, 2003 at 04:07:19PM -0800, Michael R. Wolf wrote: > > > > I've done a similar thing, using Unix dates (useful for scripts) and > > also human readable dates encoded in the filename. > > > > How 'bout something like this (no warranty, completly untested..): > > > > # Name, create, use, close, and touch(1) a log file. > > > > my $unix_now = time; > > my $human_now = local_time($unix_now); > > > > my $file_name = sprintf("DB_trailings.%d.%s.txt", $unix_now, $human_now); > > i want to share a few comments about log names... [...] > that scheme can get tedious once you have a lot of lot of logs. i > suggest that you use a descending date like '20020215-090105'. if you > ascii sort it, it's already in chronological order. it's easy for > humans to tab complete in their shell, and it doesn't have any spaces in > it. I completely agree. I got lazy with my code. I even forgot to half-way clean it up, intending at least to clean up the whitespace. That's why I put it in its own variable. $human_now =~ s/ /_/g; But of course, I like the numeric version better, for the reasons you suggest. In fact, that's what I'd done in the past. I got lazy in this posting - it was the time2str that I'd forgotten. BTW -- beware using time in a list context. Some of its components are one off from what I'd expect. [...] > i also wanted to point out a difference in philosophy when it comes to > reaping old log files. you're expiring logs based on the timestamp in > the filename, which maps to the creation time of the log. that's one > way to do it, but i prefer to expire the log after the last piece of > data was written to it. if i want to archive logs 24 hours after they > are written, i want to archive 24 hours after the last piece of data was > written, not the first piece of data, because i have no idea how long > the log was open for. if the log stays open long enough, i might end up > expiring it while it's still being written to. using the last write > time has a nice side benefit, you don't have to parse the name of the > log to figure out how to reap it, you just stat it and add the > appropriate number of seconds to its mtime. it's a small distinction > and mostly philosophical, but i thought i'd provide a different > viewpoint on that. Good point on close time. That makes an 'ls -l' command sort 'em by close time, and gives you 2 pieces of info, not just one. You can visually look at open *and* close times. On a site note, I just wrote a little test program that confirmed that the mtime is set on close, not upon the last print. By example, if time is 0 (groovy, retro, man!!!), the mtime of the following file is 10, not 0. print $fh "happy zero epoch time\n"; sleep 10; close $fh; ================ Thanks for adding the time2str function to this "stone soup", design by committee convergence of good ideas. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From jaygray at scn.org Sun Jan 19 01:21:16 2003 From: jaygray at scn.org (Jay Gray) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex In-Reply-To: <20030117181752.GG75871@www.ladro.com> Message-ID: On Fri, 17 Jan 2003, Chris Wilkes wrote: > Having not looked into embedding code into regex before Damian's talk on > Thursday I tried poking around and looking for docs on it, mainly > going off of perlretut's perldoc page. If you are very interested, there is an O'Reilly book, "Mastering Regular Expressions, second edition" by Jeffrey E. F. Friedl the owl book). "Programming Perl, third edition" devotes a section (5.10) to regex tricks like m/?{CODE}/. It is important with both books to have the latest editions, as the Owl book 1st ed and Camel book 2nd ed. are both notably out of date. I searched Google for this (quotes included): Perl regex "embedded code" ( http://www.google.com/search?q=Perl+regex+%22embedded+code%22 ) It pops up RFC 348, parrot (perl 6-related), and the Owl book on page 1 of the results. -- Jay Gray From MichaelRunningWolf at att.net Sun Jan 19 12:28:37 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex In-Reply-To: References: Message-ID: Jay Gray writes: > I searched Google for this (quotes included): > Perl regex "embedded code" > > ( http://www.google.com/search?q=Perl+regex+%22embedded+code%22 ) > > It pops up RFC 348, parrot (perl 6-related), and the Owl book on page 1 of > the results. Jay, Thanks for the googling. I have a caution regarding the Perl6 RFC's. Read 'em with a grain of salt, or at least recognize what they really are. The _internet_ RFC's, have become de-facto standards. In general, see http://www.ietf.org/rfc, which points at specific RFC standards like the mother of all email standards, RFC822 "STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES", http://www.ietf.org/rfc/rfc0822.txt?number=822 The _Perl6_ RFC's are, quite literally, a _R_equest _F_or _C_omments. The Perl6 RFC's were intended to spark a series of comments (i.e. discussions and design refinements) that would ultimately lead to Perl6. Since this effort is over 2 years old, there could have been a lot of change since the RFC. Many RFC's have died in the service of a better Perl6. The collection captures a slice of history, that may have, or may not have, been built upon, and have relevance today. Happy hunting, Michael Wolf -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From SeattlePerlFJ92 at Langenberg.Com Sun Jan 19 12:45:30 2003 From: SeattlePerlFJ92 at Langenberg.Com (Chuck Langenberg) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex References: Message-ID: <004001c2bfeb$102d01c0$17020202@c172974a> Does anybody know for "sure" if there's a 3rd edition of "Mastering Regular Expressions" by Friedl on the horizon? I've been spoofed before & I'm not interested in cleaning out any more old inventory. I took notes when Damian recommended Jeff Friedl's book, and he specifically mentioned the "Third Edition". OReilly.Com lists the 2nd Edition. And Amazon only lists the 2nd edition when you search for "Regular Expressions". Search Amazon for ISBN# 1565922573 and they return: Mastering Regular Expressions, Friedl, 1st edition (January 15, 1997). Search Amazon for ISBN# 0596002890 and they return: Mastering Regular Expressions, Friedl, 2nd edition (July 15, 2002). But just because Amazon says July-2002, doesn't mean there's not a 3rd edition in the wings. So does anybody know? > On Fri, 17 Jan 2003, Chris Wilkes wrote: > > > Having not looked into embedding code into regex before Damian's talk on > > Thursday I tried poking around and looking for docs on it, mainly > > going off of perlretut's perldoc page. > > If you are very interested, there is an O'Reilly book, "Mastering > Regular Expressions, second edition" by Jeffrey E. F. Friedl the owl > book). "Programming Perl, third edition" devotes a section (5.10) to regex > tricks like m/?{CODE}/. It is important with both books to have the latest > editions, as the Owl book 1st ed and Camel book 2nd ed. are both notably > out of date. From damian at conway.org Sun Jan 19 16:05:16 2003 From: damian at conway.org (Damian Conway) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex In-Reply-To: <004001c2bfeb$102d01c0$17020202@c172974a> References: <004001c2bfeb$102d01c0$17020202@c172974a> Message-ID: <3E2B211C.9040800@conway.org> Chuck Langenberg wrote: > Does anybody know for "sure" if there's a 3rd edition of "Mastering > Regular Expressions" by Friedl on the horizon? I've been spoofed > before & I'm not interested in cleaning out any more old inventory. > > I took notes when Damian recommended Jeff Friedl's book, and he > specifically mentioned the "Third Edition". ($what_damian_meant = $what_damian_said) =~ s/Third/Second/; (Of course, with my accent, I might actually have said "second", and you still heard "third" ;-) Damian From MichaelRunningWolf at att.net Sun Jan 19 23:29:51 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:search performance -- loops vs compound RE Message-ID: In his talk at Geospiza on Thursday, Damian mentioned something that almost had me discard a trick of mine -- I create a RE from a string by joining a list with alternation bars ("|"). Fortunately, I benchmarked it and found that I had misinterpreted him. He *did* say that many alternations, especially early in a pattern can be a problem because of backtracking. What I *missed* was that the problem manifests itself when there are multiple levels, thus requiring expensive (i.e. greater than O(N)) backtracking. It turns out that having multiple branches off the start state is actually pretty fast, since they fail early and therefore don't have to backtrack much. Here's an outline for the remainder of this message. It goes from high level to low level. Read until you've reached your detail saturation, it gets progressively more detailed. - Observations - Outstanding questions - Benchmark summary - Benchmark output - Benchmarking code ================================================================ Observations The basic comparison in the code is encapsulated in two subroutines, loop_search and RE_search. loop_search loops over a list to count up matches in @gene_data for (@search_genes) { $count{$_}++ if ( grep{/$_/g} @gene_data); } RE_search constructs a RE of alternatives, then applies it once to @gene_data my $gene_RE = join "|", @search_genes; $count{$_}++ for grep{/$gene_RE/go} @gene_data; The base data (@gene_data) remained constant. I varied the number of items to match (@search_genes) against the base data. I varied the percentage of matches within the items to match. -- 'RE_search' always outperformed 'for_search' by 1-2 orders of magnitude. -- Both subroutines slowed down with increasing number of patterns to find, though 'for_search' degraded more rapidly (200:1) than 'RE_search' (6:1) over 2+ orders of magnitude on pattern count. -- Both subroutines were independent of the match percentage. ================================================================ Outstanding questions - It seems that the function 'map_search' should be very similar to 'for_search'. It's substantially slower. I can't figure why. Do I have a bad map structure? Have I overlooked something obvious? ================================================================ Benchmark summary Rate Match Type Count 0 50 100 for 1 118 117 120 10 12 11.9 11.9 100 1.54 1.2 1.5 500 0.6 0.29 0.61 RE| 1 919 915 944 10 116 115 117 100 140 141 139 500 151 150 149 ================================================================ Benchmark output Benchmark: running RE|_0001_100%, for_0001_100%, each for at least 3 CPU seconds... RE|_0001_100%: 4 wallclock secs ( 3.07 usr + 0.00 sys = 3.07 CPU) @ 989.59/s (n=3042) for_0001_100%: 4 wallclock secs ( 3.16 usr + 0.00 sys = 3.16 CPU) @ 118.54/s (n=374) Rate for_0001_100% RE|_0001_100% for_0001_100% 119/s -- -88% RE|_0001_100% 990/s 735% -- Benchmark: running RE|_0001_050%, for_0001_050%, each for at least 3 CPU seconds... RE|_0001_050%: 3 wallclock secs ( 3.13 usr + 0.00 sys = 3.13 CPU) @ 970.64/s (n=3042) for_0001_050%: 4 wallclock secs ( 3.15 usr + 0.00 sys = 3.15 CPU) @ 118.92/s (n=374) Rate for_0001_050% RE|_0001_050% for_0001_050% 119/s -- -88% RE|_0001_050% 971/s 716% -- Benchmark: running RE|_0001_000%, for_0001_000%, each for at least 3 CPU seconds... RE|_0001_000%: 3 wallclock secs ( 3.12 usr + 0.01 sys = 3.13 CPU) @ 946.88/s (n=2959) for_0001_000%: 3 wallclock secs ( 3.18 usr + 0.00 sys = 3.18 CPU) @ 117.46/s (n=374) Rate for_0001_000% RE|_0001_000% for_0001_000% 117/s -- -88% RE|_0001_000% 947/s 706% -- Benchmark: running RE|_0010_100%, for_0010_100%, each for at least 3 CPU seconds... RE|_0010_100%: 4 wallclock secs ( 3.06 usr + 0.00 sys = 3.06 CPU) @ 123.69/s (n=379) for_0010_100%: 4 wallclock secs ( 3.03 usr + 0.00 sys = 3.03 CPU) @ 11.90/s (n=36) Rate for_0010_100% RE|_0010_100% for_0010_100% 11.9/s -- -90% RE|_0010_100% 124/s 939% -- Benchmark: running RE|_0010_050%, for_0010_050%, each for at least 3 CPU seconds... RE|_0010_050%: 4 wallclock secs ( 3.14 usr + 0.00 sys = 3.14 CPU) @ 122.14/s (n=384) for_0010_050%: 4 wallclock secs ( 3.10 usr + 0.00 sys = 3.10 CPU) @ 11.95/s (n=37) Rate for_0010_050% RE|_0010_050% for_0010_050% 12.0/s -- -90% RE|_0010_050% 122/s 922% -- Benchmark: running RE|_0010_000%, for_0010_000%, each for at least 3 CPU seconds... RE|_0010_000%: 4 wallclock secs ( 3.41 usr + 0.00 sys = 3.41 CPU) @ 122.17/s (n=416) for_0010_000%: 3 wallclock secs ( 3.09 usr + 0.00 sys = 3.09 CPU) @ 11.95/s (n=37) Rate for_0010_000% RE|_0010_000% for_0010_000% 12.0/s -- -90% RE|_0010_000% 122/s 922% -- Benchmark: running RE|_0100_100%, for_0100_100%, each for at least 3 CPU seconds... RE|_0100_100%: 3 wallclock secs ( 3.02 usr + 0.00 sys = 3.02 CPU) @ 150.79/s (n=456) for_0100_100%: 3 wallclock secs ( 3.29 usr + 0.00 sys = 3.29 CPU) @ 1.52/s (n=5) Rate for_0100_100% RE|_0100_100% for_0100_100% 1.52/s -- -99% RE|_0100_100% 151/s 9807% -- Benchmark: running RE|_0100_050%, for_0100_050%, each for at least 3 CPU seconds... RE|_0100_050%: 4 wallclock secs ( 3.14 usr + 0.00 sys = 3.14 CPU) @ 151.08/s (n=475) for_0100_050%: 4 wallclock secs ( 3.17 usr + 0.00 sys = 3.17 CPU) @ 1.26/s (n=4) Rate for_0100_050% RE|_0100_050% for_0100_050% 1.26/s -- -99% RE|_0100_050% 151/s 11888% -- Benchmark: running RE|_0100_000%, for_0100_000%, each for at least 3 CPU seconds... RE|_0100_000%: 3 wallclock secs ( 3.08 usr + 0.00 sys = 3.08 CPU) @ 152.08/s (n=469) for_0100_000%: 4 wallclock secs ( 3.31 usr + 0.00 sys = 3.31 CPU) @ 1.51/s (n=5) Rate for_0100_000% RE|_0100_000% for_0100_000% 1.51/s -- -99% RE|_0100_000% 152/s 9952% -- Benchmark: running RE|_0500_100%, for_0500_100%, each for at least 3 CPU seconds... RE|_0500_100%: 3 wallclock secs ( 3.23 usr + 0.00 sys = 3.23 CPU) @ 156.46/s (n=506) for_0500_100%: 4 wallclock secs ( 3.29 usr + 0.00 sys = 3.29 CPU) @ 0.61/s (n=2) (warning: too few iterations for a reliable count) s/iter for_0500_100% RE|_0500_100% for_0500_100% 1.65 -- -100% RE|_0500_100% 6.39e-003 25677% -- Benchmark: running RE|_0500_050%, for_0500_050%, each for at least 3 CPU seconds... RE|_0500_050%: 3 wallclock secs ( 3.10 usr + 0.00 sys = 3.10 CPU) @ 162.37/s (n=504) for_0500_050%: 4 wallclock secs ( 3.33 usr + 0.00 sys = 3.33 CPU) @ 0.30/s (n=1) (warning: too few iterations for a reliable count) s/iter for_0500_050% RE|_0500_050% for_0500_050% 3.33 -- -100% RE|_0500_050% 6.16e-003 54051% -- Benchmark: running RE|_0500_000%, for_0500_000%, each for at least 3 CPU seconds... RE|_0500_000%: 3 wallclock secs ( 3.09 usr + 0.00 sys = 3.09 CPU) @ 151.21/s (n=468) for_0500_000%: 4 wallclock secs ( 3.30 usr + 0.00 sys = 3.30 CPU) @ 0.61/s (n=2) (warning: too few iterations for a reliable count) s/iter for_0500_000% RE|_0500_000% for_0500_000% 1.65 -- -100% RE|_0500_000% 6.61e-003 24888% -- Benchmark: running for_0001_000%, for_0001_050%, for_0001_100%, for_0010_000%, for_0010_050%, for_0010_100%, for_0100_000%, for_0100_050%, for_0100_100%, for_0500_000%, for_0500_050%, for_0500_100%, each for at least 3 CPU seconds... for_0001_000%: 3 wallclock secs ( 3.16 usr + 0.00 sys = 3.16 CPU) @ 118.17/s (n=374) for_0001_050%: 3 wallclock secs ( 3.18 usr + 0.00 sys = 3.18 CPU) @ 116.83/s (n=372) for_0001_100%: 4 wallclock secs ( 3.27 usr + 0.00 sys = 3.27 CPU) @ 119.75/s (n=391) for_0010_000%: 4 wallclock secs ( 3.15 usr + 0.00 sys = 3.15 CPU) @ 12.05/s (n=38) for_0010_050%: 3 wallclock secs ( 3.27 usr + 0.00 sys = 3.27 CPU) @ 11.91/s (n=39) for_0010_100%: 4 wallclock secs ( 3.19 usr + 0.00 sys = 3.19 CPU) @ 11.93/s (n=38) for_0100_000%: 2 wallclock secs ( 3.25 usr + 0.00 sys = 3.25 CPU) @ 1.54/s (n=5) for_0100_050%: 4 wallclock secs ( 3.33 usr + 0.00 sys = 3.33 CPU) @ 1.20/s (n=4) for_0100_100%: 3 wallclock secs ( 3.34 usr + 0.00 sys = 3.34 CPU) @ 1.50/s (n=5) for_0500_000%: 3 wallclock secs ( 3.34 usr + 0.00 sys = 3.34 CPU) @ 0.60/s (n=2) (warning: too few iterations for a reliable count) for_0500_050%: 4 wallclock secs ( 3.43 usr + 0.01 sys = 3.44 CPU) @ 0.29/s (n=1) (warning: too few iterations for a reliable count) for_0500_100%: 4 wallclock secs ( 3.28 usr + 0.00 sys = 3.28 CPU) @ 0.61/s (n=2) (warning: too few iterations for a reliable count) Rate for_0500_050% for_0500_000% for_0500_100% for_0100_050% for_0100_100% for_0100_000% for_0010_050% for_0010_100% for_0010_000% for_0001_050% for_0001_000% for_0001_100% for_0500_050% 0.291/s -- -51% -52% -76% -81% -81% -98% -98% -98% -100% -100% -100% for_0500_000% 0.600/s 106% -- -2% -50% -60% -61% -95% -95% -95% -99% -99% -99% for_0500_100% 0.611/s 110% 2% -- -49% -59% -60% -95% -95% -95% -99% -99% -99% for_0100_050% 1.20/s 313% 101% 97% -- -20% -22% -90% -90% -90% -99% -99% -99% for_0100_100% 1.50/s 415% 150% 146% 25% -- -2% -87% -87% -88% -99% -99% -99% for_0100_000% 1.54/s 428% 156% 152% 28% 2% -- -87% -87% -87% -99% -99% -99% for_0010_050% 11.9/s 3991% 1886% 1850% 890% 694% 675% -- -0% -1% -90% -90% -90% for_0010_100% 11.9/s 3998% 1889% 1854% 892% 696% 677% 0% -- -1% -90% -90% -90% for_0010_000% 12.0/s 4039% 1909% 1873% 902% 704% 684% 1% 1% -- -90% -90% -90% for_0001_050% 117/s 40033% 19382% 19032% 9612% 7693% 7506% 881% 879% 870% -- -1% -2% for_0001_000% 118/s 40491% 19604% 19250% 9723% 7782% 7593% 892% 890% 881% 1% -- -1% for_0001_100% 120/s 41036% 19869% 19510% 9855% 7888% 7696% 906% 904% 894% 2% 1% -- Benchmark: running RE|_0001_000%, RE|_0001_050%, RE|_0001_100%, RE|_0010_000%, RE|_0010_050%, RE|_0010_100%, RE|_0100_000%, RE|_0100_050%, RE|_0100_100%, RE|_0500_000%, RE|_0500_050%, RE|_0500_100%, each for at least 3 CPU seconds... RE|_0001_000%: 4 wallclock secs ( 3.40 usr + 0.00 sys = 3.40 CPU) @ 918.70/s (n=3119) RE|_0001_050%: 4 wallclock secs ( 3.06 usr + 0.00 sys = 3.06 CPU) @ 914.52/s (n=2803) RE|_0001_100%: 3 wallclock secs ( 3.12 usr + 0.00 sys = 3.12 CPU) @ 944.30/s (n=2950) RE|_0010_000%: 4 wallclock secs ( 3.00 usr + 0.00 sys = 3.00 CPU) @ 116.18/s (n=349) RE|_0010_050%: 3 wallclock secs ( 3.01 usr + 0.01 sys = 3.02 CPU) @ 115.08/s (n=348) RE|_0010_100%: 3 wallclock secs ( 3.08 usr + 0.00 sys = 3.08 CPU) @ 117.34/s (n=362) RE|_0100_000%: 4 wallclock secs ( 3.07 usr + 0.00 sys = 3.07 CPU) @ 140.49/s (n=432) RE|_0100_050%: 4 wallclock secs ( 3.12 usr + 0.00 sys = 3.12 CPU) @ 141.17/s (n=441) RE|_0100_100%: 4 wallclock secs ( 3.13 usr + 0.00 sys = 3.13 CPU) @ 139.20/s (n=435) RE|_0500_000%: 4 wallclock secs ( 3.14 usr + 0.00 sys = 3.14 CPU) @ 151.08/s (n=475) RE|_0500_050%: 4 wallclock secs ( 3.22 usr + 0.00 sys = 3.22 CPU) @ 150.23/s (n=483) RE|_0500_100%: 3 wallclock secs ( 3.13 usr + 0.00 sys = 3.13 CPU) @ 148.96/s (n=467) Rate RE|_0010_050% RE|_0010_000% RE|_0010_100% RE|_0100_100% RE|_0100_000% RE|_0100_050% RE|_0500_100% RE|_0500_050% RE|_0500_000% RE|_0001_050% RE|_0001_000% RE|_0001_100% RE|_0010_050% 115/s -- -1% -2% -17% -18% -18% -23% -23% -24% -87% -87% -88% RE|_0010_000% 116/s 1% -- -1% -17% -17% -18% -22% -23% -23% -87% -87% -88% RE|_0010_100% 117/s 2% 1% -- -16% -16% -17% -21% -22% -22% -87% -87% -88% RE|_0100_100% 139/s 21% 20% 19% -- -1% -1% -7% -7% -8% -85% -85% -85% RE|_0100_000% 140/s 22% 21% 20% 1% -- -0% -6% -6% -7% -85% -85% -85% RE|_0100_050% 141/s 23% 22% 20% 1% 0% -- -5% -6% -7% -85% -85% -85% RE|_0500_100% 149/s 29% 28% 27% 7% 6% 6% -- -1% -1% -84% -84% -84% RE|_0500_050% 150/s 31% 29% 28% 8% 7% 6% 1% -- -1% -84% -84% -84% RE|_0500_000% 151/s 31% 30% 29% 9% 8% 7% 1% 1% -- -83% -84% -84% RE|_0001_050% 915/s 695% 687% 679% 557% 551% 548% 514% 509% 505% -- -0% -3% RE|_0001_000% 919/s 698% 691% 683% 560% 554% 551% 517% 512% 508% 0% -- -3% RE|_0001_100% 944/s 721% 713% 705% 578% 572% 569% 534% 529% 525% 3% 3% -- ================================================================ Benchmarking code #! /usr/bin/perl -w use Benchmark qw(timethese cmpthese); use Memoize; use List::Util qw/min/; my $debug = 0; # ================================================================ # Get sample gene data. my @gene_data = grep {/\S+/ && /^[^>]/ } ; chomp @gene_data; my $gene_data = join "", @gene_data; print("\@gene_data=>\n", join(",\n\t", @gene_data), "\n") if $debug; # ================================================================ # Get genes to search for. # Usage: search_genes($count, $match_rate) memoize 'search_genes'; sub search_genes { my $count = shift || 10; # Return list length. my $match_rate = shift || 100; # 0-100. my @ret = (); # Return list. my $match_hits = int($count * $match_rate/100); my $miss_hits = $count - $match_hits; # Grab some matches by grabbing 4-tuples from the real data. for (my $match_count = 1; $match_count <= $match_hits; $match_count++) { push @ret, substr($gene_data, rand(length($gene_data) - 4), 4); } # Add some misses, contrived from a 4 character string. # Starting from "uuuu" guarantees that it won't match /[ACGT]{4}/. for (my ($miss_count, $miss_value) = (1, "uuuu"); $miss_count <= $miss_hits; $miss_count++, $miss_value++) { push @ret, $miss_value; } # Assert a correct return count. die "bad return list size" unless @ret == $count; # Use the hash's randomized key values to randomize the return order. my %randomizer; @randomizer{@ret} = @ret; return keys %randomizer; } # Find it by looping over the search_genes. sub loop_search { my %count; my @search_genes = search_genes(@_); for (@search_genes) { $count{$_}++ if ( grep{/$_/g} @gene_data); } return %count; } # Find it by constructing a RE with lots of |'s between the search_genes. sub RE_search { my %count; my @search_genes = search_genes(@_); my $gene_RE = join "|", @search_genes; $count{$_}++ for grep{/$gene_RE/go} @gene_data; return %count; } # Find it by map'ing a grep over the search_genes. sub map_search { my %count; my @search_genes = search_genes(@_); %count = map { $_ => scalar grep{/$_/g} @gene_data } @search_genes; return %count; } # ================================================================ # Set up benchmarking. my @search_gene_count = (1, 10, 100, 500); my @match_rate = (100, 50, 0); for my $count (@search_gene_count) { for my $match_rate (@match_rate) { # Seed the memoized cache so that the functions don't incur the # cost in their benchmark. my @throw_away = search_genes($count, $match_rate); my $loop_subref = sub {loop_search($count, $match_rate)}; my $loop_name = sprintf "for_%04d_%03d%%", $count, $match_rate; my $RE_subref = sub {RE_search($count)}; my $RE_name = sprintf "RE|_%04d_%03d%%", $count, $match_rate; # my $map_subref = sub {map_search($count)}; # my $map_name = sprintf "map_%04d_%03d%%", $count, $match_rate; # How do they compare for a $count-sized set? cmpthese(0, { $loop_name => $loop_subref, $RE_name => $RE_subref, # $map_name => $map_subref, } ); # Save 'em for a different comparison later. $loop{$loop_name} = $loop_subref; $RE{$RE_name} = $RE_subref; # $map{$map_name} = $map_subref; } } # How do they compare across a range of set sizes? cmpthese(0, \%loop); cmpthese(0, \%RE); # cmpthese(0, \%map); __DATA__ >gi|20864310:11744956-11765571 Mus musculus WGS supercontig Mm3_WIFeb01_32 GTGTCCCTGCCACAGGCTCTCCATCGAGGACCATGGCGAGGCTGAGCTGGGGGTACGGCGAGCACAACGG TGAGCGCGGGCTTCCAGAGGGGGCTGATGGGGGCTTGAGGGAGCTCTGAGCCCCGTGGGGGGGTTGGGGG TCAGGGCCTGGTCCCCGCCGGCTCTCTCCAGAGTGGACGGCGGCATTCATTCAACTTCACTGGAAAAGCT CACTGCTGTCCCGAGAAAGCTTAAGAGGTCAGAAGTCAGATGACACATTTGTAAGGAAACAAGGACAACT GAGCCGCGAGAGCTCCCAGATCACTAAGTCACGGGACGCCTTCCAGGCGCTGTTGAAGCAATCTTGGTAA CTTGTAATTTGCATACTGACTTGAAGTTAACTTGGGGCTTGTTCTTCAGTCTTACTTTCCTACCGTACCC ATCCTTTCAGAGACCAAGGTTTAGCAAACGATTATAGAAATTATAATATGGTGTTAAATATATTTATTGA TAAGCATGGCAACTTTTCTTCATCGCCTAAGTGTATTAGGGATAAGACATTCTTCTTGTTCATCGTTTGA ACTGATTGCTTCAATTAATTACTCAAAAGAATTGCAAAGAAAAACTGGGAAAGCACTGATAGTCTTCAAA ATGGAGTTTGTGGATAATAATATCAAAAACTTAAATTAGCATATACGTTATTGGATAATATTCTATAGTA CATTTAATGAAAGTTTACGGAAAGTTTTCCCTTCTTTTATTTTATTTTCCCCCTTTTTGTGTTTTGAGAC GAATCTTACTCTGTAGCTTAGTCTGGGCAGAACTTGTGGTCATCCTCTTTTCTTGGATGGAAAAAAAAAA CTCGTTTCTTATTGCAGCTTATTTGAGGTCGTGATGACATTAATGTTATTTTTAAAATGACATCAGATGA AGTTTAGATTTTTATGAATGACATTTATAATTTAGATGAATTTCTTAAGCCAAAATAGCAATCTTATGTT TCATTACCTTCTAATTTGTGTGTTTGAAAGACAATCTTTACACATTTCAGTTTTGTCTCTGAAATCATTT TGTTTGTTGTTATTTGGCAGTTATTAGGTGCCAGTAGTGGTACCCTCTCTGTGGTTAGGGAGAAGGTTGT GTTAGCCAGTAGGTACTGATTGTACCCGAATAGGTACCCGAATAAGTATTGGTTTCAATAAAATTCTCCA GAAAATTTAAAATTTCAACTTAGAAAGGGCATTATAATGAGGAGTTGTTTTACATCTTGTTCATTTTTTA AATCTTAAAAAAGATTTATTCTTTTTTTAAAAAAATATGTTTATGAATTTTTGACTTGTATGTTGTGGAA GTTAGAAGAGGGCATTAGATCAACAAGGACTGCTGCTGGTTTTAGCCTCCATGTGGGCCGGGAAATCGAA CCCAGGTGCTCGGCAAGAGTATCAAGTGTTCTAACTGCTGGACCTTCTCCCCAGTCCCCAGTTTACATTC TAGCTAGGAGTTGCAGAACCATTCTTCTCGCAGAAACAGTGGTTTTCAGAGGACCACACCTTGAAGTTAG ATTATGAGATTATGTTGGAAGAATTCGGTTGGGATGTACTGGGAACTGACCAAGCATTTTTTTCTTTTTC TTTTTCTTGTTCAGTCATTGAAAATACAGTGACTGAACAGCTGGAAAGAACTTAAGCTGAGCCTGGCAGT GATAAAATGGAATGGGAATTGGAGCTCTGGACAGGACAGGGTGCCTGTTCCTAAGCAGTTTGTTTCTTCT TCCGCTAACCTCTGATCATTTTATAGGTTTAGGCCGTGTGACATCACCAAACATCATATAACACTATGGA TATTCAAAAATTCCTCAAGCCACTGAGGCATGTACCTTTCACTTAAGAACCATGGTTAAGTGAATTTAAA GTCCAGTGTGGTAGGAAACATACAAAGGTGGGTCTATTTAAGAGGCCCGATATTGCAAGTGAATAGATAA AACTGGCTATCCATCCCAGTGGCTTTATTTTGGGTAGATTTGACTTCTCTAAGAACAGGCCTGGTTGAGA AGGGTTAGGGATTGATGACGGAAGGGCTTAGGAAGAGAAAGCAGCCCCTTATCTGTTGCAAAAATGTTTG CATGTTGTGACTCCTGCATTGCATGTTTGAAATCTGGTGCTCATTACGTAGAATAACTCGTATGTGGTGG TCATGACAGAAAGATTTTCTATATTAAATAAGAAGACAAAATTGTAAGCAGAAAGATACACACAGCAAGA CGAGAAATAATCTCATAATCCTACAGTGTCTTCTGAGGATTTTAAATGCAAAATCGCCATGACCCATAGT ATCTGATTCACAGGATACCTTTGAAGCAGGGTATATTGTCATTTGTTCATGGTGTGGCTTTTTTCCAGAA ACCAATGTGAGCAACAATGTTATATTTTTTGACAGGGCATAGCCATTTTGTTTGAATTATTCTCTGTGTA AGATTTGTGTGTGTGTGTGTGTTGGGTAGATGAGTTGCATATAACAGGTACCTCAGGTTAGCTGAGCTGA GCAGAGGGGCATTAGAGGCTATCCGTCAGTGCTATAACTACTAGCAGAAATAGCAGGCAGTGTCTGCTCT TCCTCTGCTTAAACTTCTTGGCCTCTGGAGCAGCCAAGGAACATTCTTGGTTTTGAGATGGAATTTCTTT GTTTGCAACAATGAATTGTACTTCTGTTCTTGTTTGGTAGGTAGGTAACTTTGAGAAGCACTGTATGAAA TGTAATTATTCTTTCACCTATAATGTACATCTTTAATTCTGATAACAATTTAAAGCAAACACAGTGCTTT CCATAACCACAAAACACTAGTCATGGTTAAAATAGGAGCAGAGTCCTGAGGATCATACTTTTACTAATTT TTAATTTTTCCCCATGATGTGGATGATGTGGCTGTGGGTATGGATGTTTTATTGTGTGCAGAAGCCAGAT GGACCTTGGTTGTCTTCCCCTCTGTTCTCTATCACCTTCTTAATTGTTTCTCTCTGAGCCTGGAGTTCAG AGAGTCAGACTTAGTGTAACTAGCCAGCTAATGTGGAACTCCTTAAGTCTCCTCCTAAATGCTGGACTTC AAGTGAGCTGCCACACCCACCTGGCATTCCTATGGATAATGAGGATCCAAACTCTCACCTTCACATTTGT GCTGCACTTCCTTTATCCATGAAGTGGAGTCCCCAGCCTGCTGCTACCAGTTTTAATTTGCTGAATGAAG AACTTACTTAGTCCTCTCCTTTTGGTCTTCTCAATTTCAGGTCCCATTCACTGGAATGAATTGTTCCCTA TTGCTGATGGTGATCAGCAGTCTCCAATTGAGATTAAAACCAAAGAAGTGAAATACGACTCCTCACTCCG ACCTCTCAGTATCAAGTATGATCCTGCCTCAGCTAAAATCATCAGCAATAGTGGCCATTCCTTCAACGTT GACTTTGACGACACGGAGGACAAATCAGGTTGGCTCTGTTTGTTTATTAGTTGTTGTAAGACGTTGGATG GTTAGATTTACTCTCCTGTTTTTCACTCTGTAAATTTCAAAATTGAAGCATATTTATCATGTGAATTCAA GTGTTATATATTTGAAACTTAAGATAATATTACCATGAAATAATAGAGAAAATTTGTAGAAAAAAGTATG CTGGGTGATATTTTAAAATTGGTTTTAGGTTATTATTACTTAATGATGTAAATATTGAAGTTTAATAGTT TTTTATAAATAATTTTAGTCTTTTCATGAAAACTTTAAAATTTCTTTAGATTTGTTTATTTTTATCTGTA TGAATGTGTACTGTGTGGCTGTCTAAGGTTATGGTGGCTGTAAGCCCAGTGTGGGTACTGGGAATCAAAC CTAGGTCCTCTGTACAAAAACACAAAATACTCTTAATATTAACTGCTAAGCCATTTCTCTAGTCCTGTTT TTGGAAATTGTTTAGTTATAACTAAATTGCTAATTATTGTAAATGTAAAGTTGATGAGATATTTGCTTTC TAAATCTTTTTTGTGCTTGCAGTCATAATATGTATGTGTAGAAAACAAGACACACAGAAATGTAGGATAA AAATTAAGGCTGTCCCTACAGATTATAATTATGTTAGCAGCAATACATTGTTTTTCAGGATTTAAATTTG ATGCCACACGTGTATACACATGCACACCATATTATTTTACATTTTTCTCTTATGTTGTATTTAGGCTGGT ACTATATTACTCTAAAAATGTTTCCTATGCAAAATATTTCATGCATAGTTTTCATTAAAATGCATACCTC TTGTTAATAAATGAAATATATCAGCCACTCTTTTATCATAATGTATATATTATCATCATAATAATGGACA TTTAAGAAGGAAGAAAAGTAGATATTTAATTGAAAAAAGAAGTATTTAAAACATCTATCCTTATTTATAT TTTTCATTAGTTGTAATAAAAAATAAATTTCACTTGTTCATGGGTCATGTCTTTCACAATGGAAAGGTGG ACTCACAAATTAAAATGTTAATTCACTTTCTCAGTCTATTACCTAAAGGGAAAATAAAATACCATTTACT TAAAATGAATATTTGAATACTGGAATACTCTTTGAGCCTATCTGCTGCCAATTTTAAAAATGTAGCTGAA TGAAATTATGTGCAAACTTTTCTTGTCCATTGTGTGTTTGCAAGCATCTAGCCAGTGAATTTATGGGGCC TAGTGTAGGTTCTAGGGGTTGGACTCAGGTTATTAGGGCTGCCTGGCAATACTCTCCCCCCCGCCCCCAG TCATGCCATTGGCTCCCCATTAAGAATTTATATGATTTAATCATTTTCTTCATGAACTTATACTTGATGT CATAAGATCCTGCTTTTATAAAAGCATTGTTGTTAGTAAAAATTGTAAGTGTATACAGATCTCTTCTTCA CATTTGTTAGATAACCACACTGAAATATTTCTCTAGGCCTGTGCAAAATAAATAAAGAAAAATCAATGAC GTTTCTTTTTCTGTGAAGCAGAGAGAAAACCTGCCTTATTAGATGTATTTAACTTAATTTCCTTCAGGCT TTCAAATTTGTGAGTCTGTTAGTAGATGTATATGTAGTGTACAAAAGAGTTTGGAAAAGTAGCCCAAAGC TTCTAAATATTAAGTTGCTACCACCCACATTTGTTACAGGATACTTTTATAATATTTAAACATAAAAGGT CTAATGCTACTCACATCAAATATTAAAGTGTTGACATTATTCTTCAAAACCATTTTCTTTATGAATGTTA GTATTTTTATTGGGGGAAAAATTCTAATTTAATTTGTTCTGTAGTAATCTCTCATTCTTTTCCTCCCTCC TTCCCTATGCCCTCATTTCCCTGTATCTCCTGCCCCTTCCCCTCCCTCCCTTTCTCTCTCCTCCACTCTT TAACTCCTTTGAGACAGGGTTCCTCACTGAACCTGGATCCAGGCCGGTAGCCTGGAAGCCCTTGAAATTC TCCTGTTCTCACCCTGCCCACAGCACTGGGGCTACTGGCCTCGTGGCCACATCTAGATGATTTTTATTTT TGTTGCTTGTTTGTTCTGAGTCAGAGTTACCCTGTGAAGTCCAGGCTGGCTGCATTAAAGGTGGGAGCCA CCACTCCCAGCCCTGGTTTTTGTTTTAACTGGCCCACATGCTTTAACAGCACTGCTCGTACTCACTGAGC CACCTCCCCAGCTCCAAGAAGCCATTCCTGACCAAAAATTAACTGTGAATTTTATCAGTGAACACACCAC AAAATTGCCACCATGGTACTTGAGGGTTTTGCTTGGCTGGGCCAATGCACACCTGCACCTTGGCTAACAT GGAGGCATCCACTCTTCAGAACATTAATAGTTCATTGAAAGGTGACATCTAGGCACAAAATCCTTTAGGA AGACTATTCACTAAATATAGAAGGGGCTCTTGAGGGGAGACAAGATAGGGATGCTCTAGACTCATCTCAG GGAATTTCACCTGACCCTGGTTCCTGGTGGTCTGGGATGACTCCACCCAGAACTTCCACCACTGCAGTTT AACTGCCAGGTGGCATTTCTTGACCTGTTACTTTAGTGATTTATTTGAAAGAGTTTACTTTTTTGGAAAT TCTAAGTGAAAGGAAATAAAAGTAGGTATGAGTTTGGAGAGATCATTACTTGTTTTGAAGAATAAAATGG AGACAATGATTAATTATTCACTGATCTGTGATGGAAAGTAAAATAAAAATTGGTCATGTGAAAACACAAA ATCACTTTCATTAAAATTAAGGATTGTTGCCTACTACTGTGGAGCACATCTGCAGTCCCTTCCCTTGTGA GGTACTTATCTCTCTAGAGGCACTAGGACCTGGGAGAATGGAGTGGACAAATGAGGCAGACTAAAGTCTC ATGGAATAGCTGAGGGGAGTCACGTGAGTAAAGCACGTGATTACAAGCACAAGCCACACGACATGTGGGG TGCAAGCCCCCCTTGGAAAAGCGAGTTTTTCCATACAGGCACAGAGAGGATGACAGCAGCAGGCAATAAC GAGTAAGCTAAAGTAAACTCGCTCCTATTCACTACATCTGCAAGAAGCACAAAAACAAATTTCAAGAACA ATTTTGTGCTTTTGAGGAAACTGAGGGCACCAGTCTCTTGTCTTGTTTTCTTGGAGTTTTCTCACAAGTG CTCAGACTTCTCACATGACTCCATTGATGGGCAAGTCCTGACAATGAGGCTGAAGAGGAAGAGTCACAAG CCAGTCCGTCTAACCAAAAAGAAACCCACAGATTGGCTGTTTATTGCAGATCCTTAGAAACCTACATGTT TTTAAGCTCACTTTTTCCTGACCTGATTTTTCGAGAGGATCCTTCAACAGTCTTTTTCAAAATTAGGCAT TTGCTTATTCTAAACTCACTGAAATACTGACCTGTGCAGACTGAATATGTAACCTGTAAAATAATCCATG CTGCTTAGCCAGACAAAGCCTGCTAACCTAACTTTAAGAGTGACCTCTACTGCCATTATTCTTGGATGCC TCCCTAACAATGTGTGGTTTTTGTATCACTTTCTTTCTCCGGAGCCAACAAGCCTGAGTCTCCTCCCAAA GTCAATTCCACATTGATTACTCAAGCTCTCTAATCTCCTTTCTATCTGCAAGGGAATGACTTTTAGCCCA GCTCAGATTTTGTTATGCAACAGCAAGAAGAAAAGCACAATAGAGCCCTTGACTACTTTCCTTTAGCTGC CATTCCATCCTGGGTCAATGCCAGCTGTGTAATGAACACATTGCTGGCGTCATTCAGGGGAATCGTGCTG AAACTGTTTAAAGACAAATCAAATATCTTATCCATTTATTCATCAGGTATTTGTGCATCTCCTCTGACAG TTACTACGCTAGGAGGTGGTGATAGCAGGATTGCAGTCTCTGTTTTCATACTTGCATCCTAGTACCAGGA GAAGCAGTAACAGAACCCTGTCTGTTTCACACAGTAATACAAGAGGAGGCCCGCAGACTGACCTCAATGG TGGTCTCCTCTTTTTCACTGTTCACAGAGCTTTGAAAATAGCCATATTTTGCTATCATGATTTTGAAAAT ATTTGTGTGTACGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTACGTGTATGTACCATCTG ATATGGGTGCTGAGAACTGAACTTGGTCCTCTGGAAGAGCTGCAAGTATGCTTAACTGCTGAGTCATCTC TCCTACCCCACCTTTATGTATTATAAAGAAATCTTTCTTATATAAGGTGGATAGGTCTTGAAATTTAAGA CTCTGAAGAGTAATTTAAATATCTGTTACTAAGTCTGTATCTCCCTTTTCTTGCACAATTCTGTGGTATG CTGGAGTTTAGTTACTATTACGCATATTCAGCCAGCATACAATGTTTCCTTTCCATTCCTGCCTCTTCAG CAGACAAGGGAACTAGGCAGAAATCGTTTAGGGCTCTCCTTCCTTCGCCTCCTTCCCCCTCCCTTCCTCT TCATTCTTTCCCCTTTCTTTCCTCCCTCATTCCCTTCCTTCCTTCCTTTCTTTTTCTTATTTTTTTTTTT TTTTTTTTTGCACAGGATAGCCCAAAGTCACTGGCCAGGGTGCCAAGATTATAGGTGTGTGCTACCATGC GTAGTTTAGGACCATTTTATATTAAAGTGTTTTTATGTACTTATGACATAATTTTATTACCATAAACTTA GACATAATATTTGCTGAGGGAAAACACTAAAATATACTTCACCAAAGTAAAAAAGACATCTTGGAGTTTA AAAAAATACTTTAATTTCTTCACAAATATAGAGTCTAAGGACTGAAGTCGTGCCAGTTTTTATGGTTATA GCAACAATCATGCCATGGTAGGAATGGGTAGCACATGCCCAGTGCTGTTGTTTCTTCTATTTTCACAGCA GTCTGGGGGCGGGGGGGGGGCTACATCCCTCGCTCCTGTGGTTAAATGTCCAAGTGGCAGCTTAGAAGGT AGAGTTTGTCTAAGACCACCCTGCAGTGCCTGTTTCTGATCATCCAATCTCTTTGGCTCTCCCATGCTAA CACTGAACTGTTTTTGTTTTTGTTTTTTTAAATTTCAATTTCTTACTCAGAAACTCTGGCTTGCCCCCAG TTAAACAGGGTGGATTTTCAGTTTGTAGAATTCGAATCTTTTCTCTTTGCCATCTGAGGGTGCGTTGTGA TTTTCCAAGTATTTAATGGTGGTCTCTAGTTCCTTTTTACTCTTTGTATATATGAAGTTGTATCCCTGTT GGCAAAGTGAATGGCATATCTGTAAGGACAGGAATGTCCTGAGTGGTTCAGGGAGAAGTTCTGGGTTTTG ATGGGATGTATAATGTGATTTATTTATTCATTTCATAACTCTTTAAAATGTGTTGGATTTAGTTCTGCGT GGAGGTCCTCTCACTGGGAACTACAGGTTGCGGCAGTTCCATTTGCACTGGGGGTCAGCAGATGATCATG GCTCAGAGCATGTGGTAGACGGAGTGAGGTATGCTGCAGAGGTAAGCCACGCACACACTGCCTAATCAAT ACGGGATGCCTTCCATAGCCCCAGCAGAGCCTCAGCTACTCAGGCATCCCACTGTAGGGGACAGCTTCAT TAACTCAGCAGGAAAGCTTCAAACAGGGTCTTTCATAGCCTTAAACCAAACCTGAAACCTTACTATTTAT TATACATTTAAGATGAGTAGACTGAGCTTAACATGCTGTAACATGCCTGTGATCCCAGCATTTGGGAGGC AGAGACAGGAGGATCAGGACTCCCAGGCCAGCAGCCTAGGATATATGACAAGATGCTATCTGACCAAACA AAGTCAAATGACACTAACACCAAAAAATAACAAGAAGTACTTGCTGGAGGGCGTGGGATGGAAATCAGAG ACTGGAAACCATTAAGTTATTTATCCAGCTATGAAACATTATGATGAGTTTATACAACCCCTATTTTGTT ACGTGAAACTTAATCTGTTGGATTTTCTGAAAGGTCAGAGAGAAGAGAAACATTTGCGTTATGTTAGCTT TGTGTGTATTTGATCCAGACAAATAATCAGAAATAAATAAAGCTCACATTCTATACATGACAGCAGTGGC ACTTGGATAAACTGTAAGGGTACAAACTCCAGATTGCATTTGCAGGTTTCTAATGCAACTCTGTGCAGTA TTCACAACACTGATAAACAGCACAAACAATGATCATTGTCATGCTTACTTTTTGCTGACAAGGTACTCCT TTTTGATATAACAACATTCATTAGGAGTCCTCGGCTTAGTCTAATCCTCTGTGTGAAAGACAGAGTGTGA TATACCTCATTTTAATACCATTAAGTAGCGCTGAGCTGAACTTTACCCCAAAATGAAAGTCACATCTCAG TGAAAACTCTTGGAGTGAAACACTCCTGGCATGTGATTTCTTTCTACAAGACCGAGCGTTACCACGACTT ACATACTGTCTTCATCTTCTCACAGTTTTGAGATGAGGTTTGATACACAGAATAGTTCTGTTGTTCAGAA AATCCAGCAAATGGAACTTCTTTTCTACTCTGATATGTAGCTGACCTTTGAGGTTGCCATCCAACATGTT TTTTTGGCTAGTTATTTCAGTTTTATCTAAGTGTTTTTATTGCAGTACCTGCTCTGTTCTCAGGAGAGAG AGGGGAAAGTGATAGGCAGTCTACTCTCTGGCAGCAGCGGTAGTGGTGGATCTGTGAGAAAAATCTAGAC TCAGAGTGCCCTTCCAGGGAAAGGGACTAGTAAGGGGAAGTGCTATGCAGTAGGAATGAGTTCAGCTTGC TCACAGAGAGAAAAGCTTTTCTGTATAGGAATGGTACTGGTAAGAGAGAAAGAGGCGTGGACCCTGTCCT GCAGAGCAAAGCCCTGCTCTGCTTTCTGTTATCTAAAACATATCTGACTGCCAAGTGGAGAACACAGGCC ACTGTGGGGCAGATGTTAAAGGAGGGAGACAAAGTAGATGACTATGGAAGACTTGAGGTGAGCAGTGATG GTGATTTGGGCAGGAATGTGAAGGCACTGGAGAGGGCCAATACATACTTGGCAGGCCATATCAACAGGAC TTGCCTATACCAAGGATGCCGAGCTCCAGCAAGCTGTGTATACAAACCAGGATTTTAAAGAGGAAGTCAT GGTGCTTTATCATAGCAACAGAAAGTAACCAGTACAAATATATGTATGCAAATATAAAGACTAGGCTAGT AGTCCATATTGAAAACTGTATTTCTTATGGTTTGTCTATCATTGCTGTATGTTAGGTCTGAACTATAATC CACAAGCCCATGTATCAAAGGCTTCTCCAGGGCAGTATTACTGGGAGGCTGATGAACTTTGAGAGGAGTG GCCTCAAAGGAAGTCCTTAGGTCATTCCCATGTGCTTTTGATGGGATGGTAGGATCTTGCCCCATCATGG GACCTTTTTACTTCCTGGTGATGAGGTATTCAGTCTCCCAGGCACTGCACCTGTGATATGCTACTTTGCC ATTGACCAAAAAGTCAGAGGCATATACTGAGAACTTTCAAACTCAGAGCCATTTCTCTTTGTAAGTTAAT TATCTCAGAACAGATGAAAAGCTAATATATAAATATAGGAGACGCATAAATCAGATATCCACACTCGTGA TAGATTTTTGTCATAGTAATTGGCAGCATGTTTTGAATATCACAAGCATTCAGCTTAAAAATGCTTAGGT GAAATAGTACTATTATTTATAAAGAACTTTACCAAAAAGGAAAAAAAAAATTCTGTTTTGTTCTTAAACA GAGTCTCACAATGTTGCTCTGGATGGTCTGAGACTCATTGTATAGATAAGGGTGACCTAAATTTTGTAAC AATCTACCTGGATCTGCTGATGCTCAAGTGTTGAAATTACAGATGTGTGCTACTACTCCGGGAGGGAAGA ATCTTCCTCTGATAATTGTGAGGGCTAGTTTCCAGTCATCCATCTGACTCGATGTTCCTGTTAGTCAGGA AGTATGCAGTTGTTAATTTGTTTACTTTTAACGCAAAAAACACCAATATAGAAAAGTGATACCAATTTCT CCTAAGGCTATGTGAGAGAGAAGAGGGATTTACTAAAAACAGATTTTCTTGTTCTGGTTTCTCGTCATAT TTCAAACAGTTATTATTTAGCCAGTAGAAGGATGTCTACACAGGAGACTTCCTTCTCTGTATTTATATAC TCATTTCATAGCCAGTTGTGTTCCTGACCCATTGATGCCATTTCTCACTAAGAAAGCTATTTAAGGAGTT GTTGTAACTGGCACAGAGCCATTTGGAATAACTTGAGCGCTCTCCCTGGCCCATCCCCACAGTGGAACGT TCTTTATCTCTCCTGAGCCATGGGAGACTTGTTTTGTCATCATGTTTTCAGGGTTCTTTCCTCCCCCAAC TATCTCACACCAACATAATACAGAACCCACCTTTGTATGTTTCTGTCTGGATATCACTTCGTATCCCTTG ATTATACATGGTTGTTGGACTGTTTTATAGTTTTATAGTTGACTATCTGTGATAATTCTTATCTAACCAG AAACTCTTCATATTCGTTATGTGGAGTAAGATTTTGAAGGATAGAGATAAAAGTATTTATTTGTATATAC TAGATCATCTCTGTGACTGAGGGGAAATAGAGCATGAAAACTGAGTGAGTGCCCCTTTTTCAATTGCCAA ACAGATACATAAGGATTCTTATCTGAGGTGGTCCCTGGTATCTTTGCTTGTTACAACATGGCCCAGCCTG CAACATTTACTATAGGAACTAAATCCTCTAGGCCTGGCATATTGCCCTTTGGCTTCTCTGTCCTTCTTTC AAGCGGAACTGAACTGGTAGTCAGTGTGCTTACTCAGCCTTCTCTCGTATTCCTCTGTGTTTGGGATACT CTAGTGTTCATGGGGTCTAACAAGAAGGCTTTCTTTGGGTTTTGCAAATTTCTGCTTGTGTGAGCACCAG CTGCTTCTTTTCTTGCTTGGACACCTTTGCCTTTTTGACCCACAGCAATCATATTTGTTCTTGGCAAAAG ATCTGAGTCTATTCATATAAGGTAGAAAATGTAAACTGCCTATGCGAGTCAGCTCAGTATGACCATGGGA ATGATGTACCCCTACATTAGAACATTGCACATAAAAACAAACTAATGCACATTTACCGTATGCAATTATC ATTCAATAGTACAAATGATCTAATAATAAAAGCATATGACTAGATCTAAAATAGTTTATCATAAGGGGAT GCAAATTCCCCAGCCACAAAAGTGAGAGACTGCAATGAGGAACATCTAGCAGGACAGTTTCAAGTGAAAC CCTGTTACCCTCCTCTGCTACTTTACGAGGAAGTTGACTTTCTGTAGAGCCCAAGCACCTAGGTGGGTTC TATGGGTAACTGGTATCTGAGTCACAGCGACTAGTAGCCCATAACCCTTCTGGTCTCATTTCATATAAGA GTAGATTAGGGGGAATAAAGTCAGTGTCTGGATGAAGGAGTCCCTAGGCACTTTATCATTCAGCATCACA TCAGACAGTTACAGCAATATTAGTAGCATTTCTATTTTTTGTCATGCTTATACAGATGTTTGAATTATGT TATGTGTTTTCTTTTCAGCTGCATGTTGTCCACTGGAATTCAGACAAATACCCGAGCTTTGTAGAGGCAG CTCATGAGTCCGATGGGCTGGCTGTCCTGGGAGTATTTCTACAGGTGAGAACCCACTGTTTGATTTTAAA TAGCCATTTAACTAGTTTTAAATAGCAAACTAGATCTGAATATAGTACTTTCCCCTTGAAGTGAACACTA TAAAGTTCCATACTAGTTTAGGGAAAGGGTCACTTTTTTCTGAATTTCCAGTTGACTATGTGAGTAGCAA CTGCCACGCCAGCAAGAAAGCAGCAGAAGGAACAGCTGAAATCCCAAGAAGAAACCTAGGGGCTTCTGGT TCCTGACTTCCACATGGAGAGCTAGAACAACAGAGCATTCAGTTTCATGGTTCTTGTGGCACTTGTTTGC CCCTGTTGGCAAATCATCTCAGAAATCGTGGTCACTTGTGCGATCAGCAAGTTCTGTCAGCATGCTTGGG AACAGTTCCATACAGGGCGTGCACTGTTTCCATGCCTCATAATCTGTGTGATGTTGTAACTTGTGGAACA GGAGTGGCGCTGAGAGGCAAAGACTGGGAACGATGTGCCAAGCAGAGGCAGCCAGGATTTTACCCTTGAA ATCTGGGTGCTAGCAACAGGATCCAGGAATGGTGGGAGAAAATGCTTGACTTTTATGGGGTTTTATACCT TTTGGGGGGGGGGGTTGAAAATGTTCCTATTAATGAAAGGTGTAAATTTTATGTATTTGTGTATTTACAA TGCGTATGCTTTTCAGGGTGGAATGCCTTGATTTGGAACTTTAAGAAACTTGGGGCTGCAAGTAGGAGAT CTAAAATTTCATGGAAGAGTTGAGGGCAGCTCAGCCAGTCTGGTTCTATATGCCACAGCTGGTTTAATAG TCACTTCCCTAAGCAGGGTTTCTTTCAGTTAACCTGAGTCTTAAACATGGCTCAGCAGTTAAGAGTGCTT GCTGCTTTTCCGGGATACCAGAGTTCAGACCCTAGCCAGATTGCTTACCAGTGTTTGTAACTCCAGCTCC AGAGAATCTGACACCCTCTTATGTTCTCCTTGAGCTTCCACATAAGCTCATACACATGCATGTCTGAAAC ACGTGAAGCTATTACTATCAGCGTTGGAACTAACCTACAGTGCTATTCCCATAATGCTATCTTGTTCAGA CTCTTCTGGCACAATCAATCTGTCAGGTAGAGGAGAACCTTGTTCTACATTCACTGTAGGCTTTGAGCTG ACTCTGGCTTTTAGAAAATAATGAAAATGTAAGGATTGAAATGAAATGCTTGTTGCTTGTTTACTCCTGT AATTATGTCTGTTTTGAAACTTTACACTTTTAGATTGGGGAACACAATCCTCAACTGCAAAAGATCACTG ATATTTTGGATTCCATAAAGGAAAAGGTAAAATTAACTACTGTTTGTTAATGACCAATATTTTTCTACTT TCCTGAATTTTGAGCACTTACACAGTAGACATATCATATCATGCATTATTTGAAGCAAGTTTCAACTTAA CAGACCCAGACTGCAGAAATAATTTATTGCCACATACCTTTTCAGAGTTGTGAAGAGCCTGATATTATCT ATAGTAATCACTAATAAGTCTATGCAGATTTAAGTACCAACATAATAATTTTATAAAAAAAAGAAGTAAA TTATAACTTACTTAAAAGACTACTTATATAAAATAAGATTCTGTTTTTTTCCTTGACCTGGGATCTCTCT CCATATTTCACACTAGCCTGTTACTCCTTCTGGAGCCCAGGCTGAGCCTTGAACTCATGACCCCCTGCCT CTGCCTGTTGACTTCTGGGATTATAGGTATATGCCATCATATCTCACTCTATTGTCCTTCTATAAATCTA TAGAATTTACAACTTTATCTGTTCTTTTTTGAGTTAAAACAGAAATTTGTTTTACTAAAATATTGATGGA TGATAGTAATTATACAGTGAATGTGTGTGTGTCCGTCTGTCTATCTTATTTGTAATCTGTAGCAATTCTC TTTGTTTTTCCAGGGTAAACAAACACGGTTCACAAATTTTGACCCGTTATGCTTGCTTCCATCATCTTGG GACTACTGGACATACCCTGGCTCTCTGACAGTTCCACCTCTTCTTGAGAGTGTCACGTGGATTGTTTTAA AACAACCTATAAGTATCAGCTCTCAACAGGTATGTTCATTCTTCCAAGTTAATTGTGCTGCTATCAGAGG AAACTTCTATGTCATTTTTAAAACACTGTTTATATTTCTGCCATATTTTGGAGTCTGACATTTTCTTTCA TTAATTAGGTGAATGGTTAGACTAGATAAGGTTCATGTCCTCTCCCTCCTTTTGGACTTTCCCTCCTTCC TTTGTTTTTTTTCTTTCTTTCTATCAGGTCTTTCTATGTAGCCTAGGTTAGCCTTGAAATTGGGATCTTT CTGCTGTAGACCCCCAGGCACTGGGACGACAGGTCTGCCACCATCGAAGGCACATGGATTTGATCCCTTT TTAAATTGCTCTTACTGAATCACTGCTCAGAAATGTTAGATGCTTAAACTTTAAGTGGTTTACAACCCCA GAGGGGAGTTTGAGTGTGGGATGGCAACCTCATCCCTCACTTGGTGCTGTGTGTCTTTCTGCTGGAGGTG GGCTCTATAAGTTTCCTCTCCCCATTGTCAGGCATTTCATCTAAGGTACCCAACTTTGAGTCCTGAGAGT TTCTCACCTCATCAGTTTCTCATCAAGTAAATCAGGTCTCTGGTACTTTTTGGGGGGGTCCCCCCCAACA TCCTATTTCCTGAGGTTGCCTGTTTCCATTCTTTCTGCTGGCCCTCAGGTCTTCAGTCCTTTTCCCCCAC CCAATACCATATTATGTTCCCCTCTTGCAACCCCCCCACCCCATCCCCTTTCCCTCTCAAGCCCCTCCCT CTCTCCCTCCCCCCTTGTGATTGCTATCTTCTCCCTCCCTCCCAAGTGGGATTGAGGCATTATCACTTGG GCCCTTTTGCTTGTTGACCTTTTTGAGTTATGTGGACTGTATATTGATATTCTGTACTTTTTTTTTGGCT AATATCCACATATTAGTGAGTACATGTCATGCAAGTCCTTTTGGGTCTGAGTTACCTCACTCAGAATATT TTGTAGTTCCATTCATTTTAAAAACATTTAATTCTGTAAAAATTTTACTTGTTTTTATTATCCTATGTGT GTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGG GAGAGAGAGATGTGTCTGTGTGGCCCTCTATGTATATGATAAGTGTGTATGTGTGTGTGTGTGTGTGTGT GTGTGTGTGTGTGTGCGTGTGTGTGTGTGTGTGAATGTATGGGGGTGTATATATGCCCCACTGTGCATGT GGATATCCAAGGACAACTTTGTGGAGTTGGTTCTCTGCTTTTACCTATGTGTGTGTTATAGGGATTGAAC ACATTTCATCATAGCCTTTACCATCTGAGCCATAGTCCCAGCCCTGACATGTTTTTTTCTTTTCTTCTTT CTTTCTTTCTTTCTTTCTTTCTTTTTAAATGGGTTCTTTGTGAGTTTCACATCATGCACCCCAGTTTTGC TCATCTCTGTCTTCTCATTGCTGCCCTTCACCTTATAACCCCCGACCCCCACCCCACCGGAACCCCATGA GTTATTAGTCTAGTTCAAGGTCTCTGGTCTCAGTGACACCATCACTACTTAATCCCCACCAGGCTCCTCC TGGTTATTCTGCAGTTGCCTGTGTCATGGAGATCCTGCAGCTTGGAAACAGCAGGCCTTTTTACGAATCT CATATGCTCATAGATGATACAGATTTTGGGGGTGGGCTAACCAGAGACCTGGATTTTTGCCAGGGTAGGA ACAGAGCCACTCTGTGTGCAGGCCTTCCCTTATTTGCACCACCAGGGTGAACTCTCCAGCACTATTAAGG TTAGGCCACTCAATGCTGCCATTGGCAAGAGGCAGCTCTCCTGCTTTCATGGCTTGGCACGAGGCACCAG CACCTATGCCTTCAGAGCCATCTCCACTGTGCTGCCCAGCCAAGGTGCCCAGCCCACTCTCCCAAATGCT ATAGTGGGCAGGGCTAGCTTTTCTGCTCTCAAGTCCTCAGGTCTGCTCTTCTGACTATTGCAGGTGATGA GGGACAAGAGGGGGGAGGATATTATCACCGTATCCATGCCACCACTGAATGGCAGATGAGGGACTACTGG CAGGGCCAGCTCTCTGAGTTTTCACTCTTAGGGCTGGCTCGCCTGCACCTCCACCACCAGGGTCAGCTCT GCTGTGCAGTGCCTGCTTTCCCCAGTGCTGCAGCAGGTGAGGGGCAGGGTTGGATCTCCTGAGCTCATAA TCCTTTGGGTAGCTTTGCCAACTGCCAGAGGTAGTGGTGGTGGTGGGCAGGGGGATATCACCTATTTGCC TGTGCCGGTTCAGGCAGAATAGTGGCAGGGTTACTCACACCCTGCTCTCAGGGCCAGCTCCACTGTGCTG CCTGCATGAGGTGGAGGGCCATGAGTGTTGCCTCCAGTGAGAGATAGGGCCAGCTCTTGAGAGCACAGAA TACAGTGAGGGACAGTTATGTCCCTGTTAGAAGTCTAGTGGACTCAGACATGCCCCTCAGTAGCAGGTAA GTCTGGGACCTCACCATGGCCCCAGATGACAGGGCTGGCCCTCCCAACAGGCTACTCTTCTCTGCCCTTA CGTCTCCAGTTTCATCTCTCTCCATAATGCTCAAGTTGCTCCATGTTTCTTTCTCCCACATCTGATCACC ACATACTTGCATATTGTAGTCATTTGGGGAATTAGATTAAATAACATAGTGTAAAGAACTTTAAGCACAG TGTCTGGATCTCTGTGTTCTAGAAGAGAGCTTATTTTATTAGTACTCAACTTTGGCTCCAGTGGAGAGTT CTTAAAGATGGCTGAGACAAGTGTGACACAAAATTACTTAGAGGACTTTGCAAAAAAAGGATTTTGTCTT GCTGGGGCTGCTATTCAAGGAAATGAAGATCTTAGTCGTTGGGCCCAGGAAACCAGCAAAGCAGGTCACA CTTTGCTCAGCCTCCAGGCTGTACGGAGATGAACCTGCCAAGAAGGGGTGGGTGCTGAGTCAGCCTTGGT GGGAAGGGGGCAAGTTTCCTGCCTGAATGAGCCTGTGCCTACGTGAGGGATAAGGTATCTGAGCCAGCCA GGTAGGTCATGAAGCCAAGAGAAACTAACCTCAACAGGGCTTGGCATGTTCTCCCTGGCTGGGCCAGGCA ATGGGGAGAGTACTAAGGCTTAGGGCTCTTAGCAAATGTGCAAGCTGGTAGAAGAAAGTTCTACGGAAAG ATGCAATTCTGCATGGGTGATAGAGAGGTAGGGATTTATGACAAGCTTCCGAGGAATCTGTGTGTGTGTG TGTGTGTGTGTGTGTGTGTGTTTGGTTGTGTGTCTGTGGGAGCAGTGTCTTCTGAGCAGCTGCATTCCCA GGACCATCACGTGGACTGGAGTCATGACCAGGGTTACTTTAGCCTCTTTTGCTGGATTTCACCATGAGTT CTTCCTCATTCGTCCTCTGTGTTTTCAGCTACAATGATCGTAGAACTTATGACGAATTCATAAGTTGTGA TCATTTGTCTCCTCATTCCCATGTGTGGGCTCTGTGAAAAGACATGGCAGATTCTCATTTTTGAAAACAA TAATCAGATTCTGCATCCACAGGCCATGGTTGTAAAGTGCTGTATTAATGGTGAGAACCGCTTTCTTCTC TGCCTCCCTCTTATCTGATACTGTCCAGGAAATGAAGAAGGATGGAAGCCTAACTGATATGGCCTGAGGT TAGGGGACTTAAAATTCATAGAAAATAAAGGCTCTCAACCTGACAGTTTACTAATTCCTCTCTATGGAAA CACTGCAAACTCAAAAGAAACAACAGACCTCGTTCTAATATGCAGTATATGTATGCTTTTAGAGAATTTA TCCAATCTCTATCACTGTAGACTTTGCTAAATCTTATTAAACAATACTGAATTTCCCCAAATTACTAGAG TATTAGAAATCAAAATTATAACAGACTATGTGAATAGTGCTTTGCAGCAACTACAAGTAGTGTATAAAGT TATATTTATTGATATCCAAAGATGTTTATAGTATATTATGTAGAAAAAGGAGATATCAAAAATGAGGTAT ATTTGAGCACATTTTTGTAATAAAATATGTCAGATGTATGTTGTAGAGAGGGGGTGTATAGAAAACAGTT CTGCAAATCCCAGTTTGGACTGTTCAGAGCACAACATTCTTTTAAAACTTTGATCCTCAAGTGAAGAACG TTTATATACTTAATTTTGGATTCATTGTTATTTATATGGCAAAGAGAATCTAACAGAGCAATTCTTTATG GTCTGTGACCTATAACTTTGAATTTTTACATTGCATTCGTTTTAGCTGCTGGAAGAGTAAAGACTATAAC TCTTTCATCTTTTCCACGAAGTTCATTAAGATTGGTGTGACTTTCTGTGGTAAATTAATTCTCCTCTAAT TGTCCACAGCTGGCCAGATTCCGAAGCCTCTTGTGCACAGCTGAGGGAGAGAGTGCGGCTTTTTTGTTAA GCAATCACCGTCCACCACAGCCCTTGAAGGGCCGCAGAGTGAGAGCATCTTTCTATTAGCAGTCACCAGT GGGTCAACCCAATCGGAACACGGAGGTAGCAAATACAACGGAACTCAGACATTCCAATAATGGCTTTTCG AGAATTTCACGTTTGTGGATTCTACTTGTCCAGCACCTCTGGCACGGCAGAGAAAACCAGAAGTCTGAAA TAACTTAGCCCATCACTCCTAGATTTGCCCCAATGTATGTCCAATTGCTAAATATGGGATGTAATTAAAA TCACAAAGTATACCTGCTTCAGCCTTCCTGACAATAATGTCAGCCTTACCAACCTCAGACTGTACTAAAC TTTATGGTGGGCTTAGACTGAGCCTATCCCATTCTAGATAGTGTTTGATAAAAACTTTAAATTCACTTTG AACTGATATTATTCCCAAACAAGCAGTTCTTACAGTCTTGATAATTTTCTGATTAATCAAGAGTATATAT TTCCTTTAATACATTTTCTCAGATTCTCATTTTATGTACTGTAATATAGCACATAAGACAAAACACACAC AGACTAGGATAGAACAATGTGGCTACTCCTGTGATTAAAGTAACCTACAGTTTTAGTGAAGCATTCCTCA GGCTAAGAACAGCTTTTTAAGACACTATTCCACGTAATATATTCACCCAAGAATGTTAATGACTACCAGG GTGATGACATAGTGTGAGGCTCATGATATTAACGTGATTCAGACCAGCAATGTATACGATACCACTGCAG CAGAACTGCCCCGAGCTGGTGAACAGCTTCCTACAAACAGAGTGGGACGCTATCCTATATCTGCTGTTTT TTCTGTCACCCATTAAAAAGATGAACCACGTCTTGC From MichaelRunningWolf at att.net Sun Jan 19 23:55:25 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:Designing Programs References: <20030111032023.GA61153@wokkil.pair.com> <20030111064112.GA43889@newsof.com> Message-ID: Andrew Wyllie writes: > Hi Asim, > > On Fri, 10 Jan 2003, Asim Jalis wrote: [...] > > Do you draw diagrams? [...] [...] > ... Once I feel like I have enough pieces and a good > idea of what's going to be easy and hard, I start to draw out > a large diagram that shouws how all the pieces will fit together. > (Literally large, I go down to the local artist supply store and > buy a big pad of 14x17 drawing paper). The big picture diagram > basically becomes the test environment for my requirements doc. > So each feature/function I need my app to do can be traced through > the big diagram. As a technomad, I was developing in Florida, collaborating with a collegue in Maryland to deliver a product to a client in New Jersey. I am a very visual person. When I have an office, I think on the white board. Alone, and with a collegue. Pictures are worth.... Well, while in Florida, I didn't have an office, so I went to Office Max and bought a *roll* of white paper, some colored markers, a box of crayons, and some tacky putty. I tore off a bunch of similar sized sheets, stuck them to the walls, and started doodling. The main program had a sheet. As I'd flesh out the main module, another module would suggest itself. That new module would get a new sheet, and usually a different color. Step-and-repeat. As I found holes, I'd pick up the correct crayon or marker and go scribble on the wall. Big pictures made a lot more sense when the pieces were in different colors, and especially since I could see them from my keyboard. module A -- Color red module B -- Color blue module C -- Color green I was traveling with Wendy, a non-Perl coder, but a critical thinker, nonetheless. For lack of a Perl coder, I'd bounce the design off her. If I could make the colors, and lines and circles and diagrams (that would be used against us....:-) make sense to her, it was time to use them as the basis for the initial version of code. Becuause this was a data munging problem, I had lots of data to analyze. The crayons came in very handy then, too. I'd color code the output. Turns out there were recurring values of gain, voltage, current, frequency, etc... Each dependant and independant value would get color coded. From a distance, I could see the patterns emerge in a way that I couldn't before. I'd also tape the data together to form scrolls that I'd hang on the wall, floor to ceiling. There's something to be said for standing in front of your data instead of shuffling through it. I've always wanted a wall size display!!! To heck with 10" or 14" or even 21" displays. I want an 8'x10' section of wall!!!! I'll probably live long enough to have computer controlled Organic LED wallpaper. Oh, yeah!!! Walks. Lots of walks. I meditate (and create) while walking. (Some folks do it by sitting, BTW. Don't get duped into "sitting" to think if you're a walker!!!) The beach was a great spot for doing that. I used to "clock out" to take a walk, but soon realized that much of my creativivity was unleashed as I walked. I'd get to a certain spot in the paper process where I couldn't do any more. I'd go for what I thought was a "break", but found that it was just a different "phase", because when I got back, a lot of unsolved problems (and even unrealized problems) had been solved. I no longer "clocked out" when I took those kinds of walks. Pretty cool to be billing while walking ankle-deep in the surf along Cocoa Beach. Ah, those were the days...... Lest you think this is too indulgent, I am sure that I got more done on those walks than I did while on-site. They ran a manufacturing operation co-located with the development staff. Manufacturing lines require real-time interrupts. Software design requires long chunks (30 minutes - 4 hours) of uninterrupted focus. While on site, it was impossible to get 30 minutes uninterrupted time. Six times 30 minutes is not equal to 3 hours!!! Paper, markers, crayons, lots of space, sun, fresh air, unconstrained thinking time -- the makings of a creative environment. And the best OO architecture I've ever co-developed. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From m3047 at inwa.net Mon Jan 20 01:59:24 2003 From: m3047 at inwa.net (Fred Morris) Date: Mon Aug 2 21:36:48 2004 Subject: SPUG:command line switches: the DWIMmyness that is Perl Message-ID: Hi all, I use Perl for all sorts of complicated things, but I confess to never having played with the command line switches until tonight. I wanted something which would expand tabs into spaces, but I wanted to be able to specify the tab stop: sometimes it's 4, sometimes it's 8... anybody else find themselves in the same predicament? So I tried a BEGIN block, and it worked! That's cool! -- Fred Morris m3047@inwa.net -- #!/usr/bin/perl -wpi.orig =pod =head1 DeTab Converts tabs to spaces, with a user-specified tab stop size. =over 4 =item Author Fred Morris =item Creation Date 19-Jan-2003 =item Copyright (c) Copyright 2003 by Fred Morris, Seattle WA USA. This utility can be used, distributed and modified under the same terms as Perl itself. The actual tab expansion comes out of one of the books on the OReilly Perl CD. =over 4 =item e-mail m3047@inwa.net =item telephone 206.297.6344 =item mailing address 6739 3rd NW Seattle WA 98117 USA =back =back =head2 Command Line Syntax detab [-s] [] =head3 Arguments =over 4 =item -s Sets the size of a tab stop. The default tab stop size is 8. =item A file glob, or a list of files to be edited in place. If none is specified, input is read from STDIN and written to STDOUT. =back =head2 Processing Details Files, if specified, are "edited in place", with the original files saved as the original files with an extension of .orig. =cut use vars qw/ $StopSize /; BEGIN { use Getopt::Std; my %Options; getopts( "hs:", \%Options ); if (exists $Options{h}) { print "detab [-s] [[...]]\n"; exit(0); } $StopSize = ($Options{s}) ? $Options{s} : 8; } # The example on the CD uses a constant instead of $StopSize. 1 while s/\t+/' ' x (length($&) * $StopSize - length($`) % $StopSize)/e; From MichaelRunningWolf at att.net Mon Jan 20 03:02:24 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Question from Damian's talk on embedded code in regex In-Reply-To: <3E2B211C.9040800@conway.org> References: <004001c2bfeb$102d01c0$17020202@c172974a> <3E2B211C.9040800@conway.org> Message-ID: Damian Conway writes: > Chuck Langenberg wrote: > > Does anybody know for "sure" if there's a 3rd edition of "Mastering > > Regular Expressions" by Friedl on the horizon? I've been spoofed > > before & I'm not interested in cleaning out any more old inventory. > > I took notes when Damian recommended Jeff Friedl's book, and he > > specifically mentioned the "Third Edition". > > ($what_damian_meant = $what_damian_said) =~ s/Third/Second/; > > (Of course, with my accent, I might actually have said "second", and > you still heard "third" ;-) He's so used to zero-time quantum holes, and talking about Perl6 as though it were in the present, he probably was already channeling RFC's for Jeffrey's next release. :-) The second edition was released at OSCON in July 2002, so it recent. I had the opportunity to talk with him in person. He was so happy and proud to get the accumulated cruft swept out of the first edition (1997) as he released the second edition. Not only were the errors gone, but he'd caught the book up to the state of the art/practice. I'll *second* that!!! Michael P.S. Although I don't yet have a second edition, I know that the part I'll miss is in the acknowledgements. At OSCON, I had an opportunity to acknowledged Jeffrey for the acknowledgement section. (Recursion or iteration?) It touched me. Unfortunately it's gone in the second edition. I've told the story numerous times, in many different contexts. I'll reproduce it here. "Mastering Regular Expressions", Jeffrey E. F. Friedl. Edition 1, 1997. pg xxi > Personal Comments and Acknowledgements > > My Mon once told me that she couldn't believe that she ever married > Dad. When they got married, she said they _thought_ that they loved > each other. It was nothing, she continued, compared with the depth > of what they now share, thirty-something years later. It's just as > well that they didn't know how much better it could get, for had > they known, they might have considered what they had to be too > little to chance the future on. > > The analogy may be a bit melodramatic, but several years ago, I > _thought_ I understood regular expressions. > [...] > I soon learned just how much I didn't know. Resume Michael's text: I guess a marraige license is like a pilot's licence. When I got mine, the FAA instructor handed me "my licence to learn". Damian, thanks for stamping my Perl license with that RE endorsement last week. As you can see from my previous posting, I'm learning. Like Jeffrey's Mom, I didn't have any idea how much I'd love this language when I picked it up 7 years ago. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Mon Jan 20 03:07:59 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:command line switches: the DWIMmyness that is Perl In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > Hi all, > > I use Perl for all sorts of complicated things, but I confess to never > having played with the command line switches until tonight. I wanted > something which would expand tabs into spaces, but I wanted to be able to > specify the tab stop: sometimes it's 4, sometimes it's 8... anybody else > find themselves in the same predicament? > > So I tried a BEGIN block, and it worked! That's cool! Did you take a look at this module? NAME Text::Tabs -- expand and unexpand tabs per the unix expand(1) and unexpand(1) SYNOPSIS use Text::Tabs; $tabstop = 4; @lines_without_tabs = expand(@lines_with_tabs); @lines_with_tabs = unexpand(@lines_without_tabs); -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Mon Jan 20 03:50:31 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Designing Programs In-Reply-To: <200301130831.52460.jgardn@alumni.washington.edu> References: <20030111032023.GA61153@wokkil.pair.com> <200301130831.52460.jgardn@alumni.washington.edu> Message-ID: Jonathan Gardner writes: > I'm going to be the troll today. ;-) > > When writing large programs, I often reconsider when I conclude perl is the > best tool for the job. In my experience, perl is difficult to document, too > flexible, and not a good solution when you may end up having several people > working on the same thing. OK, I'll play. I'm Billy Goat Gruff.... Too flexible? That's like "too much fun". Yes, Perl is like a musical, here comes a song. First, let's learn the chorus. Too much fun? What's that mean? It's like too much money, there's no such thing It's like a girl too pretty, with too much class Being too lucky, a car too fast No matter what they say I've done I ain't never had too much fun Now we can learn the whole song. Too Much Fun> Daryle Singletary Too Much Fun> Too Much Fun> Too Much Fun (contributed by Will Hose) Too Much Fun> Too Much Fun> Blue lights flashing in my rear-view mirror Too Much Fun> The sheriff says, "Boy I should have known it was you Too Much Fun> You've got fourteen people in the back of this truck Too Much Fun> I've warned you twice and now I'm writing you up." Too Much Fun> I said, "Officer, what have I done?" Too Much Fun> He smiled and said, "Boy, you're having too much fun." Too Much Fun> Too Much Fun> (Chorus) Too Much Fun> Too much fun? What's that mean? Too Much Fun> It's like too much money, there's no such thing Too Much Fun> It's like a girl too pretty, with too much class Too Much Fun> Being too lucky, a car too fast Too Much Fun> No matter what they say I've done Too Much Fun> I ain't never had too much fun Too Much Fun> Too Much Fun> There was a fight Friday night at the Stumble Inn Too Much Fun> Me and ol' Harley just had to join in Too Much Fun> Next thing you know we were both seeing stars Too Much Fun> They threw us out and closed down the bar Too Much Fun> I said, "The Long Branch is open. The night's still young Too Much Fun> And we ain't never had too much fun." Too Much Fun> Too Much Fun> (Repeat chorus) Too Much Fun> Too Much Fun> No matter what they say I've done Too Much Fun> I ain't never had too much fun Too Much Fun> Give me the reins and let me run Too Much Fun> 'Cause I ain't never had too much fun > Most big perl programs I see have all evolved that way. They started small, > and gradually grew until they became the big program they were never intended > to be. Some big perl programs are really several separate programs that run > together. Otherwise, it is probably a website. That's Perl's fault? Please Mr. Bush. I have way too many liberties. I have too much flexibility. Please, monitor my travels, phone calls, and library withdrawals. The freedom is killing me. Please help me out!! :-) > Now here comes the trollish part. I would rather use Python than perl for > large projects. I think Python matches my style in more ways than one: Thanks for sharing your style. Despite my playful intro, I do value other opinions, and think that style matching, although it's often denigraded, is an important point. [...] > - Unlike perl, documentation is so easy to incorporate it is foolish not to. Could you illustrate this with a code/documentation fragment? Aside -- Geoff, perhaps you could counter-post some of your POD, or encapsulate some of Jonathan's illustration into a pod for your February POD talk. I'd be interested to see how folks are really dealing with the real documentation. as you continue.... > In fact, for a large project, you are shooting yourself in the foot when you > supply poor or no documentation, because you will forget how you were > supposed to use the objects you just wrote. Again, this seems like a comment on SW development in general, not specific to Perl or Python. What does Python do to make this easier? > - Unlike perl, refactoring seems to be easier, and is a much better solution > than devising a hack to get things to work. I find that because there are > only two ways to access the attributes of an object, writing regular > expressions to find all access to attributes is incredibly easy and mindless. > This is not so true for perl. Do you have a finger on why refactoring seems easier in Python? It seems to me that flexibility (that stuff that Perl gives you too much of) would be a benefit here, and that a having only two ways to access something may get you into a bind. [...] Although I started out by playing (notice that's my way of learning -- I'm a mammal), I do know that constraints are often enable a solution. Compare a my skills with that of a slug!!! Please!!! Seriously, a backbone, in fact any bone, might seem awefully constaining to a slug, but it also enables me to do things that a slug couldn't dream of. Reflexively, a slug's flexibility has its advantages. Happy slime trails, Michael Wolf -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From tim at consultix-inc.com Mon Jan 20 11:12:52 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:command line switches: the DWIMmyness that is Perl In-Reply-To: References: Message-ID: <20030120091252.A28064@timji.consultix-inc.com> On Sun, Jan 19, 2003 at 11:59:24PM -0800, Fred Morris wrote: > Hi all, > > I use Perl for all sorts of complicated things, but I confess to never > having played with the command line switches until tonight. I wanted > something which would expand tabs into spaces, but I wanted to be able to > specify the tab stop: sometimes it's 4, sometimes it's 8... anybody else > find themselves in the same predicament? > > Fred Morris > m3047@inwa.net There's a much easier way to handle switches, suitable for whipping things up really quickly. Just use the -s invocation option, and then the user can do -tabstop=5 as a command-line argument to set the variable $tabstop to 5 within the script, or simply -tabstop to set the same variable to a true value. See perldoc perlrun for details. -Tim *-----------------------------------------------------------* | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | CLASSES: Basic Perl: 2/10-12 Perl Modules: 2/13-14 | *-----------------------------------------------------------* From jgardn at alumni.washington.edu Mon Jan 20 11:39:38 2003 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Designing Programs In-Reply-To: References: <20030111032023.GA61153@wokkil.pair.com> <200301130831.52460.jgardn@alumni.washington.edu> Message-ID: <200301200939.38242.jgardn@alumni.washington.edu> Again, I am going to start with a disclaimer. I love perl. I think perl is great. When Tim demonstrated how to turn perl into awk and sed, that literally changed my life and the way I use perl. I also love Python. I can do things with Python that are unimaginable in perl. But it would take a lot of work to make Python do things that perl does so naturally. Unfortunately, too many people think of "Python vs. perl" and from there, the communities actually part company. This is incredibly unfortunate because we have so much to learn from each other. The two languages actually complement each other in many ways. Python happens to do well the parts that perl doesn't; and Python can barely do the things that perl does very well. I know this post isn't specifically about perl, but I hope it will encourage everyone to think more critically about software design and the issues that come up as you implement the design. I hope it will encourage you to plan ahead and think of how you will use perl to avoid it's weaknesses and capitalize on its strengths. Or it may even convince you to give Python a look ;-) On Monday 20 January 2003 01:50, Michael R. Wolf wrote: > Jonathan Gardner writes: > > - Unlike perl, documentation is so easy to incorporate it is foolish not > > to. > > Could you illustrate this with a code/documentation fragment? > class widget: def add_el(self, el): """Adds an element to the list of elements.""" self.els.append[el] $ python >>> import mymodule >>> dir (mymodule) ( lists all the functions, variables, classes, and modules in mymodule ) >>> dir(widget) ( lists all the methods and attributes of widget ) >>> mymodule.widget.add_el.__doc__ "Adds an element to the list of elements." In perl, you could achieve something similar using perldoc, but you can't attach documentation in a general way to *everything*. In Python, this is built in, as you can see above. Python even comes with a command to load a module and assemble all the doc strings from all the objects into something neat -- much like C++ and doxygen. Compare this with having to assemble the documentation from scratch with perldoc. This saves a lot of typing if you want to go in later and add or clean up the documentation. You won't have to write out the parameters to the function, the base classes of your class, or anything like that. The biggest thing going against POD is that it is actually not as easy to use as we all believe. If it were actually easy to use, people would be using it a lot more than they do. It is all too common to find experienced perl hackers who have little or no knowledge about POD. If you are one of those perl hackers who can really use perl, and your don't know how to use POD, then you really really need to rethink your purpose in life. Or learn POD. And the simply beatiful part about Python's documentation system: what can be simpler than plain old text for plain old documentation? > > In fact, for a large project, you are shooting yourself in the foot when > > you supply poor or no documentation, because you will forget how you were > > supposed to use the objects you just wrote. > > Again, this seems like a comment on SW development in general, not > specific to Perl or Python. What does Python do to make this easier? > Correct. You want to really see why people say "the first 90% of the project takes 90% of the time, and the last 10% takes the other 90% of the time"? Write poor documentation, or no documentation at all. However, by making it possible to connect documentation with the objects you use, you are saving a lot of time and effort. I don't have to pull up a man page or the source code to find the documentation. I can just load the module and check the object's __doc__ string. This is much easier when using a debugger, because the object is already loaded. > > - Unlike perl, refactoring seems to be easier, and is a much better > > solution than devising a hack to get things to work. I find that because > > there are only two ways to access the attributes of an object, writing > > regular expressions to find all access to attributes is incredibly easy > > and mindless. This is not so true for perl. > > Do you have a finger on why refactoring seems easier in Python? It > seems to me that flexibility (that stuff that Perl gives you too much > of) would be a benefit here, and that a having only two ways to access > something may get you into a bind. > Refactoring, in case some people are not too familiar with the term, is the act of renaming objects, attributes, modules, or functions. This is often something you will do halfway through a project after you have realized that renaming some things would make a lot of sense. The behavior of parts of your program have changed enough that keeping the old name would confuse everyone, including yourself. Of course, with solid documentation and unchanging requirements no one would ever need to refactor... but can you name the last project that you worked on that had solid documentation and unchanging requirements? And if you can, please provide me with the phone number of the recruiter at that company. The difficult part of refactoring is that you have to go through ALL the code in the project, and change the way a lot of things are done. Luckily, we have tools like grep and sed who can help us do refactoring without spending too much time. You see, we really are better than our Visual Studio "brethren", and our jobs really are much easier. ;-) Having only two ways to access the objects and attributes of objects makes it much easier to refactor because it is possible to find all the accesses to the attributes and the objects. In fact, it is so easy, there are some tools you can find to help you do it. When you see tools appear for a certain task, that means that task is easy enough to do, even a computer can do it. We all know how stupid computers are because it is our job to try to trick people into believing that they aren't. In perl, there are so many ways to do it that you can't predict the ways others have done it or even remember the ways you have done it. There are OO paradigms that some people use that make refactoring easier. However, it seems there are as many OO paradigms as there are perl hackers. You can imagine how much work it would be to write a regular expression that could find all the accesses to a certain attribute of an object. In the end, you'll end up reading all the code anyway to make sure you got it right. > > Although I started out by playing (notice that's my way of learning -- > I'm a mammal), I do know that constraints are often enable a solution. > Compare a my skills with that of a slug!!! Please!!! Seriously, a > backbone, in fact any bone, might seem awefully constaining to a slug, > but it also enables me to do things that a slug couldn't dream of. > Reflexively, a slug's flexibility has its advantages. > Yes, I completely agree. I'm not arguing that Python is better than perl, or perl better than Python. They are both tools, and I like to use the right tool for the right job. -- Jonathan Gardner jgardn@alumni.washington.edu Python Qt perl apache and linux From maherb at brimworks.com Mon Jan 20 20:50:50 2003 From: maherb at brimworks.com (Brian Maher) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. Message-ID: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> Damian's talk at this months SPUG meeting was great! I was interested in acquiring some of the scripts Damian presented at this months SPUG meeting. Specifically, I would like to see these scripts: -cd/cdd/cdd? -pmd -killproc -entar/untar -getraw Has Damian posted these anywhere? Thanks! From glyph at mac.com Mon Jan 20 21:10:39 2003 From: glyph at mac.com (Geoffrey & Kristin Grosenbach) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> Message-ID: I speak for myself and do not speak for Damian. What you read here may be completely false and should not be used in conjunction with nuclear devices. I heard from a promising young Australian programmer that these may in fact become available when that individual gets the time to prepare them for public consumption. In the meantime, you can do as I have and get a very small sampling of the power of ~damian/bin by doing: # .cshrc alias cd 'cd \!*; ls' alias cdd 'cd -' # .vimrc (maybe works in straight vi) ab hbp #!/usr/bin/perl -w map w :w # etc... If anyone has more complete notes (or implementations), I'd love to see what you wrote down as well. Geoff On Monday, January 20, 2003, at 06:50 PM, Brian Maher wrote: > Damian's talk at this months SPUG meeting was great! > > I was interested in acquiring some of the scripts Damian presented at > this months SPUG meeting. Specifically, I would like to see these > scripts: > > -cd/cdd/cdd? > -pmd > -killproc > -entar/untar > -getraw > > Has Damian posted these anywhere? > > Thanks! > > _____________________________________________________________ > Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > > http://www.GeoffreyGrosenbach.com From jmates at sial.org Mon Jan 20 22:09:26 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: ~damian/bin scripts. In-Reply-To: References: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> Message-ID: <20030121040926.GG19808@darkness.sial.org> * Geoffrey & Kristin Grosenbach > # .vimrc (maybe works in straight vi) Or .exrc, for autoformat, which was mentioned indirectly a few times (see Text::Autoformat for details): map f !Gperl -MText::Autoformat -e'autoformat' In emacs, that works out to something like M-h C-u M-| perl -MText::Autoformat -e'autoformat' though one really should be looking at elisping it to something easier to invoke. From MichaelRunningWolf at att.net Tue Jan 21 00:46:40 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> References: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> Message-ID: Brian Maher writes: > Damian's talk at this months SPUG meeting was great! > > I was interested in acquiring some of the scripts Damian presented at > this months SPUG meeting. Specifically, I would like to see these > scripts: > > -cd/cdd/cdd? > -pmd > -killproc > -entar/untar > -getraw > > Has Damian posted these anywhere? Not yet. He will after he gets home, catches up on a backlog of sleep, catches up with his family, and then a bit more. His last state-side gig is at the O'Reilly conference in early Feb. Do the math - I'm not sure what it adds up to, but this gives you a shape of the issue. And, of course, anything earlier is just the grace of that amazingly prolific Australian programmer going above (the equator) and beyond (normal human limits). Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From lists at dansanderson.com Tue Jan 21 01:53:37 2003 From: lists at dansanderson.com (Dan Sanderson) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> References: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> Message-ID: <1043135618.1260.144.camel@trinket> I would not want to discourage Damien from publishing his scripts, but I'm personally looking forward to implementing some of the more inspiring ideas myself as instructive exercises. I've never used Term::ReadKey before, for example, and would enjoy making my own getraw just to try it out. Not that Damien's versions wouldn't also be instructive to see, of course. One of the central themes of ~damien/bin was TIMTOWTDI, but the best way for you to do things in your environment is *your* way. While the theme seemed rather obvious at first, the presentation hit me at an angle I didn't expect. Like any newbie, I used to try to do things the way everyone else did, figuring that the problems of the computing environment had been re-visited countless times by people capable of making intelligent revisions, and so the traditional uses of the traditional tools were probably a pretty good way of doing things and I should try it that way. If I ever felt like a 15-year-old Unix tool could be improved, I thought, I should at least research a better existing implementation before building my own. Then perhaps at some time in the future, I could knowledgeably decide that implementing a particular change, at least in my own environment, would be worth the effort. What ~damien/bin reminded me is that the ease with which tools and wrappers can be built with Perl drastically affects the cost-benefit analysis of when to decide to just do it yourself. I've customized my Unix work environments many times over the years, but I must admit it never occurred to me to scrutinize the very building blocks I was using. Of *course* I can add custom functionality to the 'cd' command! Of *course* there ought to be a command that generates files of dummy data, I do that all the time! Of *course* tar ought to be able to figure out its own execution mode from the filename! With such a powerful sword in my hand, why on Earth would I allow it not to? I imagine this might be a newbie lesson to some degree, but it's still an important one. Especially when new to a technology, I've always paranoically exaggerated the costs of customization: I might train myself to my customizations and become less effective without them-- but of course I would, customizations are powerful. I might re-invent a wheel, perhaps even one that was already in my /usr/bin/ directory and I just didn't know about it-- but when I do discover it, I could always decide which one I like better and just use it. I might separate myself from a standard environment enough that I might not be able to assist or support others in their environments-- all the more reason to write my customizations myself, so I understand what steps I'm saving myself from having to do. I might need to write software that works in a standard environment for distribution purposes-- but that's when I learn enough about /bin/sh scripting to meet the requirements, then go back to my luxurious Perl-enabled mansion to live the rest of my life. So it was refreshing and inspiring to see how an experienced professional sets up their environment to get stuff done. I can imagine a series of similar presentations from other experienced professionals, especially with different daily needs, being similarly useful and inspiring. Home decorating ideas with Perl. It's a Good Thing. What's in *your* ~/bin directory? -- Dan On Mon, 2003-01-20 at 18:50, Brian Maher wrote: > Damian's talk at this months SPUG meeting was great! > > I was interested in acquiring some of the scripts Damian presented at > this months SPUG meeting. Specifically, I would like to see these > scripts: > > -cd/cdd/cdd? > -pmd > -killproc > -entar/untar > -getraw > > Has Damian posted these anywhere? > > Thanks! > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > From mbustad at Myrio.com Fri Jan 17 11:36:34 2003 From: mbustad at Myrio.com (Matthew.Bustad) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:DOS / BASIC Script In-Reply-To: Message-ID: One way to keep the backup files without "rotation" is to save the file with the day-of-the-month mod 2 (for ~15 backups) or the day-of-the-week (for 7 backup files). Then let the files be written over when it day comes arount: backup-1, backup-2, backup-3,.... Then you do not have to move/rename files. -Matthew.Bustad On Fri, 17 Jan 2003, September Nyang oro wrote: > SPUG-ers, > > I got a job in DataStage that runs once per day. It basically gets raw > data from DB2, transforms it ( we do some calculations and other stuff > here), and then dumps the data into an Oracle. So that part works > perfectly. > > We need to be able to archive this raw data from the DB2 source for 14 > days just incase something happens to our jobs, so we could go back and > get that raw data from the archive and run it again. We're trying to > archive this data in a flat file in Windows NT. Right now when we run > the process we could only archive the raw data for 1 day. DataStage > could only 'overwrite' or 'append' to an existing file. But we want > separate files everyday. > > The challenge: I need to write a script in Basic / DOS that would put a > timestamp in my jobs. Before it 'overwrites' yesterday's job in the > system when it writes today's job, it should move 'yesterday's job into > another directory/folder. And then keep that old job in the new folder > for 14 days. After 14 days that job should be deleted. So a script that > can perform those functions is something that would be useful to me. > > So ideally, I'll need to have a script that runs first on the system, > moves the old file into the new directory, checks whether that new > directory has files older than 14 days, if so then delete the older- > than-14-days file(s). If no older than 14 days files are available, > then just finish. > > Ideas are welcome. > > Thanks. > > ../seppy > > > > ______________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > > From MichaelRunningWolf at att.net Tue Jan 21 11:25:09 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:mailman backward compatibility Message-ID: I detect changes in the mailman messages. The trailer says: POST TO: spug-list@mail.pm.org But I, and others, have succeeded with the previous, simpler address spug-list@pm.org Is there a reason to advertise the longer address? If not, having the shorter one makes the procmail-like filters easier, and backward compatible. On a similar note, the subject tag is now "SPUG:". Previously, it had a trailing space. Replacing it would increase backward compatibility. And, I tend to like my colons to breathe! :-) As in life, coding, and the universe, there's a balance point here somewhere: Everything should be made as simple as possible, but not one bit simpler. -- Albert Einstein (1879 - 1955), (attributed) A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. -- Ralph Waldo Emerson (1803 - 1882), Self-Reliance -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From asimjalis at acm.org Tue Jan 21 12:30:19 2003 From: asimjalis at acm.org (Asim Jalis) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <1043135618.1260.144.camel@trinket> References: <26519DA0-2CEB-11D7-B3B9-000393C50526@brimworks.com> <1043135618.1260.144.camel@trinket> Message-ID: <20030121183019.GA56267@wokkil.pair.com> I missed Damian's talk as I have class on Wednesday nights (woe is me). Each message I read about it makes me more miserable. Is there a way out of this torture? Did someone take notes? Are the contents of the bin directory available somewhere? Is this talk going to be given again? Does anyone remember what kinds of things the scripts did? Asim From SeattlePerlFJ92 at langenberg.com Tue Jan 21 13:14:29 2003 From: SeattlePerlFJ92 at langenberg.com (Chuck Langenberg) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:DOS / BASIC Script References: Message-ID: <007001c2c181$5709d7c0$17020202@c172974a> I'd suggest a backup system witn NO faith in "auto pilot" processes. Technology is wonderful -- when it works. But one day you're going on vacation. And there's nothing your stand-in will ever do that's as important as a backup. They may not see it that way though. But you're the one that's going to be working till 3 AM if the backups get hosed. The problem with making a system so simple that even a simpleton can run it is -- a simpleton eventually will run it. If the company finds out how simple you've made it, they'll want to hire the cheapest labor they can find to run it. If it's really simple, that person may even train somebody else, who trains somebody else -- none of whom would understand it. If the backup operator doesn't understand what's going on, sooner or later they'll get flustered and launch the backup process 5 or 10 more times. Just to be safe, you know. And your generations of backups may float off into bit heaven. You may not even know they screwed up until months later -- when it's too late. But you do verify the content and readability of your backups every day, don't you? Here's a suggestion which would interject some human oversight. Rather than get fancy with automated rotations, I'll assume that your backup is put into the same directory name every day -- let's call it bakdir. 1. Create a job (or bat file) let's call it "dailybakup". 2. The first thing the job does is check for the existence of the "bakdir" directory. And if it exists, the job terminates with a message -- telling them they forgot to rename the directory after the last backup. 3. If the job is able to create the bakdir directory, then it assumes everything is OK. Then the job copies the current data into bakdir. 4. Every day a human being must "manually" rename the bakdir directory. If they don't know how to rename a directory, they shouldn't be doing backups in the first place. A good naming convention would come in handy here -- such as bakdir.20030121 which means January 21, 2003. And if you have numerous backup.YYYYmmDD directories laying around, they'll sort nicely, ordered by date. 5. To free the space up, I think you should delete those directories manually too. I don't want some automated process renaming or zapping my backup directories. I vote for minimal automation in my backup process. > One way to keep the backup files without "rotation" is to save the file > with the day-of-the-month mod 2 (for ~15 backups) or the day-of-the-week > (for 7 backup files). Then let the files be written over when it day > comes arount: > > backup-1, backup-2, backup-3,.... > > Then you do not have to move/rename files. > > -Matthew.Bustad > > On Fri, 17 Jan 2003, September Nyang oro wrote: > > SPUG-ers, > > > > I got a job in DataStage that runs once per day. It basically gets raw > > data from DB2, transforms it ( we do some calculations and other stuff > > here), and then dumps the data into an Oracle. So that part works > > perfectly. > > > > We need to be able to archive this raw data from the DB2 source for 14 > > days just incase something happens to our jobs, so we could go back and > > get that raw data from the archive and run it again. We're trying to > > archive this data in a flat file in Windows NT. Right now when we run > > the process we could only archive the raw data for 1 day. DataStage > > could only 'overwrite' or 'append' to an existing file. But we want > > separate files everyday. > > > > The challenge: I need to write a script in Basic / DOS that would put a > > timestamp in my jobs. Before it 'overwrites' yesterday's job in the > > system when it writes today's job, it should move 'yesterday's job into > > another directory/folder. And then keep that old job in the new folder > > for 14 days. After 14 days that job should be deleted. So a script that > > can perform those functions is something that would be useful to me. > > > > So ideally, I'll need to have a script that runs first on the system, > > moves the old file into the new directory, checks whether that new > > directory has files older than 14 days, if so then delete the older- > > than-14-days file(s). If no older than 14 days files are available, > > then just finish. > > > > Ideas are welcome. > > > > Thanks. > > > > ../seppy From cpr at u.washington.edu Tue Jan 21 14:04:53 2003 From: cpr at u.washington.edu (Christie 'Bob' Robertson) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <20030121183019.GA56267@wokkil.pair.com> Message-ID: I took notes on my laptop. I must disclaimer that couldn't type as fast as Damian talked, so no guarantees on anything; lots of things probably cut off mid-thought and whatnot. But there are some pretty good references to neat ideas. I'll send them to you off-list. xie On Tue, 21 Jan 2003, Asim Jalis wrote: > I missed Damian's talk as I have class on Wednesday nights (woe > is me). Each message I read about it makes me more miserable. Is > there a way out of this torture? Did someone take notes? Are the > contents of the bin directory available somewhere? Is this talk > going to be given again? Does anyone remember what kinds of > things the scripts did? > > Asim > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org > > From cpr at u.washington.edu Tue Jan 21 14:28:23 2003 From: cpr at u.washington.edu (Christie 'Bob' Robertson) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: Message-ID: Others have requested my notes, so here they are for the perusal of those interested, but don't forget the disclaimer! I'm sure there are mistakes from my own mis-hearing or ignorance or lack of ability to type and listen at the same time. Still, I'm sure some keywords in here will be helpful to remember certain functions we'll all be reimplementing on our own systems... http://xie.helvella.org/~xie/damian2003-01-15.txt http://xie.helvella.org/~xie/damian2003-01-16.txt xie On Tue, 21 Jan 2003, Christie 'Bob' Robertson wrote: > I took notes on my laptop. I must disclaimer that couldn't type as fast > as Damian talked, so no guarantees on anything; lots of things probably cut > off mid-thought and whatnot. But there are some pretty good references to > neat ideas. I'll send them to you off-list. > > xie > > > On Tue, 21 Jan 2003, Asim Jalis wrote: > > > I missed Damian's talk as I have class on Wednesday nights (woe > > is me). Each message I read about it makes me more miserable. Is > > there a way out of this torture? Did someone take notes? Are the > > contents of the bin directory available somewhere? Is this talk > > going to be given again? Does anyone remember what kinds of > > things the scripts did? > > > > Asim > > _____________________________________________________________ > > Seattle Perl Users Group Mailing List > > POST TO: spug-list@mail.pm.org > > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > > WEB PAGE: www.seattleperl.org > > > > > > From matt at rearviewmirror.org Tue Jan 21 14:40:37 2003 From: matt at rearviewmirror.org (Matt Beland) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: References: Message-ID: <200301211240.37314.matt@rearviewmirror.org> On Tuesday 21 January 2003 12:04 pm, Christie 'Bob' Robertson wrote: > I took notes on my laptop. I must disclaimer that couldn't type as fast > as Damian talked, so no guarantees on anything; lots of things probably cut > off mid-thought and whatnot. But there are some pretty good references to > neat ideas. I'll send them to you off-list. I suspect a lot of people are interested in what you have, however imperfect; if it's too long to send to the list, send me a copy and I'll post a link for those who are interested. -- Matt Beland matt@rearviewmirror.org http://www.rearviewmirror.org From andrew at sweger.net Tue Jan 21 15:54:11 2003 From: andrew at sweger.net (Andrew Sweger) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: <20030121183019.GA56267@wokkil.pair.com> Message-ID: On Tue, 21 Jan 2003, Asim Jalis wrote: > I missed Damian's talk as I have class on Wednesday nights (woe is > me). Each message I read about it makes me more miserable. Is there a > way out of this torture? Setup a procmail filter to /dev/null messages with "~damian/bin" in the subject. This should help reduce some of your misery. ;) > Did someone take notes? Yes. See other postings. > Are the contents of the bin directory available somewhere? Yes. On Damian's iBook in ~damian/bin/. (sorry) A public release will come someday as Damian's time permits. But people will be posting their own implementations based on the concepts presented by Damian. Naturally, the concepts are all we really need (TIMTOWTDI). > Is this talk going to be given again? I hope so. It cracked me up seeing Damian's trademark presentation color and style in vi in a terminal window. Effing brilliant use of the tools available. > Does anyone remember what kinds of things the scripts did? It's all a foggy memory to me now, like some opiate induced dream. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From joneil at cobaltgroup.com Tue Jan 21 16:02:28 2003 From: joneil at cobaltgroup.com (O'neil, Jerome) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. Message-ID: > Naturally, the concepts are all we really need (TIMTOWTDI). I'd RNDIAA (Rather Not Do It At All) if its ABD (Already Been Done). Common problems shouldn't be solved over and over again. It's fine as an academic exercise, but I don't have time for that. If someone's got a wheel, I'd much rather use that than spend time inventing one of my own. Can we expect ~damian/bin soonerish, rather than laterish? -Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20030121/84e88e36/attachment.htm From andrew at sweger.net Tue Jan 21 16:19:58 2003 From: andrew at sweger.net (Andrew Sweger) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: Message-ID: On Tue, 21 Jan 2003, O'neil, Jerome wrote: > I'd RNDIAA (Rather Not Do It At All) if its ABD (Already Been Done). Sometimes it becomes a matter of scale. Small tricks and tools like those presented by Damian last week are so small and particular to the individual, it's usually more important that the user have an intimate understanding of those tricks and shortcuts. Granted, taking someone else's shortcut as a starting point will help a good deal. Especially when one is not familiar with the means available. Who wants to spend all their time reading all the man pages to squeeze every last trick out of their shell or editor? (But I do recommend to everyone, especially those just getting started, to pick a man page at random every day and at least skim it. Don't study it, just throw it at your brain. Something will stick. Over time it will start to gel, exponentially. Some people tell me this just won't work for them. But I'm not sure they've actually tried it.) > Can we expect ~damian/bin soonerish, rather than laterish? One never knows with Damian. Getting Damian's ~/bin is less important to me than just letting Damian work on whatever he feels is important. He's been a much better judge of priorities for Perl than I'll ever be. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From Marc.M.Adkins at Doorways.org Tue Jan 21 17:36:39 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: Message-ID: > (But I do recommend to everyone, especially those just getting started, to > pick a man page at random every day and at least skim it. Don't study it, > just throw it at your brain. Something will stick. Over time it will start > to gel, exponentially. Some people tell me this just won't work for them. > But I'm not sure they've actually tried it.) I remember the days of interminably long compilations. I used the dead time to read manuals. Instead of playing solitaire or whatever. I learned a lot. Now compilations happen faster (or not at all in the case of Perl). I don't learn nearly so much. Ah, well, that's progress for you. mma From MichaelRunningWolf at att.net Tue Jan 21 18:34:51 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: References: Message-ID: Andrew Sweger writes: > On Tue, 21 Jan 2003, O'neil, Jerome wrote: > > > I'd RNDIAA (Rather Not Do It At All) if its ABD (Already Been Done). > > Sometimes it becomes a matter of scale. Small tricks and tools like those > presented by Damian last week are so small and particular to the > individual, it's usually more important that the user have an intimate > understanding of those tricks and shortcuts. Agreed. Seeing Damain's SW environment reminded me of my father's HW environment. He's a mechanical engineer by trade. He's got his shop set up a certain way. And he's got his computer set up a certain way. It took him years until he even *got* a computer. Before that, he had his drafting board set up a certain way. I liked that Damian closed his talk with a physical world analogy. When my dad sits at his computer, the graphic table, its pen, the screen and the chair are all set for *him*. I can get a bit of work done at his computer, but it's his setup. It's not so streamlined for me. Of course, I eventually get all the same things set up around *my* computer, but I like my pens in a different place, and my keyboard at a different angle, and the presets on my internet radio are all different. It's a personal thing. I do see the other side of this discussion, but let's not loose the balance that both sides bring, else we'll be trimming the ham before cooking it because our parents did, without realizing that they had a smaller pan than we do. [...] > One never knows with Damian. Getting Damian's ~/bin is less important to > me than just letting Damian work on whatever he feels is important. He's > been a much better judge of priorities for Perl than I'll ever be. To use another physical world analogy, I was talking with a master Perl programmer recently who has started doing some blacksmith work. (I had to laugh -- m/(source|metal)forge/....) He talked about some of the tricks that the blacksmith used. They were not anything magic, but the Perl guy didn't know them. He learned them. And was learning more. But it took working in the metal and under a master to pick some up. He learned by putting his body (and brain) through the process of producing a product. To get zen about it -- when the student was ready, the teacher appeared. I think there's a lot to learn by working with someone, or at least within their physical vicinity. Maybe that's a part of what works about cubicles and pair-wise programming. (I certainly do understand what doesn't work about cubicles. No need to start another thread.) In some respects, telecommuting is a detrement to our professions' state of the art and state of the practice. Generations of workers in other professions learned skills in an apprentice program, formal or not. The best practices just naturally flowed from one generation to the next, effortlessly, implicitly. We have to explicitly train ourselves with much effort. And we miss a lot. We only get the high points, the points that are conscious. Damian is good at bringing the unconscious to the foreground, to make them high points. But so much about artistry and mastry is unconscious, and therefore misses the opportunity to be shared among us all, in an ever-flowing exchange. IMHO, Michael Wolf P.S. Do you hear the seeds of another PUUP (Perl Users Using Perl) session? It's on my stack. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Tue Jan 21 18:36:42 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. In-Reply-To: References: Message-ID: "Marc M. Adkins" writes: > > (But I do recommend to everyone, especially those just getting started, to > > pick a man page at random every day and at least skim it. Don't study it, > > just throw it at your brain. Something will stick. Over time it will start > > to gel, exponentially. Some people tell me this just won't work for them. > > But I'm not sure they've actually tried it.) > > I remember the days of interminably long compilations. I used the dead time > to read manuals. Instead of playing solitaire or whatever. I learned a > lot. Now compilations happen faster (or not at all in the case of Perl). I > don't learn nearly so much. Ah, well, that's progress for you. Don't just do something. Sit there!!!! -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From adamm at wazamatta.com Wed Jan 22 01:05:35 2003 From: adamm at wazamatta.com (Adam Monsen) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. [Offtopic] In-Reply-To: References: Message-ID: <3E2E42BF.5070501@wazamatta.com> Geoffrey & Kristin Grosenbach wrote: [...] > # .cshrc > alias cd 'cd \!*; ls' This is a great... every time I cd into a directory I of course type ls. Any idea how to get it to work in bash? I tried this: # .bashrc alias cd='cd $*; ls' Unfortunately, bash doesn't execute the 'cd', my guess is to avoid infinite recursion. [...] -- Adam Monsen From djames at serv.net Wed Jan 22 01:25:53 2003 From: djames at serv.net (Daniel James) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. [Offtopic] In-Reply-To: <3E2E42BF.5070501@wazamatta.com>; from Adam Monsen on Tue, Jan 21, 2003 at 11:05:35PM -0800 References: <3E2E42BF.5070501@wazamatta.com> Message-ID: <20030121232553.A35069@itchy.serv.net> On Tue, Jan 21, 2003 at 11:05:35PM -0800, Adam Monsen wrote: > # .bashrc > alias cd='cd $*; ls' > > Unfortunately, bash doesn't execute the 'cd', my guess is to avoid > infinite recursion. Seems to me it's executing it, but it seems to be executing in a child shell so it returns you back to the parent's directory. This works though # .bashrc cwd(){ cd $* ls } You have to get used to typing cwd though; if you name your function "cd" then you will get an infinite loop--someone here may know how to get around your alias problem though. From jmates at sial.org Wed Jan 22 01:44:52 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: ~damian/bin scripts. [moreso Offtopic] In-Reply-To: <20030121232553.A35069@itchy.serv.net> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> Message-ID: <20030122074452.GK19808@darkness.sial.org> * Daniel James > You have to get used to typing cwd though; if you name your function > "cd" then you will get an infinite loop--someone here may know how to > get around your alias problem though. cd(){ builtin cd $* ls } From spug at ifokr.org Wed Jan 22 01:45:21 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:~damian/bin scripts. Message-ID: <20030122074521.GL3876@ifokr.org> Regarding the 'infinite loops' with cd, IIRC you can prefix a builtin command with 'builtin' to force it, as opposed to the alias/function, etc, thus you could use cd () { builtin cd $1 # do other things here as desired } Note that 'builtin' is not available in vanilla sh, but is in bash/ksh/zsh and probably more. I don't know if anyone besides me worries about that level of portability anymore... -- Brian Hatch Why is it if you cut off a piece Systems and of a chromosome you get a boy, Security Engineer but if you cut off a piece of a http://www.ifokr.org/bri/ boy you get a girl? Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030121/ba9dfab0/attachment.bin From kirbyk at idiom.com Wed Jan 22 02:31:06 2003 From: kirbyk at idiom.com (Kirby Krueger) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? Message-ID: I'm poking around various different Content Management packages, mostly just for fun at this point. There's a lot of them: Slashcode, squishdot, scoop, phpnuke, postnuke, everything, and many more. As a perl programmer, I tend to gravitate towards perl implementations, though there's some pretty strong support for phpnuke and postnuke to be the easiest to install and use. Postnuke certainly seems to have the strongest community support at first glance, judging from the massive number of plugin modules on their website. (This is a plus: think CPAN.) Any of you have any experience with these things? Recommendations, cautionary tales, and the like? -- Kirby From dan at concolor.org Wed Jan 22 03:37:25 2003 From: dan at concolor.org (Dan Sabath) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: Message-ID: <1D4B2255-2DED-11D7-BA85-000393A6CEB6@concolor.org> I put together a listing of portals about a year ago. I haven't kept it up to date but you may gain some insight as to what's out there. http://home.concolor.org/portals/. If you have any to add I'd be glad to list them. I have used PHPNuke and would categorically disregard it and any derivatives other than PostNuke. I understand PostNuke did a complete rewrite of the PHPNuke code which was absolutely necessary. In my experience with open source, the more a project is forked, the higher the chance that something is wrong with either the management or the code. PHPNuke has both and as a result has been forked many times. I even had to fork to code in order to get it to work for me and I'm still having to deal with problems arising from that decision. Just my 0.02$. -dan On Wednesday, Jan 22, 2003, at 00:31 US/Pacific, Kirby Krueger wrote: > I'm poking around various different Content Management packages, > mostly just > for fun at this point. There's a lot of them: Slashcode, squishdot, > scoop, > phpnuke, postnuke, everything, and many more. > > As a perl programmer, I tend to gravitate towards perl implementations, > though there's some pretty strong support for phpnuke and postnuke to > be the > easiest to install and use. Postnuke certainly seems to have the > strongest > community support at first glance, judging from the massive number of > plugin > modules on their website. (This is a plus: think CPAN.) > > Any of you have any experience with these things? Recommendations, > cautionary tales, and the like? > > -- Kirby From aaron at activox.com Wed Jan 22 07:44:34 2003 From: aaron at activox.com (Aaron Salo) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: Message-ID: <3.0.5.32.20030122054434.015561c0@mail.activox.com> I have yet to exploit the full potential of Bricolage http://www.bricolage.cc but it is a robust package based running mod_perl on PostgreSQL and pushing through HTML::Mason or HTML::Template as you prefer. Mature UIs, a nice setup, more than you'd expect. Feature set is overkill for small tasks or tiny-team CMS needs, but it's worth a look for moderate to large sites with a lot of content updating. It was developed to run salon.com (a magazine site, think lots of articles published daily, workflow and approval, publishing metaphors in the UI, etc). A weakness is sparse (IMHO) documentation, it took quite a while of trial and error and perldoc'ing the source code to get up and running, novice users participating in a CMS flow would require significant training to join the fun. On the other end of the spectrum (think a couple of people at your client that know nothing about web stuff and just know MS Office that want to manage the static content areas of a site), Macromedia just released a product called Contribute. Contribute lets novices manage their own site content and includes multi-version rollback, granular privileges, and etc, and doesn't butcher page source code or require freakish MS security holes euphemistically called "extensions" to run on your server. I am impressed with how well it serves this niche, it's not quite a piece of heinous crap like MS Fu*$edPage and for less than a hundred bucks a seat it's a good solution for the low end of the market. I am intrigued by some of the blogging products too. They handle the gist of many CMS needs, that being easy web-based interfaces to add content to a web site. Most customers that OMG I HAVE TO HAVE A CMS really mean hey, every once in a while I want to add a news article, a press release, a job vacancy, or an upcoming event to my calendar. Enjoy~ aaron At 12:31 AM 1/22/2003 -0800, Kirby Krueger wrote: >Any of you have any experience with these things? Recommendations, >cautionary tales, and the like? From alan at ufies.org Wed Jan 22 11:01:56 2003 From: alan at ufies.org (Alan) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: <3.0.5.32.20030122054434.015561c0@mail.activox.com> References: <3.0.5.32.20030122054434.015561c0@mail.activox.com> Message-ID: <20030122170156.GB1927@ufies.org> On Wed, Jan 22, 2003 at 05:44:34AM -0800, Aaron Salo wrote: > I have yet to exploit the full potential of Bricolage > > http://www.bricolage.cc [snip] Depending on the size of your project, that seems a bit over the top :) I suppose it depends on your users as well. A geek could handle a product like that relatively easily, but I doubt that your average "I just want to edit my own web pages" type person could. > > I am intrigued by some of the blogging products too. They handle the gist > of many CMS needs, that being easy web-based interfaces to add content to a > web site. Most customers that OMG I HAVE TO HAVE A CMS really mean hey, > every once in a while I want to add a news article, a press release, a job > vacancy, or an upcoming event to my calendar. Yup, exactly. I have a friend who users movabletype (www.movabletype.org) for his online magazine (www.nasty.cx), which despite the domain name, is safe for work :) For a contract a few months ago I was contracted to solve the problem of "we want to update things now and then", and ended up rolling my own mod_perl+mysql solution. It works pretty well IMHO, handles menus, image and file uploads, user authentication, etc. It's a completely custom solution though, built for the specs of those users. Depending on who/what you are looking for this for, this might be a solution, and fun coding at the same time :) Regards, Alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) From law at acm.org Wed Jan 22 13:37:52 2003 From: law at acm.org (lynn wilkins) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: <1D4B2255-2DED-11D7-BA85-000393A6CEB6@concolor.org> References: <1D4B2255-2DED-11D7-BA85-000393A6CEB6@concolor.org> Message-ID: <03012211375200.16866@maggie> Dan said -- I put together a listing of portals about a year ago. I haven't kept it up to date but you may gain some insight as to what's out there. http://home.concolor.org/portals/. If you have any to add I'd be glad to list them. -- Would Zope, Zope products (written in Perl, Python) also fit into Dan's list? -law From MichaelRunningWolf at att.net Wed Jan 22 17:08:03 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: don't recurse on alias expansion [was Re: SPUG:Re: ~damian/bin scripts. [moreso Offtopic]] In-Reply-To: <20030122074452.GK19808@darkness.sial.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> Message-ID: Jeremy Mates writes: > * Daniel James > > You have to get used to typing cwd though; if you name your function > > "cd" then you will get an infinite loop--someone here may know how to > > get around your alias problem though. > > cd(){ > builtin cd $* > ls > } Korn shell does it by quoting the name. Any quoting mechanism (single, double, backslash) on the name prevents alias substitution. That's the idea. Since I don't have a ksh handy, I haven't tested this. alias cd='\cd "$@" && ls' I also like putting in the && short-circuit test. What if the cd doesn't succeed? Another way to make it work (for non-built-ins) would be to use an absolute path name, though this isn't as portable across different machines. Aliases aren't expanded for names that look like absolute paths. alias ls='/bin/ls $LS_FLAGS "$@"' -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From glyph at mac.com Wed Jan 22 20:38:07 2003 From: glyph at mac.com (Geoffrey & Kristin Grosenbach) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: Python and Doxygen In-Reply-To: <200301200939.38242.jgardn@alumni.washington.edu> Message-ID: > Python even comes with a command to load a module and assemble all the > doc > strings from all the objects into something neat -- much like C++ and > doxygen. Compare this with having to assemble the documentation from > scratch > with perldoc. This saves a lot of typing if you want to go in later and > add > or clean up the documentation. You won't have to write out the > parameters to > the function, the base classes of your class, or anything like that. It is downright embarrassing that Perl claims to be the mother of all parsing languages, and yet cannot come up with a decent way to parse it's own code (yes, I know this is part of the purpose of Perl6). I've worked with doxygen and JavaDoc, and I would greatly benefit from such a system for Perl. In fact, I was talking with Tim about this at Colin's party. At minimum, it would be a script that would go through existing Perl code and build up POD sections for each function. At another level, it could look for function declarations and use those to make more thorough documentation. This gets a little fuzzy since all we really have is sub foo($$;\@) which most people never use. Damian mentioned a style that I use, namely sub foo { my ($param1, $param2, @param3) = @_; } which would be fully sufficient for a parser. The result would be =head2 foo ($param1, $param2, @param3) Your comments go here. =cut sub foo { ... I have a basic skeleton that does this, but I plan to refine it a bit more after I become unemployed at the end of next week! I'll post it to the list when I do. But is this all that's required? We already have pod2html that builds hyperlinked documentation, though it would be nice to have a system that would build a meta-table of contents for multiple modules/classes (like JavaDoc). I've looked a little, but haven't seen anything that does this. From aaron at activox.com Thu Jan 23 00:04:51 2003 From: aaron at activox.com (Aaron Salo) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: <20030122170156.GB1927@ufies.org> References: <3.0.5.32.20030122054434.015561c0@mail.activox.com> <3.0.5.32.20030122054434.015561c0@mail.activox.com> Message-ID: <3.0.5.32.20030122220451.010ab910@mail.activox.com> At 09:01 AM 1/22/2003 -0800, Alan wrote: >Depending on the size of your project, that seems a bit over the top :) Indeed. Bricolage is an enterprise level CMS that is aimed at a publishing metaphor. I mentioned it because I was very impressed with the depth and maturity of the product, hooray for open source and all that. Specially when people are dropping a quarter mil for Interwoven or Stellent or Vignette, it's really almost in that league. But yes, totally overkill for Aunt Martha's Knitting School. >For a contract a few months ago I was contracted to solve the problem of >"we want to update things now and then", and ended up rolling my own >mod_perl+mysql solution. It works pretty well IMHO, handles menus, >image and file uploads, user authentication, etc. It's a completely >custom solution though, built for the specs of those users. Depending >on who/what you are looking for this for, this might be a solution, and >fun coding at the same time :) The custom "one off" thing is the productivity killer in this space. Raise your hand if you've ever built a proprietary CMS or something that behaves like one...I have, literally dozens and dozens of "one off to spec" jobs. Ones that keep data in XML structures. Ones that allow minutae like specifying the META strings for given pages in a database. Ones you can point at a web site and will fetch raw page source using LWP and present it for editing. And on and on. The whole CMS thing is really a conundrum. Some people really want an admin system to manage data in an underlying database to keep their job openings or press releases current, I'm happy to give em that. Far as editing pages, the UI thing is a supreme hassle if you get down to the editing pages level, because no matter how pretty you make the UI, you're still pasting text into textarea boxes and people bitch about having to know some HTML. Take out the HTML and people want it back in. Break paragraphs and images and the like into component objects and allow them to be moved around, you'd think THAT would be cool, then people bitch because it's too much work to do all that clicking. Novice users expect it to work like MS Office, they think they can drag n drop that word doc onto an icon and have it spring to life in the site, highlight this and press to bold it, yada yada, thus the ubsequious MS F'edPage and its ilk. There is no one size fits all solution. For the low end, I think I abandon that space the same way I abandoned writing custom search engines and threaded message boards and the like. I usually defer to desktop app stuff like the previously mentioned (and promising based on my test drive) Macromedia Contribute. For what it costs a client to buy four seat licenses they couldn't hire me for a day to do something custom. They can pay me to do the other stuff where I can deliver more value and use a desktop app to maintain their static content. Client happy. I'm happy. In the midrange, I've built a framework that handles auth and granular access control based on a privilege model (Dave can do THIS but not THAT or THAT, Bob can do everything except THIS) and some modules that layer atop it to do common stuff like calendaring, job postings, press releases, polls, etc. Easy to customize and the code base is maturing. When a client wants a new widget, I build it to plug in to this framework and then I have one more widget to offer in the future. I even laid down a CMS on it recently but the CMS component was, alas, yet another one off custom job. On the high end, I'm really trying hard to like Bricolage. Mason I wrestled with a couple times and the teaching/learning curve was too dense to roll it out, non-ubergeeks would just glaze over and drool would come out of them. Similar experience with Zope. Sorry for the narrative, but the whole CMS thing is something that just begs for a killer app. And IMHO none exists. WebDAV has a lot of promise as a conduit to handle the transport but most of the stuff I've looked at is still Wright Brothers rather than Boeing. Cheers aaron From alan at ufies.org Thu Jan 23 01:11:21 2003 From: alan at ufies.org (Alan) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Content Management software: opinions? In-Reply-To: <3.0.5.32.20030122220451.010ab910@mail.activox.com> References: <3.0.5.32.20030122054434.015561c0@mail.activox.com> <3.0.5.32.20030122054434.015561c0@mail.activox.com> <3.0.5.32.20030122220451.010ab910@mail.activox.com> Message-ID: <20030123071121.GB15463@ufies.org> On Wed, Jan 22, 2003 at 10:04:51PM -0800, Aaron Salo wrote: > Novice users expect it to work like MS Office, they think they can drag n > drop that word doc onto an icon and have it spring to life in the site, > highlight this and press to bold it, yada yada, thus the > ubsequious MS F'edPage and its ilk. There is no one size fits all solution. I hate to say it, but this is why things like MSOffice and Frontpage exist, and do well, because they let you say "just point frontpage to this url and then edit this file", they get a WYSIKWYGBSS (what you see is kinda what you get but still sucks) system where they can paste their word doc txt into the document, edit it just like in word, have all the nifty stuff like spell check, etc. Or the sysadmin just says "save the press release as html and put it on //foo/shared/web/press-releases, and they do, and it works, mostly. A splendid example of this looking horrible is the gym up the road for me's site www.vrcfitness.ca - looks fine in IE, but in anything else, forget it. View source and you see that it's an Office page saved as HTML... (or is that HTM?). *sigh* Maybe someone should develop an app/protocol/system based on webdav or whatever to do this under linux, and allow publishing from OOo, abiword, etc. I guess you could say that mozilla composer does this, but... Anyway, enough, more beer, less typing! alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) From slagel at geospiza.com Thu Jan 23 12:45:53 2003 From: slagel at geospiza.com (Joe Slagel) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: Python and Doxygen References: Message-ID: <3E303861.4F9AA4AF@geospiza.com> Geoffrey & Kristin Grosenbach wrote: > > Python even comes with a command to load a module and assemble all the > > doc > > strings from all the objects into something neat -- much like C++ and > > doxygen. Compare this with having to assemble the documentation from > > scratch > > with perldoc. This saves a lot of typing if you want to go in later and > > add > > or clean up the documentation. You won't have to write out the > > parameters to > > the function, the base classes of your class, or anything like that. > > It is downright embarrassing that Perl claims to be the mother of all > parsing languages, and yet cannot come up with a decent way to parse > it's own code (yes, I know this is part of the purpose of Perl6). I've > worked with doxygen and JavaDoc, and I would greatly benefit from such a > system for Perl. In fact, I was talking with Tim about this at Colin's > party. Here at Geospiza, I have the same philosphy and problem with perl. We've actually had someone working on developing something for ourselves, but we've really been thinking about open sourcing it. The program we're working on understands the difference between perl classes and cgi scripts, uses a javadoc like style instead of POD, can output POD to use all of the pod2* utilities, and does introspection on the class. This tool isn't quite finished yet, but if we can get some help on it we'll release it. Another alternative is to use pdoc (http://pdoc.sourceforge.net/). -- Joe Slagel Geospiza, Inc. 3411 Thorndyke Ave, Seattle WA 98119 (206) 633-4403 slagel@geospiza.com From MichaelRunningWolf at att.net Thu Jan 23 13:41:24 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Damian Conway at PDX PM next Tue, Jan 28 In-Reply-To: <20030122223712.GF10086@eli.net> References: <20030122223712.GF10086@eli.net> Message-ID: Damian Conway is giving his Quantum::Superpositions talk next Tuesday in Portland, OR. This is the same title of the talk he gave last July in Seattle. If you havent't seen it, and are interested, please send email to Joshua Keroes He's looking for a head count. And if you'd like to head down, please post a follow-up for "ride offered" or "ride wanted" so that the road trip will be a networking experience. ================================================================ Joshua Keroes writes: > Damian Conway on Quantum::Superpositions > Tue 28 Jan 2003, 7-9PM > OGI, Bldg #3, Wilson Clark Center Dining Room > http://www.ogi.edu/maps/ > > Damian is, simply put, a rock star. Other people have to pay to > see him speak, you get to see him *FREE*. > > The talk explains how to adapt the Perl programming language to > quantum computing and vice versa, with applications for prime > generation, list membership testing, maxima and minima detection, > string comparison, and winning the office football pool, all in > constant time without loops or recursion. > > Along the way, we'll also touch on the physics of chocolate, > parallel programming, motor racing, the Scottish vegan movement, > ancient Latin, Mick Jagger's love life, winter sports, the secret > of the humble potato, fashion modelling, anagrammatic encryption, > modern German, cruelty to animals, and the antics of the 1930's > chapter of Copenhagen.pm. > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Thu Jan 23 19:33:28 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: don't recurse on alias expansion In-Reply-To: <20030122233428.GL19808@darkness.sial.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> Message-ID: Jeremy Mates writes: > * Michael R. Wolf > > Korn shell does it by quoting the name. Any quoting mechanism > > (single, double, backslash) on the name prevents alias substitution. > > That's the idea. Since I don't have a ksh handy, I haven't tested > > this. > > > > alias cd='\cd "$@" && ls' > > Goes wonky for me with the public domain ksh that ships with > OpenBSD; appeared to be working for a bit, but fails in unexpected > and strange ways. Would it be "Breakfast Club" that has me ask "Can you describe the strange and unexpected ways?"? -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From tim at consultix-inc.com Thu Jan 23 19:20:03 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:PDF concatenation tool? Message-ID: <20030123172003.A2004@timji.consultix-inc.com> Does anybody know of a utility that will concatenate individual files in PDF format into a single resulting PDF file? I've looked on CPAN, but can't find any module that seems to provide this functionality. -Tim *-----------------------------------------------------------* | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com | *-----------------------------------------------------------* From tim at consultix-inc.com Thu Jan 23 19:37:35 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> Message-ID: <20030123173735.A2090@timji.consultix-inc.com> On Thu, Jan 23, 2003 at 05:33:28PM -0800, Michael R. Wolf wrote: > Jeremy Mates writes: > > > * Michael R. Wolf > > > Korn shell does it by quoting the name. Any quoting mechanism > > > (single, double, backslash) on the name prevents alias substitution. > > > That's the idea. Since I don't have a ksh handy, I haven't tested > > > this. > > > > > > alias cd='\cd "$@" && ls' > > > > Goes wonky for me with the public domain ksh that ships with > > OpenBSD; appeared to be working for a bit, but fails in unexpected > > and strange ways. There's no reason to use the crappy PD-ksh that ships with the free UNIX-like systems (unless it's improved drastically in the past 18 months, since I last rejected it). That's because for years now, you've been able to get the real Kornshell for free from the AT&T research web site. I recommend downloading the binary-only version, because the source-code distribution has the weirdest installation procedure ever devised by man, and anybody having experience with conventional installation techniques will undoubtedly foul it up. Click on "ksh - standalone AT&T ksh executable" at http://www.research.att.com/sw/download/ You won't get the man page with it, but that's available at kornshell.org (look for the ksh93 manual page; yep, that's the latest *major* version, apart from some newer GUI-friendly variants). -Tim *------------------------------------------------------------* | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Ask about on-site classes on Perl, UNIX, & Linux topics! | *------------------------------------------------------------* From ben at reser.org Thu Jan 23 21:13:14 2003 From: ben at reser.org (Ben Reser) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:PDF concatenation tool? In-Reply-To: <20030123172003.A2004@timji.consultix-inc.com> References: <20030123172003.A2004@timji.consultix-inc.com> Message-ID: <20030124031314.GO13064@occipital.brain.org> On Thu, Jan 23, 2003 at 05:20:03PM -0800, Tim Maher wrote: > Does anybody know of a utility that will concatenate > individual files in PDF format into a single resulting > PDF file? > > I've looked on CPAN, but can't find any module that seems to > provide this functionality. Just use ghostscript... gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf file1.pdf file2.pdf ... -- Ben Reser http://ben.reser.org "America does not go abroad in search of monsters to destroy. She is the well-wisher to the freedom and independence of all. She is the champion only of her own." -- John Quincy Adams, July 4th, 1821 From spug at ifokr.org Thu Jan 23 21:26:39 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030123173735.A2090@timji.consultix-inc.com> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> Message-ID: <20030124032639.GO6124@ifokr.org> > > > > alias cd='\cd "$@" && ls' > > > > > > Goes wonky for me with the public domain ksh that ships with > > > OpenBSD; appeared to be working for a bit, but fails in unexpected > > > and strange ways. Works fine for me with PD KSH 5.2.14 99/07/13.2 > There's no reason to use the crappy PD-ksh that ships with the free > UNIX-like systems (unless it's improved drastically in the past 18 > months, since I last rejected it). That's because for years now, > you've been able to get the real Kornshell for free from the AT&T > research web site. What has pdksh not done correctly for you? I haven't had a problem with it ever. Now the question, why don't I use bash since bash does everything korn shell does and more? Well, because bash does too much your linux distro is likely to have lots of customizations for bash which differ from distro to distro I want a completely 'pure' environment to start with. None of this 'alias rm="rm -i"' crap. That's why I don't use bash. But having had no problems with pdksh, I don't see any reason to go out and compile at&t's version when my distro already comes with pdksh. -- Brian Hatch Smith & Wesson: Systems and The original Security Engineer Point and Click http://www.ifokr.org/bri/ device. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030123/86aa603d/attachment.bin From dan at concolor.org Thu Jan 23 21:37:55 2003 From: dan at concolor.org (Dan Sabath) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:PDF concatenation tool? Message-ID: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> I'm curious if there is a reason that the reply-to header is not set. I accidentally sent this privately to Tim rather than to the list. -dan Begin forwarded message: > From: Dan Sabath > Date: Thu Jan 23, 2003 19:32:01 US/Pacific > To: Tim Maher > Subject: Re: SPUG:PDF concatenation tool? > > Tim, > > It appears that texexec might do what you are looking for. > specifically as outlined here: > http://www.tug.org/pipermail/pdftex/2001-January/000254.html > You can find texexec here: > http://www.pragma-ade.com/texexec.htm > > > This will also probably work, but the licensing is not clear. Some > cases allow free usage. > http://www.pdflib.com/pdflib/index.html > > There is a windows freeware program which claims to be able to do this > at: > www.northlandpublishing.net/append.zip > > -dan > > On Thursday, Jan 23, 2003, at 17:20 US/Pacific, Tim Maher wrote: > >> Does anybody know of a utility that will concatenate >> individual files in PDF format into a single resulting >> PDF file? >> >> I've looked on CPAN, but can't find any module that seems to >> provide this functionality. >> >> -Tim >> *-----------------------------------------------------------* >> | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | >> | CEO, JAWCAR ("Just Another White Camel Award Recipient") | >> | tim@consultix-inc.com teachmeunix.com teachmeperl.com | >> *-----------------------------------------------------------* >> _____________________________________________________________ >> Seattle Perl Users Group Mailing List >> POST TO: spug-list@mail.pm.org >> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list >> MEETINGS: 3rd Tuesdays, U-District, Seattle WA >> WEB PAGE: www.seattleperl.org >> >> > From tim at consultix-inc.com Thu Jan 23 21:50:49 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:PDF concatenation tool? In-Reply-To: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> References: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> Message-ID: <20030123195049.B3446@timji.consultix-inc.com> On Thu, Jan 23, 2003 at 07:37:55PM -0800, Dan Sabath wrote: > I'm curious if there is a reason that the reply-to header is not set. I > accidentally sent this privately to Tim rather than to the list. > -dan That proves that the Reply-to header is set excatly the way we like it; so that you reply to the poster by default, rather than automatically including the entire list membership (over 400 people). -Tim *------------------------------------------------------------* | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Ask about on-site classes on Perl, UNIX, & Linux topics! | *------------------------------------------------------------* From bill at celestial.com Thu Jan 23 22:16:38 2003 From: bill at celestial.com (Bill Campbell) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030124032639.GO6124@ifokr.org>; from spug@ifokr.org on Thu, Jan 23, 2003 at 07:26:39PM -0800 References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> Message-ID: <20030123201637.A26339@barryg.mi.celestial.com> On Thu, Jan 23, 2003 at 07:26:39PM -0800, Brian Hatch wrote: ... >Now the question, why don't I use bash since bash does everything >korn shell does and more? Well, because > > bash does too much > your linux distro is likely to have lots of > customizations for bash which differ from > distro to distro > I want a completely 'pure' environment to start > with. None of this 'alias rm="rm -i"' crap. Add to that a good ``vi'' mode (bash's tends to do strange things), and simple repeating of previous commands using ``r [prefix]''. The latter is the most important to me since I find it much easier to repeat previous command by hitting ``r'' than the similar ``!'' repeat in bash and the csh'ish shells. I don't really like to have to do anything if there's an easier way. Unfortunately I find even ksh gets polluted by vendor's profiles so mine has a bunch of ``unalias'' commands at the top. The most obnoxious, of these I find to be SuSE 8.1's ``which'' which returns something like ``sylpheed is /usr/local/bin/sylpheed'' instead of just the plain path which of course it totally worthless in a script. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ ``Now if there is one thing that we do worse than any other nation, it is try and manage somebody else's affairs.'' Will Rogers From spug at ifokr.org Thu Jan 23 22:25:25 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:PDF concatenation tool? In-Reply-To: <20030123195049.B3446@timji.consultix-inc.com> References: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> <20030123195049.B3446@timji.consultix-inc.com> Message-ID: <20030124042525.GP6124@ifokr.org> > > I'm curious if there is a reason that the reply-to header is not set. I > > accidentally sent this privately to Tim rather than to the list. > > -dan > > That proves that the Reply-to header is set excatly the way we like it; > so that you reply to the poster by default, rather than automatically > including the entire list membership (over 400 people). This is a subject of much debate. To set or not? Google for 'reply-to munging harmful' and 'reply-to munging helpful' to see the arguments for and against. (My opinion: reply-to munging harmful.) -- Brian Hatch "I thought the purpose of filing Systems and these reports was to provide Security Engineer accurate intelligence." http://www.ifokr.org/bri/ "Vir, intelligence has nothing to do with politics." Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030123/167965e7/attachment.bin From moonbeam at catmanor.com Thu Jan 23 22:55:26 2003 From: moonbeam at catmanor.com (William Julien) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh Message-ID: <200301240455.h0O4tQE10874@catmanor.com> > >I recommend downloading the binary-only version, because the >source-code distribution has the weirdest installation procedure >ever devised by man, and anybody having experience with conventional >installation techniques will undoubtedly foul it up. > >Click on "ksh - standalone AT&T ksh executable" at >http://www.research.att.com/sw/download/ I'm a big korn shell fan. I found that the installation can be very simple by just putting ksh into /bin and edit the /etc/shells. All the other stuff isn't necessary. By the way, my .kshrc it contains: PS1="-->" # # terminal and title bar status (interactive only) # case $- in *i*) if [ `whence _cd | wc -l` -eq 0 ]; then function _cd { cd "$@" /bin/echo -n "^[]2;$HOST:$PWD^G^[]1;$HOST^G" } alias cd=_cd cd `pwd` fi export TERM=xterm esac The ^[ is an escape character and ^G is CTRL-G. This puts the path in the xterm title bar and keeps my prompt a nice constant "-->". --- William Julien _,'| _.-''``-...___..--'; moonbeam@catmanor.com /, \'. _..-' , ,--...--''' vi is my shepherd; < \ .`--''' ` /| i shall not font. `-,;' ; ; ; __...--'' __...--_..' .;.' (,__....----''' (,..--'' perl -e '( $ ,, $ ")=("a".."z")[0,-1]; print "sh", $ ","m\n";;";;"' From jmates at sial.org Thu Jan 23 23:15:51 2003 From: jmates at sial.org (Jeremy Mates) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030124032639.GO6124@ifokr.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> Message-ID: <20030124051551.GB60659@darkness.sial.org> * Brian Hatch > Works fine for me with PD KSH 5.2.14 99/07/13.2 Interesting. My test results, since folks appear to doubt the veracity of my claim that ksh goes "wonky" with the alias definition in question. Our first contestant is a just-recently-installed Sun Ultra Sparc running OpenBSD 3.2-stable as of 2003-01-21. $ uname -a OpenBSD akira.gs.washington.edu 3.2 GENERIC#0 sparc64 $ echo $KSH_VERSION @(#)PD KSH v5.2.14 99/07/13.2 $ alias cd='\cd "$@" && ls' $ mkdir a b $ cd nosuchdir ls: nosuchdir: No such file or directory Error from ls, not cd. Funny. Okay, I can live with that. $ cd a $ cd ../ jmates Uh oh, that should have been "a b", not my home directory. $ cd b $ cd ../a ls: ../a: No such file or directory $ pwd /home/jmates Does too exist, and I'm in $HOME instead of $HOME/b. $ cd /tmp ssh-AbH31365 $ cd - ls: -: No such file or directory Hey! I like using -! $ pwd /home/jmates $ ls a b $ cd a $ pwd /home/jmates Nothing listed, and I am still in $HOME. Close enough to "wonky" to deserver the "strange and unexpected" label. But wait, you say! .. It's OpenBSD! .. On a Sun Ultra Sparc! .. Running pdksh! .. in an Educational Institute! A few blocks away is a production FreeBSD box, unaffiliated with any Educational Institutes. FreeBSD has a nifty ports system containing both pdksh and ksh. Let's install those, and see how they fare. $ uname -a FreeBSD darkness.sial.org 4.7-STABLE FreeBSD 4.7-STABLE #2: Sat Nov 16 10:08:05 PST 2002 root@darkness.sial.org:/usr/obj/usr/src/sys/SIAL i386 $ echo $KSH_VERSION @(#)PD KSH v5.2.14.2 99/07/13.2 $ alias cd='\cd "$@" && ls' $ mkdir a b $ cd a $ pwd /sial/home/jmates Okay, it doesn't look like an OpenBSD thing: perhaps pdksh is to blame? Let's try ksh93. $ echo $KSH_VERSION $ grep VERSION /usr/ports/shells/ksh93/Makefile PORTVERSION= ${VERSION:S/-//g} VERSION= 2002-12-21 DISTNAME= ${PORTNAME}-${VERSION} DISTFILES= INIT.${VERSION}.tgz ast-ksh.${VERSION}.tgz $ alias cd='\cd "$@" && ls' $ cd a $ pwd /sial/home/jmates Nope, same as pdksh. Systrace of pdksh on OpenBSD shows ls getting called with the argument, which might be an interesting line of research into shell oddities. Or maybe *ksh and *BSD are at odds? Who knows... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030123/dc2ee150/attachment.bin From spug at ifokr.org Thu Jan 23 23:20:36 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <200301240455.h0O4tQE10874@catmanor.com> References: <200301240455.h0O4tQE10874@catmanor.com> Message-ID: <20030124052036.GQ6124@ifokr.org> > By the way, my .kshrc it contains: > > PS1="-->" me: PS1= machine=`hostname |awk -F. '{print $1}'` me=`whoami` if [ -w / ] ; then PS1=$me@${machine}:'$PWD'' # ' #remove dot from path export PATH=`echo $PATH | sed -e 's/:\.$//g'` else export PATH PS1=$me@${machine}:'$PWD'' $ ' fi unset me machine Yields username@host:/the/current/path $ or root@host:/the/current/path # which is excellently suited for cut/paste when doing 'scp's and such. Having a two line prompt also means you can have an entire screen width for your command, and still see where you are. > The ^[ is an escape character and ^G is CTRL-G. This puts the path in the > xterm title bar and keeps my prompt a nice constant "-->". But what happens when you ssh to another machine that doesn't have this alias, or need to sudo to root and it doesn't have it? When you log out of that machine, you need to run a gratuitious 'cd .' to fix your title bar. No, for me anything that changes my title bar should be shot. One of the reasons I don't use bash[1] since often it has such an alias. Besides, I like to label my title bars manually with 'retitle', which is pretty much similar to what you had but without needing to imbed ctrl chars: function retitle { echo '\033]0;'$@'\007\c' } [1] To get us back to the bash vs ksh debate that started this thread[2] [2] This thread being far diverged from perl, so I'm going to shut up before Tim starts having stick riddle flashbacks. -- Brian Hatch Nothing is fool-proof Systems and to a sufficiently Security Engineer talented fool. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030123/07fec1e4/attachment.bin From spug at ifokr.org Thu Jan 23 23:32:45 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:Re: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030124051551.GB60659@darkness.sial.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> <20030124051551.GB60659@darkness.sial.org> Message-ID: <20030124053245.GS6124@ifokr.org> > My test results, since folks appear to doubt the veracity of my claim > that ksh goes "wonky" with the alias definition in question. Our first > contestant is a just-recently-installed Sun Ultra Sparc running OpenBSD > 3.2-stable as of 2003-01-21. > > $ uname -a > OpenBSD akira.gs.washington.edu 3.2 GENERIC#0 sparc64 > $ echo $KSH_VERSION > @(#)PD KSH v5.2.14 99/07/13.2 > $ alias cd='\cd "$@" && ls' Try this alias on bash and you'll get the same results. Why? This alias doesn't work. When you type bash_or_ksh$ cd /tmp it expands to cd "" && ls /tmp Aliases do not take arguments. Nothing is in $@. The reason you never cd anywhere and are always in your home dir is because you are explicitly saying to go there with the cd sans arguments. But you list the 'correct' dir because your commandline args are appended to the alias commands. Proof: bash_or_ksh$ alias cd='echo "Arguments $@" && echo "ls"' bash_or_ksh$ cd /tmp Arguments ls /tmp If you want $@, you need to use a function. I'm going to bed now. I'll defend ksh again when I wake up if necessary. ;-) -- Brian Hatch I doubt, Systems and therefore Security Engineer I might be. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030123/2bd7803a/attachment.bin From tim at consultix-inc.com Fri Jan 24 00:54:52 2003 From: tim at consultix-inc.com (Tim Maher) Date: Mon Aug 2 21:36:49 2004 Subject: SPUG:testing Message-ID: <20030123225452.A4356@timji.consultix-inc.com> testing From tim at consultix-inc.com Fri Jan 24 07:34:16 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030124032639.GO6124@ifokr.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> Message-ID: <20030124053416.A6209@timji.consultix-inc.com> On Thu, Jan 23, 2003 at 07:26:39PM -0800, Brian Hatch wrote: > > > There's no reason to use the crappy PD-ksh that ships with the free > > UNIX-like systems (unless it's improved drastically in the past 18 > > months, since I last rejected it). That's because for years now, > > you've been able to get the real Kornshell for free from the AT&T > > research web site. > > What has pdksh not done correctly for you? I haven't had a > problem with it ever. I teach a 4.5-day class called "Advanced Shell Programming", and delivered that to some Fortune 500 company somewhere a few years back. Despite the fact that my software setup instructions specifically indicated that they should provide the Korn shell, they provided the PD-ksh instead, and insisted on using it. I had toyed with it a bit and found no obvious problems, so agreed to give it a shot. Well, we (myself and the 16 students) proceeded to find a new problem with the PD-ksh about every 5 minutes for the rest of the week, and many of my programming examples (using co-processes, IPC, signals, exec, eval, etc.) did not work at all properly. It was an unmitigated disaster, so I resigned myself to never let that happen again. Sorry, I don't remember the details of what the exact differences, or outright failures were, just my conclusion that just about everything it did it did differently than the real thing, if at all. But I'm not a shell zealot; if you like this shell (which may have been thoroughly rehabilitated by now, for all I know), be my guest, and enjoy it. Personally, I'll stick with the actual Korn shell, because it's equally free, rock-solid, and very extensively tested by decades of programmers doing tricky stuff. > None of this 'alias rm="rm -i"' crap. > > That's why I don't use bash. But having had no problems > with pdksh, I don't see any reason to go out and > compile at&t's version when my distro already comes > with pdksh. > Brian Hatch No need to compile it, you can download a Linux (or whatever) executable for free. -Tim *------------------------------------------------------------* | Tim Maher, CONSULTIX (206) 781-UNIX (866) DOC-PERL | | CEO, JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | Ask about on-site classes on Perl, UNIX, & Linux topics! | *------------------------------------------------------------* From MichaelRunningWolf at att.net Fri Jan 24 13:45:23 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: to 'Reply-to' or not to 'Reply-to', but this was the question -> "Re: SPUG:PDF concatenation tool?" In-Reply-To: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> References: <39C7FF57-2F4D-11D7-BA85-000393A6CEB6@concolor.org> Message-ID: Dan Sabath writes: > I'm curious if there is a reason that the reply-to header is not > set. I accidentally sent this privately to Tim rather than to the list. > -dan Dan, [ This reply got long. The simple answer is in the first 2 lines. The remainder is a historical perspective of man/machine interfaces. ] Try "follow up" or "wide reply" in your MUA instead of "reply". You can probably solve the problem by user education or user interfa configuration. There's been a whole lot of messages over the Internet since the original RFC defined the Reply-to header. It may have even been called the Arpanet back then. At that time, newsgroups were public forums and emails were private communication. Separate tools were created for the different types of protocols that handled the two. The recent blurring of the forum type and the delivery mechanism has caused much user confusion, and even an identity crisis for the tools. The SPUG list is netnews-ish in its fourm type, but email-ish in its delivery mechanism. The fourm type may induce you to load your netnews brain/finger bindings even though it's delivered via "email". [See GNUS sidebar] Mental metaphors morph -- They still call themselves Teamsters, even though they no longer manage animal teams. In hindsight, they should have called themselves Transporters, since their core business is transportation, not power source management. As humans, we're more interested in the content of the message. Our tools grew up interested in the wrapper (i.e. protocol) of the message (NNTP, POP3, SMTP, etc.), and therefore have historical views of what "reply", "follow up", "send", and "post" really mean. My own definitions are so clouded by my personal history and tool usage that I won't even try to define them. I'll just point to the fact that different protocols and different tools have (for historical and hysterical reasons) different definitions of common actions. Summary: Figure out how your tool does what you want it to do. If that's different than what you want, see if you can configure the tool. (I do have to do a similar config in GNUS for email forums.) Else, you'll have to reconfigure (i.e. train) the user (i.e. you). ================ GNUS sidebar By way of illustration not proselytizing, the reason that I like emacs GNUS as my email reader and my netnews reader is that it simplifies my message interface by separating the content from the delivery mechanism. I group all my Perl stuff together -- newsfeeds from my ISP, NNTP interfaces to perl.org, and email collected from various ISP logins. My "news" is interleaved with my "netnews", grouped by category rather than delivery mechanism (SMTP, NNTP, etc.). All my perl stuff (email and netnews) is collected into one section of my list. Key: nnml -- email (from various logins) nntp+perl.org -- NNTP from perl.org nntp+oz.net -- NNTP from oz.net, one ISP (else) -- NNTP form att.net, my original ISP I deleted various marks and message counts to unclutter the display. : nnml:perl.pm.SPUG : nnml:perl.SPUG.XP : nnml:perl.pm.SPUG.XP : nnml:perl.pm.pdx : nnml:perl.qotw-discuss : nnml:perl.qotw : nntp+perl.org:perl.dbi.users : nntp+perl.org:perl.jobs : nntp+perl.org:perl.jobs.discuss : nntp+perl.org:perl.perl6.language : nntp+perl.org:perl.trainers : nntp+perl.org:perl.recdescent : nntp+perl.org:perl.ppt : nntp+perl.org:perl.daily.tips : nntp+perl.org:perl.daily.news : nntp+perl.org:perl.cpan.cluster : nntp+perl.org:perl.cpan.workers : nntp+perl.org:perl.cpan.interface : nnml:perl.advocacy : nntp+perl.org:perl.advocacy : nntp+perl.org:perl.beginners : nnml:perl.beginners : nntp+oz.net:perl.beginners : nntp+oz.net:comp.lang.perl.announce : nntp+oz.net:comp.lang.perl : nntp+oz.net:comp.lang.perl.modules : nntp+oz.net:comp.lang.perl.moderated : nntp+oz.net:comp.lang.perl.misc : comp.lang.perl.announce : comp.lang.perl.moderated : comp.lang.perl.misc : comp.lang.perl.modules : nnml:perl.personal_references Lest you be too eager to try it out, I must warn you that there's a steep learning curve to using this power tool. It's open source, created by rocket scientists (but not technical writers) in their spare time. I've already invested in that curve, so I continue. I'd suggest broadening your search if you're interestred in converting. You still may choose Gnus, but at least it will be a well-balanced decision. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 15:23:06 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Re: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: <20030124053245.GS6124@ifokr.org> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> <20030124051551.GB60659@darkness.sial.org> <20030124053245.GS6124@ifokr.org> Message-ID: Brian Hatch writes: > Jeremy Mates writes: > > My test results, since folks appear to doubt the veracity of my claim > > that ksh goes "wonky" with the alias definition in question. Our first > > contestant is a just-recently-installed Sun Ultra Sparc running OpenBSD > > 3.2-stable as of 2003-01-21. Jeremy, Sorry if I appeared to doubt you. I was looking for the kinds of symptoms that you did post below. > Jeremy Mates continues: > > $ uname -a > > OpenBSD akira.gs.washington.edu 3.2 GENERIC#0 sparc64 > > $ echo $KSH_VERSION > > @(#)PD KSH v5.2.14 99/07/13.2 > > $ alias cd='\cd "$@" && ls' Brian, Thanks for disproving my untested code. [...] > Proof: > > bash_or_ksh$ alias cd='echo "Arguments $@" && echo "ls"' > bash_or_ksh$ cd /tmp > Arguments > ls /tmp > > > > If you want $@, you need to use a function. [...] After consulting my dogeared Bolsky/Korn book ("The Kornshell Command and Programming Language" - 1989 version, documenting the 11/16/88 version of ksh), I realized that aliases are a simple textual substitution, as you illustrated. Functional call semantics require a call to a real function (or builtin, or executable). Sorry for leading folks down a dead end. I tried to put in my $0.02 on something that I don't use -- aliases -- and failed miserably. Over the years, I try to use 'em, and keep finding reasons not to. I've now got yet another reason to pump up ~/bin with scripts instead of mucking ~/.profile or my $ENV file. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 15:07:55 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:divergence-from-a-divergence [was: lots of thing] In-Reply-To: <20030124052036.GQ6124@ifokr.org> References: <200301240455.h0O4tQE10874@catmanor.com> <20030124052036.GQ6124@ifokr.org> Message-ID: Brian Hatch writes: [...] > [2] This thread being far diverged from perl, so I'm going > to shut up before Tim starts having stick riddle > flashbacks. I agree. This topic has diverged. I'll bet that this $topic =~ m/divergence(-from-a-divergence){$nth_degree}/ is real close to burning out all by itself. I notice that many threads are not *directly* centered on Perl. I think the post/no-post decision should take into consideration whether it's useful to Perl Users as a group. After all "Perl User" is SPUG's middle name. If we got formal, using only first/last name, "Seattle Group" would be very uninteresting to most of us!!! The shear volume of discussion on this topic (all within 3 days as '~damian/bin' morphed to 'alias cd' morphed to 'helpful hints about my-favorite-*sh') indicates interest, and is therefore, IMO, important to group members. And, I happen to enjoy these side discussions within the group. I can read a sterile Perl discussion in comp.lang.perl.* from my ISP, but, at the risk of being melodramatic, the kind of community that's generated by these types of discussions is why I settled in the Northwest in general, and Seattle in particular. Perl does not exist in a vacuum. Consider how rich the content of this list is, and how connected and related we are based on discussions of some of these not-so-Perl-centric threads ~whoever/bin (for various definitions of "whoever") book publishers/editors XML, YAML coding style numerous interface problems (shell, Windows, Unix, system(), DB's (Oracle...) via DBI, browsers via CGI) design practices algorithms (sometimes posed as puzzles or quiz of the week) I think some freedom is important in selection of group content. I'm happy with the depth/breadth of the discussion. And because I know how to use my 'D' key, I can stop reading a thread when I've had enough. I love this group! Michael Wolf -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 15:31:56 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Re: Python and Doxygen In-Reply-To: <3E303861.4F9AA4AF@geospiza.com> References: <3E303861.4F9AA4AF@geospiza.com> Message-ID: Joe Slagel writes: > Geoffrey & Kristin Grosenbach wrote: > > > > Python even comes with a command to load a module and assemble all the > > > doc > > > strings from all the objects into something neat -- much like C++ and > > > doxygen. Compare this with having to assemble the documentation from > > > scratch > > > with perldoc. This saves a lot of typing if you want to go in later and > > > add > > > or clean up the documentation. You won't have to write out the > > > parameters to > > > the function, the base classes of your class, or anything like that. > > > > It is downright embarrassing that Perl claims to be the mother of all > > parsing languages, and yet cannot come up with a decent way to parse > > it's own code (yes, I know this is part of the purpose of Perl6). I've > > worked with doxygen and JavaDoc, and I would greatly benefit from such a > > system for Perl. In fact, I was talking with Tim about this at Colin's > > party. > > Here at Geospiza, I have the same philosphy and problem with perl. We've > actually had someone working on developing something for ourselves, but > we've really been thinking about open sourcing it. The program we're > working on understands the difference between perl classes and cgi scripts, > uses a javadoc like style instead of POD, can output POD to use all of the > pod2* utilities, and does introspection on the class. This tool isn't quite > finished yet, but if we can get some help on it we'll release it. > > Another alternative is to use pdoc (http://pdoc.sourceforge.net/). Has anyone used pdoc? If so, could you tack it on to Geoff' POD talk at an upcomoing SPUG meeting? It sure would be great to have a few different tools and styles. I don't want to say TMTOWTDI because *I* don't yet have one *good* way, even for a lame definition of "good". -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 15:58:30 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Can perl parse Perl? In-Reply-To: References: Message-ID: Geoffrey & Kristin Grosenbach writes: > It is downright embarrassing that Perl claims to be the mother of > all parsing languages, and yet cannot come up with a decent way to > parse it's own code (yes, I know this is part of the purpose of > Perl6). I've worked with doxygen and JavaDoc, and I would greatly > benefit from such a system for Perl. In fact, I was talking with Tim > about this at Colin's party. > > At minimum, it would be a script that would go through existing Perl > code and build up POD sections for each function. At another level, it > could look for function declarations and use those to make more > thorough documentation. > This gets a little fuzzy since all we really have is > sub foo($$;\@) > which most people never use. Damian mentioned a style that I use, namely > sub foo { my ($param1, $param2, @param3) = @_; } > which would be fully sufficient for a parser. I like the style, but recognize that any tool you build to extract docs will be based on a *style*, not on the language, and therefore of limited use (possibly only to you and your style-adopting collegues). Ever try to get a style guide adopted? Ever try to heard cats? You state that it would "fully sufficient for a parser", but in fact, it's only "fully sufficient for a well-integrated collection of trick tools and ever-changing style guides". Start down this path, and you'll get impaled in a similar fashion to the folks that try to "parse" HTML with RE's. I therefore concur with your sentiment about not having a language parser as a basic building block to build language support tools. About a decade ago, I worked at a company that provided C language CASE tools. One perspective of why the company went belly-up is that we died from the cost of writing our parsers and debuggers as building blocks for the upper level tools. We had started to make integrations to existing tools (gcc and dbx), but by then, we'd already burned through too much VC cash. I'm looking forward to the kinds of auxiliary tools that a parser-as-building-block will provide. It'll effectively open the source of this Open Source language!!! - class browsers - code analysis tools - impact analysis tools - class inheritance diagram builders - funciton call diagrams - cohesion/coupling analysis - metric analyzers (cyclic complexity, function points, LOC, etc.) - impact analysis for redesign or refactoring - refactoring editors (wouldn't Fowler and the Gang of Four be proud?) - lint(1)-like external programs to augment the venerable -w - style guide enforcement - keyword hilighting that *always* works - indent(1)-like programs that *always* work - ctag(1)-like interfaces that *always* work Now you're starting to talk about a power environmenet and a healthy ecosystem for many businesses and services. Perl, the language rules! Perl, the environment drools! Actually, I'm not so simple-minded in my thinking as this trivial, polarizing tag line would indicate, but it was kinda fun to put in as a trailer. :-) You have to realize that I really do love Perl, and want the very best for it. I think that a Perl parser is the kind of enabling technology that will provide that. Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 16:03:39 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Re: Korn Shell vs. PD-ksh In-Reply-To: <20030123173735.A2090@timji.consultix-inc.com> References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> Message-ID: SPUG-list-owner writes: [...] > There's no reason to use the crappy PD-ksh that ships with the free [...] > Click on "ksh - standalone AT&T ksh executable" at > http://www.research.att.com/sw/download/ Has anyone done this for a Windows 2000 box? Yeah, yeah. Linux. Unix. .... But I've got a W2K laptop. And what I miss is all that raw ksh power. I've been using bash on cygwin, but my fingers/brain started speaking ksh in '85. If you've got any suggestions, please reply (on the list or privately). I'll summarize any private mail back to the list for everyone's consumption. Thanks, Michael -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Fri Jan 24 17:03:42 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Re: aliases, -> Korn Shell vs. PD-ksh In-Reply-To: References: <3E2E42BF.5070501@wazamatta.com> <20030121232553.A35069@itchy.serv.net> <20030122074452.GK19808@darkness.sial.org> <20030122233428.GL19808@darkness.sial.org> <20030123173735.A2090@timji.consultix-inc.com> <20030124032639.GO6124@ifokr.org> <20030124051551.GB60659@darkness.sial.org> <20030124053245.GS6124@ifokr.org> Message-ID: "Michael R. Wolf" writes: [...] > Sorry for leading folks down a dead end. I tried to put in my $0.02 > on something that I don't use -- aliases -- and failed miserably. > Over the years, I try to use 'em, and keep finding reasons not to. > I've now got yet another reason to pump up ~/bin with scripts instead > of mucking ~/.profile or my $ENV file. Mea culpa. Again, I mislead. As Colin just pointed out to me, you cannot change a current working directory from within a normally invoked subshell. If 'cd', or any other enviroment changing thing, is what you're wrapping, you'd have to resort to something like this (untested code): alias cd='. ~/bin/my_cd' The important piece of this is that the script is not run normally, it's dotted (say sourced in csh-like shells) into the environment. That is, it's run in the current shell, not a subshell. Any environment changes that happen in my_cd, like calling the 'cd' builtin, will be reflected in the calling environment by virtue of using ".". In that case, my original sentiment about passing args to 'cd', but guarding the 'ls' may work in this (also untested) code fragment for my_cd #!/usr/bin/ksh cd "$*" && ls Geez! Even 1-liners are hard!! :-0 So much power. So many details to remember. But I guess, to refer to the original thread, that's why we wrap the detail in the script -- so that we don't have to remember the details. And we can, as Damian said, save our keystrokes for something more productive. I like to say that it's saving my brain cells to solve a more important problem. They're the same sentiment. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From schieb at centurytel.net Fri Jan 24 18:57:59 2003 From: schieb at centurytel.net (Islandman) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:regex question Message-ID: <3E31E117.80904DF4@centurytel.net> SPUG, Regex problem. A user wants to cut-n-paste text from a WORD doc into a browser form. The WORD doc of course has nasty non-alpha characters in it that I'd like to remove in most cases, perhaps replace with other text in a few others. Here's an example:  Your kids complain, ?~SNot that again!?~T BTW,  was a "bullet" in WORD. What kind of regex would help clean this text, or is there a better solution to the problem? Thanks, -Brian From dan at concolor.org Fri Jan 24 19:04:22 2003 From: dan at concolor.org (Dan Sabath) Date: Mon Aug 2 21:36:50 2004 Subject: to 'Reply-to' or not to 'Reply-to', but this was the question -> "Re: SPUG:PDF concatenation tool?" In-Reply-To: Message-ID: On Friday, Jan 24, 2003, at 11:45 US/Pacific, Michael R. Wolf wrote: > Dan Sabath writes: > >> I'm curious if there is a reason that the reply-to header is not >> set. I accidentally sent this privately to Tim rather than to the >> list. >> -dan > > Dan, > As I have privately mentioned to Tim...all I wanted to be sure of was that this is the way we as a group wanted it and not some holdover from switching to the new list software. I personally prefer the other way, but that is neither here nor there. -dan From ben at reser.org Fri Jan 24 19:18:13 2003 From: ben at reser.org (Ben Reser) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:regex question In-Reply-To: <3E31E117.80904DF4@centurytel.net> References: <3E31E117.80904DF4@centurytel.net> Message-ID: <20030125011813.GY13064@occipital.brain.org> On Fri, Jan 24, 2003 at 04:57:59PM -0800, Islandman wrote: > Regex problem. A user wants to cut-n-paste text from a WORD doc into a > browser form. The WORD doc of course has nasty non-alpha characters in > it that I'd like to remove in most cases, perhaps replace with other > text in a few others. Here's an example: > >  Your kids complain, ?~SNot that again!?~T > > BTW,  was a "bullet" in WORD. > > What kind of regex would help clean this text, or is there a better > solution to the problem? I'm not sure how much this will help but take a look at demoroniser. http://www.fourmilab.ch/webtools/demoroniser/ -- Ben Reser http://ben.reser.org "America does not go abroad in search of monsters to destroy. She is the well-wisher to the freedom and independence of all. She is the champion only of her own." -- John Quincy Adams, July 4th, 1821 From moonbeam at catmanor.com Fri Jan 24 19:27:14 2003 From: moonbeam at catmanor.com (William Julien) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:regex question Message-ID: <200301250127.h0P1REi11246@catmanor.com> > >SPUG, > Regex problem. A user wants to cut-n-paste text from a WORD doc into a >browser form. The WORD doc of course has nasty non-alpha characters in >it that I'd like to remove in most cases, perhaps replace with other >text in a few others. Here's an example: > > Your kids complain, Â~SNot that again!Â~T > >BTW,  was a "bullet" in WORD. > >What kind of regex would help clean this text, or is there a better >solution to the problem? > >Thanks, > -Brian I use a little program called 'antiword' that converts the word binary into a text or postscript. The postscript form preserves the images and format. I used this program in a perl cgi script to connect via smb to an nt server and allow the web user to view the documents. It would be really cool if we had a perl port of this! see ... http://www.winfield.demon.nl/index.html William From schieb at centurytel.net Tue Jan 28 14:01:18 2003 From: schieb at centurytel.net (Islandman) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] Message-ID: <3E36E18E.998D8F4C@centurytel.net> Will try again. Expected I was the only one who did not know the regex for removing all non-printable characters from a text string, but haven't got the answer just yet. Super-spiffy regex to accomplish this would be most appreciated. -Brian Islandman wrote: > > SPUG, > Regex problem. A user wants to cut-n-paste text from a WORD doc into a > browser form. The WORD doc of course has nasty non-alpha characters in > it that I'd like to remove in most cases, perhaps replace with other > text in a few others. Here's an example: > >  Your kids complain, ?~SNot that again!?~T > > BTW,  was a "bullet" in WORD. > > What kind of regex would help clean this text, or is there a better > solution to the problem? > > Thanks, > -Brian > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org From MichaelRunningWolf at att.net Tue Jan 28 14:01:48 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:perl + biology => (bioperl, bioinformatics conference) Message-ID: Are you going to the O'Reilly Bioinformatics conference? Did you go to the one last year? Do you use bioperl? I'm doing some background research into how Perl (or other Open Source projects) can serve the biology community. If you have any insights into how to create value (and extract some for me and some cohorts), I'd appreciate hearing from you. Thanks, Michael Wolf P.S. I've set the Reply-to field back to me (rather than the list) or feel free to call on 206/782-8377. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From smorton at pobox.com Tue Jan 28 14:04:44 2003 From: smorton at pobox.com (Sanford Morton) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Max of two floats? Message-ID: A precision bug was discovered in one of my modules, Statistics::OLS, http://www.speakeasy.org/~cgires/modules/ The result of a calculation, which theoretically can never be negative, sometimes is a tiny negative number on weird data sets. (Definition of weird; blows my modules up.) I want to ensure that these sorts of things are non-negative: # sum of squared deviations of X and Y $self->{'_ssdX'} = $sumXX - $sumX**2/$n; $self->{'_ssdY'} = $sumYY - $sumY**2/$n; $self->{'_ssdXY'} = $sumXY - $sumX*$sumY/$n; I couldn't find a max(,) function in Perl, so should I use the ? operator? I was thinking something like this might be fastest: { my $tmp; $self->{'_ssdX'} = ($tmp = $sumXX - $sumX**2/$n > 0) ? $tmp : 0; $self->{'_ssdY'} = ($tmp = $sumYY - $sumY**2/$n > 0) ? $tmp : 0; $self->{'_ssdXY'} = ($tmp = $sumXY - $sumX*$sumY/$n > 0) ? $tmp : 0; } Programming Perl and The Perl Cookbook appear not to have a canonical solution. Thanks, Sandy Morton From jsl at blarg.net Tue Jan 28 14:04:33 2003 From: jsl at blarg.net (Jim Ludwig) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] In-Reply-To: <3E36E18E.998D8F4C@centurytel.net> (message from Islandman on Tue, 28 Jan 2003 12:01:18 -0800) Message-ID: Islandman wrote: >> Will try again. Expected I was the only one who >> did not know the regex for removing all >> non-printable characters from a text string, >> but haven't got the answer just yet. >> >> Super-spiffy regex to accomplish this would be >> most appreciated. I believe there were 2 responses to this question. From my archives I found these 2: From asimjalis at acm.org Tue Jan 28 14:15:18 2003 From: asimjalis at acm.org (Asim Jalis) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Max of two floats? In-Reply-To: References: Message-ID: <20030128201518.GB54708@wokkil.pair.com> On Tue, Jan 28, 2003 at 12:04:44PM -0800, Sanford Morton wrote: > A precision bug was discovered in one of my modules, > Statistics::OLS, http://www.speakeasy.org/~cgires/modules/ The > result of a calculation, which theoretically can never be > negative, sometimes is a tiny negative number on weird data > sets. (Definition of weird; blows my modules up.) > > I want to ensure that these sorts of things are non-negative: > > # sum of squared deviations of X and Y > $self->{'_ssdX'} = $sumXX - $sumX**2/$n; > $self->{'_ssdY'} = $sumYY - $sumY**2/$n; > $self->{'_ssdXY'} = $sumXY - $sumX*$sumY/$n; > > I couldn't find a max(,) function in Perl, so should I use the > ? operator? I was thinking something like this might be > fastest: > > { my $tmp; > > $self->{'_ssdX'} = ($tmp = $sumXX - $sumX**2/$n > 0) ? $tmp : 0; > $self->{'_ssdY'} = ($tmp = $sumYY - $sumY**2/$n > 0) ? $tmp : 0; > $self->{'_ssdXY'} = ($tmp = $sumXY - $sumX*$sumY/$n > 0) ? $tmp : 0; > } > > Programming Perl and The Perl Cookbook appear not to have a > canonical solution. You could also use a regular expression: # sum of squared deviations of X and Y $self->{'_ssdX'} = $sumXX - $sumX**2/$n; $self->{'_ssdY'} = $sumYY - $sumY**2/$n; $self->{'_ssdXY'} = $sumXY - $sumX*$sumY/$n; $self->{'_ssdX'} =~ s/^-.*$/0.0/; $self->{'_ssdY'} =~ s/^-.*$/0.0/; $self->{'_ssdXY'} =~ s/^-.*$/0.0/; Probably not as readable as your solution. And it's not clear that it is any better. I am just letting my TMTOWTDI get a little wild here. Asim From MichaelRunningWolf at att.net Tue Jan 28 14:27:08 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] In-Reply-To: <3E36E18E.998D8F4C@centurytel.net> References: <3E36E18E.998D8F4C@centurytel.net> Message-ID: Islandman writes: > Will try again. Expected I was the only one who did not know the regex > for removing all non-printable characters from a text string, but > haven't got the answer just yet. > > Super-spiffy regex to accomplish this would be most appreciated. I tried to use a \p{IsPrint}, but didn't get it to work. The [:print] POSIX character works as below. #! /usr/bin/perl -w my $all; $all .= $_ for map {chr($_)} 0..1024; if (open CATV, "| cat -vet") { printf CATV "Everything(%d chars), printed visably\n", length($all); print CATV $all; close CATV; } else { warn "can't open cat for visable printing: $!"; } # Remove the non-printables. See pg 175 of "Programming Perl" 3rd # edition for character classes. my $printable = $all; $printable =~ s#[[:^print:]]##g; print "\n" x 3, "=" x 78, "\n"; printf "Only the printables (%d chars):\n", length($printable); print "V" x length($printable), "\n"; print $printable, "\n"; print "^" x length($printable), "\n"; From schieb at centurytel.net Tue Jan 28 14:39:45 2003 From: schieb at centurytel.net (Islandman) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] References: Message-ID: <3E36EA91.78D38B74@centurytel.net> Jim Ludwig wrote: > > Islandman wrote: > >> Will try again. Expected I was the only one who > >> did not know the regex for removing all > >> non-printable characters from a text string, > >> but haven't got the answer just yet. > >> > >> Super-spiffy regex to accomplish this would be > >> most appreciated. > > I believe there were 2 responses to this > question. From my archives I found these 2: > > >From Ben Reser: > > http://www.fourmilab.ch/webtools/demoroniser/ > > >From William Julien: > > http://www.winfield.demon.nl/index.html Sorry, misspoke. I did get replies and am grateful but it's not quite what I'm after. Both of those solutions are for how to deal with WORD files in their binary form. I'm looking for a way to catch and remove, or possibly change, the text content of a WORD doc when it is cut-n-paste from WORD into a web textarea box. I was hoping there was a regex such as: $text =~ /non_printable_chars//g; I like to to remove everything that is not a standard printable letter, number or punctuation. Thanks for asking for clarification, -Brian > > You could download one or both and look at the > source code if the tool wasn't an exact fit to > your problem. > > jim From schieb at centurytel.net Tue Jan 28 14:54:14 2003 From: schieb at centurytel.net (Islandman) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] References: <3E36E18E.998D8F4C@centurytel.net> Message-ID: <3E36EDF6.8E46C2D8@centurytel.net> "Michael R. Wolf" wrote: $printable =~ s#[[:^print:]]##g; <--- that's it!! thanks Michael! -Brian > > Islandman writes: > > > Will try again. Expected I was the only one who did not know the regex > > for removing all non-printable characters from a text string, but > > haven't got the answer just yet. > > > > Super-spiffy regex to accomplish this would be most appreciated. > > I tried to use a \p{IsPrint}, but didn't get it to work. The [:print] > POSIX character works as below. > > #! /usr/bin/perl -w > > my $all; > $all .= $_ for map {chr($_)} 0..1024; > > if (open CATV, "| cat -vet") { > printf CATV "Everything(%d chars), printed visably\n", length($all); > print CATV $all; > close CATV; > } else { > warn "can't open cat for visable printing: $!"; > } > > # Remove the non-printables. See pg 175 of "Programming Perl" 3rd > # edition for character classes. > my $printable = $all; > $printable =~ s#[[:^print:]]##g; > > print "\n" x 3, "=" x 78, "\n"; > printf "Only the printables (%d chars):\n", length($printable); > print "V" x length($printable), "\n"; > print $printable, "\n"; > print "^" x length($printable), "\n"; > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list@mail.pm.org > ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays, U-District, Seattle WA > WEB PAGE: www.seattleperl.org From ced at carios2.ca.boeing.com Tue Jan 28 14:23:00 2003 From: ced at carios2.ca.boeing.com (ced@carios2.ca.boeing.com) Date: Mon Aug 2 21:36:50 2004 Subject: [Fwd: SPUG:regex question] Message-ID: <200301282023.MAA06604@carios2.ca.boeing.com> >... I'm looking for a way to catch and remove, > or possibly change, the text content of a WORD doc when it is >cut-n-paste from WORD into a web textarea box. > I was hoping there was a regex such as: $text =~ > /non_printable_chars//g; > I like to to remove everything that is not a standard printable letter, You might use J.Friedl's character class to catch "viewable" ASCII, [!-~] or [\x21-\x7e] which is longer but shows more clearly that you're after a character encoding range] Some European character encodings in ISO-8859-1 would be clobbered though: umlauted u, for example. But, if this isn't an issue, one way: $text =~ s/[^!-~]//g; -- Charles DeRykus From sthoenna at efn.org Tue Jan 28 19:17:42 2003 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Max of two floats? References: Message-ID: <2uyN+gzkgOeZ092yn@efn.org> On Tue, 28 Jan 2003 12:04:44 -0800 (PST), smorton@pobox.com wrote: > >I couldn't find a max(,) function in Perl, so should I use the ? >operator? I was thinking something like this might be fastest: use List::Util 'max'; List::Util is part of Scalar-List-Utils, available on CPAN and also included in the perl distribution as of 5.8.0. From Marc.M.Adkins at Doorways.org Tue Jan 28 23:02:50 2003 From: Marc.M.Adkins at Doorways.org (Marc M. Adkins) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Max of two floats? In-Reply-To: <2uyN+gzkgOeZ092yn@efn.org> Message-ID: > >I couldn't find a max(,) function in Perl, so should I use the ? > >operator? I was thinking something like this might be fastest: > > use List::Util 'max'; > > List::Util is part of Scalar-List-Utils, available on CPAN and also > included in the perl distribution as of 5.8.0. The attached script rates the inline conditional operator as about 3-4 times faster than the List::Util::max() call for two arguments. I'm figuring the inline conditional operator gets optimized into good code whereas the max() call does stack operations and so forth. And yes, the inline conditional is what I generally use since Perl hasn't a max operator to my knowledge. Results (slowest first): List::Util (var int) 583771/s List::Util (const float) 624220/s List::Util (const int) 652742/s Conditional (var int) 2222222/s Conditional (const int) 16666667/s Conditional (const float) 20000000/s My test platform is Windows 2K on a 600 Mhz Pentium III (I think) using ActiveState Perl 5.8. Your mileage may vary. mma - the script ------------------------------------------------------- use Benchmark qw(cmpthese); use List::Util qw(max); $alpha = 23; $bravo = 13; $results = cmpthese(1_000_000, { 'Conditional (const int)' => sub { 23 > 13 ? 23 : 13 }, 'List::Util (const int)' => sub { max(23, 13) }, 'Conditional (const float)' => sub { 17.23 > 17.13 ? 17.23 : 17.13 }, 'List::Util (const float)' => sub { max(17.23, 17.13) }, 'Conditional (var int)' => sub { $alpha > $bravo ? $alpha : $bravo }, 'List::Util (var int)' => sub { max($alpha, $bravo) }, }, 'none'); map { printf "%s %15s\n", $_->[0], $_->[1] } @$results; From cwilkes-spug at ladro.com Wed Jan 29 02:30:04 2003 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:Use of (?{}) in a subroutine gives off weirdness with $^N Message-ID: <20030129083004.GA74244@www.ladro.com> I thought I would try out the (?{}) construct to see how it works, and for the most part it is working except when I put it in a subroutine. The following code works: ----------------------------------------------- #!/usr/bin/perl -w use strict; my $amt; $_ = "you owe me 100"; / \s+ # start of whitespace (\d+) (?{ $amt = $^N }) \s*$ # anything afterwards /x; print "$amt,$_\n"; $_ = "bank owes me 200"; / \s+ # start of whitespace (\d+) (?{ $amt = $^N }) \s*$ # anything afterwards /x; print "$amt,$_\n"; ----------------------------------------------- But if I do the (?{}) in a subroutine the $amt variable is lost the 2nd time around, even though it should get the $^N value: ----------------------------------------------- #!/usr/bin/perl -w use strict; my ($line, $amt); $line = "you owe me 100"; $amt = modline($line); print "$amt,$line\n"; $line = "bank owes me 200"; $amt = modline($line); print "$amt,$line\n"; sub modline { my $tmpline = shift; my $tmpamt; $tmpline =~ / \s+ # start of whitespace (\d+) (?{ $tmpamt = $^N ; print "found '$tmpamt'\n"; }) \s*$ # anything afterwards /x; return $tmpamt; } ----------------------------------------------- What gives? I threw in the print statement in the sub to see if the pattern is matching and it does. You can take it out and look at the $^R value after the regex and see that it contains the digit matched (if you leave in the print $^R is set to 1, the return code of print). Looking through the perlre perldoc I suspect it has something to do with this: The code is properly scoped in the following sense: If the assertion is backtracked (compare the section on Backtracking), all changes introduced after localization are undone, but what I can't understand is that if the match worked the first time through, why not the second? Am I using (${}) in a bad way? Chris From MichaelRunningWolf at att.net Wed Jan 29 20:15:12 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:QOTW code-a-thon Message-ID: The Perl Quiz of the Week is back!!! Number 10 arrived in my mailbox about noon on Tuesday. http://perl.plover.com/qotw/ I haven't looked at them yet, but if you'd be interested in working them in small groups, I'm interested in facilitating a pair-wise attack on them, (and of any other small quiz-like puzzle that you'd like to bring with you as an extra credit learning opportunity). Please RSVP directly to me if you can attend - Friday eveining only - Saturday evening only - Friday or Saturday eveing I'll collect the votes and formally announce a time/location back to the group. I'd encourage anyone who can't accomodate this schedule to form another group effort. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From MichaelRunningWolf at att.net Wed Jan 29 22:15:59 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:business development support group Message-ID: What: Business Development sub-group meeting Where: My Ballard home office When: Monday 9:30 a.m. - Are you looking for work, possibly Perl related? - Are you looking to increase your business? - Do you have leads that don't help you, but may help someone else? - Are you stuck? - Could you use some support? - Could you support someone else? I think that too many of us are too stuck. Alone. Without a sounding board. Chasing the same dead ends. Not pushing the good leads far enough. Holding leads or resources that could help someone else. Let's work together. Come prepared to work. This is a business development meeting!!! What to prepare for the first meeting: An introductory speech - Brief biography. - Vision statement of your next step. - What you'd like to accomplish this week. - How you'd like us to support you. - What resources or leads you can share with the group. We'll go around the circle, listen, take notes, make plans, make suggestions, and disband until the following week at which time we'll check-in with a progress report, then iterate. This is "business development", not just job search. Although I formed this idea to support the unemployed and underemployed (like me), I don't want to disband as folks find work. This kind of support is helpful to build business regardless of the starting point. Unemployed is just the degenerate case of business development with a starting point of zero. If you're already employed or have contracts, please feel free to attend even if your next step is not to hire someone. Hiring is not the only aspects of business development. Although I'm seeding this group with SPUG members, feel free to invite and bring your non-Perl business friends. More contacts means more networking and more success. We can all support each other. Please RSVP so that I can get directions to you and verify that there'll be enough space. If you'd like to participate, but can't accommodate this schedule, please let me know so that we can include you in the future. I'll supply coffee, tea, and some kind of breakfast pastry at 9:30 as an ice breaker for a 9:45 meeting start. Come prepared to work. Come prepared to have fun. Come prepared to get unstuck. Come prepared to get results. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From spug at ifokr.org Thu Jan 30 12:52:19 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:inconsistant perl -c Message-ID: <20030130185219.GW6124@ifokr.org> This is confusing. I've got a mod_perl site and want to do a simple perl -c check before pushing the code from stage to prod. The code works just fine on the server. But perl -c dissagrees. Using the following (almost completely meaningless) files the problem still exists: Contents of BriOne.pm: use Apache; use BriTwo; Contents of BriTwo.pm: use Apache; my $s = Apache->server(); $ perl -c BriTwo BriTwo Syntax OK $ perl -c BriOne Can't locate object method server via package Apache (perhaps you forgot to load 'Apache'?) at BriOne.pm line 3. Compilation Failed in require at BriOne line 3 BEGIN failed. How can I make that second perl -c not complain? It shouldn't. At least I don't think it should. -- Brian Hatch "I sense in her a key, as yet unturned." Systems and "And what exactly does that mean?" Security Engineer "I don't know. But I should think it http://www.ifokr.org/bri/ would be *fascinating* to find out." Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030130/4a0c8915/attachment.bin From cmeyer at helvella.org Thu Jan 30 15:40:14 2003 From: cmeyer at helvella.org (Colin Meyer) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:inconsistant perl -c In-Reply-To: <20030130185219.GW6124@ifokr.org>; from spug@ifokr.org on Thu, Jan 30, 2003 at 10:52:19AM -0800 References: <20030130185219.GW6124@ifokr.org> Message-ID: <20030130134014.A1236@hobart.helvella.org> On Thu, Jan 30, 2003 at 10:52:19AM -0800, Brian Hatch wrote: > > > Contents of BriOne.pm: > use Apache; > use BriTwo; > > > Contents of BriTwo.pm: > use Apache; # to see what is happening: print STDERR "about to execute \$s = Apache->server();\n"; > my $s = Apache->server(); > > > $ perl -c BriTwo > BriTwo Syntax OK > > $ perl -c BriOne > Can't locate object method server via package Apache (perhaps you forgot > to load 'Apache'?) at BriOne.pm line 3. > Compilation Failed in require at BriOne line 3 > BEGIN failed. > 'perl -c ' executes use statements, because they are effectively equivalent to BEGIN {} blocks. When you 'perl -c BriOne', it executes BriTwo.pm, and tries at that time to instantiate $s by calling Apache->server(). Unfortunately, this call does not work when running outside of the true mod_perl environment (from within httpd). > > How can I make that second perl -c not complain? It shouldn't. At > least I don't think it should. One way to avoid that error would be to change in BriTwo: my $s = Apache->server(); to: my $s; sub instantiate { $s = Apache->server(); } and manually call BriTwo::instantiate from BriOne. hth, -Colin. From alan at ufies.org Thu Jan 30 15:54:53 2003 From: alan at ufies.org (Alan) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems Message-ID: <20030130215453.GG23767@ufies.org> This may be a very silly question, but I figured I'd ask the local monks... The perl cookbook recommends using sprintf to do rounding, or write your own. The rounding that I need is pretty simple, so I figured that just rounding off via sprintf would not require me to write my own routine. First I have to clarify. When I learnt about rounding, it was you round down if it is < 5, and round up if it is >= 5. IE: rounding (to whole numbers) 12.4 gives you 12, and 12.7 gives you 13. Using the code from the cookbook I found with the following program $a = 12.30; $b = sprintf("%.0f", $a); print "Unrounded: $a\nRounded: $b\n"; I got the following results: Unrounded: 12.3 Rounded: 12 Fine so far. Changing $a to 12.7 gives: Unrounded: 12.7 Rounded: 13 Ok so far. But how about 12.5: Unrounded: 12.5 Rounded: 12 Not quite right. But 12.5000000001: Unrounded: 12.5000000001 Rounded: 13 Is this a bug or is this me now knowing how to round properly? I've got my own routine that rounds "properly", but I'm interested in knowing why there is this strange rounding behaviour. TIA alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) From pdarley at kinesis-cem.com Thu Jan 30 16:09:33 2003 From: pdarley at kinesis-cem.com (Peter Darley) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems In-Reply-To: <20030130215453.GG23767@ufies.org> Message-ID: Folks, I've had problems with this as well, and eventually abandoned sprintf all together. It's always kind of bugged me tho. The best solution for rounding I came up with is int($Value+.5). Thanks, Peter Darley -----Original Message----- From: spug-list-admin@mail.pm.org [mailto:spug-list-admin@mail.pm.org]On Behalf Of Alan Sent: Thursday, January 30, 2003 1:55 PM To: spug-list@pm.org Subject: SPUG:strange rounding problems This may be a very silly question, but I figured I'd ask the local monks... The perl cookbook recommends using sprintf to do rounding, or write your own. The rounding that I need is pretty simple, so I figured that just rounding off via sprintf would not require me to write my own routine. First I have to clarify. When I learnt about rounding, it was you round down if it is < 5, and round up if it is >= 5. IE: rounding (to whole numbers) 12.4 gives you 12, and 12.7 gives you 13. Using the code from the cookbook I found with the following program $a = 12.30; $b = sprintf("%.0f", $a); print "Unrounded: $a\nRounded: $b\n"; I got the following results: Unrounded: 12.3 Rounded: 12 Fine so far. Changing $a to 12.7 gives: Unrounded: 12.7 Rounded: 13 Ok so far. But how about 12.5: Unrounded: 12.5 Rounded: 12 Not quite right. But 12.5000000001: Unrounded: 12.5000000001 Rounded: 13 Is this a bug or is this me now knowing how to round properly? I've got my own routine that rounds "properly", but I'm interested in knowing why there is this strange rounding behaviour. TIA alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org From AEH at akc.org Thu Jan 30 16:24:01 2003 From: AEH at akc.org (Adrian Hands) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems Message-ID: Odd rounds up, even rounds down. e.g.: 11.5 -> 12 12.5 -> 12 13.5 -> 14 14.5 -> 14 15.5 -> 15 This prevents skewing in favor of up. do not use int( $Value+.5) unless you know that $Value >= 0 ! >>> "Peter Darley" 01/30/03 05:09PM >>> Folks, I've had problems with this as well, and eventually abandoned sprintf all together. It's always kind of bugged me tho. The best solution for rounding I came up with is int($Value+.5). Thanks, Peter Darley -----Original Message----- From: spug-list-admin@mail.pm.org [mailto:spug-list-admin@mail.pm.org]On Behalf Of Alan Sent: Thursday, January 30, 2003 1:55 PM To: spug-list@pm.org Subject: SPUG:strange rounding problems This may be a very silly question, but I figured I'd ask the local monks... The perl cookbook recommends using sprintf to do rounding, or write your own. The rounding that I need is pretty simple, so I figured that just rounding off via sprintf would not require me to write my own routine. First I have to clarify. When I learnt about rounding, it was you round down if it is < 5, and round up if it is >= 5. IE: rounding (to whole numbers) 12.4 gives you 12, and 12.7 gives you 13. Using the code from the cookbook I found with the following program $a = 12.30; $b = sprintf("%.0f", $a); print "Unrounded: $a\nRounded: $b\n"; I got the following results: Unrounded: 12.3 Rounded: 12 Fine so far. Changing $a to 12.7 gives: Unrounded: 12.7 Rounded: 13 Ok so far. But how about 12.5: Unrounded: 12.5 Rounded: 12 Not quite right. But 12.5000000001: Unrounded: 12.5000000001 Rounded: 13 Is this a bug or is this me now knowing how to round properly? I've got my own routine that rounds "properly", but I'm interested in knowing why there is this strange rounding behaviour. TIA alan -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list@mail.pm.org ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays, U-District, Seattle WA WEB PAGE: www.seattleperl.org From trosmus at nwnexus.net Thu Jan 30 16:29:48 2003 From: trosmus at nwnexus.net (Tim Rosmus) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems In-Reply-To: References: Message-ID: |# Unrounded: 12.7 |# Rounded: 13 |# |# Ok so far. But how about 12.5: |# |# Unrounded: 12.5 |# Rounded: 12 |# |# Not quite right. But 12.5000000001: |# |# Unrounded: 12.5000000001 |# Rounded: 13 |# It's a result of the type of hardware/OS your running on. Different architectures, FP units (if available), and byte size will give different results depending on what your running on. -- Tim Rosmus Postmaster / USENET / DNS Northwest Nexus Inc. From alan at ufies.org Thu Jan 30 16:33:43 2003 From: alan at ufies.org (Alan) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems In-Reply-To: References: Message-ID: <20030130223343.GJ23767@ufies.org> Is this just the way that perl does it, or is this something that I wasn't taught in school? On Thu, Jan 30, 2003 at 05:24:01PM -0500, Adrian Hands wrote: > Odd rounds up, even rounds down. > e.g.: > > 11.5 -> 12 > 12.5 -> 12 > 13.5 -> 14 > 14.5 -> 14 > 15.5 -> 15 > > This prevents skewing in favor of up. -- Alan - http://arcterex.net --------------------------------------------------------------------- "The only thing that experience teaches us is that experience teaches us nothing. -- Andre Maurois (Emile Herzog) From spug at ifokr.org Thu Jan 30 16:37:19 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:inconsistant perl -c In-Reply-To: <20030130134014.A1236@hobart.helvella.org> References: <20030130185219.GW6124@ifokr.org> <20030130134014.A1236@hobart.helvella.org> Message-ID: <20030130223719.GG6124@ifokr.org> To bring closure to my question, here is a set of modules that would work both in a mod_perl Apache, and with 'perl -c': $ cat BriOne.pm use Apache; use BriTwo; $ cat BriTwo.pm use Apache; # Stuff to do at module load/compile time sub dostuff { my $s = Apache->server(); ... } # Call it only if Apache->server() is defined. # This only exists if we're running inside an # apache process, not on the command line. dostuff() if eval 'Apache->server()'; $ perl -c BriTwo.pm BriTwo Syntax OK $ perl -c BriOne.pm BriOne Syntax OK The problem is that Apache->server() returns the name of the server itself, not based on any request. This is what I want, because I want to load some skeleton HTML files off the file system at module load time. The files are URL dependent (I have a prod and a stage server, where the pathnames are /web/URL/etc/etc/etc.) So the hackish eval will catch if Apache->server() works (discards the value - don't need it) and only calls the sub if we're actually running. This means all my 'perl -c' tests are accurate. Previously they'd die when they hit this code, and I'd need to check each module separately. Thanks to the various folks who responded. -- Brian Hatch Variables won't. Systems and Constants aren't. Security Engineer http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030130/c9b88ad6/attachment.bin From spug at ifokr.org Thu Jan 30 16:42:27 2003 From: spug at ifokr.org (Brian Hatch) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems In-Reply-To: References: Message-ID: <20030130224227.GH6124@ifokr.org> > Odd rounds up, even rounds down. How rounding works is very dependent on what you want. Sales tax, for instance, round up. Fractional Cents => Rounded cents 10.98 => 11 10.99 => 11 11.00 => 11 11.01 => 12 11.02 => 12 ... 11.99 => 12 12.00 => 12 So the moral of the story is "be sure things do what you want them to do, don't expect them to do what you think is right, and don't say that what it does is wrong." -- Brian Hatch Attitudes are contagious. Systems and Mine might kill you. Security Engineer http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/pipermail/spug-list/attachments/20030130/902cdaa0/attachment.bin From AEH at akc.org Thu Jan 30 17:19:44 2003 From: AEH at akc.org (Adrian Hands) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:strange rounding problems Message-ID: I believe IEEE floating point specifications support four different rounding methods. This one ("round toward even") is the default. It's definately not unique to perl - C's printf rounds this way on my system too. Btw, (1) I goofed below: 15.5 -> 16. (2) this method trades bias toward infinity for bias toward even numbers, which isn't always a good thing. (3) it's important to note that while 15.5 could be rounded to 15 or 16 depending on your rounding method, 15.50001 should always round to 16 and 15.49999 should always round to 15. (assuming we're rounding to zero decimal places). (4) Somebody mentioned it being hardware/OS dependent...If so, I guess perl doesn't specify IEEE fp arithmetic conformance ? >>> Alan 01/30/03 05:33PM >>> Is this just the way that perl does it, or is this something that I wasn't taught in school? On Thu, Jan 30, 2003 at 05:24:01PM -0500, Adrian Hands wrote: > Odd rounds up, even rounds down. > e.g.: > > 11.5 -> 12 > 12.5 -> 12 > 13.5 -> 14 > 14.5 -> 14 > 15.5 -> 15 > > This prevents skewing in favor of up. From thane at fastmail.fm Fri Jan 31 01:24:09 2003 From: thane at fastmail.fm (Thane Williams) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:new mascot? Message-ID: <20030131072409.32041448CB@server2.fastmail.fm> Perl 6 RFC 343 ( http://dev.perl.org/rfc/343.pod ) suggests that a new non-camel mascot be chosen to represent the Perl community (unless O'Reilley would be willing to freely allow the camel to be used). Does anyone know anything beyond what's stated in that RFC? Ie, has O'Reilley been approached, what did they say, and what alternate mascots are being considered? From damian at conway.org Fri Jan 31 08:32:46 2003 From: damian at conway.org (Damian Conway) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:new mascot? In-Reply-To: <20030131072409.32041448CB@server2.fastmail.fm> References: <20030131072409.32041448CB@server2.fastmail.fm> Message-ID: <3E3A890E.1090303@conway.org> Thane Williams wrote: > Perl 6 RFC 343 ( http://dev.perl.org/rfc/343.pod ) suggests that a new > non-camel mascot be chosen to represent the Perl community (unless > O'Reilley would be willing to freely allow the camel to be used). > > Does anyone know anything beyond what's stated in that RFC? Ie, has > O'Reilley been approached, what did they say, and what alternate mascots > are being considered? It is virtually certain that that RFC will be rejected. O'Reilly are already generally very open to any use of the camel that does not compete commercially with their use of it. Far more so than the RFC indicates. No alternative mascots are being considered by the design team at this time. Damian From jope-spug at jope.net Fri Jan 31 14:38:49 2003 From: jope-spug at jope.net (El JoPe Magnifico) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG: new mascot? In-Reply-To: <3E3A890E.1090303@conway.org> References: <20030131072409.32041448CB@server2.fastmail.fm> <3E3A890E.1090303@conway.org> Message-ID: > Thane Williams wrote: >> Perl 6 RFC 343 ( http://dev.perl.org/rfc/343.pod ) suggests that a new >> non-camel mascot be chosen to represent the Perl community (unless >> O'Reilley would be willing to freely allow the camel to be used). [...] On Fri, 31 Jan 2003, Damian Conway wrote: > O'Reilly are already generally very open to any use of the camel > that does not compete commercially with their use of it. > Far more so than the RFC indicates. But far less than the RFC calls for: Non-competing != Unrestricted. Though it should be noted that even the BSD's daemon is technically not entirely unrestricted, but requires permission for non-personal use: http://www.mckusick.com/beastie/mainpage/copyright.html From MichaelRunningWolf at att.net Fri Jan 31 15:51:34 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Mon Aug 2 21:36:50 2004 Subject: SPUG:QOTW code-a-thon In-Reply-To: References: Message-ID: No QOTW code-a-thon this week due to lack of response. I did get a lot of response for earlier sessions, so I'll give it another try or two. Stay tuned. These sessions need not be entirely about the QOTW. If you've got a puzzle, quiz, or idea that would be fun to code or design together, let me know. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net From Liu.Zhu at mayo.edu Wed Jan 29 22:19:57 2003 From: Liu.Zhu at mayo.edu (Liu, Zhu) Date: Mon Aug 2 21:36:51 2004 Subject: SPUG:for help Message-ID: Hi, everybody, I experienced a very stupid simple problem for three hours. I just want to extract three substrings from one string. In the beginning of the string there are two spaces like 207 MFSNLASDEQDSVRLLAV---EAC--VNIAQLLPQEDLEALVMPTLRQAAEDKSWRVRYM 261 My part code is if( $line =~ /^\s+\d+.*\d$/) { ($part, $part2, $part3) = /\s+(\d+)\s(.*)\s+(\d+)/; } it always tells me "Use of uninitialized value in pattern match (m//)", so if I use the following codes if( $line =~ /^\s+\d+.*\d$/) { ($emptypart, $start, $part, $end) = split /\s+/, $line, 4; } This time I can get the items. So my question is why parentheses can't catch the substrings? Thanks, zhu liu From m3047 at inwa.net Wed Jan 1 03:49:54 2003 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:22 2004 Subject: SPUG: Boulder (YAML/XML/Bioinformatics redux) Message-ID: Sometimes you have one of those "aha" moments, and it comes out "d'oh!!". If you've used perl -d on a CGI which in turn uses CGI.pm, you've interactively entered Boulder data: http://stein.cshl.org/boulder/docs/Boulder.html Boulder is the format which CGI.pm uses for persistence. It looks more like YAML than XML. It was developed by a bioinformatics group; and if you want to know more about bioinformatics applications for Perl, reading some of the Boulder docs and looking at some of the add-ons might be informative. Boulder was developed at least partly to serve as the persistence mechanism for HTML, an SGML spinoff. Why did they use YAML-like semantics rather than an SGML derivative? And while all this was going on, the development of specifications based on SGML for encoding and exchanging large bodies of information was already being pursued by the government. I'm not going to assert any earthshaking conclusions based on the foregoing, I guess that's the point: it's just not new. -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From glyph at mac.com Wed Jan 1 18:30:48 2003 From: glyph at mac.com (Geoffrey & Kristin Grosenbach) Date: Wed Aug 4 00:09:22 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20021230121550.A16455@timji.consultix-inc.com> Message-ID: <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> During a new year's party last night, a friend who is finishing a master's degree in applied math gave me a riddle (of sorts). THE PROBLEM: Take a stick and randomly split it into three pieces. What is the probability that the three pieces will be able to make a triangle? (HINT: Three lengths make a triangle if the longest piece is shorter than the sum of the other two). | | | | | | | | | | | | | | \/ THE SOLUTION: In his college course, he came up with the answer of 50% probability. I wrote the attached Perl script to simulate this, and constently get 38%, assuming the second split is done on the larger piece. It appears that rand() is consistently random enough to give good results, so that's not an issue. Should I tell him he's wrong (and use Perl to prove it), or am I making an obvious error? Geoff -------------- next part -------------- A non-text attachment was scrubbed... Name: stick.pl Type: application/octet-stream Size: 803 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030101/b5d896a2/stick.obj From smorton at pobox.com Wed Jan 1 18:41:18 2003 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:09:22 2004 Subject: SPUG: How to get pwd (current dir name)? Message-ID: How may I get the name of the present working directory within Perl, similar to the unix `pwd` command? Also, how may I use the mode field from the stat($filename) function to test if a file is a directory, similar to -d $filename? Thanks, Sandy Morton - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Wed Jan 1 18:58:20 2003 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> References: <20021230121550.A16455@timji.consultix-inc.com> <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> Message-ID: <20030102005820.GB8641@ifokr.org> > In his college course, he came up with the answer of 50% probability. I > wrote the attached Perl script to simulate this, and constently get 38%, > assuming the second split is done on the larger piece. Don't make assumptions. Instead, use rand to generate two numbers between 0 and 100, and have those be the 'break points'. You then determine the length of the three pieces from that. See if that gives you more accurate* results. * for differing values of 'accurate'. -- Brian Hatch Inside every old person Systems and is a young person wondering Security Engineer what the hell happened. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030101/7554e557/attachment.bin From damian at conway.org Wed Jan 1 19:48:45 2003 From: damian at conway.org (Damian Conway) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030102005820.GB8641@ifokr.org> References: <20021230121550.A16455@timji.consultix-inc.com> <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> <20030102005820.GB8641@ifokr.org> Message-ID: <3E139A7D.8030804@conway.org> Brian Hatch wrote: > > In his college course, he came up with the answer of 50% probability. I > wrote the attached Perl script to simulate this, and constently get 38%, > assuming the second split is done on the larger piece. > > > Don't make assumptions. Instead, use rand to generate two numbers > between 0 and 100, and have those be the 'break points'. That set of assumptions (there are *always* assumptions) yields a probability around 25%. Another approach would be: "randomly" break the stick once, "randomly" choose one of the two pieces, then "randomly" break that piece again. That approach yields a probability around 19%. All this means is that the problem is ill-defined, particularly the word "randomly". In reality, to break a stick into three, you break it once and most probably break the bigger half again. But sticks don't break uniformly along their length. They are vastly more likely to break around the middle of the stick, where the shear forces imparted by the moment applied at the ends is greatest. If the likely point of breakage where normally distributed across the length of the stick (it wouldn't be, but it's a reasonable approximation), then the probability of forming a triangle in the way described in the previous paragraph is given by: sub norm_rand { my $norm = 0; for (1..8) { $norm += rand() } return $norm / 8; } foreach (0 .. 100_000) { # Break stick in two... my $break_at = norm_rand(); my @piece = sort { $a <=> $b } ($break_at, 1-$break_at); # Break bigger piece in two... $break_at = norm_rand(); @piece[1,2] = ($piece[1]*$break_at, $piece[1]*(1-$break_at)); # Do they form a triangle? @piece = sort { $a <=> $b } @piece; $total_tris++ if $piece[2] < $piece[1] + $piece[0]; $total_tries++; } print "Percent that made triangles: ", $total_tris/$total_tries * 100; and the probability is around 99.93% (!) So it depends entirely on how you interpret the question. Which means that, if we truly make no assumptions, then all we can deduce is that either the pieces do form a triangle, or they don't. Hence the probablity is exactly 50%. Q.E.D. ;-) Damian - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jeremycalvert2000 at yahoo.com Wed Jan 1 19:56:30 2003 From: jeremycalvert2000 at yahoo.com (Jeremy Calvert) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030102005820.GB8641@ifokr.org> Message-ID: <20030102015630.93975.qmail@web11904.mail.yahoo.com> This was a fun one. I looked at your script, and I have to agree with Brian that you make a false assumption when you first split the stick, then split the longer of the two remaining pieces. This increases your odds of getting a triangle. I get that the odds are 25% using the following reasoning. Assume the stick is 1 unit long, and that x and y are numbers between 0 and 1 indicating the location of the break. Also assume that x >= y. I assert these assumptions don't affect the outcome of the stick problem. Now consider the crude drawing included. The breaking of the stick corresponds to some point in the xy-plane. Furthermore, this point is in the region defined by x >= y, y >= 0, and x <= 1. To determine the probability that the sticks make a triangle, we need only identify which sub-regions correspond to triangl-able sticks and which don't. The length of the sticks are y, x-y, and 1-x. In the picture the red regions corrspond to values of x and y which don't yeild triangles. There are 3 of them, each corresponding to one of the sides being longer than .5, meaning it's longer than the sum of the other two sides' lengths. The green region is where the breaks do yeild a triangle, which is a triangle with 1/4 the area of the total "state space", hence 25% probability. On a side note, I think the mistake in the perl script and the increased odd of having getting a triangl exemplifies the advantage of changing your choice of door after a goat is revealed in the infamous Monty Hall problem (see http://barryispuzzled.com/zmonty.htm), but I'm not sure. Jeremy --- Brian Hatch wrote: > > > > In his college course, he came up with the answer > of 50% probability. I > > wrote the attached Perl script to simulate this, > and constently get 38%, > > assuming the second split is done on the larger > piece. > > Don't make assumptions. Instead, use rand to > generate two numbers > between 0 and 100, and have those be the 'break > points'. You then > determine the length of the three pieces from that. > See if that > gives you more accurate* results. > > > > > * for differing values of 'accurate'. > > -- > Brian Hatch Inside every old person > Systems and is a young person > wondering > Security Engineer what the hell > happened. > http://www.ifokr.org/bri/ > > Every message PGP signed > > ATTACHMENT part 2 application/pgp-signature __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -------------- next part -------------- A non-text attachment was scrubbed... Name: stick.jpg Type: image/jpeg Size: 10857 bytes Desc: stick.jpg Url : http://mail.pm.org/archives/spug-list/attachments/20030101/1cd112df/stick.jpg From jmates at sial.org Wed Jan 1 20:28:06 2003 From: jmates at sial.org (Jeremy Mates) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Re: How to get pwd (current dir name)? In-Reply-To: References: Message-ID: <20030102022805.GG1006@darkness.sial.org> * Sanford Morton [2003-01-01T16:58-0800]: > How may I get the name of the present working directory within Perl, > similar to the unix `pwd` command? perldoc Cwd > Also, how may I use the mode field from the stat($filename) function > to test if a file is a directory, similar to -d $filename? There are probably modules, or one can drag the information from stat(2) kicking and screaming. Figuratively. sub print_file_type { my $file = shift; my %st_mode_map = ( '010000' => 'named pipe (fifo)', '020000' => 'character special', '040000' => 'directory', '060000' => 'block special', '100000' => 'file', '120000' => 'link', '140000' => 'socket', '160000' => 'whiteout' ); my $mode = (lstat($file))[2]; my $type = sprintf("%06o", $mode & 0170000); my $humantype = $st_mode_map{$type}; print "$file $humantype $type $mode\n"; } -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From smorton at pobox.com Wed Jan 1 20:55:22 2003 From: smorton at pobox.com (Sanford Morton) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> Message-ID: Choose two points (x,y) on the unit interval [0,1]: 0-------x----------y----1 Typically, it would be assumed that these points are independent and identically distributed with uniform probablity on [0,1]. (Imagine the stick is placed in a darkened room which you enter blindfolded with a machete, and whack around until you hear the stick break twice--or you lose a body part.) Now fold the interval at the chosen points. 0.......x__________y....1 | | | | | | | In this picture, it looks like the segments will form a nice triangle. There are two cases in which a triangle could not be formed: -- if both points are on the same half of the stick, then the longer end segment will exceed the sum of the other two segments. Since the points are i.i.d. unif[0,1] both points will be either above or below the midpoint 50% of the time. (Most easily visualized on a unit square.) -- If the points are on opposite halves of the stick but are too far apart (> 1/2) then the middle segment will be longer than the sum of the two end segments. On the unit square, you can see that |x-y| > 1/2 occurs 25% of the time. y 1 |----------------------| |.......... | |....... | |..... | |... | 1/2|. .| | ...| | ......| | .........| | ............| |----------------------|- x 1/2 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Wed Jan 1 21:31:06 2003 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: How to get pwd (current dir name)? In-Reply-To: References: Message-ID: <20030102033106.GC8641@ifokr.org> > How may I get the name of the present working directory within Perl, > similar to the unix `pwd` command? If you are a fan of backticks: my $pwd = `pwd`; chomp $pwd; But as meantioned, Cwd module is a better choice. > Also, how may I use the mode field from the stat($filename) function > to test if a file is a directory, similar to -d $filename? $blah = stat($filename); # do stuff with $blah if ( -d _ ) { } The underscore, when used as an argument of '-d' and friends, means use most recent stat() values, rather than re-stating them. So as long as you do no stat's between the $blah line and the if line, _ will hold the value associated with $filename. No addl stat or mode AND (&) mathematics needed. -- Brian Hatch "'Welcome to Babylon 5, the Systems and last best hope for a quick buck.'" Security Engineer http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030101/c9c255ab/attachment.bin From sthoenna at efn.org Wed Jan 1 21:31:59 2003 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Re: How to get pwd (current dir name)? References: <20030102022805.GG1006@darkness.sial.org> Message-ID: On Wed, 1 Jan 2003 18:28:06 -0800, jmates@sial.org wrote: >* Sanford Morton [2003-01-01T16:58-0800]: >> How may I get the name of the present working directory within Perl, >> similar to the unix `pwd` command? > >perldoc Cwd > >> Also, how may I use the mode field from the stat($filename) function >> to test if a file is a directory, similar to -d $filename? > >There are probably modules, or one can drag the information from >stat(2) kicking and screaming. Figuratively. Instead, you can just do a "-d _" after you do the stat. "_" is a special "file handle" that checks the info from the most recent stat, lstat, or file test operator. Example: ~/bleadperl/perl/t $perl -wle' > for (<*>) { > $uid = (stat $_)[4]; > if (-d _) { > print "dir: $_"; > } else { > print "file: $_ (uid: $uid)"; > } > }' dir: base dir: cmd dir: comp file: harness (uid: 500) dir: io dir: japh dir: lib dir: op dir: pod file: README (uid: 500) dir: run file: TEST (uid: 500) file: test.pl (uid: 500) file: TestInit.pm (uid: 500) dir: uni dir: win32 dir: x2p - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Wed Jan 1 18:45:07 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> References: <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> Message-ID: Geoffrey & Kristin Grosenbach writes: [...] > In his college course, he came up with the answer of 50% > probability. I wrote the attached Perl script to simulate this, and > constently get 38%, assuming the second split is done on the larger > piece. Doesn't this assumption violate the "randomly split in pieces" clause in the problem definition? Breaking the shorter piece will certainly not allow a triangle, but that doesn't mean you should rule it out in the solution. You could optomize it out in the calculations, but you can't ignore that possible root of the equation. > It appears that rand() is consistently random enough to give good > results, so that's not an issue. Should I tell him he's wrong (and use > Perl to prove it), or am I making an obvious error? > > Geoff -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Wed Jan 1 22:27:18 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: A question of Style, was: SPUG: Sort an array question References: <20021230081043.A28548@joneil.cobaltgroup.com> Message-ID: "Jerome O'Neil" writes: > On Sat, Dec 28, 2002 at 04:06:04PM -0800, Michael R. Wolf wrote: [...] > > I for one would like that. I know what POD *is*, have even used it on > > occasion, but it would sure do me good to see some other's "favorite > > ways". Just like this current discussion is airing folks' accumulated > > *practical* knowledge of _Perl_ style, you could focus us on the > > *practical* knowledge of _POD_ style. > > I've followed the folowing conventions for the last three years, and it > works well for me. More importantly, it works well for the people that > read and maintain my code droppings. > > I can't control how the thing will be maintained in the future, but I can > at least facilitate easy maintenence. I've found that older versions > of my stuff continue to be documented in a similar fashion, which means the > anonymous maintainers are at least using the tools. Seeding a practice that's replicated!!! ['replicated' is 'peer reviewed', for some def'n of 'peer reviewed'. ] That's good enough for a start. > It also produces an attractive API document that is usefull for > demonstrating progress to your boss, or any other "don't write code" > types that might have an interest. Or "don't read code" types.... BTW, that's what *I* am (or, I suspect anyone is) on any _first_ pass over the code before I descend into a _second_ pass through the code. [...] > "The times, they are a changin'"; A subtle truth. A sublime 1, in deed! :-) -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Wed Jan 1 17:43:22 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Sort an array question In-Reply-To: References: Message-ID: Andrew Sweger writes: > On 27 Dec 2002, Michael R. Wolf wrote: > > > Andrew Sweger writes: > > > > > Granted, there are programming jobs in large organizations where there is > > > enough engineering infrastructure where a programmer can work from > > > specifications. You will see more and more of this kind of work outsourced > > > to other markets unless our economy adjusts. > > > > I don't get what you're pointing at here. Outsourced where? What > > adjustments would prevent/encourage the outsourcing? What's left *in* > > when the remainder is *out*? > > Sorry. I think there will be increasing pressure for large software > engineering organizations to send detailed specification-based jobs to > other skill markets outside of North America. The smaller organizations > will continue to rely on hero skills to get the tough jobs done (which is > where creativity will continue to flourish). I sat next to a guy from China on a recent flight. He was exporting all kinds of book manufacturing jobs to his parent's native country. As an American business man, with a Chinese ancestry, he believed that China was going to grow in these kinds of endeavors because that's what they were good at. But he also believed that America would retain a leadership role in the creativity of business and market creation, because that's what they were good at. He reminded me of a good HR person. (Yes, they exist!!!! In fact, they're crucial to any business in a growth phase.) He seemed to be looking (at a grand scale) at the skills of certain groups of people, and trying to form synergistic relationships between them that created value for each group, and the customers. The China story is about manufacturing outsourcing. I've heard about software outsourcing, too. The stories that I've heard about involve design in the US and development in India, where a well-educted software developer can make a good living for much less than in America. I've heard mixed results from this kind of off-shore partnering. On occasion, it works. But more and more, I'm hearing that the personal interactions are severly compromised. Lacking a shared culture, the communication breaks down. That's compounded by a lack of face-time. And it's further compounded by the (hey, I just read an XP book) lack of pairwise programming, and a co-located customer, thus preventing the iterative approach to product development, and forcing a "throw it over the wall" mentality (from both sides) that results in defensive, rather than cooperative, relationships, thus directing staff energy away from the product and toward communication channels. Not deadly, but not effecient. So, it's something that needs to be managed. And that's what the guy on the plane was doing between the American and Chinese teams. And it's what has taken time in the American and Indian projects. Does anyone else have any insights into this kind of multi-national working? Is it a success, for some definition of success? [...] > Change is all I know. But I also accept that I can almost be more > effective as a teacher/mentor to the young and foolish (and > significantly more creative) people that can replace me. Not _more_ effective or creative, just _differently_ effective or creative. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 01:35:10 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <3E139A7D.8030804@conway.org> References: <20021230121550.A16455@timji.consultix-inc.com> <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> <20030102005820.GB8641@ifokr.org> <3E139A7D.8030804@conway.org> Message-ID: Damian Conway writes: > sub norm_rand { > my $norm = 0; > for (1..8) { $norm += rand() } > return $norm / 8; > } Why do this at all? And why 8? -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 01:33:50 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <3E139A7D.8030804@conway.org> References: <20021230121550.A16455@timji.consultix-inc.com> <70EFCA7A-1DE9-11D7-8D71-0050E4C54C7E@mac.com> <20030102005820.GB8641@ifokr.org> <3E139A7D.8030804@conway.org> Message-ID: Damian Conway writes: [code elided...] Using Damain's code as a base, I changed two assumptions. * I always break the left-most (not longest) piece on the second break. * The second break point is independent of the first break point. Here's the modified code, which yeilds legal triangles 49.592% of the time. ================================================================ #! /usr/bin/perl -w sub norm_rand { my $norm = 0; for (1..8) { $norm += rand() } return $norm / 8; } foreach (0 .. 100_000) { # Break stick in two... my $first_break_at = norm_rand(); my @piece = ($first_break_at, 1-$first_break_at); # Break next piece in two... my $second_break_at = norm_rand(); @piece[1,2] = ($piece[1]*$second_break_at, $piece[1]*(1-$second_break_at)); # Do they form a triangle? @piece = sort { $a <=> $b } @piece; $total_tris++ if $piece[2] < $piece[1] + $piece[0]; $total_tries++; } print "Percent that made triangles: ", $total_tris/$total_tries * 100; -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 01:42:24 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Re: How to get pwd (current dir name)? In-Reply-To: <20030102022805.GG1006@darkness.sial.org> References: <20030102022805.GG1006@darkness.sial.org> Message-ID: Jeremy Mates writes: [...] > There are probably modules, or one can drag the information from > stat(2) kicking and screaming. Figuratively. > > sub print_file_type { > my $file = shift; > > my %st_mode_map = ( > '010000' => 'named pipe (fifo)', > '020000' => 'character special', > '040000' => 'directory', > '060000' => 'block special', > '100000' => 'file', > '120000' => 'link', > '140000' => 'socket', > '160000' => 'whiteout' > ); Whiteout! What's whiteout? I only know the answer because it was a quiz question at the most recent Seattle SAGE group. Do you? > my $mode = (lstat($file))[2]; > my $type = sprintf("%06o", $mode & 0170000); > my $humantype = $st_mode_map{$type}; > > print "$file $humantype $type $mode\n"; > } > > -- > Jeremy Mates http://www.sial.org/ You sneak!!!! -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 03:09:22 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Perl advent calendar Message-ID: Is it inappropriate to focus stuff here that's on other Perl mailing lists (tips-[s]ubscribe@perl.org)? I put it here because there have only been 7 of them in the life of the list. I've been enjoying this Perl Advent Calendar. Hope you do, too. [Sorry it's such a late re-posting. It sat in my bounce box because I didn't understand about the ess-you-bee (or Seirra Uniform Bravo, to the ICAO folks) problem with majordomo. Bummer!!!] -------------------- Start of forwarded message -------------------- From: Ask Bjoern Hansen To: tips@perl.org Subject: Perl Tip 7: Perl Advent Calendar Mark Fowler of the London Perl Mongers is again doing a Perl Advent calendar for the Perl community. http://www.perladvent.org/2002/ About half of the "doors" are open already, so there is plenty for you to explore. Keep checking back every day until the 24th to see the rest of what Mark will come up with. Have a great Christmas, or whatever else is appropriate in your culture. :-) - ask To un[s]ubscribe: mail tips-[u]nsubscribe@perl.org To [s]ubscribe: mail tips-[s]ubscribe@perl.org Or visit: http://learn.perl.org/tips/ Comments, suggestions? Send them to ask@perl.org or via http://learn.perl.org/tips/feedback/tip7 -------------------- End of forwarded message -------------------- -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Thu Jan 2 12:19:11 2003 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle Message-ID: What I've witnessed, following this whole thread is true reverse engineering: i.e., given a poorly specified problem and an undocumented solution, an attempt to determine what djinn the original problem solver was listening to; my gut tells me Michael has found it. Michael Wolf wote: > >Damian Conway writes: > >[code elided...] > >Using Damain's code as a base, I changed two assumptions. > > * I always break the left-most (not longest) piece on the second break. > > * The second break point is independent of the first break point. > >Here's the modified code, which yeilds legal triangles 49.592% of the >time. > >================================================================ > -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From pate at eylerfamily.org Thu Jan 2 12:27:32 2003 From: pate at eylerfamily.org (Pat Eyler) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: windfall -> contest Message-ID: I write the occasional book review. Recently, I asked for a copy of 'LDAP Programming, Integration, and Management' by Manning Press and was a bit suprised when they shipped me a couple of copies. I asked them what to do with the other one, and they said I should find someone in SPUG that would write a review of it and pass the extra copy along. Since I figure there are likely to be a few people that would like a free book, I thought I'd put together a quick contest to see who gets the free copy. I also manage the Koha project (a free software library system), so I thought I'd tie libraries, LDAP, and maybe even Perl into the contest. If you'd like to review this book, please send me an idea for using LDAP within a library system (Patron authentication is already a work in progress). You don't need to actaully implement your idea, but the idea should be clearly defined so that someone can sit down and implement it in Perl for Koha. You can send email to me directly if you'd rather not clutter the list. I'll round up the submissions on 10 Jan 2003, and will work out delivery terms with the winner. thanks, -pate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jmates at sial.org Thu Jan 2 15:57:44 2003 From: jmates at sial.org (Jeremy Mates) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Randal Swartz Presentation to the Seattle SAGE group is Next thursday 7 PM Message-ID: <20030102215744.GK1006@darkness.sial.org> ----- Forwarded message from Scottie Swenson ----- From: Scottie Swenson Subject: Randal Swartz Presentation to the Seattle SAGE group is Next thursday 7 PM The next Seattle SAGE meeting is Thursday, January 9th, 2002 at 7pm. *** Due to the expected size of the meeting it will NOT be at the UW Rosen Building. In fact we encountered a scheduling problem with the normal auditorium style room we borrow for large meetings such as this. So BE LOOKING for another email with the special location in the next few days. *** This is a very special meeting: 1) Anyone in or near the Systems Administration or Programming professions will really want to attend. 2) Randal has requested we "PASS THE HAT" for his legal defense funds and to offset the costs of his coming up here. Please note he has refused direct reimbursement from Hero Network or the Seattle SAGE Group for coming up here to give this very important presentation. 3) The meeting WILL start at 7:30 PM. Hero Network will be providing some light refreshments (soda & cold cuts) starting at 7 PM. 4) There will still be a late informal diner (NOT SPONSORED) after the meeting. Since this is a large meeting we would like a head count ahead of time so we can warn the restaurant if we have a larger then normal crowd going with us. Randal has not told us if he is coming to the diner. But, if he is Hero Network will be trying to buy him a diner at least.... :^) Please make every effort to arrive by 7:15 P.M. to claim your seat. It will very likely be standing room only. --- Next meeting: Thursday January 9th, 2002 at 7:30 PM Title: Just Another Convicted Perl Hacker by: Randal L. Schwartz Location: TO BE ANNOUNCED Directions: Web Site: http://www.seattle-sage.org/ --- This month's technical speaker is a, very real, convicted felon and co-System Administrator (and to a lot of SAGE members "one of the good guys"). You may know him better as the author of two Nutshell books for O'Reilly and Associates: "Learning Perl" (aka the Llama Book) Available in English, Japanese, French, and German; and "Programming Perl" (aka the Camel Book). Randal also writes a many technical columns for magazines like Web Techniques & Dr. Dobbs Journal. However, Randal Schwartz, in late July 1995, was convicted, by a jury, of three felony counts under Oregon's Computer Crime Law. The charges related to his activities while working as a consultant (Systems Administrator) at an Intel Corporation facility in Beaverton, Oregon. His sentence issued in September includes 5 years of probation, 480 hours of community Service, 90 days of deferred (cancelable) jail time, and $68k of restitution to Intel. His legal bill exceeded $170k by the end of 1995. Randal Schwartz is respected on the Internet for his contributions to the progress of the Perl programming language through his two books, long-time participation in the comp.lang.perl(.misc) newsgroup, moderation of the newer comp.lang.perl.announce newsgroup, and training courses. The purpose of his talk is to describe both the events, his mistakes and the problems with modern computer crime laws. This talk is to help prevent what happened to him from happening to any other well-intentioned computing professional. Preventing similar incidents requires insight into this unforeseen application of a law that is intended to protect organizations against thieves, spies, and casual intruders to the enforcement of a corporation's internal rules of operation. Randal has agreed to give us the rare opportunity to hear the entire store with all the nitty-gritty details. This means that he will need a little over 3 hours. In order to provide such a meeting we are dispensing with normal SSG business and after a short introduction the stage will be all Randal's. To make sure we do not die of thirst or malnutrition Hero Network is sponsoring a refreshments table with soft drinks, and snacks available during the 20 min half-time break. This is a powerful presentation that you might consider bring others not normally in attendance (spouses, bosses, etc.). --- This is FREE and open to the public and a wonderful opportunity. The Seattle SAGE Group (SSG) is a local group for systems & network administrators in the Seattle and Pacific northwest areas (North Western Washington). We are a local chapter of SAGE, but SAGE / USENIX membership is not a requirement. We sponsor a regular monthly meeting open to the public on the second Thursday if each month at 7 p.m. Check out our Web site for more information: http://www.seattle-sage.org/ -- Cheers, Scottie // Scottie Swenson 2308 N 149th Street, Suite #100 // President Shoreline, Washington 98133 // Hero Network phone (206)367-1675 fax (206)306-1678 // mailto:swenson@heronetwork.com http://www.heronetwork.com/ ----- End forwarded message ----- -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Thu Jan 2 17:21:25 2003 From: tim at consultix-inc.com (Tim Maher) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Jan. Meeting: The Horror of ~damian/bin ! Message-ID: <20030102152125.A5724@timji.consultix-inc.com> SPUGsters, Here's the announcement for our first *Damianiacal meeting* of the New Year, a week from next Wednesday (yes, it's Wednesday this time!). The same info's on the web site, but in *color*. Also, please note that Damian would really like to see more students in his Seattle & Kirkland training classes for that same week, so check out http://teachmeperl.com for details. FYI, here's the current schedule of Consultix classes, including Damian's: DAMIAN C: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17 T. MAHER: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13 To help you out, we've extended the 50% discounts through the weekend, for those still recovering from their vacations. 8-} ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== January 2003 Seattle Perl Users Group Meeting ----------------------------------------------------- Speaker: Damian Conway, "Renowned Perl Wizard and Modulator" damian@conway.org Time: Wednesday, January 15, 2002 7-9pm NOTE: Usual location and time, but 3rd Wednesday, rather than 3rd Tuesday! Location: SAFECO bldg, Brooklyn St. and NE 45th St. Cost: Admission is free and open to the general public. Info: http://seattleperl.org/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "Everyday Perl - The Horror that is ~damian/bin" In this new talk, Damian walks us through his ~/bin directory, explaining the numerous home-spun Perl scripts that he uses on an everyday basis. Remember, we're dealing with "The Damian" here, so just because the scripts are short and practical, that doesn't mean they can't also be scary! Pre- and Post- Meeting Activities --------------------------------- The pre-meeting dinner will be at the Cedars restaurant, at 50th St. and Brooklyn, in the University District, near the Safeco building where the meeting will take place. The phone number is 527-5247. If you're planning to be there, please post a message to the list with your expected arrival time (5:30-5:45pm is recommended). As usual, those seeking liquid input before (and/or after) the meeting are invited to congregate at the nearby Finn MacCool's tavern, at 4217 University Ave. North, (206) 675-0885. (But if somebody has a *specific recommendation* for an alternative location that's more conducive to conversation, please let me know, and we'll consider trying it out.) See the web-site for more details. ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 13:38:42 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: Message-ID: m3047@inwa.net (Fred Morris) writes: > What I've witnessed, following this whole thread is true reverse > engineering: i.e., given a poorly specified problem and an undocumented > solution, an attempt to determine what djinn the original problem solver > was listening to; my gut tells me Michael has found it. I found it! I found it!! Since you mention the djinn, perhaps I've even found GOD, which, according to Douglas Hofstadter's 1979 Pulitzer-Prize winning "Goedel, Escher, Bach" is a recursive acronym for God Of Djinn. How 'bout that? God reflected in a Perl script! It's fractals all the way down, and all the way up. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 16:54:30 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: contest -> SPUG sub-UG [was Re: SPUG: windfall -> contest] In-Reply-To: References: Message-ID: Pat Eyler writes: > I write the occasional book review. Recently, I asked for a copy of > 'LDAP Programming, Integration, and Management' by Manning Press and > was a bit suprised when they shipped me a couple of copies. [...] > I'll round up the submissions on 10 Jan 2003, and will work out > delivery terms with the winner. I noticed a "book reading club" announcement on the Portland PM group, that had started an idea brewing in the back of my mind. Your postig brought it forward. Let me suggest that when you do deliver the books that you announce it her, and then anyone who's interested in discussing the book could set up a similar meeting time/place for a group discussion. I've occasionally found that this kind of discussion helps me with books. By me sharing what I got from the book, it catalyzes the knowledge that I gained. And by listeing to others, I get points or perspectives that I had missed. Not being familiar with the book, or even LDAP, I'm not sure it's conducive to this kind of discussion. Some books are, some aren't. But there will be a few folks possibly starting to read it at the same time, so it might be a good time to try a little short-lived SPUG sub-UG for discusision of the LDAP book. It's a way to play with it, and that's learning in my book. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From AEH at akc.org Thu Jan 2 17:50:03 2003 From: AEH at akc.org (Adrian Hands) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle Message-ID: m3047@inwa.net (Fred Morris) writes: > my gut tells me Michael has found it. You realize it was the modification (norm_rand) to make the first break occur close to the middle that increased the probability to nearly 100%. Then, the modification to make it blindly choose the "left" piece, instead of the "longer" piece, for the second break, resulted in it picking the "longer" piece 1/2 the time... 1/2 of ~100% -> ~50%. It seems unlikely to me that the "friend" based his answer on the idea that it's easier to break the stick in the middle. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From asimjalis at acm.org Thu Jan 2 17:53:21 2003 From: asimjalis at acm.org (Asim Jalis) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: Message-ID: <20030102235321.GD30881@wokkil.pair.com> On Thu, Jan 02, 2003 at 11:38:42AM -0800, Michael R. Wolf wrote: > m3047@inwa.net (Fred Morris) writes: > > What I've witnessed, following this whole thread is true > > reverse engineering: i.e., given a poorly specified problem > > and an undocumented solution, an attempt to determine what > > djinn the original problem solver was listening to; my gut > > tells me Michael has found it. > > I found it! I found it!! > > Since you mention the djinn, perhaps I've even found GOD, > which, according to Douglas Hofstadter's 1979 Pulitzer-Prize > winning "Goedel, Escher, Bach" is a recursive acronym for God > Of Djinn. How 'bout that? God reflected in a Perl script! > It's fractals all the way down, and all the way up. God, as we all know, is the invisible sigil. This is discussed in excruciating detail in the Lost Perldocs. To read up on this take a look at "perldoc perllost". Hopefully they have been found by now. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Thu Jan 2 18:57:11 2003 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle Message-ID: Adrian Hands wrote: > >m3047@inwa.net (Fred Morris) writes: > >> my gut tells me Michael has found it. > >You realize it was >the modification (norm_rand) to make the first break occur close to the >middle that increased the probability to nearly 100%. >Then, the modification to make it blindly choose the "left" piece, >instead of the "longer" piece, >for the second break, resulted in it picking the "longer" piece 1/2 the >time... > 1/2 of ~100% -> ~50%. This is the crux of the djinn's counsel: to break the stick once and then again (two whacks with one blade), instead of taking a double-headed cleaver to it (one whack with two blades). Hearing the djinn's call, the acolyte mutters aloud: "who's ever heard of an axe with two heads?", forgetting for a moment that their stature as a mathematician raises them above human concerns for practicality. >It seems unlikely to me that the "friend" based his answer on the idea >that it's easier to break the stick in the middle. This is irrelevant. (Do you know the apocryphal story of how Gauss added up the numbers from 1 to 100?) -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Thu Jan 2 19:36:30 2003 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: Message-ID: <20030103013630.GK3881@ifokr.org> > This is the crux of the djinn's counsel: to break the stick once and then > again (two whacks with one blade), instead of taking a double-headed > cleaver to it (one whack with two blades). But what is the effective difference? Never was it said which piece should be cut again. should it be the big or the small one? The left or the right one? Or should it be random? This is assumption one if you break in two phases. (If you choose utterly random, there's no difference from using a double-headed cleaver. Although I suppose you could argue that very very very very infrequently you get the same random number twice in a row and end up cutting the stick in the same place, but I think we can rule that out for a large enough sample size.) The second assumption is "is a stick likely to break at every point evenly". If I bend the stick to break it, it's much more likely to break near the middle than under my thumb. I think building in stick-breakage-vs-distance logic requires research beyond the scope of the question. I'm sticking with 25% as my answer. I'd love to hear the mathematics that yielded 50%. (Not counting the averaging of random data, which yields very bad random data.) > (Do you know the apocryphal story of how Gauss added up the numbers from 1 > to 100?) Would that be 1+100 + 2+99 + 3+98 ... + 49+52 + 50+51 == 101 + 101 + 101 ... + 101 + 101 == 101 * 50 == 505 -- Brian Hatch I used to be a lumberjack, Systems and but I just couldn't hack Security Engineer it, so they gave me the ax. http://www.ifokr.org/bri/ Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030102/ac384865/attachment.bin From me at donshanks.com Thu Jan 2 20:33:07 2003 From: me at donshanks.com (Don Shanks) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030103013630.GK3881@ifokr.org> Message-ID: <001d01c2b2d0$774de310$33fea8c0@telgar> Am I missing something, or do three sticks joined end to end always make a triangle? -----Original Message----- From: owner-spug-list@pm.org [mailto:owner-spug-list@pm.org] On Behalf Of Brian Hatch Sent: Thursday, 02 January, 2003 17:37 To: Fred Morris Cc: spug-list@pm.org Subject: Re: SPUG: Stick Riddle > This is the crux of the djinn's counsel: to break the stick once and > then again (two whacks with one blade), instead of taking a > double-headed cleaver to it (one whack with two blades). But what is the effective difference? Never was it said which piece should be cut again. should it be the big or the small one? The left or the right one? Or should it be random? This is assumption one if you break in two phases. (If you choose utterly random, there's no difference from using a double-headed cleaver. Although I suppose you could argue that very very very very infrequently you get the same random number twice in a row and end up cutting the stick in the same place, but I think we can rule that out for a large enough sample size.) The second assumption is "is a stick likely to break at every point evenly". If I bend the stick to break it, it's much more likely to break near the middle than under my thumb. I think building in stick-breakage-vs-distance logic requires research beyond the scope of the question. I'm sticking with 25% as my answer. I'd love to hear the mathematics that yielded 50%. (Not counting the averaging of random data, which yields very bad random data.) > (Do you know the apocryphal story of how Gauss added up the numbers > from 1 to 100?) Would that be 1+100 + 2+99 + 3+98 ... + 49+52 + 50+51 == 101 + 101 + 101 ... + 101 + 101 == 101 * 50 == 505 -- Brian Hatch I used to be a lumberjack, Systems and but I just couldn't hack Security Engineer it, so they gave me the ax. http://www.ifokr.org/bri/ Every message PGP signed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From spug at ifokr.org Thu Jan 2 20:45:48 2003 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <001d01c2b2d0$774de310$33fea8c0@telgar> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> Message-ID: <20030103024548.GL3881@ifokr.org> > Am I missing something, or do three sticks joined end to end always make > a triangle? Stick 1: 1 inch Stick 2: 2 inches Stick 3: 400 miles So this can't make a triangle by connecting the end points. Yes, you could make a triangle with a big stick coming off one vertex... -- Brian Hatch The beautiful thing about Systems and Windows is that it doesn't Security Engineer just crash. It pops up a http://www.ifokr.org/bri/ dialog box and makes you hit 'ok' first. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030102/828a1ef7/attachment.bin From asimjalis at acm.org Thu Jan 2 20:46:19 2003 From: asimjalis at acm.org (Asim Jalis) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <001d01c2b2d0$774de310$33fea8c0@telgar> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> Message-ID: <20030103024619.GA55116@wokkil.pair.com> On Thu, Jan 02, 2003 at 06:33:07PM -0800, Don Shanks wrote: > Am I missing something, or do three sticks joined end to end > always make a triangle? They don't. Sandy Morton posted a neatly drawn ASCII picture earlier in this thread which illustrated this nicely. To demonstrate that with a concrete counter-example: Consider three sticks of length 1, 1, 3. These can't form a triangle since the sum of the first two is smaller than the third. In general, if A, B, C are the lengths of the sticks in increasing order, for them to form a triangle, A + B >= C. Asim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jay at Scherrer.com Thu Jan 2 21:04:24 2003 From: jay at Scherrer.com (Jay Scherrer) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: Message-ID: <200301021904.24961.jay@scherrer.com> On Thursday 02 January 2003 03:50 pm, Adrian Hands wrote: > m3047@inwa.net (Fred Morris) writes: > > my gut tells me Michael has found it. > > You realize it was > the modification (norm_rand) to make the first break occur close to the > middle that increased the probability to nearly 100%. > Then, the modification to make it blindly choose the "left" piece, > instead of the "longer" piece, > for the second break, resulted in it picking the "longer" piece 1/2 the > time... > 1/2 of ~100% -> ~50%. > > It seems unlikely to me that the "friend" based his answer on the idea > that it's easier to break the stick in the middle. > > That brings up a really good point! Instead of using rand(8), the rand() should be done three times, using rand(99) each. Thus the randomized cuts would truly reflect the percentage of each slice of the original stick. jay - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Thu Jan 2 21:07:27 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030103024619.GA55116@wokkil.pair.com> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> <20030103024619.GA55116@wokkil.pair.com> Message-ID: <1041563247.6489.1.camel@svetlana.penguinsinthenight.com> On Thu, 2003-01-02 at 18:46, Asim Jalis wrote: > In general, if A, B, C are the lengths of the sticks in > increasing order, for them to form a triangle, A + B >= C. > Although if A + B = C you have a degenerate triangle (basically, they "add up" to a straight line). -- * .~. `( ---------------------------------------------------------------- ` / V \ . Creede Lambard : Linux. Nontraditional, reliable, /( )\ creede@penguinsinthenight.com : free and cheap. Pick any four. ^^-^^ ---------------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030102/1c795093/attachment.bin From tim at consultix-inc.com Thu Jan 2 21:21:54 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <001d01c2b2d0$774de310$33fea8c0@telgar> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> Message-ID: <20030102192154.A7402@timji.consultix-inc.com> On Thu, Jan 02, 2003 at 06:33:07PM -0800, Don Shanks wrote: > Am I missing something, or do three sticks joined end to end always make > a triangle? I puzzled over this early on myself, because the way the problem was phrased, it could have been interpreted as "will the three sticks form a triangle -- or would it be some other geometric shape?" (as if!). And that distracted me from the real issue, which is one of "gap-bridging". Let's cast fancy formulas aside for the moment and just imagine the spatial requirements: if you had one long stick and two shorter ones, you could join two ends together, but perhaps be unable to bridge the gap between the others. For example: ---------------------- #1 \ \ #2 And here's stick #3: -- Unfortunately, #3 is too short to simultaneously touch the ends of both of the others to enclose a common area, and therefore we ain't got no triangle. Or, to approach it from Yet Another Angle, what we've got instead of a triangle is, in air travel parlance, an Open Jaw Itinerary, instead of a Circle one. -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jmates at sial.org Thu Jan 2 21:17:40 2003 From: jmates at sial.org (Jeremy Mates) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Re: Stick Riddle In-Reply-To: <20030103024548.GL3881@ifokr.org> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> <20030103024548.GL3881@ifokr.org> Message-ID: <20030103031740.GO1006@darkness.sial.org> * Brian Hatch [2003-01-02T19:03-0800]: > So this can't make a triangle by connecting the end points. Are we disallowing non-Euclidean geometries? -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030102/6abd5f51/attachment.bin From dan at concolor.org Thu Jan 2 21:44:16 2003 From: dan at concolor.org (Dan Sabath) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Jan. Meeting: The Horror of ~damian/bin ! In-Reply-To: <20030102152125.A5724@timji.consultix-inc.com> Message-ID: I'll be at Ceders at 5:45pm Dan Sabath dan@concolor.org On Thursday, Jan 2, 2003, at 15:21 US/Pacific, Tim Maher wrote: > SPUGsters, > > Here's the announcement for our first *Damianiacal meeting* > of the New Year, a week from next Wednesday (yes, it's > Wednesday this time!). The same info's on the web site, > but in *color*. > > Also, please note that Damian would really like to see more > students in his Seattle & Kirkland training classes for that > same week, so check out http://teachmeperl.com for details. > > FYI, here's the current schedule of Consultix classes, > including Damian's: > > DAMIAN C: > Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17 > T. MAHER: > Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13 > > To help you out, we've extended the 50% discounts through > the weekend, for those still recovering from their vacations. 8-} > > ====================================================== > | Tim Maher, Ph.D. tim@timmaher.org | > | JAWCAR ("Just Another White Camel Award Recipient" | > | SPUG Founder & Leader spug@seattleperl.org | > | Seattle Perl Users Group www.seattleperl.org | > ====================================================== > > January 2003 Seattle Perl Users Group Meeting > ----------------------------------------------------- > > Speaker: Damian Conway, "Renowned Perl Wizard and Modulator" > damian@conway.org > > Time: Wednesday, January 15, 2002 7-9pm > NOTE: Usual location and time, but 3rd Wednesday, > rather than 3rd Tuesday! > Location: SAFECO bldg, Brooklyn St. and NE 45th St. > > Cost: Admission is free and open to the general public. > Info: http://seattleperl.org/ > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > > "Everyday Perl - The Horror that is ~damian/bin" > > In this new talk, Damian walks us through his ~/bin directory, > explaining the numerous home-spun Perl scripts that he uses > on an everyday basis. > > Remember, we're dealing with "The Damian" here, so just because > the scripts are short and practical, that doesn't mean they > can't also be scary! > > Pre- and Post- Meeting Activities > --------------------------------- > The pre-meeting dinner will be at the Cedars restaurant, at 50th > St. and Brooklyn, in the University District, near the Safeco > building where the meeting will take place. The phone number is > 527-5247. If you're planning to be there, please post a message > to the list with your expected arrival time (5:30-5:45pm is > recommended). > > As usual, those seeking liquid input before (and/or after) the > meeting are invited to congregate at the nearby Finn MacCool's > tavern, at 4217 University Ave. North, (206) 675-0885. (But if > somebody has a *specific recommendation* for an alternative location > that's more conducive to conversation, please let me know, and > we'll consider trying it out.) > > See the web-site for more details. > > ====================================================== > | Tim Maher, Ph.D. tim@timmaher.org | > | JAWCAR ("Just Another White Camel Award Recipient" | > | SPUG Founder & Leader spug@seattleperl.org | > | Seattle Perl Users Group www.seattleperl.org | > ====================================================== > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your > Email-address > For daily traffic, use spug-list for LIST ; for weekly, > spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jeremycalvert2000 at yahoo.com Thu Jan 2 22:39:05 2003 From: jeremycalvert2000 at yahoo.com (Jeremy Calvert) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <1041563247.6489.1.camel@svetlana.penguinsinthenight.com> Message-ID: <20030103043905.21173.qmail@web11907.mail.yahoo.com> > Although if A + B = C you have a degenerate triangle > (basically, they > "add up" to a straight line). Fortunately the probability of this happening is 0 and doesn't affect one's answer, regardless of (reasonable) interpretation of problem. I'm interested in understanding why Damian's second interpretation -in which a break is made randomly somewhere on the stick, then one of the resulting sticks is chosen at random and is broken at a randomly chosen spot- has about a 19% chance of achieving triangle. Intuitively, this precise probability is 25% * (1/2 + 1/4) = 18.75%, where the two phase approach introduces a 50% liklihood of failure in the second step, but I can't find a way to express this rigorously. If you think you have a proof, I'd like to see it. J __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Thu Jan 2 22:57:45 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030103043905.21173.qmail@web11907.mail.yahoo.com> References: <20030103043905.21173.qmail@web11907.mail.yahoo.com> Message-ID: <1041569865.6597.6.camel@svetlana.penguinsinthenight.com> On Thu, 2003-01-02 at 20:39, Jeremy Calvert wrote: > > Although if A + B = C you have a degenerate triangle > > (basically, they > > "add up" to a straight line). > > Fortunately the probability of this happening is 0 and > doesn't affect one's answer, regardless of > (reasonable) interpretation of problem. > Not so. If the first break results in two sticks of equal length you will end up with a degenerate triangle, regardless of where the second break is made. -- Creede Lambard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030102/c05fc8ab/attachment.bin From oladar at drizzle.com Thu Jan 2 23:03:31 2003 From: oladar at drizzle.com (Sean Dwyer) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: FILEHANDLE - What am I missing here. Message-ID: <001f01c2b2e5$793f4640$dc0afed8@DRGNSFIRE> All, I am trying to use a file handle across several subroutines. In the code below (which is just a concept test sequence) as it stands when it hits "sometext" in sub1 I get no more lines printed. If I comment out sub1 then I dutifully get the first 200 lines of the file, 100 each from sub2 and sub3. What am I missing here. Why does seem to close (or go out of scope) after sub1. And is there a way to do what I am trying to do? thanks for any help- Sean #!/usr/bin/perl use strict; my ($i, $j); open FILE, ";} &sub1; &sub2; &sub3; sub sub1{ foreach(&getline){ print; print "SUB3"; return if(/sometext/); } } sub sub2{ for($i = 1; $i < 100; $i++){ my $test = &getline; print $test; } } sub sub3{ for($j = 1; $j < 100; $j++){ my $test = &getline; print $test; } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/spug-list/attachments/20030102/c05e89f3/attachment.htm From spug at ifokr.org Thu Jan 2 23:27:57 2003 From: spug at ifokr.org (Brian Hatch) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: FILEHANDLE - What am I missing here. In-Reply-To: <001f01c2b2e5$793f4640$dc0afed8@DRGNSFIRE> References: <001f01c2b2e5$793f4640$dc0afed8@DRGNSFIRE> Message-ID: <20030103052757.GN3881@ifokr.org> > sub1 then I dutifully get the first 200 lines of the file, 100 each from > sub2 and sub3. What am I missing here. Why does seem to close (or > go out of scope) after sub1. And is there a way to do what I am trying > to do? looks like sub1 calls getline: > foreach(&getline){ and getline looks like this > sub getline{;} Since getline returns an array (all the lines of FILE) to your foreach loop, there's nothing left in FILE. Here's sub1: > sub sub1{ > foreach(&getline){ > print; > print "SUB3"; > return if(/sometext/); > } > } Even though you may return before processing all the lines in the foreach, getline has already snagged all lines. There's nothing left in FILE by the time you call sub2, etc. You should have getline return a scalar: sub getline { scalar } That way it gets a line, not all lines. -- Brian Hatch Not one shred of Systems and evidence supports Security Engineer the notion that http://www.ifokr.org/bri/ life is serious. Every message PGP signed -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://mail.pm.org/archives/spug-list/attachments/20030102/bc2f4e22/attachment.bin From jeremycalvert2000 at yahoo.com Fri Jan 3 00:23:19 2003 From: jeremycalvert2000 at yahoo.com (Jeremy Calvert) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <1041569865.6597.6.camel@svetlana.penguinsinthenight.com> Message-ID: <20030103062319.25023.qmail@web11908.mail.yahoo.com> > > > ... if A + B = C ... > > ... the probability of this happening is 0 ... > Not so. If the first break results in two sticks of > equal length ... Is so so:). The probability of your counter-example happening is also 0. Otherwise, what is the probability that the first break results in two sticks of equal length? Such is the counter-intuitive world of infintesimals:) J __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Fri Jan 3 00:41:09 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030103062319.25023.qmail@web11908.mail.yahoo.com> References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> Message-ID: <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> On Thu, 2003-01-02 at 22:23, Jeremy Calvert wrote: > > > > ... if A + B = C ... > > > > ... the probability of this happening is 0 ... > > > Not so. If the first break results in two sticks of > > equal length ... > > Is so so:). The probability of your counter-example > happening is also 0. Otherwise, what is the > probability that the first break results in two sticks > of equal length? I still respectfully state that it's not so. The probability of the first break being exactly in the middle of the stick is vanishingly small, but so is the probability that the break appears anywhere else in the stick. Does that mean the stick can never be broken, since the probability of it breaking at any particular point is the same as the probability of it breaking at the exact center? (This probably has something to do with dividing by zero.) Not to mention the many, many circumstances in which the first break appears at location $x along the stick, and the second break causes the longer of the two sticks to split such that the longest piece left over has length of .5 . This is obviously a problem for some sort of calculus, but I'm afraid my calculus years are, ahem, many years behind me. On a similar subject, Isaac Asimov recounted a story from (I believe) his undergraduate years when he was sitting in on a class with a friend. The professor was trying to make a point about breaking a piece of chalk in half. The proto-Good Doctor said it couldn't be done, whereupon the instructor broke the piece of chalk. "That's not it," Asimov said (I'm paraphrasing, because this is all from memory). "You now have two whole pieces of chalk." The class laughed. "And even if you do have a standard measure for a piece of chalk, how do you know whether you've really broken it in half? What if the pieces are .51 and .49 of a piece of chalk? What about the dust?" For this observation he was kicked out of the class. :) The moral of this story is . . . um, always properly define your problem. I think. Or maybe it's don't try to one-up the instructor when you're in a strange class. -- * .~. `( ------------------------------------------------------------- ` / V \ . Creede Lambard : You're never too old to enjoy /( )\ creede@penguinsinthenight.com : a happy childhood ^^-^^ ------------------------------------------------------------- Perl Programmer and Linux Sysadmin, reasonable rates. Inquire within. GPG key at http://www.penguinsinthenight.com/creede_public_key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030102/47e07d58/attachment.bin From jgardn at alumni.washington.edu Fri Jan 3 08:18:52 2003 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> Message-ID: <200301030618.52701.jgardn@alumni.washington.edu> On Thursday 02 January 2003 10:41 pm, Creede Lambard wrote: > On Thu, 2003-01-02 at 22:23, Jeremy Calvert wrote: > > > > > ... if A + B = C ... > > > > > > > > ... the probability of this happening is 0 ... > > > > > > Not so. If the first break results in two sticks of > > > equal length ... > > > > Is so so:). The probability of your counter-example > > happening is also 0. Otherwise, what is the > > probability that the first break results in two sticks > > of equal length? > > I still respectfully state that it's not so. The probability of the > first break being exactly in the middle of the stick is vanishingly > small, but so is the probability that the break appears anywhere else in > the stick. Does that mean the stick can never be broken, since the > probability of it breaking at any particular point is the same as the > probability of it breaking at the exact center? (This probably has > something to do with dividing by zero.) > > Not to mention the many, many circumstances in which the first break > appears at location $x along the stick, and the second break causes the > longer of the two sticks to split such that the longest piece left over > has length of .5 . > > This is obviously a problem for some sort of calculus, but I'm afraid my > calculus years are, ahem, many years behind me. > The chances of the stick breaking exactly in some predefined way is infinitessimally small -- hence zero. My reasoning is as follows. A mathematical stick can be cut anywhere between the two ends. There is an infinite number of positions in which it can be cut, and so the chances for any one of those positions to be cut is infinitessimally small. This is not so when using perl's scalars. There is a finite number of places you can make a cut along the stick, even if you use floating point numbers (which aren't mathematically real numbers but give us a pretty good approximation). If you were able to randomly generate *any* real number between 0 and 1 in perl (you can't, so don't try!), then the situation for the mathematical stick applies. A stick that is real -- err, I mean a real stick, not a mathematical or perl one -- is made up of atomic matter that can only be subdivided in a finite number of ways. So, like the perl sticks, it can be broken in some predefined way. The chances are very, very small, but not zero. -- Jonathan Gardner jgardn@alumni.washington.edu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From glyph at mac.com Fri Jan 3 09:20:54 2003 From: glyph at mac.com (Geoffrey & Kristin Grosenbach) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: POD Talk In-Reply-To: Message-ID: By popular demand and at the request of Tim, I will be giving a short talk on the use of POD at the February SPUG meeting. Planned topics include: * Basic POD tags and syntax * Making pod2html look good with stylesheets * Targeting multiple output formats * Syntax/parser gotchas * A brief look at the code that parses POD (i.e. writing your own translator for a new or customized output format) Feel free to write me with any other POD-related topics you'd like to hear discussed. Geoff glyph@mac.com On Thursday, January 2, 2003, at 10:03 AM, Christie 'Bob' Robertson wrote: > Hey, I'd love a talk on your ways to use POD! Ask Tim about it? > Christie > > > On Sat, 28 Dec 2002, Geoffrey & Kristin Grosenbach wrote: > >> On Friday, December 27, 2002, at 12:26 PM, Brian Hatch wrote: >>> >>> If you are writing code that is only used by your employer, then >>> increased obfuscation can lead to a good situation called "job >>> security". >> >> *cold chill creeps up the back of my neck* >> >> In the Tao of Programming it is written: >> >> "Though a program be but three lines long, someday it will have to be >> maintained." >> >> >> I've spent the last month rewriting a whole Perl-based system because >> it >> was so obfuscated. (Okay, it was also failing to fulfill the purposes >> for which it was originally written, but obfuscation was one of the >> reasons for the rewrite). The people before me had either left with >> short notice, or were fired. I'm not hoping to lose my job, but I do >> hope to leave a better system for those who follow by documenting and >> using readable code (which often uses short variable names, but with >> comments). >> >> And what about POD? I'm surprised at how many Perl programmers I meet >> who don't know anything about POD (maybe I should volunteer to give a >> lightning talk on my favorite ways to use POD). It may not be as >> automatic as JavaDoc or some other in-code documentation systems, but >> it's built into the Perl interpreter and there are a lot of translators >> that can work with it. >> >> A friend of mine says: >> >> "A good programmer can recognize well-written code from 50 feet away." >> >> (He must have really good eyesight). >> >> >> Geoff http://www.GeoffreyGrosenbach.com >> >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - >> POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org >> Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL >> Replace ACTION by subscribe or unsubscribe, EMAIL by your >> Email-address >> For daily traffic, use spug-list for LIST ; for weekly, >> spug-list-digest >> Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org >> >> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 22:53:38 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: Message-ID: Sanford Morton writes: > Choose two points (x,y) on the unit interval [0,1]: > > 0-------x----------y----1 > [...] > Now fold the interval at the chosen points. > > 0.......x__________y....1 > | | > | | > | | > | [...] > y > > 1 |----------------------| > |.......... | > |....... | > |..... | > |... | > 1/2|. .| > | ...| > | ......| > | .........| > | ............| > |----------------------|- x > 1/2 1 You've elegantly transformed the 1-dimension(2 parameter) problem into a 2-dimension(1 point) problem. Bravo! What a great perspective change from which to view the solution space. This kind of side-ways thinking is why I love following these kinds of discussions, and why I'm so often surprised at how simple (or hard) a problem can become when a separate perspective is taken. Thanks for the paradigm shift! -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 22:48:08 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:23 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030103013630.GK3881@ifokr.org> References: <20030103013630.GK3881@ifokr.org> Message-ID: Brian Hatch writes: > == 101 * 50 == 505 Oops! == 101 * 50 == 5050 5050 - fifty-fifty? There's that number again!!! Have we stumbled across some new golden mean? I didn't mean to. As my former mother-in-law used to say, "It's 7 to one, half a dozen of another." -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 22:45:30 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Jan. Meeting: The Horror of ~damian/bin ! In-Reply-To: <20030102152125.A5724@timji.consultix-inc.com> References: <20030102152125.A5724@timji.consultix-inc.com> Message-ID: Tim Maher writes: [...] > Pre- and Post- Meeting Activities > --------------------------------- > The pre-meeting dinner will be at the Cedars restaurant, at 50th > St. and Brooklyn, in the University District, near the Safeco > building where the meeting will take place. The phone number is > 527-5247. If you're planning to be there, please post a message > to the list with your expected arrival time (5:30-5:45pm is > recommended). I'll be there at 5:30. -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Thu Jan 2 22:44:33 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Stick Riddle In-Reply-To: <20030102192154.A7402@timji.consultix-inc.com> References: <20030103013630.GK3881@ifokr.org> <001d01c2b2d0$774de310$33fea8c0@telgar> <20030102192154.A7402@timji.consultix-inc.com> Message-ID: SPUG-list-owner writes: [...] > Or, to approach it from Yet Another Angle, what we've got instead of a > triangle is, in air travel parlance, an Open Jaw Itinerary, instead of > a Circle one. Once you bring in great circle routing, you've gotten away from Euclidean geometry! :-) -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Fri Jan 3 12:37:24 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Stick Riddle In-Reply-To: <200301030618.52701.jgardn@alumni.washington.edu> References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> <200301030618.52701.jgardn@alumni.washington.edu> Message-ID: Jonathan Gardner writes: > On Thursday 02 January 2003 10:41 pm, Creede Lambard wrote: > > On Thu, 2003-01-02 at 22:23, Jeremy Calvert wrote: > > > > > > ... if A + B = C ... > > > > > > > > > > ... the probability of this happening is 0 ... > > > > > > > > Not so. If the first break results in two sticks of > > > > equal length ... > > > > > > Is so so:). The probability of your counter-example > > > happening is also 0. Otherwise, what is the > > > probability that the first break results in two sticks > > > of equal length? > > > > I still respectfully state that it's not so. The probability of the > > first break being exactly in the middle of the stick is vanishingly > > small, but so is the probability that the break appears anywhere else in > > the stick. Does that mean the stick can never be broken, since the > > probability of it breaking at any particular point is the same as the > > probability of it breaking at the exact center? (This probably has > > something to do with dividing by zero.) > > > > Not to mention the many, many circumstances in which the first break > > appears at location $x along the stick, and the second break causes the > > longer of the two sticks to split such that the longest piece left over > > has length of .5 . > > > > This is obviously a problem for some sort of calculus, but I'm afraid my > > calculus years are, ahem, many years behind me. > > > > The chances of the stick breaking exactly in some predefined way is > infinitessimally small -- hence zero. infintessimally small is not zero infintessimally small is infintessimally small You're playing with Zeno's Paradox, except that you seem to be working with a mortise (and possibly a tenon?) instead of a tortoise and Achilles (but not a tendon!), and are therefore barking up the tree that bore the fruits known as integral calculus. Google for "zeno paradox" or take a quick look at this cute description http://www.mathacademy.com/pr/prime/articles/zeno_tort/index.asp -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From harry.l.wegley at pss.boeing.com Fri Jan 3 13:27:38 2003 From: harry.l.wegley at pss.boeing.com (Wegley, Harry L) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Stick Riddle Message-ID: In the real world, wouldn't the breaks occur at the molecular level. There are not an infinite number of molecules between the ends of the stick, so the probability of breaking the stick in 2 equal parts appears to be small, but finite. However, there are the problems of the geometry as well as the physical properties of the stick (e.g. it probably would not break normally to its surface; the stick is not a perfectly circular rod; molecules splinter off when it breaks, etc.) In the real world things usually become finite, but other complicating factors are introduced. --Harry Wegley -----Original Message----- From: Jonathan Gardner [mailto:jgardn@alumni.washington.edu] Sent: Friday, January 03, 2003 6:19 AM To: Creede Lambard; Jeremy Calvert Cc: spug-list@pm.org Subject: Re: SPUG: Stick Riddle On Thursday 02 January 2003 10:41 pm, Creede Lambard wrote: > On Thu, 2003-01-02 at 22:23, Jeremy Calvert wrote: > > > > > ... if A + B = C ... > > > > > > > > ... the probability of this happening is 0 ... > > > > > > Not so. If the first break results in two sticks of > > > equal length ... > > > > Is so so:). The probability of your counter-example > > happening is also 0. Otherwise, what is the > > probability that the first break results in two sticks > > of equal length? > > I still respectfully state that it's not so. The probability of the > first break being exactly in the middle of the stick is vanishingly > small, but so is the probability that the break appears anywhere else in > the stick. Does that mean the stick can never be broken, since the > probability of it breaking at any particular point is the same as the > probability of it breaking at the exact center? (This probably has > something to do with dividing by zero.) > > Not to mention the many, many circumstances in which the first break > appears at location $x along the stick, and the second break causes the > longer of the two sticks to split such that the longest piece left over > has length of .5 . > > This is obviously a problem for some sort of calculus, but I'm afraid my > calculus years are, ahem, many years behind me. > The chances of the stick breaking exactly in some predefined way is infinitessimally small -- hence zero. My reasoning is as follows. A mathematical stick can be cut anywhere between the two ends. There is an infinite number of positions in which it can be cut, and so the chances for any one of those positions to be cut is infinitessimally small. This is not so when using perl's scalars. There is a finite number of places you can make a cut along the stick, even if you use floating point numbers (which aren't mathematically real numbers but give us a pretty good approximation). If you were able to randomly generate *any* real number between 0 and 1 in perl (you can't, so don't try!), then the situation for the mathematical stick applies. A stick that is real -- err, I mean a real stick, not a mathematical or perl one -- is made up of atomic matter that can only be subdivided in a finite number of ways. So, like the perl sticks, it can be broken in some predefined way. The chances are very, very small, but not zero. -- Jonathan Gardner jgardn@alumni.washington.edu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From sthoenna at efn.org Fri Jan 3 14:09:50 2003 From: sthoenna at efn.org (Yitzchak Scott-Thoennes) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: The Stick Riddle, with a Twist References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> Message-ID: On 02 Jan 2003 22:41:09 -0800, creede@penguinsinthenight.com wrote: >On a similar subject, Isaac Asimov recounted a story from (I believe) >his undergraduate years when he was sitting in on a class with a friend. >The professor was trying to make a point about breaking a piece of chalk >in half. The proto-Good Doctor said it couldn't be done, whereupon the >instructor broke the piece of chalk. > >"That's not it," Asimov said (I'm paraphrasing, because this is all from >memory). "You now have two whole pieces of chalk." The class laughed. >"And even if you do have a standard measure for a piece of chalk, how do >you know whether you've really broken it in half? What if the pieces are >.51 and .49 of a piece of chalk? What about the dust?" > >For this observation he was kicked out of the class. :) > >The moral of this story is . . . um, always properly define your >problem. I think. Or maybe it's don't try to one-up the instructor when >you're in a strange class. This misses the point of the story. IIRC, the professor was asserting that mathemeticians are mystics since they believe in the square root of -1. Asimov was defending mathemeticians by pointing out the equal "unreality" of 1/2. To return to the topic at hand, here's a new twist on the stick riddle: Assume the stick is an even number of units "L" long (for L >= 3). Break the stick into 3 sections (each an integral number >= 1 of units long). What percentage of possible combinations make a valid triangle (considering invalid the degenerate A+B=C case). How about permutations? What is the limit of the percentage as L approaches infinity? (For both combinations and permutations.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Fri Jan 3 14:56:43 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: The Stick Riddle, with a Twist In-Reply-To: References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> <1041576069.6489.19.camel@svetlana.penguinsinthenight.com> Message-ID: <1041627403.6489.54.camel@svetlana.penguinsinthenight.com> On Fri, 2003-01-03 at 12:09, Yitzchak Scott-Thoennes wrote: > This misses the point of the story. IIRC, the professor was asserting that > mathemeticians are mystics since they believe in the square root of -1. > Asimov was defending mathemeticians by pointing out the equal "unreality" > of 1/2. As I said, it's been a very long time since I read the story. Thank you. > -- > Creede Lambard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030103/f8bba36b/attachment.bin From tim at consultix-inc.com Fri Jan 3 15:20:40 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: NO MORE STICK RIDDLE POSTINGS ALLOWED! Message-ID: <20030103132040.A13407@timji.consultix-inc.com> Okay guys, we're losing [s]ubscribers in droves at this point, and we've already beaten this subject to death. Start a separate "stick-riddle-nuts" list for any further discussions. -Tim P.S. WARNING: I have the ability to "un[s]ubscribe" you! Don't make me do it ! 8-} ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Fri Jan 3 19:08:11 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? Message-ID: <20030103170811.A14774@timji.consultix-inc.com> Beloved SPUGsters (*except* for you Stick-Riddle lunatics 8-} ), I guess I've led a charmed life, because I never had to install any CPAN modules as a non-root user before. And I can't believe how inconvenient the setup is, which probably means I'm doing it the hard way: First, the only way I've found to get CPAN to ignore the system-wide [c]onfig file, if it's already there, and prompt me to fill in my own preferences is by first creating in the [c]onfig file the empty anonymous hash (just creating the file doesn't do it): !# echo '$CPAN::Config={};' > ~/.cpan/CPAN/MyConfig.pm Then, after doing !# perl -MCPAN -e shell, I have to do the following to set up the appropriate variables (although perhaps I could have echo'd them up above as hash initializers, I didn't try): o conf makepl_arg "LIB=~/class/lib \ INSTALLMAN1DIR=~/class/man/man1 \ INSTALLMAN3DIR=~/class/man/man3" o conf commit Is this as good as it gets? Or is there an easier way? -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* ----- End forwarded message ----- -- -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jsl at blarg.net Fri Jan 3 19:21:13 2003 From: jsl at blarg.net (Jim Ludwig) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? In-Reply-To: <20030103170811.A14774@timji.consultix-inc.com> (message from SPUG-list-owner on Fri, 3 Jan 2003 17:08:11 -0800) Message-ID: SPUG-list-owner wrote: >> I guess I've led a charmed life, because I >> never had to install any CPAN modules as a >> non-root user before. And I can't believe how >> inconvenient the setup is, which probably means >> I'm doing it the hard way: >> >> [...] >> >> Is this as good as it gets? Or is there an >> easier way? Given the constraints, the easiest way of all would be to install Perl itself as a non-root user into your home directory, then to make sure the perl in your home directory comes before the system-wide perl in your PATH. Or, heh, perhaps that's not seen as easier at all, but it's what I would do. jim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Fri Jan 3 19:32:57 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? In-Reply-To: <20030103170811.A14774@timji.consultix-inc.com> References: <20030103170811.A14774@timji.consultix-inc.com> Message-ID: <1041643977.6597.106.camel@svetlana.penguinsinthenight.com> Well, I'm not responding to this, because: 1. Of this: > Beloved SPUGsters (*except* for you Stick-Riddle lunatics 8-} ), :p 2. Because it looks like you've already gone through the man page, which is what I would have done. The only thing I have to add is that when I tried this on a system where I don't have root access, it wanted to rewrite my ~/.cpan/CPAN/MyConfig.pm because it didn't know about caching metadata. -- Creede Lambard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030103/10e88b9c/attachment.bin From glyph at mac.com Fri Jan 3 20:12:29 2003 From: glyph at mac.com (Geoffrey & Kristin Grosenbach) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Last Stick Comment (seriously) Message-ID: I never thought I would generate such a discussion with my stick riddle, but it has been thoroughly entertaining! I nearly sprayed a mouthful of mint tea on my monitor while reading Damian's explanation of the shearing qualities of sticks! I'm just hoping Tim won't force me to do a talk on "Splitting Sticks with Perl." ; ) Nonetheless, I'll put all these ideas together and send them to my friend. If he doesn't choke on the bulk of this discourse, I might even be able to convince him to learn Perl! Geoff http://www.GeoffreyGrosenbach.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From thane at fastmail.fm Fri Jan 3 20:32:55 2003 From: thane at fastmail.fm (Thane Williams) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? Message-ID: <20030104023255.E24763EA0C@server2.fastmail.fm> Since I'm not a stick-riddle lunatic I'll put in a word: I don't use the CPAN shell, and all I've had to do is perl Makefile.PL PREFIX=~/lib/perl make make install This can vary. One I had to: perl Makefile.PL INSTALLSITELIB=~/lib/perl \ INSTALLMAN3DIR=~/lib/perl/man/man3 make make install Still seems easier than what you were doing. Of course, your programs have to have: use lib '/home/thane/lib/perl'; (Assuming you're named Thane, which has always been the case for me.) On Fri, 3 Jan 2003 17:08:11 -0800, "SPUG-list-owner" said: > Beloved SPUGsters (*except* for you Stick-Riddle lunatics 8-} ), > > I guess I've led a charmed life, because I never had to install > any CPAN modules as a non-root user before. And I can't believe > how inconvenient the setup is, which probably means I'm doing it > the hard way: > > First, the only way I've found to get CPAN to ignore the system-wide > [c]onfig file, if it's already there, and prompt me to fill in my > own preferences is by first creating in the [c]onfig file > the empty anonymous hash (just creating the file doesn't do it): > > !# echo '$CPAN::Config={};' > ~/.cpan/CPAN/MyConfig.pm > > Then, after doing > > !# perl -MCPAN -e shell, > > I have to do the following to set up the appropriate variables (although > perhaps I could have echo'd them up above as hash initializers, I didn't > try): > > o conf makepl_arg "LIB=~/class/lib \ > INSTALLMAN1DIR=~/class/man/man1 \ > INSTALLMAN3DIR=~/class/man/man3" > o conf commit > > Is this as good as it gets? Or is there an easier way? > > -Tim > *----------------------------------------------------------------------------* > | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) > DOC-LINUX | > | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") > | > | tim@consultix-inc.com teachmeunix.com teachmeperl.com > teachmelinux.net | > *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* > | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: > 2/13; | > | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; > | > *----------------------------------------------------------------------------* > > ----- End forwarded message ----- > > -- > -Tim > *----------------------------------------------------------------------------* > | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) > DOC-LINUX | > | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") > | > | tim@consultix-inc.com teachmeunix.com teachmeperl.com > teachmelinux.net | > *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* > | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: > 2/13; | > | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; > | > *----------------------------------------------------------------------------* > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, > spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Fri Jan 3 20:47:00 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Last Stick, call for SPUG Town Crier In-Reply-To: References: Message-ID: <20030103184700.B15193@timji.consultix-inc.com> On Fri, Jan 03, 2003 at 06:12:29PM -0800, Geoffrey & Kristin Grosenbach wrote: > > I never thought I would generate such a discussion with my stick riddle, Nor did we . . . But thank God it's finally over. Over, right? *C'mon*, everybody say it along with me, "The Stick Riddle Thread is Over!" Thank you. > but it has been thoroughly entertaining! I nearly sprayed a mouthful of > mint tea on my monitor while reading Damian's explanation of the > shearing qualities of sticks! I'm just hoping Tim won't force me to do a > talk on "Splitting Sticks with Perl." ; ) > Geoff Not on your life. But I *was* thinking about asking you to write something 100 times on a blackboard . . . Yes Geoff, it was an amazing thread, especially because it showcased the collective intelligence and imagination of the group like no other topic ever did. Which reminds me of something I'd like to run by the group! I've been thinking that in every meeting, we should have a 10-minute "current affairs" update as part of our normal routine. In that segment, someone would summarize the last month's salient postings on use.perl.org, inform us about open calls for conference papers, describe newly released modules by SPUG members, and recount the most interesting threads on our mailing list. All in bullet-item format, with few details, but lots of pointers for more information. An associated posting on our web site would help in this regard. Any volunteers? I see this as a rotating assignment, where one volunteer would have the responsibility for one quarter or so, and then pass the baton on to the next one (because it would be too much work to try to recruit a new "SPUG Town Crier" for every meeting, along with recruting the speakers as well). How do the rest of you feel about this? -Tim ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From creede at penguinsinthenight.com Fri Jan 3 20:46:40 2003 From: creede at penguinsinthenight.com (Creede Lambard) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? In-Reply-To: <20030104023255.E24763EA0C@server2.fastmail.fm> References: <20030104023255.E24763EA0C@server2.fastmail.fm> Message-ID: <1041648399.6489.121.camel@svetlana.penguinsinthenight.com> On Fri, 2003-01-03 at 18:32, Thane Williams wrote: > Still seems easier than what you were doing. Of course, your programs > have to have: > use lib '/home/thane/lib/perl'; Or alternatively you can set the environment variable PERL5LIB=/home/thane/lib/perl which I believe should have the same effect. -- Creede Lambard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/archives/spug-list/attachments/20030103/20a75c62/attachment.bin From wim at nyetwork.org Fri Jan 3 20:49:02 2003 From: wim at nyetwork.org (Wim Kerkhoff) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? In-Reply-To: <20030103170811.A14774@timji.consultix-inc.com> Message-ID: <000301c2b39b$d702e870$0414a8c0@carpus> Tim said: > Beloved SPUGsters (*except* for you Stick-Riddle lunatics 8-} ), > > I guess I've led a charmed life, because I never had to > install any CPAN modules as a non-root user before. And I > can't believe how inconvenient the setup is, which probably > means I'm doing it the hard way: Try "The CPAN.pm Shell and Locally Installed Modules" from Stas Bekman's article: http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=2 Regards, Wim Kerkhoff wim@nyetwork.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From ryanparr at thejamescompany.com Fri Jan 3 23:37:16 2003 From: ryanparr at thejamescompany.com (Ryan Parr) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: non-Root CPAN Config; easier way? In-Reply-To: <000301c2b39b$d702e870$0414a8c0@carpus> Message-ID: Additionally, the new CPANPLUS module makes the process easier. When you set it up it gives you the option of using ~/.cpanplus or lib/cpanplus for everything it does. Works cleanly as far as I can tell. And it's easy to use programatically, so it's a double win :) -----Original Message----- From: owner-spug-list@pm.org [mailto:owner-spug-list@pm.org]On Behalf Of Wim Kerkhoff Sent: Friday, January 03, 2003 7:49 PM To: spug-list@pm.org Subject: RE: SPUG: non-Root CPAN Config; easier way? Tim said: > Beloved SPUGsters (*except* for you Stick-Riddle lunatics 8-} ), > > I guess I've led a charmed life, because I never had to > install any CPAN modules as a non-root user before. And I > can't believe how inconvenient the setup is, which probably > means I'm doing it the hard way: Try "The CPAN.pm Shell and Locally Installed Modules" from Stas Bekman's article: http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=2 Regards, Wim Kerkhoff wim@nyetwork.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Fri Jan 3 23:48:58 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Jan. TPJ is out! Message-ID: <20030103214858.A16344@timji.consultix-inc.com> SPUGsters (and I'll even including the "Stick-Riddle Fanatics" this time), Just wanted to let you know that the new Perl Journal issue is out now, with some interesting articles. Including ones on Juggling, Rubies, and Cookies! Surf on over to www.tpj.com and [s[ubscribe (for $12), if you haven't already, and check it out. -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Sat Jan 4 04:24:55 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: New TPJ Issue: DANGER! Message-ID: <20030104022455.A17716@timji.consultix-inc.com> SPUGsters (including Stick-Riddlers), Well, I must say I'm embarrassed for having encouraged you all to check out the new Perl Journal issue. I did, about 10pm, and I've been up until now (2:10 am) giving the editor a piece of my mind. My big mistake was in glancing at an article about "Building your own Perl Modules", while looking for my display ad. I spent the next several hours documentating all the stylistic, technical, and grammatical flaws exhibited by the programs it contained, and making it clear to the editorial staff that yes, even at $1 per issue, we deserve better than this! On the other hand, I liked the article by Simon Cozens on Ruby, which was well written, educational, and entertaining, with only one error (a '=>' that should have been a '->'). But TPJ gets no credit for the quality of this piece, because Simon would have submitted it that way in the first place! I'm afraid to look at any of the other articles, because I'd really prefer to stop typing and go to sleep, so I'll just leave you with this warning that the Modules article is pretty nasty. All you can learn from it is how NOT to conceive of, implement, and document a module. 8-{ Maybe the copy editor is just on vacation, and the next issue will be better? Frankly, this is the first TPJ from the "downloading era" I've looked at this closely; I hope they haven't all been this dodgy! -Tim P.S. I've often said that Jon Orwant is the best technical editor of our generation; too bad he has nothing to do with TPJ any more. *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Sat Jan 4 15:00:04 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Jan. TPJ is out! In-Reply-To: <20030103214858.A16344@timji.consultix-inc.com> References: <20030103214858.A16344@timji.consultix-inc.com> Message-ID: SPUG-list-owner writes: > SPUGsters (and I'll even including the "Stick-Riddle Fanatics" this time), > > Just wanted to let you know that the new Perl Journal issue is out now, > with some interesting articles. Including ones on Juggling, Rubies, > and Cookies! I hope they're not juggling broken sticks..... But if they are, we know where to send them. :-) -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From cansubaykan at hotmail.com Mon Jan 6 13:33:09 2003 From: cansubaykan at hotmail.com (John Subaykan) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: File::Find, skipping next directory Message-ID: I'm using File::Find to process a large number of files one directory down from where I am running the program. I have several directories named something similar to this: topdir/dir33 dopdir/dir34 topdir/dir35 .. topdir/dir98 topdir/dir99 my $the_dir = "topdir"; my @tododirs = ($the_dir); find({ wanted => \&do_it, no_chdir => 1 }, @tododirs); süb do_it { return unless (-T $File::Find::name); # during testing, I want to run tests on individual # files, in this case, say I want to run the test on # ./topdir/dir78/file78-100.html return unless $File::Find::name =~ /dir78\/file78-100\.html$/; # if I put the above line to skip until I get to the # file I want, I still have to wait for the script to # check all the files starting from dir99 and working # backwards (File::Find seems to sort descending?) # even if I specify this: return unless $File::Find::dir =~ /dir78$/; # it still looks at every file in the directories before 'dir78'. } so is there a way to skip the whole directory using File::Find without modifying the path of the starting directory (in my case e.g. without changing "topdir" to "topdir/dir78")? a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this email list to avoid typing the letters "s", "u", and "b" together? I chose "süb" just to be different and I'm just asking because my name begins with these three letters. John [S]ubaykan _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jmates at sial.org Mon Jan 6 14:00:46 2003 From: jmates at sial.org (Jeremy Mates) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Re: File::Find, skipping next directory In-Reply-To: References: Message-ID: <20030106200046.GG1006@darkness.sial.org> * John Subaykan [2003-01-06T11:53-0800]: > so is there a way to skip the whole directory using File::Find without > modifying the path of the starting directory (in my case e.g. without > changing "topdir" to "topdir/dir78")? See File::Find::prune in 'perldoc File::Find' > a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this > email list to avoid typing the letters "s", "u", and "b" together? I chose > "s?b" just to be different and I'm just asking because my name begins with > these three letters. administrivia = yes Is likely enabled in the majordomo config for the list, and should be set to no. The default check yields a large number of false positives. -- Jeremy Mates http://www.sial.org/ OpenPGP: 0x11C3D628 (4357 1D47 FF78 24BB 0FBF 7AA8 A846 9F86 11C3 D628) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Mon Jan 6 14:01:35 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: File::Find, skipping next directory In-Reply-To: References: Message-ID: <20030106120135.A7738@timji.consultix-inc.com> On Mon, Jan 06, 2003 at 11:33:09AM -0800, John Subaykan wrote: > > a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this > email list to avoid typing the letters "s", "u", and "b" together? I chose > "s?b" just to be different and I'm just asking because my name begins with > these three letters. > > John [S]ubaykan > Majordomo's sensitivity to words that look like list management requests is localized to the first ten lines of the message. So just make sure your messages are at least that long before typing your name, and you'll be okay! ====================================================== | Tim Maher, Ph.D. tim@timmaher.org | | JAWCAR ("Just Another White Camel Award Recipient" | | SPUG Founder & Leader spug@seattleperl.org | | Seattle Perl Users Group www.seattleperl.org | ====================================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From jgardn at alumni.washington.edu Mon Jan 6 22:24:48 2003 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Stick Riddle In-Reply-To: References: <20030103062319.25023.qmail@web11908.mail.yahoo.com> <200301030618.52701.jgardn@alumni.washington.edu> Message-ID: <200301062024.48893.jgardn@alumni.washington.edu> On Friday 03 January 2003 10:37, Michael R. Wolf wrote: > infintessimally small is not zero > > infintessimally small is infintessimally small > > You're playing with Zeno's Paradox, except that you seem to be working > with a mortise (and possibly a tenon?) instead of a tortoise and > Achilles (but not a tendon!), and are therefore barking up the tree > that bore the fruits known as integral calculus. > It is true that infinitessimally small is zero. Let me explain. The chance of having the mathematical stick break in exactly one spot is one divided by the number of spots you can divide the stick at. There are an infinite number of points you can break the stick at. We can't divide any number by infinity and get a number we understand (we're calling this number "infinitessimally small", but we really should call it "1 divided by infinity"). We have take the limit as the number of spots you can divide the stick at approaches infinity and see what the number tends towards. This is written in English as "the limit of 1 over x as x approaches inifinity". This is most definitely zero. There is no other number that this approaches. Therefore, our number "infinitessimally small", which I prefer to call "1 divided by infinity", is indeed zero. You're right, the idea of limits and finding numbers you can't normally find is the basis of calculus. Now what does this have to do with perl? I don't know. Anyone care to explain? -- Jonathan Gardner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From MichaelRunningWolf at att.net Mon Jan 6 19:06:53 2003 From: MichaelRunningWolf at att.net (Michael R. Wolf) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Re: [Pdx-pm] Meeting In-Reply-To: <20030107000753.GU6237@eli.net> References: <20030107000753.GU6237@eli.net> Message-ID: Anyone interested in a road trip to Portland? The Portland Perl Mongers are having a meeting this Wednesday, January 8th. Topic: Ruby for Perl Programmers or What's all this Ruby stuff? Michael Wolf ================================================================ Joshua Keroes writes: > Looks like there's a meeting this Wedsnesday. http://portland.pm.org/ says: > > News > > The next meeting is Wednesday Jan 8th 2003, this will be the first > meeting of 2003. Phil Tomson will be speaking on Ruby for Perl > programmers > > Bio: Phil Tomson > > I've been programming in Ruby for about 2 years now - sometimes even > for money! (though not currently) Prior to that I did a fair amount of > Perl programming for about six years. Prior to that (about 10 years > ago) I was an ASIC (hardware) engineer. > > Topic: Ruby for Perl Programmers or What's all this Ruby stuff? > > You can do object oriented Perl programming and I have, but, uh, ... > how can I put this tactfully considering the audience... well, it just > kind of began to make my eyes hurt ;-) After finding Ruby a couple of > years back my eyes are feeling much better. > > So "Why should I learn Ruby?" you ask? Well, it has a lot of the same > features you like about Perl - like regular expressions, strings, > arrays, hashes - but they're used in a very object oriented, > consistent manner. Ruby is different enough from Perl to so that > learning it will help you to look at programming problems in a new > light and that's always valuable. I've also found that Ruby is easy > for Perl programmers to learn - it only took me a few days to become > comfortable with Ruby. > > I'll present a quick introduction to Ruby and how it's similar to and > yet different from Perl. > > Where and when > > Place: Onsite! Technology, Inc. > Address: 333 SE 3rd, Portland, OR > Date and Time: 2003-01-08 at 7:00 PM > URL: www.onsitetech.com > > There will be a social meeting at Rose and Raindrop at 6:00 PM. The > address is 532 S.E. Grand and it's about 3 blocks from the Onsite! > Technology offices. > > __END__ > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -- Michael R. Wolf All mammals learn by playing! MichaelRunningWolf@att.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From tim at consultix-inc.com Mon Jan 6 21:12:07 2003 From: tim at consultix-inc.com (SPUG-list-owner) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Re: File::Find, skipping next directory In-Reply-To: <20030106200046.GG1006@darkness.sial.org> References: <20030106200046.GG1006@darkness.sial.org> Message-ID: <20030106191207.A10027@timji.consultix-inc.com> On Mon, Jan 06, 2003 at 12:00:46PM -0800, Jeremy Mates wrote: > > > a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this > > email list to avoid typing the letters "s", "u", and "b" together? I chose > > "s?b" just to be different and I'm just asking because my name begins with > > these three letters. > > administrivia = yes > > Is likely enabled in the majordomo config for the list, and should be > set to no. The default check yields a large number of false positives. > > -- > Jeremy Mates http://www.sial.org/ I figure that's preferable to reducing the number of "true postitives" to *zero*, and having actual attempts to unzubscribe (which happen regularly) appear on the list. But my ultimate plan is to get us switched over to the alternate "mailman" list server; I've asked 5 times already, and am hoping that the 6th time will be the charm. -Tim *----------------------------------------------------------------------------* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. & JAWCAR ("Just Another White Camel Award Recipient") | | tim@consultix-inc.com teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | MAHER CLASSES: Minimal Perl: 1/27; UNIX: 1/28; Perl: 2/10; Modules: 2/13; | | DAMIAN CLASSES: Munging: 1/13; Regexes: 1/15; BioInfo: 1/15; OOP: 1/17; | *----------------------------------------------------------------------------* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From moonbeam at catmanor.com Mon Jan 6 21:37:50 2003 From: moonbeam at catmanor.com (William Julien) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Re: File::Find, skipping next directory Message-ID: <200301070337.h073bo405343@catmanor.com> > >On Mon, Jan 06, 2003 at 12:00:46PM -0800, Jeremy Mates wrote: >> >> > a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this >> > email list to avoid typing the letters "s", "u", and "b" together? I chose >> > "s?b" just to be different and I'm just asking because my name begins with >> > these three letters. >> >> administrivia = yes >> >> Is likely enabled in the majordomo config for the list, and should be >> set to no. The default check yields a large number of false positives. >> >> -- >> Jeremy Mates http://www.sial.org/ > >I figure that's preferable to reducing the number of "true postitives" to >*zero*, and having actual attempts to unzubscribe (which happen regularly) >appear on the list. But my ultimate plan is to get us switched over to >the alternate "mailman" list server; I've asked 5 times already, and am >hoping that the 6th time will be the charm. Considering the purpose of this list, I think it would be better to get the bozo unzubscribe requests, than to force everyone to munge thier code on for each '[s]ub xxxx {' code on every post. Anyone care to comment? William - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From m3047 at inwa.net Tue Jan 7 01:37:51 2003 From: m3047 at inwa.net (Fred Morris) Date: Wed Aug 4 00:09:24 2004 Subject: The Smart List Re: SPUG: Re: File::Find, skipping next directory Message-ID: Haven't people heard of SmartList? http://www.hartzler.net/smartlist/SmartList-FAQ.html SPUG-list-owner wrote: >On Mon, Jan 06, 2003 at 12:00:46PM -0800, Jeremy Mates wrote: >> >> > a 'by-the-way' question; why do we use words like "Zub" or "[s]ub" on this >> > email list to avoid typing the letters "s", "u", and "b" together? I >>chose >> > "s?b" just to be different and I'm just asking because my name begins with >> > these three letters. >> >> administrivia = yes >> >> Is likely enabled in the majordomo config for the list, and should be >> set to no. The default check yields a large number of false positives. >> >> -- >> Jeremy Mates http://www.sial.org/ > >I figure that's preferable to reducing the number of "true postitives" to >*zero*, and having actual attempts to unzubscribe (which happen regularly) >appear on the list. But my ultimate plan is to get us switched over to >the alternate "mailman" list server; I've asked 5 times already, and am >hoping that the 6th time will be the charm. Yeah, it's an interesting choice, and all the more interesting because the procmail list errs in the other direction (and uses mailman). For the life of me, I can't figure it out. Good thing I know procmail and whatnot, and don't think list traffic is that important. Come on, do you really think I'll be unsubscribed? Well then, fine. -- Fred Morris m3047@inwa.net - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org From pate at eylerfamily.org Tue Jan 7 10:12:40 2003 From: pate at eylerfamily.org (Pat Eyler) Date: Wed Aug 4 00:09:24 2004 Subject: SPUG: Re: [Pdx-pm] Meeting In-Reply-To: Message-ID: We could probably make this easier (or more interesting), and do a Ruby for Perl Programmers meeting for the February Seattle Ruby Brigade meeting ... it could be either a follow up to Phil's presentation or another intro for people who don't want to make the trip. Pat Eyler Kaitiaki/manager migrant Linux sys admin the Koha project ruby, shell, and perl geek http://www.koha.org http://pate.eylerfamily.org On 6 Jan 2003, Michael R. Wolf wrote: > > Anyone interested in a road trip to Portland? The Portland Perl > Mongers are having a meeting this Wednesday, January 8th. > > Topic: Ruby for Perl Programmers or What's all this Ruby stuff? > > Michael Wolf > > ================================================================ > > Joshua Keroes writes: > > > Looks like there's a meeting this Wedsnesday. http://portland.pm.org/ says: > > > > News > > > > The next meeting is Wednesday Jan 8th 2003, this will be the first > > meeting of 2003. Phil Tomson will be speaking on Ruby for Perl > > programmers > > > > Bio: Phil Tomson > > > > I've been programming in Ruby for about 2 years now - sometimes even > > for money! (though not currently) Prior to that I did a fair amount of > > Perl programming for about six years. Prior to that (about 10 years > > ago) I was an ASIC (hardware) engineer. > > > > Topic: Ruby for Perl Programmers or What's all this Ruby stuff? > > > > You can do object oriented Perl programming and I have, but, uh, ... > > how can I put this tactfully considering the audience... well, it just > > kind of began to make my eyes hurt ;-) After finding Ruby a couple of > > years back my eyes are feeling much better. > > > > So "Why should I learn Ruby?" you ask? Well, it has a lot of the same > > features you like about Perl - like regular expressions, strings, > > arrays, hashes - but they're used in a very object oriented, > > consistent manner. Ruby is different enough from Perl to so that > > learning it will help you to look at programming problems in a new > > light and that's always valuable. I've also found that Ruby is easy > > for Perl programmers to learn - it only took me a few days to become > > comfortable with Ruby. > > > > I'll present a quick introduction to Ruby and how it's similar to and > > yet different from Perl. > > > > Where and when > > > > Place: Onsite! Technology, Inc. > > Address: 333 SE 3rd, Portland, OR > > Date and Time: 2003-01-08 at 7:00 PM > > URL: www.onsitetech.com > > > > There will be a social meeting at Rose and Raindrop at 6:00 PM. The > > address is 532 S.E. Grand and it's about 3 blocks from the Onsite! > > Technology offices. > > > > __END__ > > _______________________________________________ > > Pdx-pm-list mailing list > > Pdx-pm-list@mail.pm.org > > http://mail.pm.org/mailman/listinfo/pdx-pm-list > > > > -- > Michael R. Wolf > All mammals learn by playing! > MichaelRunningWolf@att.net > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org > Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest > Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - POST TO: spug-list@pm.org PROBLEMS: owner-spug-list@pm.org Subscriptions; Email to majordomo@pm.org: ACTION LIST EMAIL Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org