From me at heyjay.com Sat Nov 1 07:53:58 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Newsletter from O'Reilly UG Program, October 31 References: <20031101015444.GB18975@ink.inkdroid.org> Message-ID: <004901c3a07f$9a860130$6405a8c0@a30> > -Introducing REBOL with Amazingly Easy GUI Programming Anyone familiar with this REBOL? I went to the web page but didn't see any screen shots or example code jay From me at heyjay.com Sat Nov 1 18:27:34 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] www::mechanize - setting a drop down list Message-ID: <006d01c3a0d8$27ffc700$6405a8c0@a30> Hi, I'm trying to set a Any help would be appreciated Jay From me at heyjay.com Sun Nov 2 07:26:56 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Re: www::mechanize - setting a drop down list Message-ID: <002b01c3a144$fe0b7e40$6405a8c0@a30> Nevermind, there was a radio button I needed to click too, to make it work ----- Original Message ----- From: "Jay Strauss" To: "chicago-pm" Sent: Saturday, November 01, 2003 6:27 PM Subject: www::mechanize - setting a drop down list > Hi, > > I'm trying to set a STYLE="font-size: xx-small; font-family: Arial,Helvetica;"> > > > > > > > > > > > Any help would be appreciated > Jay > > > > From ehs at pobox.com Sun Nov 2 07:38:05 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] www::mechanize - setting a drop down list In-Reply-To: <006d01c3a0d8$27ffc700$6405a8c0@a30> References: <006d01c3a0d8$27ffc700$6405a8c0@a30> Message-ID: <20031102133805.GC22155@ink.inkdroid.org> On Sat, Nov 01, 2003 at 06:27:34PM -0600, Jay Strauss wrote: > It looks like there is some JavaScript being called as a result of the onChange attribute on the SELECT tag. Most likely it is doing some sort of client side form verification before it submits the form. Last I heard there is some rudimentary support for JavaScript in WWW::Mechanize, but nothing that would handle this function selectTimePeriod(). You could look at the JavaScript code, figure out what it is doing, and change your WWW::Mechanize bot behavior as appropriate. Perhaps it is mapping the value's to a new value, or doing some other kind of voodoo? If you post the whole page I would be willing to take a look. A couple other things to double check: - is the form name really "DATERANGE"? - is there a special button that the user is supposed to click, like a "search" button or something? If so, you'll have to specify the button to click with the 'button' parameter in your call to submit_form(). Good luck! //Ed From me at heyjay.com Sun Nov 2 08:29:42 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] www::mechanize - setting a drop down list References: <006d01c3a0d8$27ffc700$6405a8c0@a30> <20031102133805.GC22155@ink.inkdroid.org> Message-ID: <003b01c3a14d$c31ae7e0$6405a8c0@a30> Thanks Ed, yep just that, I needed to click a radio button ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Sunday, November 02, 2003 7:38 AM Subject: Re: [Chicago-talk] www::mechanize - setting a drop down list > On Sat, Nov 01, 2003 at 06:27:34PM -0600, Jay Strauss wrote: > > > > It looks like there is some JavaScript being called as a result of the > onChange attribute on the SELECT tag. Most likely it is doing some > sort of client side form verification before it submits the form. > > Last I heard there is some rudimentary support for JavaScript in > WWW::Mechanize, but nothing that would handle this function selectTimePeriod(). > You could look at the JavaScript code, figure out what it is doing, and change > your WWW::Mechanize bot behavior as appropriate. Perhaps it is mapping the > value's to a new value, or doing some other kind of voodoo? If you post the > whole page I would be willing to take a look. > > A couple other things to double check: > > - is the form name really "DATERANGE"? > > - is there a special button that the user is supposed to click, like a > "search" button or something? If so, you'll have to specify the button > to click with the 'button' parameter in your call to submit_form(). > > Good luck! > > //Ed > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Sun Nov 2 13:25:10 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] appending hashes Message-ID: <002501c3a177$1052d530$6405a8c0@a30> Is there any shortcut (like a slice or something) to push on hash onto another: my %h = (a=>1, b=>2, c=>3); my %a = (d=>4, e=>5); push %h, %a; #doesn't work %h += %a; #doesn't work I did it manually like: map {$h{$_} = $a{$_}} keys %a; But, thought there may be a shortcut syntax Jay From mbl at lelnet.com Sun Nov 2 14:41:43 2003 From: mbl at lelnet.com (Matthew Landry) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Bye bye Coogan's In-Reply-To: <1943120000.1067261221@[192.168.200.4]>; from lembark@jeeves.wrkhors.com on Mon, Oct 27, 2003 at 07:27:01AM -0600 References: <1943120000.1067261221@[192.168.200.4]> Message-ID: <20031102144143.A14643@cyteen.lelnet.com> On Mon, Oct 27, 2003 at 07:27:01AM -0600, Steven Lembark wrote: > > Are there no more downtown meetings? > We have to work out the time, etc. Before the meeting location > is changed there will be plenty of email describing the new > location. This still seems ambiguous...will the group continue holding meetings downtown? If so, I'll see you all this month. If not...well, it's been nice knowing you all, and maybe I'll be able to come again if I buy a car and lose my job. -- Matthew Landry mbl@lelnet.com O- LEL Network Services Anti-Stupid Talisman "You don't have to outrun the bear. Just outrun the slowest hiker." GPG Fingerprint: 842E B9FC BA37 3C4F BBFA 91A8 CA08 40FB 8561 71A7 From frag at ripco.com Sun Nov 2 14:36:57 2003 From: frag at ripco.com (Mike Fragassi) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Can't make Tuesday In-Reply-To: References: <200310271725.h9RHPfA19862@mail.pm.org> <4AE8C95D-0890-11D8-B7A8-00039394FC90@multiply.org> <200310271725.h9RHPfA19862@mail.pm.org> <5.1.1.6.0.20031029155923.02270e18@hecky.it.northwestern.edu> Message-ID: I just found that a friend I haven't seen in over a year is hitting town -- this Tuesday. I can't make it, so I won't be able to give rides. Lembark may be able to, though. -- Mike F. From jason at multiply.org Sun Nov 2 14:51:57 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] gear In-Reply-To: References: <200310271725.h9RHPfA19862@mail.pm.org> <4AE8C95D-0890-11D8-B7A8-00039394FC90@multiply.org> <200310271725.h9RHPfA19862@mail.pm.org> <5.1.1.6.0.20031029155923.02270e18@hecky.it.northwestern.edu> Message-ID: <65DE1186-0D76-11D8-8BBD-00039394FC90@multiply.org> Hi All. I have some gear I would like to unload, and figured I would try the group first. I have: 8Gig Travan Tape Drive (quantum) plus a mismatched (cable-wise) + 6 or 7 tapes adaptec ultra 160 scsi 2 card (29130? came with a blue and white G3, but worked great in my PC). a 21" compaq monitor that is slow to start up and has some occasional flickering, but overall works allright. I can bring this stuff to tuesday's meeting if anyone is interested. Oh, the gear is free (or the cost of a bass ale after the meeting), btw. -jason scott gessner jason@multiply.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 606 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031102/4332ba2f/attachment.bin From me at heyjay.com Sun Nov 2 15:24:30 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Building a module (distrubution) Message-ID: <000701c3a187$b71cf110$6405a8c0@a30> hola, I'm building a bunch of packages for interacting with Ameritrade. There is no cpan module for this, so I figured maybe I should build it for possible upload to cpan. Questions: 1) Is it realistic to think anyone would use this, considering it's real money, to do the tests would require someone supply a real ameritrade userid / password 2) I figured I could build it under Finance::Ameritrade, and build modules for transaction, trade in Finance::Ameritrade::Trade Finance::Ameritrade::Transaction You think that is a problematic structure? 3) If I went with the above structure, how would I get it to install all the components under Finance::Ameritrade? That is, if i do cd Finance/Ameritrade perl Makefile.pl make make test make install how would I get it to install Finance::Ameritrade::Transaction too? Thanks Jay From jt at plainblack.com Sun Nov 2 17:29:47 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Bye bye Coogan's In-Reply-To: <20031102144143.A14643@cyteen.lelnet.com> Message-ID: > This still seems ambiguous...will the group continue holding >meetings downtown? > > If so, I'll see you all this month. If not...well, it's been nice >knowing you all, and maybe I'll be able to come again if I buy a car and >lose my job. Everyone has said that the downtown meetings are still on. They will be the "social" meetings. The meetings up in Vernon Hills will be the technical meetings. JT ~ Plain Black Create like a god, command like a king, work like a slave. From andy at petdance.com Sun Nov 2 18:21:44 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Building a module (distrubution) In-Reply-To: <000701c3a187$b71cf110$6405a8c0@a30> References: <000701c3a187$b71cf110$6405a8c0@a30> Message-ID: Steal from existing distributions. Take a look at WWW::Mechanize and see how it's set up. If that does too much custom stuff, try HTML::Lint. xoa From andy at petdance.com Sun Nov 2 18:32:16 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <002501c3a177$1052d530$6405a8c0@a30> References: <002501c3a177$1052d530$6405a8c0@a30> Message-ID: <2CCD5342-0D95-11D8-9164-000393BFA5FA@petdance.com> > Is there any shortcut (like a slice or something) to push on hash onto > another: > > my %h = (a=>1, b=>2, c=>3); > my %a = (d=>4, e=>5); %h = (%h,%a); That turns %h into a list, and %a into a list, and constructs a new hash in %h. Any keys in %h that exist in %a will be overwritten. This is a common trick to handle parms passed into arrays, especially defaults: sub foo { my %defaults = ( name => "", x => 0, y => 0, ); my %parms = ( %defaults, @_ ); } xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From me at heyjay.com Sun Nov 2 18:39:27 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] appending hashes References: <002501c3a177$1052d530$6405a8c0@a30> <2CCD5342-0D95-11D8-9164-000393BFA5FA@petdance.com> Message-ID: <001901c3a1a2$f11d9ed0$6405a8c0@a30> Ah, Thanks, I knew there was a simpler way Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Sunday, November 02, 2003 6:32 PM Subject: Re: [Chicago-talk] appending hashes > > Is there any shortcut (like a slice or something) to push on hash onto > > another: > > > > my %h = (a=>1, b=>2, c=>3); > > my %a = (d=>4, e=>5); > > %h = (%h,%a); > > That turns %h into a list, and %a into a list, and constructs a new > hash in %h. Any keys in %h that exist in %a will be overwritten. > > This is a common trick to handle parms passed into arrays, especially > defaults: > > sub foo { > my %defaults = ( > name => "", > x => 0, > y => 0, > ); > > my %parms = ( %defaults, @_ ); > } > > xoa > > -- > Andy Lester > andy@petdance.com, AIM:petdance > http://petdance.com/ http://use.perl.org/~petdance/ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From andy at petdance.com Sun Nov 2 19:21:35 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] Bye bye Coogan's In-Reply-To: <20031102144143.A14643@cyteen.lelnet.com> References: <1943120000.1067261221@[192.168.200.4]> <20031102144143.A14643@cyteen.lelnet.com> Message-ID: <11024CB0-0D9C-11D8-BC08-000393BFA5FA@petdance.com> > This still seems ambiguous...will the group continue holding > meetings downtown? It's really no different than before. Only three people showed up last month, and one of them was me, giving the presentation, such as it was. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From flateyjarbok at yahoo.com Sun Nov 2 21:26:35 2003 From: flateyjarbok at yahoo.com (Richard Solberg) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] WSJ.com signon form has changed as of Sunday. Did anyone else notice this? Message-ID: <20031103032635.97390.qmail@web14703.mail.yahoo.com> Hello all, I use perl to sign on to wsj.com to get some data. Seems like at about 2pm on Sunday the signon form changed and the following code fails. At the last statement which is a form dump, I get the following message: Can't call method "dump" on an undefined value at line 24. use strict; use HTTP::Request::Common; use HTML::Form; use Date::Simple ('date', 'today'); use LWP::UserAgent; #use LWP::Debug qw(+); use HTTP::Cookies; my $ua = LWP::UserAgent->new(); $ua->agent("Automation/0.1"); $ua->cookie_jar( HTTP::Cookies->new( autosave => 1 )); my $request = $ua->request( POST 'http://online.wsj.com/login?URI=%2Fdocuments%2diaries.htm'); my $form = HTML::Form->parse( $request->content, $request->base()); print $form->dump; Thanks all, Richard __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ From ehs at pobox.com Mon Nov 3 08:48:44 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:50 2004 Subject: [Chicago-talk] gear In-Reply-To: <65DE1186-0D76-11D8-8BBD-00039394FC90@multiply.org> References: <200310271725.h9RHPfA19862@mail.pm.org> <4AE8C95D-0890-11D8-B7A8-00039394FC90@multiply.org> <200310271725.h9RHPfA19862@mail.pm.org> <5.1.1.6.0.20031029155923.02270e18@hecky.it.northwestern.edu> <65DE1186-0D76-11D8-8BBD-00039394FC90@multiply.org> Message-ID: <20031103144844.GB2414@ink.inkdroid.org> On Sun, Nov 02, 2003 at 02:51:57PM -0600, jason gessner wrote: > a 21" compaq monitor that is slow to start up and has some > occasional flickering, but overall works allright. Jason, if it's still available I'm interested in the monitor. I can't argue with that price :) //Ed From ehs at pobox.com Mon Nov 3 08:59:01 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] WSJ.com signon form has changed as of Sunday. Did anyone else notice this? In-Reply-To: <20031103032635.97390.qmail@web14703.mail.yahoo.com> References: <20031103032635.97390.qmail@web14703.mail.yahoo.com> Message-ID: <20031103145901.GC2414@ink.inkdroid.org> On Sun, Nov 02, 2003 at 07:26:35PM -0800, Richard Solberg wrote: > my $request = $ua->request( POST > 'http://online.wsj.com/login?URI=%2Fdocuments%2diaries.htm'); > > my $form = HTML::Form->parse( $request->content, > $request->base()); > > print $form->dump; That error indicates to me that the $form object is not defined. I just took a look at the HTML::Form doc [1], and it looks like the call to parse() will return an empty list when there are no forms found in the content that is passed in to parse. So it would appear that the result of $request->content() does not contain a form, perhaps even no HTML. Make sure you are getting the HTML content you expect when you call request()...maybe do a little print $request->content() somewhere :) It's also worth noting that you are basically doing what WWW::Mechanize [2] does here, by using LWP::UserAgent with HTML::Form. You might want to consider making your life easier by using WWW::Mechanize...but you are probably already aware of this. Good luck! //Ed [1] http://search.cpan.org/perldoc?HTML::Form [2] http://search.cpan.org/perldoc?WWW::Mechanize From jason at multiply.org Mon Nov 3 09:52:44 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] gear In-Reply-To: <20031103144844.GB2414@ink.inkdroid.org> Message-ID: <200311031507.hA3F7lk26558@tetsuo.mengelt.com> Cool. I will bring it with me. Like I said, it has been slow to warm up lately, but overall it is still pretty good. And, hey, it's free! ;) -jason scott gessner jason@multiply.org -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Ed Summers Sent: Monday, November 03, 2003 8:49 AM To: Chicago.pm chatter Subject: Re: [Chicago-talk] gear On Sun, Nov 02, 2003 at 02:51:57PM -0600, jason gessner wrote: > a 21" compaq monitor that is slow to start up and has some occasional > flickering, but overall works allright. Jason, if it's still available I'm interested in the monitor. I can't argue with that price :) //Ed _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From Andy_Bach at wiwb.uscourts.gov Mon Nov 3 10:11:41 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Newsletter from O'Reilly UG Program, October 31 In-Reply-To: <004901c3a07f$9a860130$6405a8c0@a30> Message-ID: I read a couple Dr Dobbs articles on it, its seemed fairly cool - www.ddj.com though some of them seem for purchase only? a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "I'm not sure what LInux-friendly means" Martin Taylor, MicroSoft's Linux strategist From Andy_Bach at wiwb.uscourts.gov Mon Nov 3 10:22:40 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <002501c3a177$1052d530$6405a8c0@a30> Message-ID: my %h = (a=>1, b=>2, c=>3); my %a = (d=>4, e=>5); %h = (%h, %a); for my $key ( keys %h ) { print "Key: $key: $h{$key}\n" } A hash is just (sort of) a list of key value pairs, so making one big array/list of it ... the '=>' Supercomma is just a comma that automatically quotes the lhs, i.e my %a = ('a', 1, ...); is the same as: my %a = (a => 1, ...) %h = (%h, %a); just unrolls the hashs and rolls them all back up again. You'd think there'd be a way to push (%a) on to the end of %h w/o unrolling %h (what if its really big or something?) but, besides the map sort of method, I can't think of a way. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "I'm not sure what LInux-friendly means" Martin Taylor, MicroSoft's Linux strategist From me at heyjay.com Mon Nov 3 11:11:16 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes References: Message-ID: <007e01c3a22d$9d433000$6405a8c0@a30> Thanks Andy, Yeh I knew it was just (sorta) a list, that's why I tired "push", but I didn't think about (@a, @b) or (%a, %b) to produce another list Jay ----- Original Message ----- From: To: "Chicago.pm chatter" Sent: Monday, November 03, 2003 10:22 AM Subject: Re: [Chicago-talk] appending hashes > my %h = (a=>1, b=>2, c=>3); > my %a = (d=>4, e=>5); > > %h = (%h, %a); > for my $key ( keys %h ) { > print "Key: $key: $h{$key}\n" > } > > A hash is just (sort of) a list of key value pairs, so making one big > array/list of it ... the '=>' Supercomma is just a comma that > automatically quotes the lhs, i.e > my %a = ('a', 1, ...); > is the same as: > my %a = (a => 1, ...) > > %h = (%h, %a); > just unrolls the hashs and rolls them all back up again. > > You'd think there'd be a way to push (%a) on to the end of %h w/o > unrolling %h (what if its really big or something?) but, besides the map > sort of method, I can't think of a way. > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "I'm not sure what LInux-friendly means" > Martin Taylor, MicroSoft's Linux strategist > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From andy at petdance.com Mon Nov 3 14:18:08 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Reminder: Tomorrow's tech meeting in Vernon Hills Message-ID: Please come to the inaugural meeting of the north suburban Chicago Perl Mongers, TOMORROW, November 4th at 7pm, in Vernon Hills, IL. This is a NEW meeting place, on a NEW day (1st Tuesday of the month). Andy Lester will be presenting "A Field Guide To Perl Command-Line Switches", and we'll be giving away all sorts of books and goodies from O'Reilly, SAMS and more. For more information, including directions to the meeting place, see http://chicago.pm.org/, or email andy@petdance.com. We hope to see you there! -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From briank at kappacs.com Mon Nov 3 22:06:51 2003 From: briank at kappacs.com (Brian Katzung) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: References: Message-ID: <3FA725DB.7080506@kappacs.com> katzung@moon [1056] cat hashtest use Benchmark; %b = map(($_, $_), 'AA' .. 'ZZ'); %c = map(($_, $_), 0 .. 675); timethese(1000, { 'baseline' => sub { %a = %b; }, 'unroll' => sub { %a = %b; %a = (%a, %c); }, 'append' => sub { %a = %b; @a{keys(%c)} = values(%c); } } ); katzung@moon [1057] perl hashtest Benchmark: timing 1000 iterations of append, baseline, unroll... append: 9 wallclock secs ( 8.56 usr + 0.00 sys = 8.56 CPU) @ 116.82/s (n=1000) baseline: 5 wallclock secs ( 4.57 usr + 0.00 sys = 4.57 CPU) @ 218.82/s (n=1000) unroll: 24 wallclock secs (22.42 usr + 0.00 sys = 22.42 CPU) @ 44.60/s (n=1000) YMMV - Brian From me at heyjay.com Tue Nov 4 00:47:16 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes References: <3FA725DB.7080506@kappacs.com> Message-ID: <023401c3a29f$82388db0$6405a8c0@a30> What's the baseline showing? Just how long it takes to copy a hash? Jay ----- Original Message ----- From: "Brian Katzung" To: "Chicago.pm chatter" Sent: Monday, November 03, 2003 10:06 PM Subject: Re: [Chicago-talk] appending hashes > katzung@moon [1056] cat hashtest > use Benchmark; > > %b = map(($_, $_), 'AA' .. 'ZZ'); > %c = map(($_, $_), 0 .. 675); > > timethese(1000, > { > 'baseline' => sub > { > %a = %b; > }, > 'unroll' => sub > { > %a = %b; > %a = (%a, %c); > }, > 'append' => sub > { > %a = %b; > @a{keys(%c)} = values(%c); > } > } > ); > katzung@moon [1057] perl hashtest > Benchmark: timing 1000 iterations of append, baseline, unroll... > append: 9 wallclock secs ( 8.56 usr + 0.00 sys = 8.56 CPU) @ > 116.82/s (n=1000) > baseline: 5 wallclock secs ( 4.57 usr + 0.00 sys = 4.57 CPU) @ > 218.82/s (n=1000) > unroll: 24 wallclock secs (22.42 usr + 0.00 sys = 22.42 CPU) @ > 44.60/s (n=1000) > > YMMV > > - Brian > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at jeeves.wrkhors.com Tue Nov 4 07:29:25 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Bye bye Coogan's In-Reply-To: <20031102144143.A14643@cyteen.lelnet.com> References: <1943120000.1067261221@[192.168.200.4]> <20031102144143.A14643@cyteen.lelnet.com> Message-ID: <1347430000.1067952565@[192.168.200.4]> > If so, I'll see you all this month. If not...well, it's been nice > knowing you all, and maybe I'll be able to come again if I buy a car and > lose my job. We will still be meeting at Coogans, on the 3rd monday (same Bat Time, same Bat Channel...). There is nothing sacred about Coogans long term: if anyone can find another free place to meet that's fine with me. The main problem is that anyone else we've spoken to -- including the Library and Loyola -- want cash for the room. I may have one other place to try: IIT, which is near the L and JFK but not the Metra. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From lembark at jeeves.wrkhors.com Tue Nov 4 07:32:36 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <002501c3a177$1052d530$6405a8c0@a30> References: <002501c3a177$1052d530$6405a8c0@a30> Message-ID: <1351770000.1067952756@[192.168.200.4]> --On Sunday, November 02, 2003 13:25:10 -0600 Jay Strauss wrote: > Is there any shortcut (like a slice or something) to push on hash onto > another: > > my %h = (a=>1, b=>2, c=>3); > my %a = (d=>4, e=>5); > > push %h, %a; #doesn't work > %h += %a; #doesn't work > > I did it manually like: > map {$h{$_} = $a{$_}} keys %a; > > But, thought there may be a shortcut syntax Assign the slice. You cannot "push" a hash, however, because they are not ordered. Any assignment you make from one hash onto anohter will overwrite existing contents. Given you want the replacements then: @foo{keys %bar} = values %bar; will do it for you -- with the caveat that existing values in %foo will be overwritten with values from %bar. That or: exists $foo{$_} or $foo{$_} = $bar{$_} for keys %bar; will assign only new values to %foo. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From lembark at jeeves.wrkhors.com Tue Nov 4 07:34:33 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <2CCD5342-0D95-11D8-9164-000393BFA5FA@petdance.com> References: <002501c3a177$1052d530$6405a8c0@a30> <2CCD5342-0D95-11D8-9164-000393BFA5FA@petdance.com> Message-ID: <1354130000.1067952873@[192.168.200.4]> --On Sunday, November 02, 2003 18:32:16 -0600 Andy Lester wrote: >> Is there any shortcut (like a slice or something) to push on hash onto >> another: >> >> my %h = (a=>1, b=>2, c=>3); >> my %a = (d=>4, e=>5); > > %h = (%h,%a); > > That turns %h into a list, and %a into a list, and constructs a new hash > in %h. Any keys in %h that exist in %a will be overwritten. > > This is a common trick to handle parms passed into arrays, especially > defaults: > > sub foo { > my %defaults = ( > name => "", > x => 0, > y => 0, > ); > > my %parms = ( %defaults, @_ ); > } This can get hairy depending on the hash sizes. Flattening both hashes out and re-assigning them uses up a lot of scratch space. Assigning via keys/values at least doesn't double the space. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From lembark at jeeves.wrkhors.com Tue Nov 4 07:37:42 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <023401c3a29f$82388db0$6405a8c0@a30> References: <3FA725DB.7080506@kappacs.com> <023401c3a29f$82388db0$6405a8c0@a30> Message-ID: <1357570000.1067953062@[192.168.200.4]> --On Tuesday, November 04, 2003 00:47:16 -0600 Jay Strauss wrote: > What's the baseline showing? Just how long it takes to copy a hash? >> katzung@moon [1057] perl hashtest >> Benchmark: timing 1000 iterations of append, baseline, unroll... >> append: 9 wallclock secs ( 8.56 usr + 0.00 sys = 8.56 CPU) @ >> 116.82/s (n=1000) >> baseline: 5 wallclock secs ( 4.57 usr + 0.00 sys = 4.57 CPU) @ >> 218.82/s (n=1000) >> unroll: 24 wallclock secs (22.42 usr + 0.00 sys = 22.42 CPU) @ >> 44.60/s (n=1000) Baseline shows what it takes to copy the same amount of space, append the time to merge a new set of keys/values into an existing space, unroll the time to unroll both hashes into lists and re-assign the result to an existing hash. If you are doing the job once only to copy 3-5 items at the start of a program then all of this is moot. If you are making the copy in a [possibly tight] loop then append is your friend (so to speak). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From lembark at jeeves.wrkhors.com Tue Nov 4 08:23:48 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Anyone need a lift from Deerfield to Vernon Hills? Message-ID: <1382960000.1067955828@[192.168.200.4]> --On Friday, October 31, 2003 14:13:23 -0600 Mike Fragassi wrote: > > It looks now like I can't make it -- a friend I haven't seen in over a > year is coming to town then. Have you been following the thread on > Chicago-talk? It looks like one guy, maybe more, may be needing a ride to > the meeting from the Lake Cook train station, just east of Pfingsten, 5 > minutes from Walg.HQ. I can pick people up if I know who you are and how to reach you during the day so that we can coordinate it. My element can handle three add'l people easily, possibly one more. After the meeting I can dump people at the Metra or (after a slightly longer ride) Blue Line/busses. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From me at heyjay.com Tue Nov 4 08:15:37 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes References: <3FA725DB.7080506@kappacs.com><023401c3a29f$82388db0$6405a8c0@a30> <1357570000.1067953062@[192.168.200.4]> Message-ID: <002b01c3a2de$e95de4b0$6405a8c0@a30> > Baseline shows what it takes to copy the same amount of space What I meant, is what is the point of the baseline test (not what is it doing)? From Andy_Bach at wiwb.uscourts.gov Tue Nov 4 09:51:32 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <3FA725DB.7080506@kappacs.com> Message-ID: Interestingly (???) the map method: 'mapappend' => sub { %a = %b; %a = map {$_ => $c{$_} } keys(%c); }, is slower and gets worse as the hashes get bigger. I bumped up c to: %c = map(($_, $_), 0 .. 6750); and: Benchmark: timing 1000 iterations of append, baseline, mapappend... append: 36 wallclock secs (33.94 usr + 0.22 sys = 34.16 CPU) @ 29.27/s (n=1000) baseline: 2 wallclock secs ( 2.08 usr + 0.02 sys = 2.10 CPU) @ 476.19/s (n=1000) mapappend: 65 wallclock secs (61.32 usr + 0.58 sys = 61.90 CPU) @ 16.16/s (n=1000) (left off unroll as it was really slow). Looks like slices are the way to go. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "I'm not sure what LInux-friendly means" Martin Taylor, MicroSoft's Linux strategist From lembark at jeeves.wrkhors.com Tue Nov 4 11:01:20 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <002b01c3a2de$e95de4b0$6405a8c0@a30> References: <3FA725DB.7080506@kappacs.com> <023401c3a29f$82388db0$6405a8c0@a30> <1357570000.1067953062@[192.168.200.4]> <002b01c3a2de$e95de4b0$6405a8c0@a30> Message-ID: <13540000.1067965280@[192.168.100.3]> -- Jay Strauss >> Baseline shows what it takes to copy the same amount of space > > What I meant, is what is the point of the baseline test (not what is it > doing)? Gives a baseline time for a minimal action. You know that the other steps cannot take more than that much time and can see how much extra work the merge or unroll takes. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at jeeves.wrkhors.com Tue Nov 4 11:19:44 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: References: Message-ID: <14350000.1067966383@[192.168.100.3]> -- Andy_Bach@wiwb.uscourts.gov > Interestingly (???) the map method: > 'mapappend' => sub > { > %a = %b; > %a = map {$_ => $c{$_} } keys(%c); > }, > > is slower and gets worse as the hashes get bigger. I bumped up c to: > %c = map(($_, $_), 0 .. 6750); > and: > Benchmark: timing 1000 iterations of append, baseline, mapappend... > append: 36 wallclock secs (33.94 usr + 0.22 sys = 34.16 CPU) @ > 29.27/s (n=1000) > baseline: 2 wallclock secs ( 2.08 usr + 0.02 sys = 2.10 CPU) @ > 476.19/s (n=1000) > mapappend: 65 wallclock secs (61.32 usr + 0.58 sys = 61.90 CPU) @ > 16.16/s (n=1000) > > (left off unroll as it was really slow). Looks like slices are the way > to go. Makes sense: map has to individually process the unrolled hash into $_ and build the output list via -- essentially -- push as it goes along. Serializing the operation is most of what causes the pain. So far as I know: @foo{keys %bar} = values %bar is the fastest, lowest overhead way to merge the hashes. To merge multiple hashes use hash referents in a sub (e.g., from a job I use to manage the environment): #!/blah/perl ... sub merge { my %bucket = (); @bucket{ keys %$_ } = values %$_ for @_; \%bucket } # don't wanna loose these either way... my @inherit = qw( TERM HOME USER MAIL DISPLAY ); # configured environment my %default = qw( ... ); # read from config files, whatever my %host = qw( ... ); # point is they go from least specific my %user = qw( ... ); # to most specific as you go down my %job = qw( ... ); # the list my $newenv = merge \%ENV, \%default, \%host, \%user, \%job; @{$newenv}{ @inherit } = @ENV{ @inherit }; $newenv->{ENV_SETUP_SOURCES} = join ':', @sourcefiles; # at this point the environment is hard-wired from # the config files -- no need to worry about env # vars from a working shell polluting dot-scripts. %ENV = %$newenv; exec @ARGV || $ENV{SHELL}; die "Roadkill: $!"; this gets stuffed into a #! and called via something like: [ "$ENV_SETUP_SOURCES" = "" ] && exec env_setup $0 $*; at the top of shell scripts. If the environment has not yet been set up then the multiple exec's leave the PID alone (parent never gets a SIGCHLD) but the job is left running with a fully configured environment. Only trick is to make sure the env var used to flag the passthrough doesn't collide with anything else. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at jeeves.wrkhors.com Tue Nov 4 11:20:55 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Anyone need a lift from Deerfield to Vernon Hills? In-Reply-To: <1382960000.1067955828@[192.168.200.4]> References: <1382960000.1067955828@[192.168.200.4]> Message-ID: <15200000.1067966455@[192.168.100.3]> > I can pick people up if I know who you are and how to reach you during > the day so that we can coordinate it. My element can handle three add'l > people easily, possibly one more. After the meeting I can dump people at > the Metra or (after a slightly longer ride) Blue Line/busses. Looks like I'll be at my desk most of the afternoon: +1 847 914 5905 -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Tue Nov 4 10:35:09 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Interfacing to a Java pgm with API Message-ID: <000701c3a2f1$a3240250$6305a8c0@WASHINGTON> Ok, my attempts at using Java.pm and Inline::Java have both dead ended (though I still have hope for the Inline::Java, the author is looking into why it doesn't work in my case). should I use IO::Socket, or is there some other package I should use for socket communication Jay --On Thursday, October 09, 2003 07:46:56 -0500 Jay Strauss wrote: > The more I've been reading, and the more I understand about the API, I'm > leaning toward Java.pm. The API does use sockets, and someone did build > an example using IO::Socket. He had to read the C++ code and > reverse-engineer the calls. I think it would be better to use their API > (especially since its still in a state of change), and use some glue to > talk to it. > > The vendor's architecture is: Remote Server <---> Client App <----> Custom > App (using API) > > As I understand from the vendor's message boards they routinely change the > Server & Client & API to fix bugs and add new functionality. Then why use Java.pm? The socket interface should be enough -- and an excellent exercise in working with sockets. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 910 1206 From me at heyjay.com Tue Nov 4 10:36:30 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes References: Message-ID: <002401c3a2f1$fcaa1990$6305a8c0@WASHINGTON> I did the same thing (figuring it would be faster than the slice) Jay ----- Original Message ----- From: To: "Chicago.pm chatter" Sent: Tuesday, November 04, 2003 9:51 AM Subject: Re: [Chicago-talk] appending hashes > Interestingly (???) the map method: > 'mapappend' => sub > { > %a = %b; > %a = map {$_ => $c{$_} } keys(%c); > }, > > is slower and gets worse as the hashes get bigger. I bumped up c to: > %c = map(($_, $_), 0 .. 6750); > and: > Benchmark: timing 1000 iterations of append, baseline, mapappend... > append: 36 wallclock secs (33.94 usr + 0.22 sys = 34.16 CPU) @ > 29.27/s (n=1000) > baseline: 2 wallclock secs ( 2.08 usr + 0.02 sys = 2.10 CPU) @ > 476.19/s (n=1000) > mapappend: 65 wallclock secs (61.32 usr + 0.58 sys = 61.90 CPU) @ > 16.16/s (n=1000) > > (left off unroll as it was really slow). Looks like slices are the way to > go. > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "I'm not sure what LInux-friendly means" > Martin Taylor, MicroSoft's Linux strategist > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at jeeves.wrkhors.com Tue Nov 4 12:44:44 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <002401c3a2f1$fcaa1990$6305a8c0@WASHINGTON> References: <002401c3a2f1$fcaa1990$6305a8c0@WASHINGTON> Message-ID: <25520000.1067971483@[192.168.100.3]> -- Jay Strauss > I did the same thing (figuring it would be faster than the slice) The slice will be your fastest way since it does not have to re-assign the entire hash's storage: building the hash chain is more expensive than populating an existing one. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From walter at torres.ws Tue Nov 4 13:20:16 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Anyone need a lift from Deerfield to Vernon Hills? In-Reply-To: <1382960000.1067955828@[192.168.200.4]> Message-ID: It looks like I can go tonight. I have a mini van that will hold 5 addt'l adults. I live by Brookfield zoo, so I can pick up anyone along the way, or at the train up there. If you need a lift contact me off line. Walter From walter at torres.ws Tue Nov 4 17:10:10 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Anyone need a lift from Deerfield to Vernon Hills? In-Reply-To: Message-ID: Well, once again this gets pre-empted! sorry, I must withdraw my earlier offer of a ride. I can not make it now. Can anyone scan and post any hand outs? I really wanted to see this one. Thanks Walter From lembark at jeeves.wrkhors.com Tue Nov 4 18:28:07 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Anyone need a lift from Deerfield to Vernon Hills? In-Reply-To: References: Message-ID: <91990000.1067992087@[192.168.100.3]> -- Walter Torres > Well, once again this gets pre-empted! > > sorry, I must withdraw my earlier offer of a ride. > > I can not make it now. If anyone needs a ride chirp up soon... -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From EasyAsY2K at myrealbox.com Tue Nov 4 11:18:04 2003 From: EasyAsY2K at myrealbox.com (Leland J) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Today's meeting Message-ID: <1067966284.bf1ad840EasyAsY2K@myrealbox.com> I'm interesting in coming to today's (11/4). Is it okay if I just show up? Thanks to whoever responds (typing this out during lunch, so I can't check until 6:00) I'm 17 and have been using perl for a year now to do miscellaneous tasks and a major project that involues laziness and my library. I'm quite excited that this meeting is 10 minutes away rather than in Chicago. - Leland Johnson From briank at kappacs.com Tue Nov 4 22:46:58 2003 From: briank at kappacs.com (Brian Katzung) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] appending hashes In-Reply-To: <023401c3a29f$82388db0$6405a8c0@a30> References: <3FA725DB.7080506@kappacs.com> <023401c3a29f$82388db0$6405a8c0@a30> Message-ID: <3FA880C2.5060009@kappacs.com> Jay Strauss wrote: > What's the baseline showing? Just how long it takes to copy a hash? Specifically, I wanted to simulate the original conditions inside the timing loop: appending a new hash to an existing hash, but from a consistent state each time (thus, initializing %a = %b). Since what I really wanted was to compare the time for %a = (%a, %c) to @a{keys(%c)} = values(%c), I needed to subtract the time for %a = %b. The baseline time is that time. -- Brian > Jay > ----- Original Message ----- > From: "Brian Katzung" > To: "Chicago.pm chatter" > Sent: Monday, November 03, 2003 10:06 PM > Subject: Re: [Chicago-talk] appending hashes > > > >>katzung@moon [1056] cat hashtest >>use Benchmark; >> >>%b = map(($_, $_), 'AA' .. 'ZZ'); >>%c = map(($_, $_), 0 .. 675); >> >>timethese(1000, >>{ >> 'baseline' => sub >> { >> %a = %b; >> }, >> 'unroll' => sub >> { >> %a = %b; >> %a = (%a, %c); >> }, >> 'append' => sub >> { >> %a = %b; >> @a{keys(%c)} = values(%c); >> } >>} >>); >>katzung@moon [1057] perl hashtest >>Benchmark: timing 1000 iterations of append, baseline, unroll... >> append: 9 wallclock secs ( 8.56 usr + 0.00 sys = 8.56 CPU) @ >>116.82/s (n=1000) >> baseline: 5 wallclock secs ( 4.57 usr + 0.00 sys = 4.57 CPU) @ >>218.82/s (n=1000) >> unroll: 24 wallclock secs (22.42 usr + 0.00 sys = 22.42 CPU) @ >>44.60/s (n=1000) >> >>YMMV >> >> - Brian From jt at plainblack.com Tue Nov 4 23:35:48 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Today's meeting In-Reply-To: <1067966284.bf1ad840EasyAsY2K@myrealbox.com> Message-ID: This email's a little late. Perhaps it got mixed up a mail server somewhere. The meeting has already transpired. There will be another one next month. The first tuesday in December. You're absolutely welcome to come. For that matter, bring a friend. On Tue, 04 Nov 2003 11:18:04 -0600 "Leland J" wrote: >I'm interesting in coming to today's (11/4). Is it okay if I just show up? Thanks to >whoever responds (typing this out during lunch, so I can't check until 6:00) > >I'm 17 and have been using perl for a year now to do miscellaneous tasks and a major >project that involues laziness and my library. > >I'm quite excited that this meeting is 10 minutes away rather than in Chicago. > >- Leland Johnson > >_______________________________________________ >Chicago-talk mailing list >Chicago-talk@mail.pm.org >http://mail.pm.org/mailman/listinfo/chicago-talk JT ~ Plain Black Create like a god, command like a king, work like a slave. From ejanev2 at yahoo.com Wed Nov 5 10:57:30 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] No way I am unsubscribing Message-ID: <20031105165730.89709.qmail@web21508.mail.yahoo.com> I just did a little change from my side: Unsubscribed my primary home mail and subscribed under "ejanev2.yahoo.com", especially created for Chicago.pm list ( Very often I learn from mistakes ). About the meeting yesterday: It was cool, much beter than my expectations. I am looking forward for the next one :-) Note from me about usefull onliners on the Web: I believe that most of subscribers are already familiar with this. But for any case they might be usefull to someone: There is a good introduction to Perl for Unix Sys Admins, including one-liners, in the first Unix Review Column of Randal L. Schwartz: http://www.stonehenge.com/merlyn/UnixReview/col01.html Also, here is Tom Chritiansen's list of one-liners (given as resource for an article): ftp://www6.software.ibm.com/software/developer/library/l-p102/tomc.txt Emil __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From ehs at pobox.com Wed Nov 5 11:19:40 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] last night's meeting Message-ID: <20031105171940.GB20777@ink.inkdroid.org> Just wanted to say how much I enjoyed last night's meeting. It was great to see so many new faces (to me at least), with all sorts of levels of Perl experience...and the new digs are truly nice. I learned lots from Andy's talk about command line switches too (hadn't used -F and -a before). perl -a -F: -ne 'print "$F[4]\n";' /etc/passwd Steven offered to talk about debugging Perl at the next meeting...Steven could you send a brief summary of what you are going to cover for the website? Afterwards I nudged Jonathan (hachi) about possibly presenting on POE [1], also someone (I suck at names) who is working at Northwestern with bioperl [2] and Genbank to do genetics work on particular kind of slime :) Jason, Steven and I managed to find a nice pub up the road afterwards for a few cold ones. Good fun, thanks JT and WDI for the new space. //Ed [1] http://poe.perl.org [2] http://bioperl.org [3] http://www.brunswickwdi.com/ From EasyAsY2K at myrealbox.com Wed Nov 5 17:33:21 2003 From: EasyAsY2K at myrealbox.com (Leland J) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Today's meeting Message-ID: <1068075201.70123b60EasyAsY2K@myrealbox.com> Actually I did make it. Trying this out again to see how fast it sends. It better have better than an eight hour turnaround this time! -Leland From ejanev2 at yahoo.com Wed Nov 5 17:35:35 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] shell expansion Message-ID: <20031105233535.67738.qmail@web21505.mail.yahoo.com> Here is a question about small problem ( I think ) with shell expansion under Windows. Under UNIX the following would work naturally: perl -l -e 'print for @ARGV' * Everything that could be expanded with "echo *" from the current directory will be printed. Under Windows: C:\Temp>perl -l -e "print for @ARGV" * It will print just "*". ( echo * yields the same too ). I used some technique to have the desired under Windows: Imediatelly at the begining of the program: @ARGV = <@ARGV>; This basically works, but the same script want be portable to UNIX. Any sugestion... Emil __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From ebohlman at earthlink.net Wed Nov 5 18:10:58 2003 From: ebohlman at earthlink.net (Eric Bohlman) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] shell expansion In-Reply-To: <20031105233535.67738.qmail@web21505.mail.yahoo.com> References: <20031105233535.67738.qmail@web21505.mail.yahoo.com> Message-ID: On Wed, 5 Nov 2003 15:35:35 -0800 (PST), Emil Janev wrote: > Here is a question about small problem ( I think ) with shell expansion > under Windows. > > Under UNIX the following would work naturally: > > perl -l -e 'print for @ARGV' * > > Everything that could be expanded with "echo *" from the current > directory will be printed. > > Under Windows: > > C:\Temp>perl -l -e "print for @ARGV" * > > It will print just "*". ( echo * yields the same too ). > > I used some technique to have the desired under Windows: Imediatelly at > the begining of the program: > > @ARGV = <@ARGV>; > > This basically works, but the same script want be portable to UNIX. What I do is set PERL5OPT to "-MWild" in my Windows environment, and include the following module in \perl\lib: # Wild.pm - emulate shell @ARGV expansion on shells that don't use File::DosGlob; @ARGV = map { my @g = File::DosGlob::glob($_) if /[*?]/; @g ? @g : $_; } @ARGV; 1; That way the program itself doesn't need to know whether it's running under a globbing (Unix) or non-globbing (Windows) shell. I picked this up from somewhere years ago, but I don't remember where. From walter at torres.ws Wed Nov 5 21:15:10 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] shell expansion In-Reply-To: Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Eric Bohlman > Sent: Wednesday, November 05, 2003 6:11 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] shell expansion > What I do is set PERL5OPT to "-MWild" in my Windows environment, and > include the following module in \perl\lib: > > # Wild.pm - emulate shell @ARGV expansion on shells that don't > That way the program itself doesn't need to know whether it's > running under a globbing (Unix) or non-globbing (Windows) shell. > I picked this up from somewhere years ago, but I don't remember > where. perldoc perlwin32 :) Walter From chimcentral at yahoo.com Wed Nov 5 22:15:52 2003 From: chimcentral at yahoo.com (matt boex) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] last night's meeting In-Reply-To: <20031105171940.GB20777@ink.inkdroid.org> Message-ID: <20031106041552.42826.qmail@web40812.mail.yahoo.com> i am not happy... couldn't go due to basement flooding... is there an electronic copy of the presentation? matt Ed Summers wrote: Just wanted to say how much I enjoyed last night's meeting. It was great to see so many new faces (to me at least), with all sorts of levels of Perl experience...and the new digs are truly nice. I learned lots from Andy's talk about command line switches too (hadn't used -F and -a before). perl -a -F: -ne 'print "$F[4]\n";' /etc/passwd Steven offered to talk about debugging Perl at the next meeting...Steven could you send a brief summary of what you are going to cover for the website? Afterwards I nudged Jonathan (hachi) about possibly presenting on POE [1], also someone (I suck at names) who is working at Northwestern with bioperl [2] and Genbank to do genetics work on particular kind of slime :) Jason, Steven and I managed to find a nice pub up the road afterwards for a few cold ones. Good fun, thanks JT and WDI for the new space. //Ed [1] http://poe.perl.org [2] http://bioperl.org [3] http://www.brunswickwdi.com/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk --------------------------------- Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20031105/90d5e36b/attachment.htm From me at heyjay.com Thu Nov 6 09:21:16 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Dynamic method call Message-ID: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> How do I call a method, where a variable contains the method name? my $method = "do_something"; $self->$method; Thanks Jay From jt at plainblack.com Thu Nov 6 09:36:52 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> Message-ID: I do this all the time...and you've got it absolutely right. On Thu, 6 Nov 2003 09:21:16 -0600 "Jay Strauss" wrote: >How do I call a method, where a variable contains the method name? > >my $method = "do_something"; >$self->$method; > >Thanks >Jay >_______________________________________________ >Chicago-talk mailing list >Chicago-talk@mail.pm.org >http://mail.pm.org/mailman/listinfo/chicago-talk JT ~ Plain Black Create like a god, command like a king, work like a slave. From lembark at jeeves.wrkhors.com Thu Nov 6 10:40:01 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] shell expansion In-Reply-To: <20031105233535.67738.qmail@web21505.mail.yahoo.com> References: <20031105233535.67738.qmail@web21505.mail.yahoo.com> Message-ID: <328410000.1068136801@[192.168.100.3]> -- Emil Janev > Here is a question about small problem ( I think ) with shell expansion > under Windows. > > Under UNIX the following would work naturally: > > perl -l -e 'print for @ARGV' * > > Everything that could be expanded with "echo *" from the current > directory will be printed. > > Under Windows: > > C:\Temp>perl -l -e "print for @ARGV" * > > It will print just "*". ( echo * yields the same too ). > > I used some technique to have the desired under Windows: Imediatelly at > the begining of the program: > > @ARGV = <@ARGV>; > > This basically works, but the same script want be portable to UNIX. > > Any sugestion... Globbing on dos-based systems uses 8.3 notation, which requires all files to have an extension. All the NT file system does is layer a long-name database over the 8.3 storage mechanism. To glob all of the files you need to use "*.*" -- which, of course, breaks *NIX file systems that don't have built-in extensions. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ejanev2 at yahoo.com Thu Nov 6 09:44:29 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] shell expansion In-Reply-To: Message-ID: <20031106154429.24330.qmail@web21510.mail.yahoo.com> >> perldoc perlwin32 Thanks. That's it. And about me not looking at "perdoc perlwin32" : I bet it is because of laziness ( the bad one ). Emil __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From lembark at jeeves.wrkhors.com Thu Nov 6 10:45:42 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> References: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> Message-ID: <330100000.1068137142@[192.168.100.3]> -- Jay Strauss > How do I call a method, where a variable contains the method name? > > my $method = "do_something"; > $self->$method; The "can" operator returns a subroutine referent if the given de-reference is capable of doing something. It can take an object or package name as the object and the sub name as an argument. If the given inheritence tree can do the thing you get back a referent (true) if not you get back undef (false). Any of: my $sub = $object->can( $method ); my $sub = $package->can( $method ); my $sub = __PACKAGE__->can( $method ); will work. I use this heavily for dispatching initializers: my $item = shift; if( my $init = $item->can('init') ) { $init->( $item ) } else { my $type = ref $item || $item; carp "Bogus $item: ($type) cannot 'init'"; } For your example: { my $item = shift; my $name = shift; my $call = $item->can( $name ) or croak "Bogus item: cannot $name"; my $result = $call->( $item ); ... } will do what you were looking for. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at jeeves.wrkhors.com Thu Nov 6 10:47:07 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:51 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: References: Message-ID: <331300000.1068137226@[192.168.100.3]> -- JT Smith > I do this all the time...and you've got it absolutely right. Depends on whether you prefer to use indirect references. Using can() to pre-filter the name gives better control/error messages. > On Thu, 6 Nov 2003 09:21:16 -0600 > "Jay Strauss" wrote: >> How do I call a method, where a variable contains the method name? >> >> my $method = "do_something"; >> $self->$method; -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Thu Nov 6 09:50:08 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call References: Message-ID: <000e01c3a47d$a85d9b40$6305a8c0@WASHINGTON> Wasn't working, I must have some other error Jay ----- Original Message ----- From: "JT Smith" To: "Chicago.pm chatter" Sent: Thursday, November 06, 2003 9:36 AM Subject: Re: [Chicago-talk] Dynamic method call I do this all the time...and you've got it absolutely right. On Thu, 6 Nov 2003 09:21:16 -0600 "Jay Strauss" wrote: >How do I call a method, where a variable contains the method name? > >my $method = "do_something"; >$self->$method; > >Thanks >Jay >_______________________________________________ >Chicago-talk mailing list >Chicago-talk@mail.pm.org >http://mail.pm.org/mailman/listinfo/chicago-talk JT ~ Plain Black Create like a god, command like a king, work like a slave. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From Dooley.Michael at con-way.com Thu Nov 6 09:54:06 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] advanceing through a file w/o using an array Message-ID: ok, I haven't looked at perl in well pretty much forever. #! /usr/bin/perl -w $FILE='path_to_mail_file'; open (MAILFILE, "$FILE") || die "Can not read file ($!)"; while () { chomp; if ($_ =~ /^From / || /^Subject: /) { print "$_\n"; } } ok this is all I have so far. which is pretty easy in the first place. the part I am working on is getting the body of the email and displaying that. the body comes after "Message-Id: " and ends on the line befor "^From ". Is there a variable I can use to print the line after a match untill another match is found? kinda like if ($_ =~ /Message-Id: /) { print the next line until $_= "^From " } From ehs at pobox.com Thu Nov 6 11:01:05 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Re: [Chicago.pm]: advanceing through a file w/o using an array In-Reply-To: <1440628130-1463792638-1068133850@boing.topica.com> References: <1440628130-1463792638-1068133850@boing.topica.com> Message-ID: <20031106170104.GA26868@ink.inkdroid.org> > To: "'chicago-pm@topica.com'" > From: "Dooley, Michael" > Subject: [Chicago.pm]: advanceing through a file w/o using an array I thought the chicago.pm list at topica was closed down in preference to the new list at pm.org! [1] Michael, please get on the new list if you can. Anyhow, I'm not answering your question really, but you might want to take a look at Mail::Box [2] on CPAN. Once you've got installed you can interact with all sorts of mail folders (mbox, maildir, imap4, pop) with a common interface. Assuming you've got an mbox format file at /home/bgates/mbox, you could: use Mail::Box::Mbox; my $folder = Mail::Box::Mbox->new( folder => '/home/bgates/mbox' ); foreach my $msg ( $folder->messages() ) { print $msg->body(),"\n"; } Lazy, and nice to read -- at least for me :) You can do all sorts of crazy stuff like deleting, modifying, searching. Well worth a look at if you need to do lots of work with mail messages. //Ed [1] http://chicago.pm.org/discuss.html [2] http://search.cpan.org/perldoc?Mail::Box From hachi at kuiki.net Thu Nov 6 11:10:14 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] advanceing through a file w/o using an array In-Reply-To: References: Message-ID: <3FAA8076.9070000@kuiki.net> Dooley, Michael wrote: > ok, I haven't looked at perl in well pretty much forever. > > #! /usr/bin/perl -w > > $FILE='path_to_mail_file'; > > open (MAILFILE, "$FILE") || die "Can not read file ($!)"; > > while () { > chomp; > if ($_ =~ /^From / || /^Subject: /) { > print "$_\n"; > } > } > > > ok this is all I have so far. which is pretty easy in the first place. > the part I am working on is getting the body of the email and displaying > that. > > the body comes after "Message-Id: " and ends on the line befor "^From ". > > Is there a variable I can use to print the line after a match untill another > match is found? > > kinda like > if ($_ =~ /Message-Id: /) { > print the next line until $_= "^From " > } Actually, there is an operator for this sort of thing '..' is the flipflop operator. The only trouble is that it's inclusive when you use it like this: if (/^Message-Id: / .. /^From: /) so in that case you would get both the Message-Id and From lines, which is not what you want. Basically, turning it around so the inclusive matches point the other way is closer to what you want in this case. unless (/^From: / .. /^Message-Id: /) Of course, the cleanest way to parse real mail files (what this looks like) is to use a module for that purpose. --Jonathan (hachi) From me at heyjay.com Thu Nov 6 11:15:08 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call References: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> <330100000.1068137142@[192.168.100.3]> Message-ID: <001801c3a489$88933750$6305a8c0@WASHINGTON> I started off doing: my $sub = __PACKAGE__->can( $method ); but figured I'd get back a Package::Subname (class), and not the object I'm currently using, though I must admit I didn't check to see what I was getting back. I'll try > my $sub = $object->can( $method ); and see what I get back. I need $self in the method I call, not sure it I do: my $sub = $object->can( $method ); &$sub(@arg); if I can: my $self = shift once I'm in the function Like I said, I'll try it Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Thursday, November 06, 2003 10:45 AM Subject: Re: [Chicago-talk] Dynamic method call > > > -- Jay Strauss > > > How do I call a method, where a variable contains the method name? > > > > my $method = "do_something"; > > $self->$method; > > The "can" operator returns a subroutine referent if the given > de-reference is capable of doing something. It can take an > object or package name as the object and the sub name as an > argument. If the given inheritence tree can do the thing you > get back a referent (true) if not you get back undef (false). > > Any of: > > my $sub = $object->can( $method ); > > my $sub = $package->can( $method ); > > my $sub = __PACKAGE__->can( $method ); > > will work. > > > I use this heavily for dispatching initializers: > > my $item = shift; > > if( my $init = $item->can('init') ) > { > $init->( $item ) > } > else > { > my $type = ref $item || $item; > > carp "Bogus $item: ($type) cannot 'init'"; > } > > For your example: > > { > my $item = shift; > my $name = shift; > > my $call = $item->can( $name ) > or croak "Bogus item: cannot $name"; > > my $result = $call->( $item ); > > ... > } > > will do what you were looking for. > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From Dooley.Michael at con-way.com Thu Nov 6 11:32:12 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] advanceing through a file w/o using an array Message-ID: thanks ed and Jason. yeah I had an old contact still in my email for the perl mailing list. so it went to the topica one on accident. been corrected. mike From andy at petdance.com Thu Nov 6 17:44:01 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Meeting recap and slides Message-ID: <19465565-10B3-11D8-A288-000393BFA5FA@petdance.com> Check out http://chicago.pm.org/meetings/20031104/ for a recap of Monday's meeting, and link to the slides for my talk. xoxo, Andy -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From lembark at jeeves.wrkhors.com Thu Nov 6 19:34:44 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <001801c3a489$88933750$6305a8c0@WASHINGTON> References: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> <330100000.1068137142@[192.168.100.3]> <001801c3a489$88933750$6305a8c0@WASHINGTON> Message-ID: <47140000.1068168884@[192.168.100.3]> > my $sub = $object->can( $method ); > &$sub(@arg); ~~ NO!!! The use of & to make calls is a holdover from Perl4... Avoid using & for any sort of sub call unless you really do understand what you are doing with it (at which point you usually won't do it). my $method = $item->can( $method_name ); $method->( $item ); is what you are looking for. You want to dereference the method, NOT call it bypassing prototype def's with the same @_ as the current call by default. Note: you can use: sub dispatch { my $item = shift; my $name = shift; if( my $sub = $item->can( $name ) ) { $sub->( $item, @_ ) } else { my $type = ref $item || $item; die "Bogus dispatch: $type cannot $name"; } } Is a fairly general dispatcher: $foo->dispatch( $methodnames{$inputvalue}, @otherargs ); will get redispatched as necessary. This is nice for data-driven programming where $inputvalue can be stored in a config file or input stream and handled by several objects which can cooperate in dealing with the issue. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From merlyn at stonehenge.com Thu Nov 6 19:55:26 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <47140000.1068168884@[192.168.100.3]> References: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> <330100000.1068137142@[192.168.100.3]> <001801c3a489$88933750$6305a8c0@WASHINGTON> <47140000.1068168884@[192.168.100.3]> Message-ID: <86y8utc583.fsf@blue.stonehenge.com> >>>>> "Steven" == Steven Lembark writes: >> my $sub = $object->can( $method ); >> &$sub(@arg); Steven> ~~ Steven> NO!!! The use of & to make calls is a holdover from Perl4... No, it's still a perfectly valid thing in Perl 5. Steven> Avoid using & for any sort of sub call unless you really Steven> do understand what you are doing with it (at which point Steven> you usually won't do it). No, default to using it until you know why you shouldn't. Note to Steven: "Prototypes are a BAD idea". -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From shild at sbcglobal.net Thu Nov 6 20:11:34 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <86y8utc583.fsf@blue.stonehenge.com> Message-ID: > Note to Steven: "Prototypes are a BAD idea". I seen this before(I think there is a node on perlmonks), but I'll ask, Why are Prototypes bad? > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 06-Nov-2003 Time: 20:10:15 ---------------------------------- From merlyn at stonehenge.com Thu Nov 6 20:30:20 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: References: Message-ID: <86sml0di6d.fsf@blue.stonehenge.com> >>>>> "Scott" == Scott T Hildreth writes: >> Note to Steven: "Prototypes are a BAD idea". Scott> I seen this before(I think there is a node on perlmonks), Scott> but I'll ask, Why are Prototypes bad? Larry invented them only to tweak the parser so that user-defined subroutines could be parsed the same way that the odd built-ins were also parsed (except for print, grep, map, and a few others I can't recall). The problem is that there was *just* enough stuff that people thought they should be used even for things that aren't trying to emulate built-in syntax. That's the problem. Do not use them unless you are trying to emulate a built-in. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From chimcentral at yahoo.com Thu Nov 6 21:45:10 2003 From: chimcentral at yahoo.com (matt boex) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Meeting recap and slides In-Reply-To: <19465565-10B3-11D8-A288-000393BFA5FA@petdance.com> Message-ID: <20031107034510.81956.qmail@web40808.mail.yahoo.com> thanks... --- Andy Lester wrote: > Check out http://chicago.pm.org/meetings/20031104/ > for a recap of > Monday's meeting, and link to the slides for my > talk. > > xoxo, > Andy > > -- > Andy Lester > andy@petdance.com, AIM:petdance > http://petdance.com/ http://use.perl.org/~petdance/ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From lembark at jeeves.wrkhors.com Fri Nov 7 10:26:27 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <86y8utc583.fsf@blue.stonehenge.com> References: <000c01c3a479$a0df6960$6305a8c0@WASHINGTON> <330100000.1068137142@[192.168.100.3]> <001801c3a489$88933750$6305a8c0@WASHINGTON> <47140000.1068168884@[192.168.100.3]> <86y8utc583.fsf@blue.stonehenge.com> Message-ID: <64910000.1068222386@[192.168.100.3]> > Note to Steven: "Prototypes are a BAD idea". Yes, but until we can convince everyone to stop using the bloody things it doesn't help to break the code. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at jeeves.wrkhors.com Fri Nov 7 10:52:20 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <86sml0di6d.fsf@blue.stonehenge.com> References: <86sml0di6d.fsf@blue.stonehenge.com> Message-ID: <71280000.1068223940@[192.168.100.3]> -- "Randal L. Schwartz" >>>>>> "Scott" == Scott T Hildreth writes: > >>> Note to Steven: "Prototypes are a BAD idea". > > Scott> I seen this before(I think there is a node on perlmonks), > Scott> but I'll ask, Why are Prototypes bad? > > Larry invented them only to tweak the parser so that user-defined > subroutines could be parsed the same way that the odd built-ins were > also parsed (except for print, grep, map, and a few others I can't > recall). > > The problem is that there was *just* enough stuff that people thought > they should be used even for things that aren't trying to emulate > built-in syntax. > > That's the problem. > > Do not use them unless you are trying to emulate a built-in. Even then, there aren't that many situations where you *need* prototypes. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From pbaker at where2getit.com Fri Nov 7 10:34:38 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <86sml0di6d.fsf@blue.stonehenge.com> References: <86sml0di6d.fsf@blue.stonehenge.com> Message-ID: <478F412E-1140-11D8-9025-0003937562B8@where2getit.com> On Nov 6, 2003, at 8:30 PM, Randal L. Schwartz wrote: > > Do not use them unless you are trying to emulate a built-in. If we aren't supposed to use them, then why doesn't it say so in the docs. I use prototypes to keep users from giving incorrect arguments to functions. If they provide the incorrect number of arguments, it's caught at compile time and they can quickly fix it. Without prototypes, I would need to manually write code to check that they gave the right arguments, or I could ignore it and then the user could spend much wasted time trying to figure out why their code is mysteriously not working the way it's supposed to. -- Paul Baker "Yes, we did produce a near-perfect republic. But will they keep it? Or will they, in the enjoyment of plenty, lose the memory of freedom?? -- Thomas Jefferson in a letter to John Adams GPG Key: http://homepage.mac.com/pauljbaker/public.asc From jason at multiply.org Fri Nov 7 12:20:31 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Weird Cygwin issue Message-ID: <200311071735.hA7HZap31964@tetsuo.mengelt.com> Hi Guys. I am having some trouble getting Template-Toolkit to compile (the ONLY thing I am having trouble with). Steven, after your offer of doing the debugger talk, I did a little digging into the debugger and came up with the following stack trace for the perl Makefile.PL process for Template: ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1215): 1215: print "Checking $abs\n" if ($trace >= 2); ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1216): 1216: next unless $self->maybe_command($abs); ExtUtils::MM_Unix::maybe_command(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:29 77): 2977: my($self,$file) = @_; ExtUtils::MM_Unix::maybe_command(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:29 78): 2978: return $file if -x $file && ! -d $file; ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1217): 1217: print "Executing $abs\n" if ($trace >= 2); ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1219): 1219: my $version_check = qq{$abs -e "require $ver; print qq{VER_OK\n}"}; ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1226): 1226: if ($Is_BSD) { ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1229): 1229: close STDERR if $stderr_duped; ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:1230): 1230: $val = `$version_check`; Any ideas as to what would cause this code to fail? It simply hangs after the final line. No output, can't ctrl-c it. Feh. -jason scott gessner jason@multiply.org From lembark at jeeves.wrkhors.com Fri Nov 7 14:24:35 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <478F412E-1140-11D8-9025-0003937562B8@where2getit.com> References: <86sml0di6d.fsf@blue.stonehenge.com> <478F412E-1140-11D8-9025-0003937562B8@where2getit.com> Message-ID: <242870000.1068236675@[192.168.100.3]> > If we aren't supposed to use them, then why doesn't it say so in the > docs. I use prototypes to keep users from giving incorrect arguments to > functions. If they provide the incorrect number of arguments, it's caught > at compile time and they can quickly fix it. Without prototypes, I would > need to manually write code to check that they gave the right arguments, > or I could ignore it and then the user could spend much wasted time > trying to figure out why their code is mysteriously not working the way > it's supposed to. For one rather nice way: perldoc Class::Contract; The manual checks are my preference only becuase I can give more useful error messages than the compiler does. In most cases with perl the arg's are on a list or a referent to some type. Aside from knowing to pass in a hash referent (vs array ref) or that arg's are required, the really useful error messages don't start until after the values themselves have been validated, which prototypes cannot do for you. Once you have to validate the arg's anyway, what's the difference in adding 2-3 lines to check for a correct ref type? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From pbaker at where2getit.com Fri Nov 7 14:24:30 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <242870000.1068236675@[192.168.100.3]> References: <86sml0di6d.fsf@blue.stonehenge.com> <478F412E-1140-11D8-9025-0003937562B8@where2getit.com> <242870000.1068236675@[192.168.100.3]> Message-ID: <643B00D4-1160-11D8-9025-0003937562B8@where2getit.com> On Nov 7, 2003, at 2:24 PM, Steven Lembark wrote: > For one rather nice way: perldoc Class::Contract; That's for OO where prototypes don't matter anyway. > The manual checks are my preference only becuase I can give > more useful error messages than the compiler does. In most > cases with perl the arg's are on a list or a referent to some > type. Aside from knowing to pass in a hash referent (vs array > ref) or that arg's are required, the really useful error > messages don't start until after the values themselves have > been validated, which prototypes cannot do for you. Once > you have to validate the arg's anyway, what's the difference > in adding 2-3 lines to check for a correct ref type? Which brings me to the point. When I'm doing complex things, I generally go with OO so prototypes are a non issue and I'm doing manual more complex checks anyway. But when doing functions that are taking general not-too-complex arguments, where you may only ever screw up by not giving the right number of them, that's when I use prototypes. -- Paul Baker "Yes, we did produce a near-perfect republic. But will they keep it? Or will they, in the enjoyment of plenty, lose the memory of freedom?? -- Thomas Jefferson in a letter to John Adams GPG Key: http://homepage.mac.com/pauljbaker/public.asc From starbuck at hawaii.rr.com Fri Nov 7 18:31:35 2003 From: starbuck at hawaii.rr.com (Christopher Nava) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] advanceing through a file w/o using an array References: <3FAA8076.9070000@kuiki.net> Message-ID: <000f01c3a58f$aac2def0$6400a8c0@vector> Do you have a place I can find more info on this "flipflop" operator. I tried google "flipflop + perl" and got nothing usefull. I too am doing multi line file parsing (MTF messages not email) and could use any tools you've got. BTW: My current method is to do something like this.... open (INFILE, $filename) || die ($!); # I've got LOTS of ram and the files are relativly short so slurping in the entire file is no problem. my @file = ; close (INFILE); chomp @file; #Note: I usualy use a map function to get rid of both DOS CR/LF and Unix LFs. my $header = 1; my $found = ""; my %metadata = (); my @body = (); # You could use a while loop if you choose... #while () { # Substitute $_ for $line in the below text... # I prefer foreach since it results in a named variable ($line) that is easier for new persons to understand. foreach $line (@file) { # Note, I try to move the most likely items toward the top to avoid testing oddballs for every line... if ($header && $line =~ /^sometext$/) { # Look for the end of the header $header = 0; }elsif ($line =~ /^Subj:/) { # Multi line item $found = "Subject"; }elsif ($line =~ /^Country:/) { # Single line item $found = "Country"; }elseif ($line =~ /^Summary:/) { # Multi line item $found = "Summary"; } #....more of same... # If $found is equal to an item we append it to that metadata. if ($header) { $metadata{$found} =. $line; } else { push (@body, $line); } } # Note: I'm at home and can't test the above so there are likely be bugs in it.... -- Chris Nava ----- Original Message ----- From: "Jonathan Steinert" To: "Chicago.pm chatter" Sent: Thursday, November 06, 2003 7:10 AM Subject: Re: [Chicago-talk] advanceing through a file w/o using an array > Dooley, Michael wrote: > > ok, I haven't looked at perl in well pretty much forever. > > > > #! /usr/bin/perl -w > > > > $FILE='path_to_mail_file'; > > > > open (MAILFILE, "$FILE") || die "Can not read file ($!)"; > > > > while () { > > chomp; > > if ($_ =~ /^From / || /^Subject: /) { > > print "$_\n"; > > } > > } > > > > > > ok this is all I have so far. which is pretty easy in the first place. > > the part I am working on is getting the body of the email and displaying > > that. > > > > the body comes after "Message-Id: " and ends on the line befor "^From ". > > > > Is there a variable I can use to print the line after a match untill another > > match is found? > > > > kinda like > > if ($_ =~ /Message-Id: /) { > > print the next line until $_= "^From " > > } > > Actually, there is an operator for this sort of thing '..' is the > flipflop operator. The only trouble is that it's inclusive when you use > it like this: > > if (/^Message-Id: / .. /^From: /) > > so in that case you would get both the Message-Id and From lines, which > is not what you want. Basically, turning it around so the inclusive > matches point the other way is closer to what you want in this case. > > unless (/^From: / .. /^Message-Id: /) > > Of course, the cleanest way to parse real mail files (what this looks > like) is to use a module for that purpose. > > --Jonathan (hachi) > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at jeeves.wrkhors.com Sat Nov 8 14:30:12 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Dynamic method call In-Reply-To: <643B00D4-1160-11D8-9025-0003937562B8@where2getit.com> References: <86sml0di6d.fsf@blue.stonehenge.com> <478F412E-1140-11D8-9025-0003937562B8@where2getit.com> <242870000.1068236675@[192.168.100.3]> <643B00D4-1160-11D8-9025-0003937562B8@where2getit.com> Message-ID: <23560000.1068323412@[192.168.100.3]> -- Paul Baker > > On Nov 7, 2003, at 2:24 PM, Steven Lembark wrote: > >> For one rather nice way: perldoc Class::Contract; > > That's for OO where prototypes don't matter anyway. Actually, you can screw people trying to use OO with prototypes quite nicely > Which brings me to the point. When I'm doing complex things, I generally > go with OO so prototypes are a non issue and I'm doing manual more > complex checks anyway. > > But when doing functions that are taking general not-too-complex > arguments, where you may only ever screw up by not giving the right > number of them, that's when I use prototypes. @_ == 6 or croak "Bogus call: offball count, should be 6"; doesn't seem like all that much typing. If folks pass in too few values you'll give back an uninit value warning at which point it gets pretty obvious what happend. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at jeeves.wrkhors.com Sat Nov 8 14:49:41 2003 From: lembark at jeeves.wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] advanceing through a file w/o using an array In-Reply-To: <000f01c3a58f$aac2def0$6400a8c0@vector> References: <3FAA8076.9070000@kuiki.net> <000f01c3a58f$aac2def0$6400a8c0@vector> Message-ID: <24790000.1068324581@[192.168.100.3]> -- Christopher Nava > Do you have a place I can find more info on this "flipflop" operator. > I tried google "flipflop + perl" and got nothing usefull. > I too am doing multi line file parsing (MTF messages not email) and could > use any tools you've got. what is the 'flipflop' operator supposed to do? if you want to detect file transitions try: my $path = ''; while( ) { if( $path ne $ARGV ) { $path = $ARGV; # just read the first line of a new file, deal # with any setups. ... } ... } > BTW: My current method is to do something like this.... > > open (INFILE, $filename) || die ($!); ># I've got LOTS of ram and the files are relativly short so slurping in the > entire file is no problem. > my @file = ; > close (INFILE); > > chomp @file; you could use chomp( my @linz = <$infile> ); if you are really adverse to typing :-) Lexical file handles are easier to deal with in most cases: sub slurp { open my $fh, '<', shift or croak "Bogus path"; chomp( my @linz = <$fh> ); wantarray ? @linz : \@linz } my $linz = slurp $path; or my @linz = slurp $path; will do it nicely. ># Note: I usualy use a map function to get rid of both DOS CR/LF and Unix > LFs. a for loop handles this with less overhead -- doesn't have to flatten and reassign the list: s/\s+$// for @linz; is the fastest way. ># I prefer foreach since it results in a named variable ($line) that is > easier for new persons to understand. > foreach $line (@file) { You can save all of the if blocks by using a dispatch table and one regex: my %handlerz = ( # this associates each of the mail header entries # with a subroutine that handles that header entry. Subject => __PACKAGE__->can( 'subject_handler' ), Country => __PACKAGE__->can( 'country_handler' ), Summary => __PACKAGE__->can( 'summary_handler' ), From => __PACKAGE__->can( 'from_handler' ), ); sub read_header { # read the first paragraph, leaves ARGV positioned # at the message body. local $/ = ''; my $header = ; chomp( my @hdrlinz = split /\n/, $header ); wantarray ? @hdrlinz : \@hdrlinz; } for( read_header ) { my ($field) = /^(\w+):/; if( my $sub = $handlerz{$fild} ) { $sub->( $_ ); } } # the next will suck up the message body -- assuming # an RFC mail message, Hell alone knows what you'll get from # Domino or Outlook... To add a handler for some field type just write a sub in the current module or use base wherever you put the thing. The %handlerz table associates the mail header entry with whichever sub is used to handle it. Nice thing is that you can associate any sub with any number of headers (e.g., a log-only entry to record what happend) and add the pieces one-by-one as you need them (or stub the ones you need and develop them as you go along). I know this verges on the OO-ish for some people, but if you think of it as a jump table it may be easier to swallow :-) > > # Note, I try to move the most likely items toward the top to avoid > testing oddballs for every line... > if ($header && $line =~ /^sometext$/) { # Look for the end of the > header $header = 0; > }elsif ($line =~ /^Subj:/) { # Multi line item > $found = "Subject"; > }elsif ($line =~ /^Country:/) { # Single line item > $found = "Country"; > }elseif ($line =~ /^Summary:/) { # Multi line item > $found = "Summary"; > } #....more of same... > > # If $found is equal to an item we append it to that metadata. > if ($header) { > $metadata{$found} =. $line; > } else { > push (@body, $line); > } > } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Nov 10 14:53:45 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Weird Cygwin issue In-Reply-To: <200311071735.hA7HZap31964@tetsuo.mengelt.com> References: <200311071735.hA7HZap31964@tetsuo.mengelt.com> Message-ID: <13600000.1068497624@[192.168.100.3]> -- jason gessner > ExtUtils::MM_Unix::find_perl(/usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm:123 > 0): 1230: $val = `$version_check`; > > > Any ideas as to what would cause this code to fail? It simply hangs after > the final line. No output, can't ctrl-c it. Feh. Try: b 1230 c x $version_check What happens if you run $version_check by hand from the command line? You can also try: x $a = qx($version_check); and see what the thing is supposed to return. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Nov 10 15:15:56 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] [Chicago.pm]: For the few of us wretches who write code with bugs... (fwd) Message-ID: <22010000.1068498956@[192.168.100.3]> ---------- Forwarded Message ---------- From: lembark@wrkhors.com Subject: [Chicago.pm]: For the few of us wretches who write code with bugs... > > ... I will be describing the Perl debugger. > > Admittedly this might at first seem useful only to the tiny proportion > of you who write code with bugs in it. However, if you contemplate > the number of other idio..., er, Otherwise Fine Programmers (tm) > who put bugs in their code the debugger starts to look, well, useful. > > > I'll go over the debugger basics inside "perl -d" for setting breakpoints > and running code and examining variables and structures. It's also > worth spending a few moments on $DB::single, $DB::trace (and why > to remove them before releasing a module :-). > > For those who don't enjoy gdb, I'll also describe how to get/install/use > the Perl Tk Debugger (-d:ptkdb). > > But wait, there's more... > > The debugger is a nice tool for simply checking code or for one-pass > data munging. I'll go over some tricks for command-line perlyfying > with the debugger. > > > Note: after the last meeting I was also approached about doing > something with OO Perl. I can pick that up at a later time if people > are interested. > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > > -- > undef$/;open # "moc.acipot@ebircsbusnu-mp-ogacihc" liam ,busnu ot > STDIN,$0;print # mp-ogacihc/stsil/moc.acipot.www//:ptth > scalar(reverse # moc.acipot@mp-ogacihc > scalar<>),"\n" # sregnoM lreP ogacihC -- mp.ogacihC > > --^---------------------------------------------------------------- > This email was sent to: lembark@wrkhors.com > > EASY UNSUBSCRIBE click here: http://topica.com/u/?aVxiI5.aVAlwp.bGVtYmFy > Or send an email to: chicago-pm-unsubscribe@topica.com > > TOPICA - Start your own email discussion group. FREE! > http://www.topica.com/partner/tag02/create/index2.html > --^---------------------------------------------------------------- ---------- End Forwarded Message ---------- -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ejanev2 at yahoo.com Mon Nov 10 17:19:02 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Re: For the few of us wretches who write code with bugs... (fwd) In-Reply-To: <22010000.1068498956@[192.168.100.3]> Message-ID: <20031110231902.74129.qmail@web21508.mail.yahoo.com> --- Steven Lembark wrote: > Subject: [Chicago.pm]: For the few of us wretches who write code with > bugs... > > > ... I will be describing the Perl debugger. I am very interested for the topic of the next Tech Meeting. I am very interested for the proposed future one: OO Perl. I wish the meetings were held more ofthen than once a month. According the traphic of the mailing list this Monday, I beleive that Mondays are not favorite days of other subscribers too. Emil __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From walter at torres.ws Mon Nov 10 17:59:14 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Re: [Chicago.pm]: For the few of us wretches who write code with bugs... Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Emil Janev > Sent: Monday, November 10, 2003 5:19 PM > To: Chicago.pm chatter > Subject: [Chicago-talk] Re: For the few of us wretches who write code > withbugs... (fwd) > According the traphic of the mailing list this Monday, I beleive > that Mondays are not favorite days of other subscribers too. I can't make Tuesdays, Boy Scout meeting night. But then again, I've not made it to the last 8 for some reason or other. :/ Walter From andy at petdance.com Mon Nov 10 20:20:44 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Re: [Chicago.pm]: For the few of us wretches who write code with bugs... In-Reply-To: References: Message-ID: <20031111022044.GA3264@petdance.com> > > According the traphic of the mailing list this Monday, I beleive > > that Mondays are not favorite days of other subscribers too. The day for when we meet in Vernon Hills isn't an item of debate at this point. It's first Tuesday of the month. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ejanev2 at yahoo.com Tue Nov 11 09:30:17 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Re: The day for when we meet in Vernon Hills isn't an item of debate In-Reply-To: <20031111022044.GA3264@petdance.com> Message-ID: <20031111153018.28239.qmail@web21504.mail.yahoo.com> > The day for when we meet in Vernon Hills isn't an item of debate at this > point. It's first Tuesday of the month. > > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance I agree with this totally. I have to say that may writing: > > According the traphic of the mailing list this Monday, I beleive > > that Mondays are not favorite days of other subscribers too. was misunderstood. I just put a remark on Mondays in general (as first days after the weekend) as not my favorite days. It was not connected to the Tech meetings at all. Maybe one ":-)" on the end of my comment would be more appropriate. Sorry for this. Emil __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From ehs at pobox.com Tue Nov 11 10:30:31 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] debugging Message-ID: <20031111163031.GC9010@ink.inkdroid.org> Steven, thanks for the blurb. I modified it slightly and put it up on the website [1], and submitted as a story to use.perl.org. By the way, Andy mentioned at the last meeting that we have a members page [2]. If you would like to be listed just drop me an email with your name. You can optionally include your homepage and/or place of employment, technical specialties, hobbies, etc. //Ed [1] http://chicago.pm.org/meetings/ [2] http://chicago.pm.org/members.html From walter at torres.ws Tue Nov 11 18:18:07 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] brain dead question... Message-ID: OK, I know I've known this. I know this info is out there, I'm just not asking the right question. So I'll ask humans, maybe they can decipher my question. "How can I add a path to @INC?" I have a couple of Modules that are not being found when I compile perl2exe. So I thought I'd give explicate path info. can you please remind this brain-dead human? thx Walter From mike at oobak.org Tue Nov 11 18:32:02 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] brain dead question... In-Reply-To: References: Message-ID: <1068597122.2047.5.camel@woody.star.niu.edu> use lib '/path/to/include'; is the preferred method. `perldoc lib` for more info. :) On Tue, 2003-11-11 at 18:18, Walter Torres wrote: > OK, I know I've known this. > > I know this info is out there, I'm just not asking the right question. > > So I'll ask humans, maybe they can decipher my question. > > "How can I add a path to @INC?" > > I have a couple of Modules that are not being found when I compile perl2exe. > > So I thought I'd give explicate path info. > > can you please remind this brain-dead human? > > thx > > Walter > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From Aaron.Young at citadelgroup.com Tue Nov 11 19:34:30 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] brain dead question... Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EAD2@CORPEMAIL.citadelgroup.com> i usually do unshift(@INC, '/my/math'); there are some OO ways to do this...but i can't remember them Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Walter Torres [mailto:walter@torres.ws] > Sent: Tuesday, November 11, 2003 6:18 PM > To: chicago-talk@mail.pm.org > Subject: [Chicago-talk] brain dead question... > > > OK, I know I've known this. > > I know this info is out there, I'm just not asking the right question. > > So I'll ask humans, maybe they can decipher my question. > > "How can I add a path to @INC?" > > I have a couple of Modules that are not being found when I > compile perl2exe. > > So I thought I'd give explicate path info. > > can you please remind this brain-dead human? > > thx > > Walter > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From walter at torres.ws Tue Nov 11 23:11:49 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] brain dead question... In-Reply-To: <1068597122.2047.5.camel@woody.star.niu.edu> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Mike Pastore > Sent: Tuesday, November 11, 2003 6:32 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] brain dead question... > > > use lib '/path/to/include'; > > is the preferred method. `perldoc lib` for more info. :) Yea, I thought that was it. :/ I wasn't sure. Thanks Walter From walter at torres.ws Tue Nov 11 23:17:09 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] a favor... In-Reply-To: <1068597122.2047.5.camel@woody.star.niu.edu> Message-ID: Is there anyone here willing to take my copy of perl3exe (assuming you don't have it) and try to compile a script that I created? It will not compile for me. It says it can't locate ANY of the modules I am calling for. But gee, the script itself runs fine. I just need to see if it is my machine/setup or not. thanks Walter PS: Yes, I've sent a support message to them. we've traded 3 messages so far. No results. From ehs at pobox.com Wed Nov 12 00:43:53 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] a favor... In-Reply-To: References: <1068597122.2047.5.camel@woody.star.niu.edu> Message-ID: <20031112064353.GA26718@ink.inkdroid.org> On Tue, Nov 11, 2003 at 11:17:09PM -0600, Walter Torres wrote: > Is there anyone here willing to take my copy of perl3exe (assuming you don't > have it) and try to compile a script that I created? I would be willing to see if it'll compile under PAR [1] //Ed [1] http://par.perl.org From me at heyjay.com Wed Nov 12 21:03:12 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS Message-ID: <000701c3a992$aee7c4d0$6405a8c0@a30> Hi, when I'm building a module and I have: our $VERSION = '0.01'; And then I'm using CVS, is there some way to make it when I check the module in, that CVS would replace the "0.01" with the CVS version? I remember with RCS you could put some strings into your code that RCS would replace with the history, author, version... What about with CVS and Perl? Thanks Jay From shild at sbcglobal.net Wed Nov 12 21:27:03 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS In-Reply-To: <000701c3a992$aee7c4d0$6405a8c0@a30> Message-ID: With CVS (as far as I know) you put an $Id: line at the top of the script which gets filled in with person who checked it in, version, date when the code is commited. So in perl put, #$Id: $ at the top of your code. I don't know about having it replace the $VERSION, unless you parsed the CVS Id line in a BEGIN block. On 13-Nov-2003 Jay Strauss wrote: > Hi, > > when I'm building a module and I have: > > our $VERSION = '0.01'; > > > And then I'm using CVS, is there some way to make it when I check the module > in, that CVS would replace the "0.01" with the CVS version? > > I remember with RCS you could put some strings into your code that RCS would > replace with the history, author, version... > > What about with CVS and Perl? > > Thanks > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 12-Nov-2003 Time: 21:22:06 ---------------------------------- From shild at sbcglobal.net Wed Nov 12 21:29:41 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS In-Reply-To: Message-ID: Great CVS online book, http://cvsbook.red-bean.com/cvsbook.html On 13-Nov-2003 Scott T. Hildreth wrote: > > With CVS (as far as I know) you put an $Id: line at the top of the script > which gets filled in with person who checked it in, version, date when the code is > commited. So in perl put, > >#$Id: $ > > at the top of your code. > > I don't know about having it replace the $VERSION, unless you parsed the CVS Id line > in a BEGIN block. > > > On 13-Nov-2003 Jay Strauss wrote: >> Hi, >> >> when I'm building a module and I have: >> >> our $VERSION = '0.01'; >> >> >> And then I'm using CVS, is there some way to make it when I check the module >> in, that CVS would replace the "0.01" with the CVS version? >> >> I remember with RCS you could put some strings into your code that RCS would >> replace with the history, author, version... >> >> What about with CVS and Perl? >> >> Thanks >> Jay >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > > ---------------------------------- > E-Mail: Scott T. Hildreth > Date: 12-Nov-2003 > Time: 21:22:06 > ---------------------------------- > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 12-Nov-2003 Time: 21:29:01 ---------------------------------- From andy at petdance.com Wed Nov 12 22:12:54 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS In-Reply-To: References: Message-ID: <20031113041254.GA31508@petdance.com> > >> when I'm building a module and I have: > >> > >> our $VERSION = '0.01'; Take a look at the ExtUtils::MakeMaker FAQ. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Wed Nov 12 22:03:54 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS References: <20031113041254.GA31508@petdance.com> Message-ID: <006b01c3a99b$2cf9cfa0$6405a8c0@a30> Thanks, Do most people use: $VERSION = sprintf "%d.%03d", q$Revision: 1.9 $ =~ /(\d+)/g; or $VERSION = do { my @r = (q$Revision: 1.9 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Wednesday, November 12, 2003 10:12 PM Subject: Re: [Chicago-talk] Perl and CVS > > >> when I'm building a module and I have: > > >> > > >> our $VERSION = '0.01'; > > Take a look at the ExtUtils::MakeMaker FAQ. > > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Wed Nov 12 22:04:47 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS References: Message-ID: <007101c3a99b$488ef7e0$6405a8c0@a30> Thanks for the link jay ----- Original Message ----- From: "Scott T. Hildreth" To: "Chicago.pm chatter" Sent: Wednesday, November 12, 2003 9:29 PM Subject: RE: [Chicago-talk] Perl and CVS Great CVS online book, http://cvsbook.red-bean.com/cvsbook.html On 13-Nov-2003 Scott T. Hildreth wrote: > > With CVS (as far as I know) you put an $Id: line at the top of the script > which gets filled in with person who checked it in, version, date when the code is > commited. So in perl put, > >#$Id: $ > > at the top of your code. > > I don't know about having it replace the $VERSION, unless you parsed the CVS Id line > in a BEGIN block. > > > On 13-Nov-2003 Jay Strauss wrote: >> Hi, >> >> when I'm building a module and I have: >> >> our $VERSION = '0.01'; >> >> >> And then I'm using CVS, is there some way to make it when I check the module >> in, that CVS would replace the "0.01" with the CVS version? >> >> I remember with RCS you could put some strings into your code that RCS would >> replace with the history, author, version... >> >> What about with CVS and Perl? >> >> Thanks >> Jay >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > > ---------------------------------- > E-Mail: Scott T. Hildreth > Date: 12-Nov-2003 > Time: 21:22:06 > ---------------------------------- > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 12-Nov-2003 Time: 21:29:01 ---------------------------------- _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Thu Nov 13 09:38:29 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] brain dead question... In-Reply-To: References: Message-ID: <199730000.1068737908@[192.168.100.3]> -- Walter Torres > OK, I know I've known this. > > I know this info is out there, I'm just not asking the right question. > > So I'll ask humans, maybe they can decipher my question. > > "How can I add a path to @INC?" syntatically correct: unshift @INC, $your_path_here; push @INC, $your_path_here; splice @INC, $offset, 0, ( $your_path_here ); probably what you are looking for: use lib qw( /path/to/something /path/to/anotherthing ); -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Thu Nov 13 09:43:12 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS In-Reply-To: References: Message-ID: <202670000.1068738192@[192.168.100.3]> -- "Scott T. Hildreth" > > With CVS (as far as I know) you put an $Id: line at the top of the script > which gets filled in with person who checked it in, version, date when > the code is commited. So in perl put, > ># $Id: $ > > at the top of your code. > > I don't know about having it replace the $VERSION, unless you parsed the > CVS Id line in a BEGIN block. > > > On 13-Nov-2003 Jay Strauss wrote: >> Hi, >> >> when I'm building a module and I have: >> >> our $VERSION = '0.01'; >> >> >> And then I'm using CVS, is there some way to make it when I check the >> module in, that CVS would replace the "0.01" with the CVS version? >> >> I remember with RCS you could put some strings into your code that RCS >> would replace with the history, author, version... >> >> What about with CVS and Perl? The problem with using RCS numbers with a perl $VERSION string is that the RCS ones do not always sort lexically. There are lots of situations where upping the RCS $version number does not mean you are releasing a new version of the Perl code (e.g., you check it in 20 times to make sure it's archived before you actually release the module). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ehs at pobox.com Thu Nov 13 10:08:22 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] perl/chicago job Message-ID: <20031113160822.GB5020@ink.inkdroid.org> In case you're not subscribed to jobs.perl.org a Perl/Chicago job was just posted yesterday. //Ed -- http://jobs.perl.org/job/1071 Posted: November 12, 2003 Job title: LAMP developer Company name: LiveText Inc Location: United States, IL, Chicago Travel: 0% Terms of employment: Salaried employee Hours: Full time Onsite: yes Description: Chicago based company in search of a web developer to design/develop/maintain a web-based content management system, and other support tools for our users in a LAMP environment. Candidates should be highly self-motivated individuals who possess a strong understanding and working knowledge of Perl, MySql, Linux RedHat, Apache, mod_perl, PHP, Java, XHTML, CSS, Javascript, XML, and UML. Candidates should also demonstrate a willingness to learn new languages and technologies as needed. Required skills: - Perl, mod_perl, PHP - Apache + SSL - SQL Database design, DBI, MySql - solid OO design, UML - XHTML, CSS, JavaScript, XML - Strong communications skills - Self motivated - Detail oriented Desired skills: - Linux administration experience - MySql administration experience URL for more information: http://college.livetext.com/ Contact information: Please send resume with salary requirements to jobs@livetext.com From me at heyjay.com Thu Nov 13 10:09:17 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited Message-ID: <001201c3aa00$7fb77fc0$6405a8c0@a30> Hi, So I've run into hard dead ends trying Inline::Java and Java.pm. So I'm thinking of rewriting the whole vendor thing in perl (they give the java source). My main concern is they start up a separate thread to talk on a socket. I'm currently using Perl 5.6.1 which doesn't (as I understand) have threading support. what are my options to work around the threading stuff? Thanks Jay From ehs at pobox.com Thu Nov 13 10:16:32 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <001201c3aa00$7fb77fc0$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> Message-ID: <20031113161632.GC5020@ink.inkdroid.org> On Thu, Nov 13, 2003 at 10:09:17AM -0600, Jay Strauss wrote: > So I've run into hard dead ends trying Inline::Java and Java.pm. I'm probably beating a dead horse here, but what was the dead end with Inline::Java, and have you seen the recent article on using Inline::Java at perl.com? [1] Have you tried the Inline discussion list [2] to see if they can provide any assistance? //Ed [1] http://www.perl.com/pub/a/2003/11/07/java.html [2] http://inline.perl.org From hachi at kuiki.net Thu Nov 13 10:17:58 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <001201c3aa00$7fb77fc0$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> Message-ID: <3FB3AEB6.2020908@kuiki.net> You could use POE ( http://poe.perl.org ) or fork and use IPC, or you could write your own non-blocking IO code. Stem** ( http://www.stemsystems.com ) is possible too. It all depends on what this socket is doing, and what the main program is doing. ** I don't know stem, but from what I gather from Uri Guttman (the Author) it can do anything POE can. --Jonathan Steinert Jay Strauss wrote: > Hi, > > So I've run into hard dead ends trying Inline::Java and Java.pm. So I'm > thinking of rewriting the whole vendor thing in perl (they give the java > source). My main concern is they start up a separate thread to talk on a > socket. I'm currently using Perl 5.6.1 which doesn't (as I understand) have > threading support. > > what are my options to work around the threading stuff? > > > Thanks > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Thu Nov 13 10:19:24 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <001201c3aa00$7fb77fc0$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> Message-ID: <212490000.1068740364@[192.168.100.3]> -- Jay Strauss > Hi, > > So I've run into hard dead ends trying Inline::Java and Java.pm. So I'm > thinking of rewriting the whole vendor thing in perl (they give the java > source). My main concern is they start up a separate thread to talk on a > socket. I'm currently using Perl 5.6.1 which doesn't (as I understand) > have threading support. > > what are my options to work around the threading stuff? - 5.8.1 has a stable threading environment, leaves the rest of Perl syntax usable. - Fork and use IPC for the data transfer (perldoc perlipc). Given the way data is handled, setting up a pipe is probably the simplest fix. - Use a single proc w/ polling select on the socket. Lincon's Network Programming With Perl addresses this issue in lurid detail with a number of interface standards. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Thu Nov 13 10:31:23 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <20031113161632.GC5020@ink.inkdroid.org> Message-ID: <002501c3aa03$949da8d0$6405a8c0@a30> It had something to do with the asynchronous thread that the java was starting, it made it (currently) impossible to callback to perl, or at least that is what Patrick LeBoutillier (the author of Inline::Java) thought :). Jay ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 10:16 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > On Thu, Nov 13, 2003 at 10:09:17AM -0600, Jay Strauss wrote: > > So I've run into hard dead ends trying Inline::Java and Java.pm. > > I'm probably beating a dead horse here, but what was the dead end with > Inline::Java, and have you seen the recent article on using Inline::Java at > perl.com? [1] > > Have you tried the Inline discussion list [2] to see if they can provide > any assistance? > > //Ed > > [1] http://www.perl.com/pub/a/2003/11/07/java.html > [2] http://inline.perl.org > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Thu Nov 13 10:42:34 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <212490000.1068740364@[192.168.100.3]> Message-ID: <002f01c3aa05$2501f6f0$6405a8c0@a30> > - 5.8.1 has a stable threading environment, leaves the rest > of Perl syntax usable. > - Fork and use IPC for the data transfer (perldoc perlipc). > Given the way data is handled, setting up a pipe is probably > the simplest fix. I'll read up on perlipc > - Use a single proc w/ polling select on the socket. Thought about that, but not really sure how to implement it and provide the kind of callback interface that may be necessary > Lincon's Network Programming With Perl addresses this issue > in lurid detail with a number of interface standards. I don't have that book. Wish I could have won that at the meeting :). Ps read the "learning more perl" (i.e. perl modules... by Randal), thought it was good, learned a couple of things, but most of it was review Jay From ehs at pobox.com Thu Nov 13 10:45:30 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <002501c3aa03$949da8d0$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <20031113161632.GC5020@ink.inkdroid.org> <002501c3aa03$949da8d0$6405a8c0@a30> Message-ID: <20031113164530.GD5020@ink.inkdroid.org> On Thu, Nov 13, 2003 at 10:31:23AM -0600, Jay Strauss wrote: > It had something to do with the asynchronous thread that the java was > starting, it made it (currently) impossible to callback to perl, or at least > that is what Patrick LeBoutillier (the author of Inline::Java) thought :). Interesting, would you be willing to talk about Inline::Java sometime at a meeting? I'd be intersted to learn what you've learned, and see some examples. //Ed From andy at petdance.com Thu Nov 13 11:38:53 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <002f01c3aa05$2501f6f0$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <212490000.1068740364@[192.168.100.3]> <002f01c3aa05$2501f6f0$6405a8c0@a30> Message-ID: <20031113173853.GC7159@petdance.com> > > Lincon's Network Programming With Perl addresses this issue > > in lurid detail with a number of interface standards. > > I don't have that book. Wish I could have won that at the meeting :). We've never had it to give away. It's definitely worth the money. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Andy_Bach at wiwb.uscourts.gov Thu Nov 13 10:57:47 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <002f01c3aa05$2501f6f0$6405a8c0@a30> Message-ID: One thing - all the sample code from OReilly books is available on-line, if not the book. The perl cookbook (now at version 2!) covers ipc in chapter 16 and sockets in 17 so you can go to OReilly's site and get that sample code and use it. http://www.oreilly.com/catalog/perlckbk2/ There's some kind Unfortunately, NPWP is Addison-Wesley, but Lincoln has the source and sample chapters at: http://modperl.com:9000/perl_networking/ a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From Andy_Bach at wiwb.uscourts.gov Thu Nov 13 10:59:52 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: Message-ID: I meant to say: "There's some kind of Safari 'try it free' offer (don't we have some pm related access?) too, at O'Reilly" a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From pbaker at where2getit.com Thu Nov 13 16:03:06 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:52 2004 Subject: [Chicago-talk] Perl and CVS In-Reply-To: <000701c3a992$aee7c4d0$6405a8c0@a30> References: <000701c3a992$aee7c4d0$6405a8c0@a30> Message-ID: <3FB3FF9A.4060400@where2getit.com> Jay Strauss wrote: > And then I'm using CVS, is there some way to make it when I check the module > in, that CVS would replace the "0.01" with the CVS version? Use this: our $VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d." . "%02d" x $#r, @r }; This would expand out the version number to 1.02 and it will be updated by CVS commits. If you think you may have more than one hundred revisions (the revision number could get up to 1.100, then change the "%02d" to "%03d". -- Paul Baker From me at heyjay.com Thu Nov 13 20:22:43 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Perl and CVS References: <000701c3a992$aee7c4d0$6405a8c0@a30> <3FB3FF9A.4060400@where2getit.com> Message-ID: <00a901c3aa56$32731ca0$6405a8c0@a30> Okay dokey, I figure a 1000 commits isn't unrealistic (depending on how often one commits) ----- Original Message ----- From: "Paul Baker" To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 4:03 PM Subject: Re: [Chicago-talk] Perl and CVS > Jay Strauss wrote: > > > And then I'm using CVS, is there some way to make it when I check the module > > in, that CVS would replace the "0.01" with the CVS version? > > Use this: > > our $VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d." . "%02d" x $#r, @r }; > > This would expand out the version number to 1.02 and it will be updated by CVS commits. If you think you may have more than one hundred revisions (the revision number could get up to 1.100, then change the "%02d" to "%03d". > > -- > Paul Baker > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From jthomasoniii at yahoo.com Thu Nov 13 22:36:30 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. Message-ID: <20031114043630.97447.qmail@web60205.mail.yahoo.com> Alrighty then. I've been lurking for far too long and I figure I should start participating again. Particularly since I could use some suggestions. Yes, yes, I'm selfish that way. Okay, here's the issue. Our application is trusting. Very trusting. It just assumes that a lot of things won't go wrong. That's bad. Further, even when things *do* go wrong, it tends not to report them. That's worse. Beyond that, a lot of the time even if you -wanted- to report them, you can't, because the buried deep down module that actually has the error still doesn't tell you. It's quite literally. "Oh no! Something bad happened. Well, I'll forget about it and return undef!" And this is becoming a problem. People are starting to request more specialized error messages. Spitting back "An error occurred" for every occurence only gets you so far, after all. So, we'd like to get in some form of error handling and do so relatively painlessly. Because this is, of course, no longer a small application, with line counts well into 5 digits and easily breaking 6 if you count the template and HTML code. Which brings us to some of the caveats that will hinder the "relatively painlessly" part. 1) We have to be able to roll it out piece-meal into the system. Anything that would require an immediate and total re-write of everything to handle something new really isn't appropriate. 2) It always has to report the correct error back. (duh, but I'll address that in a moment). 3) It can't break any of the existing code. Virtually all of the error handling is done by returning something true upon success and undef upon failure. Easy, right? So far, here's what I've investigated and my results. I looked into using Error.pm (and the equivalents) but have decided against it because it violates condition 2, unless we violate condition 1 as well. The issue is that it stores the error in a third-party location ("prior Error"), which is fine as long as everything is always setting an error there. But my concern is that a method will fail, set an error, and return undef. Then later, another method will fail, not set an error, and return undef. Then if I try to report on that second failure, I'll end up with the error message from the first. Very bad, since we're now reporting the wrong thing instead of something generic. The next thing we considered was linking that third party error information to package or object metadata. So you could say "recent_error_for($obj) or recent_error_for($methodref)" or whatever. This has some immediate concerns. First of all, it still fails the same way in a dispatch method. if foo() calls bar() which fails and sets an error, then foo() reports it and we're all fine. But if foo() then calls baz() which fails and doesn't set an error, we'll probably end up reporting back the earlier "bar" error. I can get around this by explicitly wiping out the error message each time we enter foo(), but that seems hack-ish. The bigger issue is memory. Sure, when we first enter a method, we know the object calling it, but that object is not necessarily passed along to submethod calls (and we can't go adding it in to all submethod calls because we rapidly start to violate condtion 1) ). So the alternative was to have the error recording actually populate all parents in the full caller() stack. So foo() calls bar() calls par() calls tee() and tee() has an error, then the error reported in tee() stores elsehwere that same error linked to all of the parent functions. This'll work, but it's ~extremely~ memory intensive. And memory is always a concern, especially since we deploy under mod_perl. So I think that approach is out as well. But here, some happy news. I have one idea I've been kicking around, and a friend on another system suggested another. My idea is as follows - create an uberclass that all modules will eventually inherit from (everything's pretty distinct now), and stick some error handling routines in there. My personal favorite has always been an error method that when called as an accessor returns the error string and as a mutator returns undef. So you can do: sub foo { my $self = shift; return $self->error("We always fail. Sigh.") unless 0; }; $obj->foo() || die $obj->error(); So we put that in the superclass and gradually re-write things to inherit from it and use it. While we do that, we tweak the modules as necessary so they bubble up the errors from down below. Now, naturally, normally bubbling up like that would kill us, because the other modules wouldn't necessarily have the error method, which brings us into trouble with possibly violating (1). So the solution? Hack UNIVERSAL. Give UNIVERSAL an error() method that just returns something generic. That way, as we enhance modules to use the uberclass, they can bubble up generic errors to start with, which we'll eventually replace with specific ones. Of course, hacking UNIVERSAL isn't very high on my list of Good Things To Do, so I'm leary of it. The other suggestion I received was to use exceptions. Now, of course, exceptions would probably be a bad thing since we'd have to run around and make sure that they wer ehandled all over the app which would instantly violate (1). But his suggestion was to write some fairly beefy try/throw/catch/finally handler blocks. Try would register the exceptions it'll catch, and then throw will only die if something currently says it'll handle it. Otherwise it'll return undef. And then finally pops off the handling of that particular exception. Messy, but we could probably get it to work. I'm more hesitant about this one for some other reasons. First of all, I just don't like exceptions. I know this is a religious debate, but I don't care for them. Your code jumps around, there's no indication of what's happening, and it ends up hiding the location of the error from you. Yes, yes, some people think that's good, but I don't. Like I said, it's a religious debate. Further, we're not using exception handling in the rest of the app, so I'm leary about sticking it in here when it's so completely different. Effectively what I'm saying here is that I'll use exceptions if it's really the best and only choice, but I'd really rather not unless I'm backed into a corner. And that's the dilemma. Anybody out there have any suggestions? Again, we want to do it while: 1) We have to be able to roll it out piece-meal into the system. Anything that would require an immediate and total re-write of everything to handle something new really isn't appropriate. 2) It always has to report the correct error back. 3) It can't break any of the existing code. Virtually all of the error handling is done by returning something true upon success and undef upon failure. Any suggestions/recommendations/ideas/questions will be appreciated. Thanks, -Jim.......... __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From me at heyjay.com Fri Nov 14 09:09:19 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30><20031113161632.GC5020@ink.inkdroid.org><002501c3aa03$949da8d0$6405a8c0@a30> <20031113164530.GD5020@ink.inkdroid.org> Message-ID: <004001c3aac1$48e2a990$6405a8c0@a30> Sorry Ed, forgot to answer. I got to be honest, I didn't really learn much because I didn't really get a chance to use it. I don't have any examples, because my stuff never worked. I'm happy to give a talk on something I actually get to work. If I recode this thing in perl, maybe I can talk about sockets and treads/select/poe (however I end up doing the asynchronous part) Jay ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 10:45 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > On Thu, Nov 13, 2003 at 10:31:23AM -0600, Jay Strauss wrote: > > It had something to do with the asynchronous thread that the java was > > starting, it made it (currently) impossible to callback to perl, or at least > > that is what Patrick LeBoutillier (the author of Inline::Java) thought :). > > Interesting, would you be willing to talk about Inline::Java sometime > at a meeting? I'd be intersted to learn what you've learned, and see > some examples. > > //Ed > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Fri Nov 14 09:11:05 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30><212490000.1068740364@[192.168.100.3]><002f01c3aa05$2501f6f0$6405a8c0@a30> <20031113173853.GC7159@petdance.com> Message-ID: <005901c3aac4$5bd20bb0$6405a8c0@a30> I suppose I'll have to buy it, what's one more $50 O'Reilly book :( ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 11:38 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > > > Lincon's Network Programming With Perl addresses this issue > > > in lurid detail with a number of interface standards. > > > > I don't have that book. Wish I could have won that at the meeting :). > > We've never had it to give away. It's definitely worth the money. > > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Fri Nov 14 09:11:55 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: Message-ID: <005a01c3aac4$5c0306c0$6405a8c0@a30> Andy, Thanks for the link, maybe it will have something I want to do Jay ----- Original Message ----- From: To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 10:57 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > One thing - all the sample code from OReilly books is available on-line, > if not the book. The perl cookbook (now at version 2!) covers ipc in > chapter 16 and sockets in 17 so you can go to OReilly's site and get that > sample code and use it. > http://www.oreilly.com/catalog/perlckbk2/ > > There's some kind > > Unfortunately, NPWP is Addison-Wesley, but Lincoln has the source and > sample chapters at: > http://modperl.com:9000/perl_networking/ > > a > > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been mentioned by > name in an official Kremlin pronouncement?" unnamed humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Fri Nov 14 09:34:33 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: References: Message-ID: <65790000.1068824072@[192.168.100.3]> -- Andy_Bach@wiwb.uscourts.gov > I meant to say: > > "There's some kind of Safari 'try it free' offer (don't we have some pm > related access?) too, at O'Reilly" 14 days free trial on the top of their web page (e.g., via www.ora.com -> safari). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jason at multiply.org Fri Nov 14 09:55:45 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <65790000.1068824072@[192.168.100.3]> References: <65790000.1068824072@[192.168.100.3]> Message-ID: <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> Hi All. This is what I want to do and how I propose I do it: Want: replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 Proposed steps 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 2) test it 3) use that perl to install all of the modules I need 4) remove all RPMs that rely on perl 5) move this perl into place on top of the other perl thoughts? 1 and 2 completed with no errors, BTW. Regards, Jason Gessner Ascent Marketing Partners jgessner@ascentmp.com (T) 312.224.2744 (F) 312.224.2761 From me at heyjay.com Fri Nov 14 10:21:58 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <212490000.1068740364@[192.168.100.3]> Message-ID: <000a01c3aacb$70633a20$6405a8c0@a30> Would the following be sorta like what you mean. > - Fork and use IPC for the data transfer (perldoc perlipc). > Given the way data is handled, setting up a pipe is probably > the simplest fix. package userFunctions; sub new {...}; sub priceChange {...}; 1; package socketMaster; sub new {...}; setup socket fork if (child) { while (1) { read socket examine message # call appropriate function sorta like next line $self->{userFunctions}->priceChange; } } sub sendMessage {...}; 1; # Then later in my perl code my $userFuncs = userFunctions->new(); my $socketMaster = socketReader->new($userFuncs); $sockMaster->sendMessage("some message"); From me at heyjay.com Fri Nov 14 10:28:15 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? References: <65790000.1068824072@[192.168.100.3]> <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> Message-ID: <003601c3aacc$4efdc4d0$6405a8c0@a30> Whether it will work or not I have no idea, but why do you install the modules first then replace perl, instead of replacing perl first, then installing your modules? I sort of want to do the same thing on debian (move from 5.6.1 -> 5.8.x), but am scared Jay From jason at multiply.org Fri Nov 14 10:33:44 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <003601c3aacc$4efdc4d0$6405a8c0@a30> References: <65790000.1068824072@[192.168.100.3]> <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> <003601c3aacc$4efdc4d0$6405a8c0@a30> Message-ID: <506F00F7-16C0-11D8-9730-00039394FC90@multiply.org> you hit it on the head: On Nov 14, 2003, at 10:28 AM, Jay Strauss wrote: > I sort of want to do the same thing on debian (move from 5.6.1 -> > 5.8.x), > but am scared i want to be able to re-configure the new perl and then simply replace the old one with this. -jason scott gessner jason@multiply.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 343 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031114/2ca87c20/attachment.bin From Andy_Bach at wiwb.uscourts.gov Fri Nov 14 10:36:10 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <003601c3aacc$4efdc4d0$6405a8c0@a30> Message-ID: I did that on debian and I can't get my xwindows/kde to work and one of the hold-ups seems to be that kde wants 'perl' which is perl 5.6.1 libs and I've got 5.8.1 hand compiled and I can't get apt-get to get over it. Right now I can patch till I'm blue in the face, but the best I can do is get a 'failsafe' session going. I don't know for certain that the perl install is the problem, but .... a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From jason at multiply.org Fri Nov 14 10:40:29 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: References: Message-ID: <41E9DFF8-16C1-11D8-9730-00039394FC90@multiply.org> hmmm well, i have no gui running on this box, but I do need to make a list of what depends on perl :( -jason On Nov 14, 2003, at 10:36 AM, Andy_Bach@wiwb.uscourts.gov wrote: > I did that on debian and I can't get my xwindows/kde to work and one of > the hold-ups seems to be that kde wants 'perl' which is perl 5.6.1 libs > and I've got 5.8.1 hand compiled and I can't get apt-get to get over > it. > > Right now I can patch till I'm blue in the face, but the best I can do > is > get a 'failsafe' session going. I don't know for certain that the perl > install is the problem, but .... > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been mentioned > by > name in an official Kremlin pronouncement?" unnamed humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From Andy_Bach at wiwb.uscourts.gov Fri Nov 14 10:43:26 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <41E9DFF8-16C1-11D8-9730-00039394FC90@multiply.org> Message-ID: Try aptitude - its another one that wouldn't install due to the mess I'd made of my setup, but, cooly enough, by going, via lynx to the site and downloading the .deb package, it was automagically recognized and installed. aptitude has a way to list the packages dependent upon a lib for you. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From jt at plainblack.com Fri Nov 14 10:52:36 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: Message-ID: Is there any reason you can't have both on your machine? I do a lot of perl development so I keep two or three versions of perl around at all times for testing purposes. Then in the shebang I just specify to be /usr/bin/perl5 /usr/bin/perl560 /usr/bin/perl582 etc JT ~ Plain Black Create like a god, command like a king, work like a slave. From jason at multiply.org Fri Nov 14 10:55:00 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: References: Message-ID: <48E6305F-16C3-11D8-9730-00039394FC90@multiply.org> does each version then have it's own set of dependencies and it's own separate module collection? That would be ideal so that I could do this incrementally. if I install to,. say /usr/local/perl5.8.2 and on the shebang use #!/usr/local/perl5.8.2/bin/perl everything will pull from that installation? What about other utilities (perldoc, etc). Will i simply have to make some 582 aliases? On Nov 14, 2003, at 10:52 AM, JT Smith wrote: > Is there any reason you can't have both on your machine? I do a lot of > perl development so I keep two or three versions of perl around at all > times for testing purposes. Then in the shebang I just specify to be > > /usr/bin/perl5 > /usr/bin/perl560 > /usr/bin/perl582 > > etc > > JT ~ Plain Black > > Create like a god, command like a king, work like a slave. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -jason scott gessner jason@multiply.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1033 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031114/ee9cad4d/attachment.bin From ehs at pobox.com Fri Nov 14 11:10:55 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? Message-ID: <20031114171055.GC11925@ink.inkdroid.org> > Want: > replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 > > Proposed steps > 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 > 2) test it > 3) use that perl to install all of the modules I need > 4) remove all RPMs that rely on perl > 5) move this perl into place on top of the other perl I'm not sure you can do 3 without having performed 'make install'. It's worth a try though. I believe that 5.8.2 by default goes into /usr/local, and that rh7.2 comes with Perl in /usr/bin. So you might be able to get away with building, installing Perl, and grabbing the CPAN modules you need...and then removing the old /usr/bin/perl and symlinking /usr/bin/perl to /usr/local/bin/perl. Alternatively (if Perl is already in /usr/local/bin/perl) you could install Perl into a custom directory, /usr/local/perl5.8.2 perhaps, and then create symlinks for the executables that come with Perl. Note: a handy trick for getting all the CPAN modules you need. Using the old Perl do this: perl -MCPAN -e 'autobundle' This will create a listing of all your CPAN modules + their version numbers in ~/.cpan/Bundle/Snapshot_2003_11_14_00.pm. Or with anotother suitable date. When you've got your new Perl build you can then: perl -MCPAN -e 'install Bundle::Snapshot_2003_11_14_00' This will go out to CPAN and download all you need, kind of like aptget on acid :) I have no idea how to make your RPM database happy afterwards though. //Ed From jason at multiply.org Fri Nov 14 11:13:48 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <20031114171055.GC11925@ink.inkdroid.org> References: <20031114171055.GC11925@ink.inkdroid.org> Message-ID: sweet, that's right, perl is in /usr/ not /usr/local on RH7.2 bye bye symlink, I am make installing. :) -jason On Nov 14, 2003, at 11:10 AM, Ed Summers wrote: > >> Want: >> replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 >> >> Proposed steps >> 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 >> 2) test it >> 3) use that perl to install all of the modules I need >> 4) remove all RPMs that rely on perl >> 5) move this perl into place on top of the other perl > > I'm not sure you can do 3 without having performed 'make install'. It's > worth a try though. I believe that 5.8.2 by default goes into > /usr/local, and > that rh7.2 comes with Perl in /usr/bin. So you might be able to get > away with > building, installing Perl, and grabbing the CPAN modules you > need...and then > removing the old /usr/bin/perl and symlinking /usr/bin/perl to > /usr/local/bin/perl. > > Alternatively (if Perl is already in /usr/local/bin/perl) you could > install > Perl into a custom directory, /usr/local/perl5.8.2 perhaps, and then > create > symlinks for the executables that come with Perl. > > Note: a handy trick for getting all the CPAN modules you need. Using > the old > Perl do this: > > perl -MCPAN -e 'autobundle' > > This will create a listing of all your CPAN modules + their version > numbers > in ~/.cpan/Bundle/Snapshot_2003_11_14_00.pm. Or with anotother > suitable date. > > When you've got your new Perl build you can then: > > perl -MCPAN -e 'install Bundle::Snapshot_2003_11_14_00' > > This will go out to CPAN and download all you need, kind of like > aptget on > acid :) I have no idea how to make your RPM database happy afterwards > though. > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From jt at plainblack.com Fri Nov 14 11:16:09 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <48E6305F-16C3-11D8-9730-00039394FC90@multiply.org> Message-ID: >does each version then have it's own set of dependencies and it's own separate module >collection? That would be ideal so that I could do this incrementally. Yes. I install each into their own folder /data/perl-5.8.2 for instance (/data is a big RAID5 partition on all my servers), but you could put them into /usr/local or /opt or whatever. I put aliases in /usr/bin for each just cuz it's a few characters less than typing /data/perl-5.8.2/bin/perl. >if I install to,. say /usr/local/perl5.8.2 and on the shebang use >#!/usr/local/perl5.8.2/bin/perl everything will pull from that installation? What Yes. >about other utilities (perldoc, etc). Will i simply have to make some 582 aliases? You could either make links in /usr/bin for each or just reference them with a full path each time. JT ~ Plain Black Create like a god, command like a king, work like a slave. From ehs at pobox.com Fri Nov 14 11:15:49 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <48E6305F-16C3-11D8-9730-00039394FC90@multiply.org> References: <48E6305F-16C3-11D8-9730-00039394FC90@multiply.org> Message-ID: <20031114171549.GD11925@ink.inkdroid.org> On Fri, Nov 14, 2003 at 10:55:00AM -0600, jason gessner wrote: > does each version then have it's own set of dependencies and it's own > separate module collection? That would be ideal so that I could do > this incrementally. Yep, they do. Andy was telling me how he had like 5 different versions of Perl installed on his laptop so he could thoroughly test Test::Harness. So it can be done. > if I install to,. say /usr/local/perl5.8.2 and on the shebang use > #!/usr/local/perl5.8.2/bin/perl everything will pull from that > installation? What about other utilities (perldoc, etc). Will i > simply have to make some 582 aliases? Yeah, you could make some symlinks, or add /usr/local/perl to your system PATH, and then symlink /usr/local/perl to /usr/local/perl5.8.2 This way you could have multiple versions installed, and you could flip between them by simply pointing the symlink at another directory. //Ed From ehs at pobox.com Fri Nov 14 11:17:06 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? In-Reply-To: References: <20031114171055.GC11925@ink.inkdroid.org> Message-ID: <20031114171706.GE11925@ink.inkdroid.org> On Fri, Nov 14, 2003 at 11:13:48AM -0600, jason gessner wrote: > bye bye symlink, I am make installing. :) /me crosses fingers and says a little prayer. //Ed From andy at petdance.com Fri Nov 14 12:10:45 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Multiple installs In-Reply-To: References: <20031114171055.GC11925@ink.inkdroid.org> Message-ID: <20031114181045.GB6548@petdance.com> Since I have to test Test::Harness on all Perls back to 5.4.0, I have many installed on my box at home. It's pretty simple once you get everything compiled up nice. I config 'em with a script like this: ./Configure \ -des \ -Dprefix=/var/perl/5.4.0 \ -Dmydomain=.petdance.com \ -Dcf_email=andy@petdance.com \ -Dperladmin=andy@petdance.com Then I symlink 'em: ln -s /var/perl/5.4.0/bin/perl /usr/local/bin/perl5.4.0 And then I can have my handy little testall script do the tests on all: #!/usr/bin/perl -w # This isn't meant to be installed, just used by the maintainer. my @vers = qw( 5.4.0 5.5.3 5.6.0 5.6.1 5.8.0 5.8.1 5.8.2 blead ); @vers = ( @vers, shuffle( @vers ), reverse( @vers ) ); for my $perlver ( @vers ) { my $perl = "perl$perlver"; warn "\n\n\n# Testing $perl\n"; execute( "make realclean" ); do_or_die( $perl, "Makefile.PL" ); do_or_die( "make test" ); } sub execute { print "@_", "\n"; system( @_ ); } sub do_or_die { print "@_", "\n"; system( @_ ) == 0 or die "Failed executing @_"; } sub shuffle { my @list = @_; my $i = @list; while ($i) { my $j = rand $i--; @list[$i, $j] = @list[$j, $i]; } return @list; } HTH, xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Fri Nov 14 11:18:06 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. In-Reply-To: <20031114043630.97447.qmail@web60205.mail.yahoo.com> References: <20031114043630.97447.qmail@web60205.mail.yahoo.com> Message-ID: <69540000.1068830285@[192.168.100.3]> > 1) We have to be able to roll it out piece-meal into > the system. Anything that would require an immediate > and total re-write of everything to handle something > new really isn't appropriate. > 2) It always has to report the correct error back. > (duh, but I'll address that in a moment). > 3) It can't break any of the existing code. Virtually > all of the error handling is done by returning > something true upon success and undef upon failure. > > Easy, right? Yes, actually. > So far, here's what I've investigated and my results. > > I looked into using Error.pm (and the equivalents) but > have decided against it because it violates condition > 2, unless we violate condition 1 as well. The issue is > that it stores the error in a third-party location > ("prior Error"), which is fine as long as everything > is always setting an error there. But my concern is > that a method will fail, set an error, and return > undef. Then later, another method will fail, not set > an error, and return undef. Then if I try to report on > that second failure, I'll end up with the error > message from the first. Very bad, since we're now > reporting the wrong thing instead of something > generic. One thing you can do at the #! level is to trap the unhandled exceptions so that you have a better idea where they happen. This can be implemented in stages by $SIG{__DIE__} = sub { ... } to existing pieces of code you can trap aptosis in your sub's -- that or wrapping the top-level call in a block eval. You can then start adding die clauses where undef's are assigned to the returns: $foo = undef; becomes die "Undefined $foo"; At which point the die handler (or top-level eval) can deal with reporting the cause of death. One way to handle this is: #!/blah/perl eval { your old code here... }; die "$0: $@" if $@; exit 0; [useing perl -i to automate this if you like :-]. This will not affect the running code since none if it throws exceptions. Now go in and either modify the routines that see undef with something like: croak "Undef returned from foobar call"; or replace the return undef's with similar croaks: croak "Useful Error Message Here" unless $var; to die instead of return undef at all. Personally, I prefer using exceptions since it simplifies the calling code also: all it gets back are values the called function considers legit. You can handle the exceptions if you like via: sub foo { for(;;) { eval { some call; another call; }; if( $@ =~ /errstring 1/ ) { # deal with whatever caused error # number one. } elsif( $@ =~ /blah/ ) { # deal with blah errors } elsif( $@ =~ /roadkill/ ) { # redispatch the exception die "Roadkill: foo unable to handle $@ from bar"; } else { # no errors, we're done. last } } } If this looks pretty much like textbook exception handling, you're right. The nice thing about it is that the top-level handler reports all errors and you can update the existing code incrementally to handle the errors properly. > my $self = shift; > return $self->error("We always fail. Sigh.") unless > 0; > }; sub slurp { my $item = shift or die "Bogus foo: false object"; my $path = $item->{path}; die "Nonexistant: $path" unless -e $path; die "Unreadable: $path" unless -r _; open my $fh, '<', $path or die "Roadkill: $path: $!"; local $/; # caller gets back the item's buffer $item->{buffer} = <$fh> } for my $file ( @filz ) { # ignore anything other than roadkill. eval { $file->slurp or warn "Empty $file->{path}"; }; die "Fatal read: $@" if $@ && $@ =~ /Roadkill:/; } The error method can be modified to die with a useful message rather than return undef easily enough, after which you start putting eval's in the proper places. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jason at multiply.org Fri Nov 14 11:22:17 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Multiple installs In-Reply-To: <20031114181045.GB6548@petdance.com> References: <20031114171055.GC11925@ink.inkdroid.org> <20031114181045.GB6548@petdance.com> Message-ID: <1860995D-16C7-11D8-9730-00039394FC90@multiply.org> that's slick I don't need as many versions, but I see the logic in there.... 2 is enough of a hassle for me ;) -jason On Nov 14, 2003, at 12:10 PM, Andy Lester wrote: > > Since I have to test Test::Harness on all Perls back to 5.4.0, I have > many installed on my box at home. It's pretty simple once you get > everything compiled up nice. > > I config 'em with a script like this: > > ./Configure \ > -des \ > -Dprefix=/var/perl/5.4.0 \ > -Dmydomain=.petdance.com \ > -Dcf_email=andy@petdance.com \ > -Dperladmin=andy@petdance.com > > Then I symlink 'em: > > ln -s /var/perl/5.4.0/bin/perl /usr/local/bin/perl5.4.0 > > And then I can have my handy little testall script do the tests on all: > > #!/usr/bin/perl -w > > # This isn't meant to be installed, just used by the maintainer. > > my @vers = qw( 5.4.0 5.5.3 5.6.0 5.6.1 5.8.0 5.8.1 5.8.2 blead ); > @vers = ( @vers, shuffle( @vers ), reverse( @vers ) ); > > for my $perlver ( @vers ) { > my $perl = "perl$perlver"; > > > warn "\n\n\n# Testing $perl\n"; > execute( "make realclean" ); > do_or_die( $perl, "Makefile.PL" ); > do_or_die( "make test" ); > } > > sub execute { > print "@_", "\n"; > system( @_ ); > } > > sub do_or_die { > print "@_", "\n"; > system( @_ ) == 0 or die "Failed executing @_"; > } > > sub shuffle { > my @list = @_; > my $i = @list; > while ($i) { > my $j = rand $i--; > @list[$i, $j] = @list[$j, $i]; > } > return @list; > } > > HTH, > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Fri Nov 14 11:24:38 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> References: <65790000.1068824072@[192.168.100.3]> <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> Message-ID: <70840000.1068830677@[192.168.100.3]> -- jason gessner > Hi All. > > This is what I want to do and how I propose I do it: > > Want: > replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 > > Proposed steps > 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 > 2) test it > 3) use that perl to install all of the modules I need > 4) remove all RPMs that rely on perl > 5) move this perl into place on top of the other perl > > thoughts? > > 1 and 2 completed with no errors, BTW. use a prefix of /opt/perl/5.8.1. Test it with #!/opt/perl/5.8.1/bin/perl until you're happy. then: cd /opt/perl; rm -f *; ln -fs 5.8.1/* .; One time only: cd /opt/bin/; ln -fs ../perl/bin/* .; and add /opt/bin/ at the top of your path. To test, say, 5.8.2 on the box follow the exact same steps as for 5.8.1 exept for the path that is symlinked up a level. If you long for 5.8.1 a week after making the symlink then just re-make the symlinks in /opt/perl. That's why the LFS and SVR4 use a version number in the standard install paths (honered more in the breach, I admit). You might not want to pull all the perly RPM's. Better to leave the vendor's perl in place as-is and just update your optional copy. If you update the /usr/bin/perl link and it doesn't break anything then rpm -e -nodeps perl-blah and leave it at that (if you really need the space that badly). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Aaron.Young at citadelgroup.com Fri Nov 14 12:48:18 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBAF@CORPEMAIL.citadelgroup.com> Did you try SWIG? If so, did you have problems with that? Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, November 14, 2003 9:09 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Java API/Perl revisited > > > Sorry Ed, forgot to answer. I got to be honest, I didn't > really learn much > because I didn't really get a chance to use it. I don't have > any examples, > because my stuff never worked. I'm happy to give a talk on > something I > actually get to work. If I recode this thing in perl, maybe > I can talk > about sockets and treads/select/poe (however I end up doing > the asynchronous > part) > > Jay > ----- Original Message ----- > From: "Ed Summers" > To: "Chicago.pm chatter" > Sent: Thursday, November 13, 2003 10:45 AM > Subject: Re: [Chicago-talk] Java API/Perl revisited > > > > On Thu, Nov 13, 2003 at 10:31:23AM -0600, Jay Strauss wrote: > > > It had something to do with the asynchronous thread that > the java was > > > starting, it made it (currently) impossible to callback > to perl, or at > least > > > that is what Patrick LeBoutillier (the author of > Inline::Java) thought > :). > > > > Interesting, would you be willing to talk about > Inline::Java sometime > > at a meeting? I'd be intersted to learn what you've learned, and see > > some examples. > > > > //Ed > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From Aaron.Young at citadelgroup.com Fri Nov 14 12:51:47 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBB0@CORPEMAIL.citadelgroup.com> are you using the stable debian or unstable? i'm running unstable and i have this installed "This is perl, v5.8.1 built for i386-linux-thread-multi" Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, November 14, 2003 10:28 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > Whether it will work or not I have no idea, but why do you install the > modules first then replace perl, instead of replacing perl first, then > installing your modules? > > I sort of want to do the same thing on debian (move from > 5.6.1 -> 5.8.x), > but am scared > > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From Aaron.Young at citadelgroup.com Fri Nov 14 12:57:44 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBB2@CORPEMAIL.citadelgroup.com> when you hand rolled that perl, did you install it the "debian way"? Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Andy_Bach@wiwb.uscourts.gov > [mailto:Andy_Bach@wiwb.uscourts.gov] > Sent: Friday, November 14, 2003 10:36 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > I did that on debian and I can't get my xwindows/kde to work > and one of > the hold-ups seems to be that kde wants 'perl' which is perl > 5.6.1 libs > and I've got 5.8.1 hand compiled and I can't get apt-get to > get over it. > > Right now I can patch till I'm blue in the face, but the best > I can do is > get a 'failsafe' session going. I don't know for certain > that the perl > install is the problem, but .... > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been > mentioned by > name in an official Kremlin pronouncement?" unnamed > humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From Aaron.Young at citadelgroup.com Fri Nov 14 13:01:04 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBB3@CORPEMAIL.citadelgroup.com> i'm not sure if this is what is happening but here's a lesson i learned when i first moved to debian, i decided that i didn't like the perl they installed so i downloaded the source and compiled a new perl things started failing i learned that perl is special to debian (as it is to all of us) and that it is best to wait for the maintainer to release a new version (use something other than stable if you want fast upgrades) but if you can't wait for the maintainer, then you need to compile and install perl the "debian way" which means download the source using "apt-get source perl" and doing a few extra steps but there is a 5.8.1 version available, so unless you want something else... Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: jason gessner [mailto:jason@multiply.org] > Sent: Friday, November 14, 2003 10:40 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > hmmm > > well, i have no gui running on this box, but I do need to make a list > of what depends on perl > > :( > > -jason > > On Nov 14, 2003, at 10:36 AM, Andy_Bach@wiwb.uscourts.gov wrote: > > > I did that on debian and I can't get my xwindows/kde to > work and one of > > the hold-ups seems to be that kde wants 'perl' which is > perl 5.6.1 libs > > and I've got 5.8.1 hand compiled and I can't get apt-get to > get over > > it. > > > > Right now I can patch till I'm blue in the face, but the > best I can do > > is > > get a 'failsafe' session going. I don't know for certain > that the perl > > install is the problem, but .... > > > > a > > > > Andy Bach, Sys. Mangler > > Internet: andy_bach@wiwb.uscourts.gov > > VOICE: (608) 261-5738 FAX 264-5030 > > > > > > "And do my eyes deceive me, or has Judsys at long last been > mentioned > > by > > name in an official Kremlin pronouncement?" unnamed > humorist off list > > (no offense) > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From Aaron.Young at citadelgroup.com Fri Nov 14 13:02:37 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBB4@CORPEMAIL.citadelgroup.com> you may also want to look at dpkg-depcheck --help Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Andy_Bach@wiwb.uscourts.gov > [mailto:Andy_Bach@wiwb.uscourts.gov] > Sent: Friday, November 14, 2003 10:43 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > Try aptitude - its another one that wouldn't install due to > the mess I'd > made of my setup, but, cooly enough, by going, via lynx to > the site and > downloading the .deb package, it was automagically recognized and > installed. aptitude has a way to list the packages > dependent upon a lib > for you. > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been > mentioned by > name in an official Kremlin pronouncement?" unnamed > humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From pbaker at where2getit.com Fri Nov 14 13:03:09 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> References: <65790000.1068824072@[192.168.100.3]> <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> Message-ID: <3FB526ED.30406@where2getit.com> jason gessner wrote: > Hi All. > > This is what I want to do and how I propose I do it: > > Want: > replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 Just to troll. I would change steps 3-5 as so: 3. Install Debian Woody. 4. Configure apt pinning for debian unstable. See http://www.argon.org/~roderick/apt-pinning.html 5. apt-get -t unstable install perl -- Paul Baker From Aaron.Young at citadelgroup.com Fri Nov 14 13:05:08 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBB5@CORPEMAIL.citadelgroup.com> reading this again, i see you want 5.8.2, it might be available, i haven't updated in a week or three Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Ed Summers [mailto:ehs@pobox.com] > Sent: Friday, November 14, 2003 11:11 AM > To: chicago-talk@mail.pm.org > Subject: [Chicago-talk] Re: Stealth Perl Install and then the > old swap-a-roo? > > > > > Want: > > replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 > > > > Proposed steps > > 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 > > 2) test it > > 3) use that perl to install all of the modules I need > > 4) remove all RPMs that rely on perl > > 5) move this perl into place on top of the other perl > > I'm not sure you can do 3 without having performed 'make > install'. It's > worth a try though. I believe that 5.8.2 by default goes into > /usr/local, and > that rh7.2 comes with Perl in /usr/bin. So you might be able > to get away with > building, installing Perl, and grabbing the CPAN modules you > need...and then > removing the old /usr/bin/perl and symlinking /usr/bin/perl to > /usr/local/bin/perl. > > Alternatively (if Perl is already in /usr/local/bin/perl) you > could install > Perl into a custom directory, /usr/local/perl5.8.2 perhaps, > and then create > symlinks for the executables that come with Perl. > > Note: a handy trick for getting all the CPAN modules you > need. Using the old > Perl do this: > > perl -MCPAN -e 'autobundle' > > This will create a listing of all your CPAN modules + their > version numbers > in ~/.cpan/Bundle/Snapshot_2003_11_14_00.pm. Or with > anotother suitable date. > > When you've got your new Perl build you can then: > > perl -MCPAN -e 'install Bundle::Snapshot_2003_11_14_00' > > This will go out to CPAN and download all you need, kind of > like aptget on > acid :) I have no idea how to make your RPM database happy > afterwards though. > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From jason at multiply.org Fri Nov 14 13:11:24 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861EBB5@CORPEMAIL.citadelgroup.com> References: <800BCF60D1553144BABCBFCE36249D3D0861EBB5@CORPEMAIL.citadelgroup.com> Message-ID: <570B7EC4-16D6-11D8-9730-00039394FC90@multiply.org> well, thanks to good advice all around, I successfully built 5.8.2, installed to /usr/local and am letting the vendor install (/usr ) live. i have little experience with debian, so i am sticking to what I know for now..... thanks to all who offered advice! -jason On Nov 14, 2003, at 1:05 PM, Young, Aaron wrote: > reading this again, i see you want 5.8.2, it might be available, i > haven't updated in a week or three > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > >> -----Original Message----- >> From: Ed Summers [mailto:ehs@pobox.com] >> Sent: Friday, November 14, 2003 11:11 AM >> To: chicago-talk@mail.pm.org >> Subject: [Chicago-talk] Re: Stealth Perl Install and then the >> old swap-a-roo? >> >> >> >>> Want: >>> replace perl 5.6.1 on my redhat 7.2 box with 5.8.2 >>> >>> Proposed steps >>> 1) build 5.8.2 in a local director (/home/jason/perl5.8.2 >>> 2) test it >>> 3) use that perl to install all of the modules I need >>> 4) remove all RPMs that rely on perl >>> 5) move this perl into place on top of the other perl >> >> I'm not sure you can do 3 without having performed 'make >> install'. It's >> worth a try though. I believe that 5.8.2 by default goes into >> /usr/local, and >> that rh7.2 comes with Perl in /usr/bin. So you might be able >> to get away with >> building, installing Perl, and grabbing the CPAN modules you >> need...and then >> removing the old /usr/bin/perl and symlinking /usr/bin/perl to >> /usr/local/bin/perl. >> >> Alternatively (if Perl is already in /usr/local/bin/perl) you >> could install >> Perl into a custom directory, /usr/local/perl5.8.2 perhaps, >> and then create >> symlinks for the executables that come with Perl. >> >> Note: a handy trick for getting all the CPAN modules you >> need. Using the old >> Perl do this: >> >> perl -MCPAN -e 'autobundle' >> >> This will create a listing of all your CPAN modules + their >> version numbers >> in ~/.cpan/Bundle/Snapshot_2003_11_14_00.pm. Or with >> anotother suitable date. >> >> When you've got your new Perl build you can then: >> >> perl -MCPAN -e 'install Bundle::Snapshot_2003_11_14_00' >> >> This will go out to CPAN and download all you need, kind of >> like aptget on >> acid :) I have no idea how to make your RPM database happy >> afterwards though. >> >> //Ed >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > ----------------------------------------------------------------------- > -------------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and > proprietary. It is to be read and used solely by the intended > recipient(s). > Citadel and its affiliates retain all proprietary rights they may have > in the > information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 > and delete this e-mail (including any attachments hereto) immediately > without reading, disseminating, distributing or copying. We cannot give > any assurances that this e-mail and any attachments are free of viruses > and other harmful code. Citadel reserves the right to monitor, > intercept > and block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From Andy_Bach at wiwb.uscourts.gov Fri Nov 14 13:11:32 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861EBB2@CORPEMAIL.citadelgroup.com> Message-ID: > when you hand rolled that perl, did you install it the "debian way"? Er, no. What is the "debian way"? I reallly *liked* the apt-get etc when I started and this was from a knoppix knx-hdinstall process on a lap top. Now, I'm not so sure. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From Andy_Bach at wiwb.uscourts.gov Fri Nov 14 13:14:46 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <3FB526ED.30406@where2getit.com> Message-ID: > apt-get -t unstable install perl fails: ... perl: Depends: perl-base (= 5.6.1-8.3) but 5.8.1-2 is to be installed) a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From pbaker at where2getit.com Fri Nov 14 13:20:13 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Re: Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861EBB5@CORPEMAIL.citadelgroup.com> References: <800BCF60D1553144BABCBFCE36249D3D0861EBB5@CORPEMAIL.citadelgroup.com> Message-ID: <3FB52AED.3080800@where2getit.com> Young, Aaron wrote: > reading this again, i see you want 5.8.2, it might be available, i > haven't updated in a week or three unstable contains 5.8.2-1 so it must have just been added. http://packages.qa.debian.org/p/perl.html -- Paul Baker From pbaker at where2getit.com Fri Nov 14 13:24:05 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: References: Message-ID: <3FB52BD5.2000407@where2getit.com> Andy_Bach@wiwb.uscourts.gov wrote: >>apt-get -t unstable install perl > > > fails: > ... > perl: Depends: perl-base (= 5.6.1-8.3) but 5.8.1-2 is to be installed) Well then unshift it on to the list :-) apt-get -t unstable install perl-base perl From pbaker at where2getit.com Fri Nov 14 13:25:01 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: References: Message-ID: <3FB52C0D.6010606@where2getit.com> Andy_Bach@wiwb.uscourts.gov wrote: >>apt-get -t unstable install perl > > > fails: > ... > perl: Depends: perl-base (= 5.6.1-8.3) but 5.8.1-2 is to be installed) Oh yeah and 5.8.2 should be there, so make sure you do an apt-get update before doing the install. From jthomasoniii at yahoo.com Fri Nov 14 13:28:55 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. Message-ID: <20031114192855.19710.qmail@web60202.mail.yahoo.com> > One thing you can do at the #! level is to trap the > unhandled exceptions so that you have a better idea > where they happen. This can be implemented in stages > by $SIG{__DIE__} = sub { ... } to existing pieces of > code you can trap aptosis in your sub's -- that or > wrapping the top-level call in a block eval. > You can then start adding die clauses where undef's > are assigned to the returns: > $foo = undef; > becomes > die "Undefined $foo"; > At which point the die handler (or top-level eval) > can > deal with reporting the cause of death. > One way to handle this is: > #!/blah/perl > eval > { > your old code here... > }; > die "$0: $@" if $@; > exit 0; > [useing perl -i to automate this if you like :-]. This still pretty soundly violates condition (1) (the piece-meal roll out). Even if we do use the itty bitty commandline doohicky to automate it for us, we're still changing a massive amount of code, which wouldn't be good. Besides, exactly what good does the top level die handler do for us? Unless there's some slick approach I'm not considering, we'd end up zooming to the top handler (the sighandler or the global eval) just about instantly. And when that happens we choke with a very generic error. We can't do that. It's a live, running, web app. Right now we give the users generic errors, but they're inline on the screen and they can basically continue to work. This would be a new error page that they'd then jump to that doesn't give them anything additional that's useful, and would probably just confuse and/or upset them. Not good. We'd basically need the global handler to catch the die, note it somewhere, and return back to where we were, returning an error code in the process. As the stopgap 'til things would be ported, of course. > Now go in and either modify the routines that see > undef > with something like: Again, violates condition (1). :) There's an awful lot of code involved here, and this approach seems to hinge upon us modifying all of it to catch things, lest the user get kicked out with the global die handler implemented up above. > If this looks pretty much like textbook exception > handling, > you're right. It does and it is. But exceptions aren't my preferred approach in general, and not in this case specifically. First of all, like I said, the system doesn't use exceptions now. So if we took an exceptions based approach, we'd have both exceptions and errorcodes running around at the same time, at least temporarily, since we're not going to re-write everything in one swoop to use exceptions instead. In general, like I said, it's a religious debate. I'm not a fan of exceptions for a few reasons. First of all, you can end up hiding the location of the error from the user. If foo() handles an error, and calls bar(), which calls baz() which throws the error, you'll jump out of bar when it blows up and back into foo() with little indication as to what's going on. It's confusing. To alleviate some of the confusion, you can trap the error a level above and then re-throw it if it's not something you handle. But at that point, you've effectively re-implemented an error code based approach. The only advantage is that you're forced to handle it at at least one level. I don't see any real advantage to typing: eval ( $obj->foo(); } if ($@ =~ /exception1/) { #handle elsif ($@ =~ /exception2/) { #handle } . . . instead of: unless (defined $obj->foo()) { if ($obj->err =~ /exception1/) { #handle } elsif ($obj->err =~ /exception2/) { #handle } . . . }; Same thing, just slightly different syntax. The only real difference is that an errorcode approach forces you to always bubble up (exceptions can be caught at higher levels), and the exceptions force you to always catch it at least once. But that's all philosophy. If exceptions look like the best approach to take, we'll consider them. But I don't think this'll work w/o lots of code re-working, which we don't want to do at once. -Jim.... __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From Aaron.Young at citadelgroup.com Fri Nov 14 13:42:20 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBBA@CORPEMAIL.citadelgroup.com> you have to build a .deb file of the compiled source you want this will create all the necessary debian things to make sure that your package is handled by dpkg i haven't done this in a while, but here are the notes i have from a year or more ago (use apt-get source to get the foo_* files) building debian packages You will need all of foo_*.dsc, foo_*.tar.gz and foo_*.diff.gz to compile the source (note: there is no .diff.gz for a Debian native package). Once you have them, if you have the dpkg-dev package installed, the following command: dpkg-source -x foo_version-revision.dsc will extract the package into a directory called foo-version. If you want just to compile the package, you may cd into foo-version directory and issue the command debian/rules build to build the program, then debian/rules binary as root, to build the package, and then dpkg -i ../foo_version-revision_arch.deb to install the newly-built package. Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Andy_Bach@wiwb.uscourts.gov > [mailto:Andy_Bach@wiwb.uscourts.gov] > Sent: Friday, November 14, 2003 1:12 PM > To: Chicago.pm chatter > Subject: RE: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > > when you hand rolled that perl, did you install it the "debian way"? > > Er, no. What is the "debian way"? I reallly *liked* the > apt-get etc when > I started and this was from a knoppix knx-hdinstall process > on a lap top. > Now, I'm not so sure. > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been > mentioned by > name in an official Kremlin pronouncement?" unnamed > humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From pbaker at where2getit.com Fri Nov 14 13:42:37 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. In-Reply-To: <20031114043630.97447.qmail@web60205.mail.yahoo.com> References: <20031114043630.97447.qmail@web60205.mail.yahoo.com> Message-ID: <3FB5302D.8020805@where2getit.com> Jim Thomason wrote: > Which brings us to some of the caveats that will > hinder the "relatively painlessly" part. > > 1) We have to be able to roll it out piece-meal into > the system. Anything that would require an immediate > and total re-write of everything to handle something > new really isn't appropriate. > 2) It always has to report the correct error back. > (duh, but I'll address that in a moment). > 3) It can't break any of the existing code. Virtually > all of the error handling is done by returning > something true upon success and undef upon failure. > > Easy, right? Well that depends. I have one question, because which I wasn't sure I know what the goal of the extra error reporting is meant to meet. Basically my question is, do you want the more "verbose" errors so that 1) foo can behave differently based on what error happened in bar. 2) Or will foo always behave the same when bar returns undef no matter what error occured? To further explain, foo calls bar. bar has an error and returns undef. Now with bar modifed with the better error message support, which would you like to be the end result of this better error message? 1) foo checks the error message to see which error occured. foo then does x, y, or z depending on which actual error occured. 2) foo continues to do as it is currently coded to when it receives undef from bar and it really doesn't care what actual error happened. But you (the person, not the code) want to find out what the real error was so you can fix it after the fact. So basically which of these do you want. If you want 1 you want some real sort of error handling. If all you really want is 2, then what you need is error logging. If you want 1, I leave it in the hands of the other people on this list. If you want 2, then I suggest you check out the Log::Log4perl module on CPAN. It is kick ass and it is very easy to add something to your code base in piece mail. In fact I am doing this very same thing to my company's very large code base. As I go into each module for normal reasons (add a new feature, fix some bug) I at the same time remove the currently existing crappy error handling code (written by me) and replace it with Log::Log4perl calls. It's very nice and I have no regrets as of yet. Log::Log4perl is very cool because you can easily modify the verbosity of your error reporting WHILE AN APPLICATION IS STILL RUNNING!! No need to shut it down, change something and restart it. How cool is that?! So yeah, if really what you need is just good ol' error logging, I can help you out with that. -- Paul Baker From pbaker at where2getit.com Fri Nov 14 13:50:17 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861EBBA@CORPEMAIL.citadelgroup.com> References: <800BCF60D1553144BABCBFCE36249D3D0861EBBA@CORPEMAIL.citadelgroup.com> Message-ID: <3FB531F9.9010400@where2getit.com> Young, Aaron wrote: > you have to build a .deb file of the compiled source you want > > this will create all the necessary debian things to make sure that your > package is handled by dpkg Easier way to do this is to simply do this: mkdir perl_build cd perl_build sudo apt-get install fakeroot apt-get source perl cd perl_5.8.2 dpkg-buildpackage -uc -b -rfakeroot sudo dpkg -i ../*.deb That should do it for ya...assuming you have all the build dependencies already installed. -- Paul Baker From jthomasoniii at yahoo.com Fri Nov 14 13:51:03 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. Message-ID: <20031114195103.7954.qmail@web60204.mail.yahoo.com> >1) foo checks the error message to see which error occured. foo then >does x, y, or z depending on which actual error occured. >2) foo continues to do as it is currently coded to when it receives >undef from bar and it really doesn't care what actual error happened. >But you (the person, not the code) want to find out what the real error >was so you can fix it after the fact. Right now, we just want #2. But eventually we may very well want #1. BUT, we don't just want to log the error, we want to know in the code explicitly which error it was. Some errors are already logged for later programmer review, but we need to worry about PEBKAC stuff. If the user types in a string of letters when we only want an integer, we want to return an error along the lines of "Please give us an integer" instead of "An error occurred, please try again." Sure, we can log it ourselves so the programmers can look at it later, but that doesn't make things easier for the end user. And we can't just log it and then read the log for fear of violating my condition #2 - we may end up reporting the wrong error. Eventually, long term? etc. We may want to take different action depending upon the actual error. But it's not something we're actively looking at right now (AFAIK), but it'd always be nice to have that option. -Jim..... __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree From lembark at wrkhors.com Fri Nov 14 14:04:11 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Errors. And the reporting thereof. In-Reply-To: <20031114192855.19710.qmail@web60202.mail.yahoo.com> References: <20031114192855.19710.qmail@web60202.mail.yahoo.com> Message-ID: <2194970000.1068840251@[192.168.200.4]> -- Jim Thomason >> One thing you can do at the #! level is to trap the >> unhandled exceptions so that you have a better idea >> where they happen. This can be implemented in stages >> by $SIG{__DIE__} = sub { ... } to existing pieces of >> code you can trap aptosis in your sub's -- that or >> wrapping the top-level call in a block eval. >> You can then start adding die clauses where undef's >> are assigned to the returns: >> $foo = undef; >> becomes >> die "Undefined $foo"; >> At which point the die handler (or top-level eval) >> can >> deal with reporting the cause of death. >> One way to handle this is: >> # !/blah/perl >> eval >> { >> your old code here... >> }; >> die "$0: $@" if $@; >> exit 0; >> [useing perl -i to automate this if you like :-]. > > This still pretty soundly violates condition (1) (the > piece-meal roll out). Even if we do use the itty bitty > commandline doohicky to automate it for us, we're > still changing a massive amount of code, which > wouldn't be good. All changes are incremental: the wrapper does not interfere with any existing code at all. After that you can go into the places that return undef and modify them singly. > Besides, exactly what good does the top level die > handler do for us? Unless there's some slick approach > I'm not considering, we'd end up zooming to the top > handler (the sighandler or the global eval) just about > instantly. And when that happens we choke with a very > generic error. You start by [incrementally] adding die's for places where roadkill is inevitable, giving them more specific messages. This solves the immediate problem of being able to incrementally improve your message handling. As time passes, you can add exception handlers to the places that now deal with undefs. > We'd basically need the global handler to catch the > die, note it somewhere, and return back to where we > were, returning an error code in the process. As the > stopgap 'til things would be ported, of course. Adding the top-level eval is about being able to catch things that otherwise would have gone unnoticed. After that you begin working your way incrementally down the code. Exceptions allow you to dive out of code at the point where an error is detected with a specific message, which is what you wanted. > Again, violates condition (1). :) There's an awful lot > of code involved here, and this approach seems to > hinge upon us modifying all of it to catch things, > lest the user get kicked out with the global die > handler implemented up above. The modifications can be incremental, initially at the points where error messages are not sufficient now. After the poorly behaved points are handled the others can be exceptionized. > It does and it is. But exceptions aren't my preferred > approach in general, and not in this case > specifically. First of all, like I said, the system > doesn't use exceptions now. So if we took an > exceptions based approach, we'd have both exceptions > and errorcodes running around at the same time, at > least temporarily, since we're not going to re-write > everything in one swoop to use exceptions instead. No matter what process you use you'll have some mixture running around since you won't be doing it all at once. > In general, like I said, it's a religious debate. I'm > not a fan of exceptions for a few reasons. First of > all, you can end up hiding the location of the error > from the user. If foo() handles an error, and calls > bar(), which calls baz() which throws the error, > you'll jump out of bar when it blows up and back into > foo() with little indication as to what's going on. > It's confusing. Only if you want to design your code that way. You can put multiple levels of exception handling in place for cases where the errors are not fatal. You can also croak -- confess to get nice, point-specific errors with a full stack trace (see perldoc Carp). > To alleviate some of the confusion, you can trap the > error a level above and then re-throw it if it's not > something you handle. But at that point, you've > effectively re-implemented an error code based > approach. The only advantage is that you're forced to > handle it at at least one level. I don't see any real > advantage to typing: Not really. You have advantages in being able to exit the offending code immedately and save yourself oodles of if-ladders checking return codes for every call. You are also making the bad assumption that messages given with die are not descriptive. Nothing prevents you from die "bogus file handle in Bar::foo". > eval ( > $obj->foo(); > } > > if ($@ =~ /exception1/) { > #handle > elsif ($@ =~ /exception2/) { > #handle > } That or use a dispatch table: $handlerz->{$@} if exists $handlerz{$@}; The main difference here is that a single exception can jump multiple levels of call stack, which can be useful in avoding the if-logic at every level for handling roadkill. Nothing says you need eval's at every level of the code. > instead of: > > unless (defined $obj->foo()) { > if ($obj->err =~ /exception1/) { > #handle > } > elsif ($obj->err =~ /exception2/) { > #handle > } > . > . > . > }; > > Same thing, just slightly different syntax. The only > real difference is that an errorcode approach forces > you to always bubble up (exceptions can be caught at > higher levels), and the exceptions force you to always > catch it at least once. Then why did you ask the question in the first place? If you prefer using bubble-up logic with error strings then stick with it and just break the fingers of anyone who codes without valid error messages. > But that's all philosophy. If exceptions look like the > best approach to take, we'll consider them. But I > don't think this'll work w/o lots of code re-working, > which we don't want to do at once. Which is why exceptions would work: they allow incremental modification of the existing code. Nothing keeps you from testing $obj->error while testing $@. The main thing is being able to wrap things once and them modify them incrementally moving down the call stack. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Nov 14 14:06:08 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? In-Reply-To: <003601c3aacc$4efdc4d0$6405a8c0@a30> References: <65790000.1068824072@[192.168.100.3]> <01ADA3F8-16BB-11D8-9730-00039394FC90@multiply.org> <003601c3aacc$4efdc4d0$6405a8c0@a30> Message-ID: <2196810000.1068840368@[192.168.200.4]> -- Jay Strauss > Whether it will work or not I have no idea, but why do you install the > modules first then replace perl, instead of replacing perl first, then > installing your modules? Suggestion: leave vendor distributed code alone unless you are replacing it with more vendor distributed code using a vendor approved method. The whole point to having /opt on the system outside /usr is to put your own software into it. Just install perl into /opt/perl/5.8.1,, make a few symlinks, and use /opt/bin/perl in your own #! code. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Aaron.Young at citadelgroup.com Fri Nov 14 14:49:05 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Stealth Perl Install and then the old swap-a-roo? Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EBBE@CORPEMAIL.citadelgroup.com> thanks, i'll update my notes with this as an example Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Paul Baker [mailto:pbaker@where2getit.com] > Sent: Friday, November 14, 2003 1:50 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Stealth Perl Install and then the > old swap-a-roo? > > > Young, Aaron wrote: > > you have to build a .deb file of the compiled source you want > > > > this will create all the necessary debian things to make > sure that your > > package is handled by dpkg > > Easier way to do this is to simply do this: > > mkdir perl_build > cd perl_build > sudo apt-get install fakeroot > apt-get source perl > cd perl_5.8.2 > dpkg-buildpackage -uc -b -rfakeroot > sudo dpkg -i ../*.deb > > That should do it for ya...assuming you have all the build > dependencies already installed. > > -- > Paul Baker > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From me at heyjay.com Sat Nov 15 07:33:49 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <800BCF60D1553144BABCBFCE36249D3D0861EBAF@CORPEMAIL.citadelgroup.com> Message-ID: <002c01c3ab7d$63641170$6405a8c0@a30> I did not try swig (to be honest I forgot about it). I remember when I read about it, it seemed hard to implement it. I'll go read about it again Jay ----- Original Message ----- From: "Young, Aaron" To: "Chicago.pm chatter" Sent: Friday, November 14, 2003 12:48 PM Subject: RE: [Chicago-talk] Java API/Perl revisited Did you try SWIG? If so, did you have problems with that? Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, November 14, 2003 9:09 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Java API/Perl revisited > > > Sorry Ed, forgot to answer. I got to be honest, I didn't > really learn much > because I didn't really get a chance to use it. I don't have > any examples, > because my stuff never worked. I'm happy to give a talk on > something I > actually get to work. If I recode this thing in perl, maybe > I can talk > about sockets and treads/select/poe (however I end up doing > the asynchronous > part) > > Jay > ----- Original Message ----- > From: "Ed Summers" > To: "Chicago.pm chatter" > Sent: Thursday, November 13, 2003 10:45 AM > Subject: Re: [Chicago-talk] Java API/Perl revisited > > > > On Thu, Nov 13, 2003 at 10:31:23AM -0600, Jay Strauss wrote: > > > It had something to do with the asynchronous thread that > the java was > > > starting, it made it (currently) impossible to callback > to perl, or at > least > > > that is what Patrick LeBoutillier (the author of > Inline::Java) thought > :). > > > > Interesting, would you be willing to talk about > Inline::Java sometime > > at a meeting? I'd be intersted to learn what you've learned, and see > > some examples. > > > > //Ed > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ---------------------------------------------------------------------------- --------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From shild at sbcglobal.net Sat Nov 15 09:01:59 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <005901c3aac4$5bd20bb0$6405a8c0@a30> Message-ID: It's not an O'Reilly Book, it's Addison-Wesley :-) You can get at bookpool for $38.50, http://www.bookpool.com/.x/n7ipygr5u8/sm/0201615711 It is a great book, well worth the purchase. On 14-Nov-2003 Jay Strauss wrote: > I suppose I'll have to buy it, what's one more $50 O'Reilly book :( > > ----- Original Message ----- > From: "Andy Lester" > To: "Chicago.pm chatter" > Sent: Thursday, November 13, 2003 11:38 AM > Subject: Re: [Chicago-talk] Java API/Perl revisited > > >> > > Lincon's Network Programming With Perl addresses this issue >> > > in lurid detail with a number of interface standards. >> > >> > I don't have that book. Wish I could have won that at the meeting :). >> >> We've never had it to give away. It's definitely worth the money. >> >> xoa >> >> -- >> Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> >> > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 15-Nov-2003 Time: 08:58:28 ---------------------------------- From me at heyjay.com Sun Nov 16 10:48:48 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net> Message-ID: <016c01c3ac61$8332de20$6405a8c0@a30> Jonathan, I was planning on using POE in a different aspect of what I'm trying to do. How did you envision using it this application? I have to read a socket (endlessly), and dispatch methods based on the messages I receive over the socket, I also have to talk on that socket when necessary Jay ----- Original Message ----- From: "Jonathan Steinert" To: "Chicago.pm chatter" Sent: Thursday, November 13, 2003 10:17 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > You could use POE ( http://poe.perl.org ) or fork and use IPC, or you > could write your own non-blocking IO code. Stem** ( > http://www.stemsystems.com ) is possible too. It all depends on what > this socket is doing, and what the main program is doing. > > ** I don't know stem, but from what I gather from Uri Guttman (the > Author) it can do anything POE can. > > --Jonathan Steinert > > Jay Strauss wrote: > > > Hi, > > > > So I've run into hard dead ends trying Inline::Java and Java.pm. So I'm > > thinking of rewriting the whole vendor thing in perl (they give the java > > source). My main concern is they start up a separate thread to talk on a > > socket. I'm currently using Perl 5.6.1 which doesn't (as I understand) have > > threading support. > > > > what are my options to work around the threading stuff? > > > > > > Thanks > > Jay > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From ehs at pobox.com Sun Nov 16 11:02:26 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] POE was Java API/Perl revisited In-Reply-To: <016c01c3ac61$8332de20$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net> <016c01c3ac61$8332de20$6405a8c0@a30> Message-ID: <20031116170226.GB30622@ink.inkdroid.org> hachi: > You could use POE ( http://poe.perl.org ) or fork and use IPC, or you > could write your own non-blocking IO code. Stem** ( > http://www.stemsystems.com ) is possible too. It all depends on what > this socket is doing, and what the main program is doing. I think a talk about POE at one of our tech meetings would be *really* cool. Would you be willing to do it? I know you've done some practical work with POE and I think it could be interesting to a lot of folks. If you can get away from work, can we pencil you in? If the drive to/from WI proved to be too much, I'd be willing to pitch in a few bucks to help you get a hotel room down in Vernon Hills. //Ed From jt at plainblack.com Sun Nov 16 11:10:38 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:53 2004 Subject: [Chicago-talk] POE was Java API/Perl revisited In-Reply-To: <20031116170226.GB30622@ink.inkdroid.org> Message-ID: >I think a talk about POE at one of our tech meetings would be *really* cool. >Would you be willing to do it? I know you've done some practical work with >POE and I think it could be interesting to a lot of folks. I agree. That would be a very interesting talk. JT ~ Plain Black Create like a god, command like a king, work like a slave. From ehs at pobox.com Mon Nov 17 16:11:07 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] reviews: Regex Pocket Reference / Pragmatic Version Control Message-ID: <20031117221107.GE3997@ink.inkdroid.org> The website has a couple new reviews: Regular Expressions Pocket Reference http://chicago.pm.org/reviews/pocketregex.html Pragmatic Version Control http://chicago.pm.org/reviews/pragvers.html And the Template Toolkit template (ahem) is now available too if you are reviewing a book and want to use it. http://chicago.pm.org/reviews/template.html //Ed From ehs at pobox.com Mon Nov 17 16:19:25 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] reviews: Regex Pocket Reference / Pragmatic Version Control In-Reply-To: <20031117221107.GE3997@ink.inkdroid.org> References: <20031117221107.GE3997@ink.inkdroid.org> Message-ID: <20031117221925.GA5725@ink.inkdroid.org> Apologies, the template in fact is at: http://chicago.pm.org/reviews/template.txt And is also linked to from the reviews page. //Ed From pfleury at medicine.bsd.uchicago.edu Tue Nov 18 11:38:22 2003 From: pfleury at medicine.bsd.uchicago.edu (Patrick Fleury) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A Book Review: Sequence Analysis in a Nutshell In-Reply-To: <20031117221925.GA5725@ink.inkdroid.org> References: <20031117221107.GE3997@ink.inkdroid.org> <20031117221107.GE3997@ink.inkdroid.org> Message-ID: <5.2.1.1.2.20031118092756.00a77558@128.135.32.3> A couple of months ago, I went to a meeting and was given a book called _Sequence Analysis in a Nutshell_ and asked to write a review of it. Here it is: --PatF ======================================================================================== Title: Sequence Analysis in a Nutshell (SAIAN) Authors: Markel, S and Leon, D. Publisher: O'Reilly and Associates Year: 2003 The basic idea behind sequence analysis is the classification of DNA or protein sequences in terms of other known DNA or protein sequences. To take a simple case, suppose there is a laboratory team that decodes a section of human - or mouse or rat - DNA and finds it corresponds to a sequence of letters, perhaps something like AGTTCGATTGATTGCA. (This is a fairly small sequence.) The team might want to find out is what is already known about this particular sequence. To do this, they would compare their sequence to a known database of sequences. This database searching is not a trivial matter because, not only would they want to find out if there are any exact matches for their sequence, they might also want to find out if there are any approximate matches. Here, approximate takes on a new meaning because it not only means sequences that share a large number of exact matches, but also sequences where parts of their sequence appear separated by other letters. For example, if you consider the above sequence, it appears in the sequence ATAGTAATTCGAGCTTTGAATTTTGCA except that there are a few other letters interspersed within it. Or, they might be happy to find a sequence like the above except some of the letters have been transposed to other letters. For example, the sequence ATTTCGGTAGATGCA is the above sequence with a couple of random letter changes. Such alignments, although highly unintuitive to the uninitiated, might be useful to the biological researcher. The team might also want to search not only databases of human DNA but also mouse DNA, rat DNA or perhaps even the worm, C Elegans. I could go on with this, but I am merely trying to convince you that searching for one sequence among other sequences is not just a matter of bringing up a regular expression engine and letting it do its job. Instead, it's a very sophisticated process with lots of variations and parameters. Indeed a lot of work has gone into tweaking the particular types of algorithm to use in such searches. These algorithms have been codified into families with titles such as BLAST (Basic Local Alignment Search Tool) and BLAT (BLAST-Like Alignment Tool) and ClustalW and they are available in various places on the web. This brings us to the volume under discussion. While it is possible to find out about these tools by searching the net, it would be useful to have one source that contained information about all of them in one easy to use format. This volume is that source. This is another of O'Reilly's Nutshell series. Like the others in the series such as "Perl in a Nutshell", "C++ in a Nutshell" etc., the volume does not have as its main point the explication of the theory of sequence analysis. You will need to look elsewhere for that. Instead, it collects in one place a lot of information about the tools that are useful. The first five chapters are devoted to clear descriptions of the common data formats you will run into in sequence analysis. These include, FASTA, SWISS-PROT, GenBank and some of their relatives. The next few chapters are devoted to the tools that make these analyses work. Surprisingly, BLAST, one of the most popular of the search algorithms gets pretty short shrift. It only has about seven pages devoted to it. This might be due to the fact that O'Reilly recently published a book devoted entirely to BLAST. (There will be more about that later.) The short space given to BLAST might also be because the authors wanted to save a lot of space for EMBOSS (European Molecular Biology Open Software Suite). EMBOSS is a suite of over 100 programs for sequence analysis that have been released as open source and whose code is available on the web. Anyone who wants to see real working C-code to perform sequence analysis matching would do well to down load these programs and study them. Markel and Leon devote almost 170 pages to this suite and all of its possible options and flags. By the way, the section on EMBOSS is really the only place a where a particular programming language appears in the book and it doesn't really appear because you need to download the code to see it. There is no Perl in "SAIAN". Besides data formats and descriptions of tools, the book also has some other useful parts. For example, it has appendices devoted to amino acid and nucleotide tables, and genetic codes. It also lists a lot of websites where interested parties can go to find more information. This book looks useful for anyone who would like to have good single reference for sequence analysis tools. All of the above notwithstanding, the book is a manual and sometimes reading it is just like reading a Unix Man page. It may be informative, but, if you really want to know what is going on, you may need to look elsewhere for some further explanation. In particular, the treatment of BLAST in "SAIAN" does not really tell you what is going on. I would be much harder on "SAIAN" were it not for the fact the O'Reilly recently published another book titled simply "BLAST". "BLAST", which was written by Ian Korff, Mark Yandell and Joseph Bedell, is subtitled "An Essential Guide to the Basic Local Alignment Search Tool" and it is indeed that. It contains not only a detailed introduction to BLAST, but also a short introduction to the theory behind BLAST. If you want to find out a little bit about basic genetics and how BLAST works into sequence alignment, you could do a lot worse then read this book. It goes through the algorithms in some detail and actually shows you some elementary Perl code to carry out some of the algorithms. Furthermore, it contains an introduction to some of the statistical methods behind the code. (If you want to go deeply into the theory behind the algorithms, I recommend the book by Durbin, Krogh, etc referenced at the end of this review.) In summary, "Sequence Analysis in a Nutshell" is a useful tool. It collects in one place common data formats. It also collects references to common algorithms such as BLAST and BLAT. It has a large section on EMBOSS. It has appendices on genetic codes and nucleotides. It has a lot of references to URLS for finding more information and for downloading code. It does not have enough about BLAST but, the book called "BLAST", also from O'Reilly, provides a very good reference for that tool along with other more theoretical information. Finally, I want to point out the animal on the cover of SAIAN works as symbolism on several levels. It is a liger a cross between a male lion and a female tiger. (A cross between a male tiger and a female lion is called a tigon. Ah, the wonderful things you learn from reading the colphon of an O'Reilly book.) It is not only fitting that such a mixture of genes be on the cover of this book but it is nice to note that the authors work for LION bioscience. Patrick Fleury Books referenced in the above Durbin, R. Eddy, S., Krogh, A. and Mitchison, G. 1998, Biological Sequence Analysis, New York: Cambridge University Press Korf, I, Yandell, M. and Bedell, J., 2003, BLAST, Sebastopol: O'Reilly Markel, S. and Leon, D., 2003, Sequence Analysis in a Nutshell, Sebastopol: O'Reilly From ehs at pobox.com Tue Nov 18 10:01:29 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter Message-ID: <20031118160129.GB10338@ink.inkdroid.org> Review copies for these O'Reilly titles are available. - Digital Photography Pocket Guide, 2nd Edition - Head First EJB Below is the full user group newsletter from them if you are interested. //Ed ----- Forwarded message from Marsee Henon ----- ================================================================ O'Reilly News for User Group Members November 14, 2003 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Digital Photography Pocket Guide, 2nd Edition -Head First EJB ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Steve Bass ("PC Annoyances"), APCUG User Group Reception--November 16 -Tim O'Reilly, COMDEX, Las Vegas, NV--November 16-20, 2003 -ApacheCon, Las Vegas, NV--November 16-19, 2003 -David McFarland ("Dreamweaver MX: The Missing Manual" and "Dreamweaver 4: The Missing Manual"), 2003 Macromedia MAX, Salt Lake City, UT--Nov 18-21 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -Registration Is Open for ETech 2004--San Diego, CA ---------------------------------------------------------------- News ---------------------------------------------------------------- -Are "How To" Books Archaic? -Open Source at COMDEX Contest Winners -GBA Programming with DevKit Advance -Certification in Linux/Unix System Administration -"Head First EJB" Author Interview -Inside Class Loaders -Windows Server 2003: Still Room for Improvement -Shooting the Windows Messenger Service -Using the eBay SDK -Panther Internet Sharing -Rendezvous Picture Transfer with Panther ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ***Digital Photography Pocket Guide, 2nd Edition Order Number: 6276 "Digital Photography Pocket Guide, 2nd Edition" expands on the basic photography techniques introduced in the bestselling first edition to help you take the kind of pictures you've always dreamed of--and now in full color! This book explains each of the camera's components, shows you what they do, and then helps you choose the right settings. When you ask, "How can I get that picture?", simply pull this small guide out of your camera bag, backpack, or back pocket and find the answer quickly. http://www.oreilly.com/catalog/digphotopg2/ ***Head First EJB Order Number: 5717 Learn not just what Enterprise JavaBeans technology is; learn why it is, and what it is and isn't good for. This book gives you tricks and tips for EJB development, and for passing the latest, very challenging Sun Certified Business Component Developer (SCBCD) exam. You'll learn how to think like a server. You'll learn how to think like a bean. And because this is a Head First book, you'll learn how to think about thinking. http://www.oreilly.com/catalog/hfjejb/ The table of contents are available online: http://www.oreilly.com/catalog/hfjejb/toc.pdf ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Steve Bass ("PC Annoyances"), APCUG User Group Reception, Las Vegas, NV--November 16 The Association of Personal Computer User Groups is hosting a UG exhibition and reception from 3:00-5:30 p.m. Drop by the O'Reilly table and say "hi" to me (Marsee Henon) and author Steve Bass, who will be signing copies of his new book, "PC Annoyances." (O'Reilly is giving away a free copy of "PC Annoyances" to APCUG Attendees--check your welcome goodie bag!) Stardust Resort and Casino, Las Vegas, NV. http://www.apcug.org/events/comdex/fall2003/index.shtm ***O'Reilly at COMDEX, Las Vegas, NV--November 16-20, 2003 Tim O'Reilly will be moderating the Power Panel "Open Source: The Open Source Paradigm Shift" Thursday November 20, 9am. Panelists include Brian Behlendorf, Apache Co-founder, CTO of Collab.Net Marten Mickos (CEO MySQL), Allan Vermuelen (CTO Amazon.com) Jason Matusow (Shared Source Program Manager, Microsoft), and Stormy Peters (Open Source Program Manager, Hewlett-Packard). Room N109 at the Las Vegas Convention Center, NV http://www.comdex.com/lasvegas2003//spec_evts/index.php?s=power_panels The Open Source and Linux Innovation Center Theater will include presentations from Rob Flickenger (Linux Server Hacks & "Wireless Hacks"), Steve Mallet (O'Reilly Network), and Dan J. Woods ("Enterprise Services Architecture" & "Packaged Composite Applications"). For more information and schedule of these events, go to: http://www.comdex.com/lasvegas2003/exhib/index.php?s=ic_open_source ***ApacheCon, Las Vegas, NV--November 16-19, 2003 Come by our booth on November 17 and visit me or look for our authors Brian Aker ("Running Weblogs with Slash"), Stas Bekman ("Practical mod_perl"), Rich Bowen and Ken Coar ("Apache Cookbook"), Will Iverson ("Mac OS X for Java Geeks"), Rasmus Lerdorf ("Programming PHP" and "PHP Pocket Reference"), Doug Tidwell ("XSLT" and "Programming Web Services with SOAP"), and Adam Trachtenberg ("PHP Cookbook") who are all speaking at this gathering. Alexis Park Resort, Las Vegas, NV. http://www.apachecon.com/2003/US/index.html ***David McFarland ("Dreamweaver MX: The Missing Manual"), 2003 Macromedia MAX, Salt Lake City, UT--Nov 18-21 Please stop by our booth (#216) and pick up a free excerpt booklet from Colin Moock's upcoming book, "ActionScript 2.0 Essentials." Be sure to catch sessions with author David McFarland. Salt Palace Convention Center, Salt Lake City, UT. http://macromedia.com/macromedia/conference/ ================================================ Conference News ================================================ ***Registration Is Open for ETech 2004--San Diego, CA Gather with lead users, forward thinkers, and technology activists at O'Reilly's third annual Emerging Technology Conference to vet the projects and ideas that will radically alter not just the future of computing, but the way we live and work. ETech is slated for February 9-12, 2004 in San Diego, California. Take advantage of our Early Bird discount when you register before January 9, 2004. http://conferences.oreilly.com/etech/ User Group members who register before January 9, 2004 get a double discount. Use code DSUG when you register, and receive 20% off the "Early Bird" price. To register for the conference, go to: http://conferences.oreillynet.com/pub/w/28/register.html ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***Are "How To" Books Archaic? A reader asked us about O'Reilly's vision for future books given the rate of change in technology and the growth of the Internet as an information source. Tim says "how to" books will only become more important as the paradigm shift that's taking place in computing leads us into uncharted territory. Read more and share your thoughts on November's Ask Tim. http://www.oreilly.com/pub/a/oreilly/ask_tim/2003/rateofchange_1103.html --------------------- Open Source --------------------- ***Open Source at COMDEX Contest Winners We nominated 21 projects as potential participants in the Open Source Innovation Area at COMDEX, and you voted for the six that will attend. Find out which open source projects will go where only commercial software vendors have gone before. http://www.oreillynet.com/pub/wlg/3957 ***GBA Programming with DevKit Advance Emulation has opened up game programming to hobbyists. While it's possible to build amazing games on all sorts of obsolete platforms, it's also possible to build them on modern ones, including the GameBoy Advance. Howard Wen explores DevKit Advance and interviews its lead developers. http://linux.oreillynet.com/pub/a/linux/2003/11/06/devkit_advance.html ***Certification in Linux/Unix System Administration Learn system administration skills online and receive credit from the University of Illinois. Courses include: The Unix File System, Networking and DNS, Unix Services, and Scripting for Administrators with sed, awk, and Perl. Enroll today at the O'Reilly Learning Lab and save $149 per course. http://oreilly.useractive.com/courses/sysadmin.php3 --------------------- Java --------------------- ***"Head First EJB" Author Interview Kathy Sierra and Bert Bates have just completed the second title in O'Reilly's Head First series, the recently released "Head First EJB," a certification book as unique as the series itself. In this interview, the authors discuss why the Head First series now includes a certification book, why the book is essential even if you're not planning to take the exam, how they've used their unique teaching style to help Java candidates pass the EJB exam, and much more. http://www.onjava.com/pub/a/onjava/2003/11/05/HeadFirst_EJB.html ***Inside Class Loaders Class loading is a topic that separates the Java Jedi from his or her apprentice. Until you start working with multiple -- and potentially incompatible -- class loaders, you don't realize the trickiness of keeping classes straight. Andreas Schaefer's introduction will help expose how class loading works. http://www.onjava.com/pub/a/onjava/2003/11/12/classloader.html --------------------- Windows --------------------- ***Windows Server 2003: Still Room for Improvement Windows Server 2003 is indeed an improvement over the earlier Windows 2000 platform, but with just a wee bit more work, Microsoft could have made it much easier to use. Mitch Tulloch has a few suggestions that he hopes Microsoft will take to heart. Mitch is the author of "Windows Server 2003 in a Nutshell." http://www.oreillynet.com/pub/a/network/2003/11/11/winserver2003.html Windows Server 2003 in a Nutshell Order Number: 4044 http://www.oreilly.com/catalog/winsvrian/ ***Shooting the Windows Messenger Service On November 6, the Federal Trade Commission took the unusual step of convincing a U.S. District Court to issue a temporary restraining order shutting down a spamming company for using the Windows Messenger Service to deliver unwanted pop-ups. In this article, Preston Gralla shows you how you can permanently solve this pop-up problem in XP by disabling the Windows Messenger Service, a hack he also covers in his book, "Windows XP Hacks." http://www.oreillynet.com/pub/a/network/2003/11/11/winxp_hacks.html Windows XP Hacks Order Number: 5113 http://www.oreilly.com/catalog/winxphks/index.html --------------------- .NET --------------------- ***Using the eBay SDK Unless you've been living in a cave, you probably already know that eBay enables people and businesses to buy and sell items online. But you might not have known that you can write software applications that integrate with eBay through a handy set of .NET components. Jeffrey McManus gives you an overview of how to write apps using the eBay SDK for .NET. http://www.ondotnet.com/pub/a/dotnet/2003/11/10/ebay.html --------------------- Mac --------------------- ***Panther Internet Sharing A quick look at sharing an Internet connection in Panther with IP over FireWire, which is now built into Mac OS X 10.3, and AirPort, including the pros and cons of each method. http://www.macdevcenter.com/pub/a/mac/2003/11/11/panther_internet.html ***Rendezvous Picture Transfer with Panther You can show others on a Rendezvous network pictures directly from your camera using the new Image Capture app in Panther. But that's only part of the good news. Derrick Story shows you the ins and outs of this handy new Mac OS X 10.3 trick. http://www.macdevcenter.com/pub/a/mac/2003/11/10/rendezvous_images.html Until next time-- Marsee ----- End forwarded message ----- -- Ed Summers aim: inkdroid web: http://www.inkdroid.org The deeper I go the darker it gets. [Peter Gabriel] From mcavoy76 at hotmail.com Tue Nov 18 12:56:22 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter References: <20031118160129.GB10338@ink.inkdroid.org> Message-ID: I'd like to do the photography book. I'll even post before and after pictures to my website, showing what great strides I'll have made as a digital photographer. Chris ----- Original Message ----- From: "Ed Summers" To: Sent: Tuesday, November 18, 2003 10:01 AM Subject: [Chicago-talk] review books available / ora newsletter > Review copies for these O'Reilly titles are available. > > - Digital Photography Pocket Guide, 2nd Edition > - Head First EJB > > Below is the full user group newsletter from them if you are interested. > > //Ed > > ----- Forwarded message from Marsee Henon ----- > > ================================================================ > O'Reilly News for User Group Members > November 14, 2003 > ================================================================ > ---------------------------------------------------------------- > Book News > ---------------------------------------------------------------- > -Digital Photography Pocket Guide, 2nd Edition > -Head First EJB > ---------------------------------------------------------------- > Upcoming Events > ---------------------------------------------------------------- > -Steve Bass ("PC Annoyances"), APCUG User Group Reception--November 16 > -Tim O'Reilly, COMDEX, Las Vegas, NV--November 16-20, 2003 > -ApacheCon, Las Vegas, NV--November 16-19, 2003 > -David McFarland ("Dreamweaver MX: The Missing Manual" and "Dreamweaver 4: > The Missing Manual"), 2003 Macromedia MAX, Salt Lake City, UT--Nov 18-21 > ---------------------------------------------------------------- > Conferences > ---------------------------------------------------------------- > -Registration Is Open for ETech 2004--San Diego, CA > ---------------------------------------------------------------- > News > ---------------------------------------------------------------- > -Are "How To" Books Archaic? > -Open Source at COMDEX Contest Winners > -GBA Programming with DevKit Advance > -Certification in Linux/Unix System Administration > -"Head First EJB" Author Interview > -Inside Class Loaders > -Windows Server 2003: Still Room for Improvement > -Shooting the Windows Messenger Service > -Using the eBay SDK > -Panther Internet Sharing > -Rendezvous Picture Transfer with Panther > > ================================================ > Book News > ================================================ > Did you know you can request a free book to review for your > group? Ask your group leader for more information. > > For book review writing tips and suggestions, go to: > http://ug.oreilly.com/bookreviews.html > > Don't forget, you can receive 20% off any O'Reilly book you > purchase directly from O'Reilly. Just use code DSUG when > ordering online or by phone 800-998-9938. > http://www.oreilly.com/ > > > ***Free ground shipping is available for online orders of at > least $29.95 that go to a single U.S. address. This offer > applies to U.S. delivery addresses in the 50 states and > Puerto Rico. > For more details, go to: > http://www.oreilly.com/news/freeshipping_0703.html > > > ***Digital Photography Pocket Guide, 2nd Edition > Order Number: 6276 > "Digital Photography Pocket Guide, 2nd Edition" expands on the basic > photography techniques introduced in the bestselling first edition to help > you take the kind of pictures you've always dreamed of--and now in full > color! This book explains each of the camera's components, shows you what > they do, and then helps you choose the right settings. When you ask, "How > can I get that picture?", simply pull this small guide out of your camera > bag, backpack, or back pocket and find the answer quickly. > http://www.oreilly.com/catalog/digphotopg2/ > > > ***Head First EJB > Order Number: 5717 > Learn not just what Enterprise JavaBeans technology is; learn why it is, > and what it is and isn't good for. This book gives you tricks and tips for > EJB development, and for passing the latest, very challenging Sun > Certified Business Component Developer (SCBCD) exam. You'll learn how to > think like a server. You'll learn how to think like a bean. And because > this is a Head First book, you'll learn how to think about thinking. > http://www.oreilly.com/catalog/hfjejb/ > > The table of contents are available online: > http://www.oreilly.com/catalog/hfjejb/toc.pdf > > ================================================ > Upcoming Events > ================================================ > ***For more events, please see: > http://events.oreilly.com/ > > ***Steve Bass ("PC Annoyances"), APCUG User Group Reception, > Las Vegas, NV--November 16 > The Association of Personal Computer User Groups is hosting a UG > exhibition and reception from 3:00-5:30 p.m. Drop by the O'Reilly table > and say "hi" to me (Marsee Henon) and author Steve Bass, who will be > signing copies of his new book, "PC Annoyances." (O'Reilly is giving away > a free copy of "PC Annoyances" to APCUG Attendees--check your welcome > goodie bag!) > Stardust Resort and Casino, Las Vegas, NV. > http://www.apcug.org/events/comdex/fall2003/index.shtm > > > ***O'Reilly at COMDEX, Las Vegas, NV--November 16-20, 2003 > Tim O'Reilly will be moderating the Power Panel "Open Source: > The Open Source Paradigm Shift" Thursday November 20, 9am. > Panelists include Brian Behlendorf, Apache Co-founder, CTO of Collab.Net > Marten Mickos (CEO MySQL), Allan Vermuelen (CTO Amazon.com) > Jason Matusow (Shared Source Program Manager, Microsoft), > and Stormy Peters (Open Source Program Manager, Hewlett-Packard). > Room N109 at the Las Vegas Convention Center, NV > http://www.comdex.com/lasvegas2003//spec_evts/index.php?s=power_panels > > The Open Source and Linux Innovation Center Theater will include > presentations from Rob Flickenger (Linux Server Hacks & "Wireless Hacks"), > Steve Mallet (O'Reilly Network), and Dan J. Woods ("Enterprise Services > Architecture" & "Packaged Composite Applications"). For more information > and schedule of these events, go to: > http://www.comdex.com/lasvegas2003/exhib/index.php?s=ic_open_source > > > ***ApacheCon, Las Vegas, NV--November 16-19, 2003 > Come by our booth on November 17 and visit me or look for our authors > Brian Aker ("Running Weblogs with Slash"), Stas Bekman ("Practical > mod_perl"), Rich Bowen and Ken Coar ("Apache Cookbook"), Will Iverson > ("Mac OS X for Java Geeks"), Rasmus Lerdorf ("Programming PHP" and "PHP > Pocket Reference"), Doug Tidwell ("XSLT" and "Programming Web Services > with SOAP"), and Adam Trachtenberg ("PHP Cookbook") who are all speaking > at this gathering. Alexis Park Resort, Las Vegas, NV. > http://www.apachecon.com/2003/US/index.html > > > ***David McFarland ("Dreamweaver MX: The Missing Manual"), 2003 Macromedia > MAX, Salt Lake City, UT--Nov 18-21 > Please stop by our booth (#216) and pick up a free excerpt booklet from > Colin Moock's upcoming book, "ActionScript 2.0 Essentials." Be sure to > catch sessions with author David McFarland. Salt Palace Convention Center, > Salt Lake City, UT. > http://macromedia.com/macromedia/conference/ > > ================================================ > Conference News > ================================================ > ***Registration Is Open for ETech 2004--San Diego, CA > Gather with lead users, forward thinkers, and technology activists at > O'Reilly's third annual Emerging Technology Conference to vet the projects > and ideas that will radically alter not just the future of computing, but > the way we live and work. ETech is slated for February 9-12, 2004 in San > Diego, California. Take advantage of our Early Bird discount when you > register before January 9, 2004. > http://conferences.oreilly.com/etech/ > > User Group members who register before January 9, 2004 get a double > discount. Use code DSUG when you register, and receive 20% off the > "Early Bird" price. > > To register for the conference, go to: > http://conferences.oreillynet.com/pub/w/28/register.html > > ================================================ > News From O'Reilly & Beyond > ================================================ > --------------------- > General News > --------------------- > ***Are "How To" Books Archaic? > A reader asked us about O'Reilly's vision for future books given the rate > of change in technology and the growth of the Internet as an information > source. Tim says "how to" books will only become more important as the > paradigm shift that's taking place in computing leads us into uncharted > territory. Read more and share your thoughts on November's Ask Tim. > http://www.oreilly.com/pub/a/oreilly/ask_tim/2003/rateofchange_1103.html > > --------------------- > Open Source > --------------------- > ***Open Source at COMDEX Contest Winners > We nominated 21 projects as potential participants in the Open Source > Innovation Area at COMDEX, and you voted for the six that will attend. > Find out which open source projects will go where only commercial software > vendors have gone before. > http://www.oreillynet.com/pub/wlg/3957 > > > ***GBA Programming with DevKit Advance > Emulation has opened up game programming to hobbyists. While it's possible > to build amazing games on all sorts of obsolete platforms, it's also > possible to build them on modern ones, including the GameBoy Advance. > Howard Wen explores DevKit Advance and interviews its lead developers. > http://linux.oreillynet.com/pub/a/linux/2003/11/06/devkit_advance.html > > > ***Certification in Linux/Unix System Administration > Learn system administration skills online and receive credit from the > University of Illinois. Courses include: The Unix File System, Networking > and DNS, Unix Services, and Scripting for Administrators with sed, awk, > and Perl. Enroll today at the O'Reilly Learning Lab and save $149 per > course. > http://oreilly.useractive.com/courses/sysadmin.php3 > > --------------------- > Java > --------------------- > ***"Head First EJB" Author Interview > Kathy Sierra and Bert Bates have just completed the second title in > O'Reilly's Head First series, the recently released "Head First EJB," a > certification book as unique as the series itself. In this interview, the > authors discuss why the Head First series now includes a certification > book, why the book is essential even if you're not planning to take the > exam, how they've used their unique teaching style to help Java candidates > pass the EJB exam, and much more. > http://www.onjava.com/pub/a/onjava/2003/11/05/HeadFirst_EJB.html > > > ***Inside Class Loaders > Class loading is a topic that separates the Java Jedi from his or her > apprentice. Until you start working with multiple -- and potentially > incompatible -- class loaders, you don't realize the trickiness of keeping > classes straight. Andreas Schaefer's introduction will help expose how > class loading works. > http://www.onjava.com/pub/a/onjava/2003/11/12/classloader.html > > --------------------- > Windows > --------------------- > ***Windows Server 2003: Still Room for Improvement > Windows Server 2003 is indeed an improvement over the earlier Windows 2000 > platform, but with just a wee bit more work, Microsoft could have made it > much easier to use. Mitch Tulloch has a few suggestions that he hopes > Microsoft will take to heart. Mitch is the author of "Windows Server 2003 > in a Nutshell." > http://www.oreillynet.com/pub/a/network/2003/11/11/winserver2003.html > > Windows Server 2003 in a Nutshell > Order Number: 4044 > http://www.oreilly.com/catalog/winsvrian/ > > > ***Shooting the Windows Messenger Service > On November 6, the Federal Trade Commission took the unusual step of > convincing a U.S. District Court to issue a temporary restraining order > shutting down a spamming company for using the Windows Messenger Service > to deliver unwanted pop-ups. In this article, Preston Gralla shows you how > you can permanently solve this pop-up problem in XP by disabling the > Windows Messenger Service, a hack he also covers in his book, "Windows XP > Hacks." > http://www.oreillynet.com/pub/a/network/2003/11/11/winxp_hacks.html > > Windows XP Hacks > Order Number: 5113 > http://www.oreilly.com/catalog/winxphks/index.html > > --------------------- > .NET > --------------------- > ***Using the eBay SDK > Unless you've been living in a cave, you probably already know that eBay > enables people and businesses to buy and sell items online. But you might > not have known that you can write software applications that integrate > with eBay through a handy set of .NET components. Jeffrey McManus gives > you an overview of how to write apps using the eBay SDK for .NET. > http://www.ondotnet.com/pub/a/dotnet/2003/11/10/ebay.html > > --------------------- > Mac > --------------------- > ***Panther Internet Sharing > A quick look at sharing an Internet connection in Panther with IP over > FireWire, which is now built into Mac OS X 10.3, and AirPort, including > the pros and cons of each method. > http://www.macdevcenter.com/pub/a/mac/2003/11/11/panther_internet.html > > > ***Rendezvous Picture Transfer with Panther > You can show others on a Rendezvous network pictures directly from your > camera using the new Image Capture app in Panther. But that's only part of > the good news. Derrick Story shows you the ins and outs of this handy new > Mac OS X 10.3 trick. > http://www.macdevcenter.com/pub/a/mac/2003/11/10/rendezvous_images.html > > Until next time-- > > Marsee > > > > > > > > ----- End forwarded message ----- > > -- > Ed Summers > aim: inkdroid > web: http://www.inkdroid.org > > The deeper I go the darker it gets. [Peter Gabriel] > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From ehs at pobox.com Tue Nov 18 19:52:37 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter In-Reply-To: References: <20031118160129.GB10338@ink.inkdroid.org> Message-ID: <20031119015237.GC12978@ink.inkdroid.org> On Tue, Nov 18, 2003 at 12:56:22PM -0600, Chris McAvoy wrote: > I'd like to do the photography book. I'll even post before and after > pictures to my website, showing what great strides I'll have made as a > digital photographer. Perhaps you could even take some pictures at our next meeting, and we can put them up on the chicago.pm.org website. I've got your mailing address on file so I'll get a copy sent out to you. //Ed From jason at multiply.org Tue Nov 18 20:28:30 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter In-Reply-To: <20031119015237.GC12978@ink.inkdroid.org> Message-ID: <200311190144.hAJ1i2U05864@tetsuo.mengelt.com> If any whisper about review copies of the upcoming "High Performance MySQL" start coming our way from O'Reilly, I gladly volunteer for a review. I have a large MySQL app coming up that I want to run like gangbusters. :) -jason scott gessner jason@multiply.org -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Ed Summers Sent: Tuesday, November 18, 2003 7:53 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] review books available / ora newsletter On Tue, Nov 18, 2003 at 12:56:22PM -0600, Chris McAvoy wrote: > I'd like to do the photography book. I'll even post before and after > pictures to my website, showing what great strides I'll have made as a > digital photographer. Perhaps you could even take some pictures at our next meeting, and we can put them up on the chicago.pm.org website. I've got your mailing address on file so I'll get a copy sent out to you. //Ed _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From shild at sbcglobal.net Tue Nov 18 20:42:19 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter In-Reply-To: <200311190144.hAJ1i2U05864@tetsuo.mengelt.com> Message-ID: Funny you brought that up, a new co-worker just told me about the book. He apparently knows the author. On 19-Nov-2003 jason gessner wrote: > If any whisper about review copies of the upcoming "High Performance MySQL" > start coming our way from O'Reilly, I gladly volunteer for a review. I have > a large MySQL app coming up that I want to run like gangbusters. :) > > -jason scott gessner > jason@multiply.org > > > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Ed Summers > Sent: Tuesday, November 18, 2003 7:53 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] review books available / ora newsletter > > On Tue, Nov 18, 2003 at 12:56:22PM -0600, Chris McAvoy wrote: >> I'd like to do the photography book. I'll even post before and after >> pictures to my website, showing what great strides I'll have made as a >> digital photographer. > > Perhaps you could even take some pictures at our next meeting, and we can > put them up on the chicago.pm.org website. > > I've got your mailing address on file so I'll get a copy sent out to you. > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 18-Nov-2003 Time: 20:40:55 ---------------------------------- From shild at sbcglobal.net Tue Nov 18 20:44:02 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:54 2004 Subject: FWD: RE: [Chicago-talk] review books available / ora newsletter Message-ID: Meant to send to the list. -----FW: ----- Date: Tue, 18 Nov 2003 20:40:26 -0600 (CST) Sender: shildret@scotth.emsphone.com From: "Scott T. Hildreth" To: Ed Summers Subject: RE: [Chicago-talk] review books available / ora newsletter Any takers on the Head First EJB? I would like it if not. I am supposed to start learning Java, I've been dragging my feet a little. This would help motivate me. It is hard to try it when Perl does it all. :-) On 18-Nov-2003 Ed Summers wrote: > Review copies for these O'Reilly titles are available. > > - Digital Photography Pocket Guide, 2nd Edition > - Head First EJB > > Below is the full user group newsletter from them if you are interested. > > //Ed > > ----- Forwarded message from Marsee Henon ----- > > ================================================================ > O'Reilly News for User Group Members > November 14, 2003 > ================================================================ > ---------------------------------------------------------------- > Book News > ---------------------------------------------------------------- > -Digital Photography Pocket Guide, 2nd Edition > -Head First EJB > ---------------------------------------------------------------- > Upcoming Events > ---------------------------------------------------------------- > -Steve Bass ("PC Annoyances"), APCUG User Group Reception--November 16 > -Tim O'Reilly, COMDEX, Las Vegas, NV--November 16-20, 2003 > -ApacheCon, Las Vegas, NV--November 16-19, 2003 > -David McFarland ("Dreamweaver MX: The Missing Manual" and "Dreamweaver 4: > The Missing Manual"), 2003 Macromedia MAX, Salt Lake City, UT--Nov 18-21 > ---------------------------------------------------------------- > Conferences > ---------------------------------------------------------------- > -Registration Is Open for ETech 2004--San Diego, CA > ---------------------------------------------------------------- > News > ---------------------------------------------------------------- > -Are "How To" Books Archaic? > -Open Source at COMDEX Contest Winners > -GBA Programming with DevKit Advance > -Certification in Linux/Unix System Administration > -"Head First EJB" Author Interview > -Inside Class Loaders > -Windows Server 2003: Still Room for Improvement > -Shooting the Windows Messenger Service > -Using the eBay SDK > -Panther Internet Sharing > -Rendezvous Picture Transfer with Panther > > ================================================ > Book News > ================================================ > Did you know you can request a free book to review for your > group? Ask your group leader for more information. > > For book review writing tips and suggestions, go to: > http://ug.oreilly.com/bookreviews.html > > Don't forget, you can receive 20% off any O'Reilly book you > purchase directly from O'Reilly. Just use code DSUG when > ordering online or by phone 800-998-9938. > http://www.oreilly.com/ > > > ***Free ground shipping is available for online orders of at > least $29.95 that go to a single U.S. address. This offer > applies to U.S. delivery addresses in the 50 states and > Puerto Rico. > For more details, go to: > http://www.oreilly.com/news/freeshipping_0703.html > > > ***Digital Photography Pocket Guide, 2nd Edition > Order Number: 6276 > "Digital Photography Pocket Guide, 2nd Edition" expands on the basic > photography techniques introduced in the bestselling first edition to help > you take the kind of pictures you've always dreamed of--and now in full > color! This book explains each of the camera's components, shows you what > they do, and then helps you choose the right settings. When you ask, "How > can I get that picture?", simply pull this small guide out of your camera > bag, backpack, or back pocket and find the answer quickly. > http://www.oreilly.com/catalog/digphotopg2/ > > > ***Head First EJB > Order Number: 5717 > Learn not just what Enterprise JavaBeans technology is; learn why it is, > and what it is and isn't good for. This book gives you tricks and tips for > EJB development, and for passing the latest, very challenging Sun > Certified Business Component Developer (SCBCD) exam. You'll learn how to > think like a server. You'll learn how to think like a bean. And because > this is a Head First book, you'll learn how to think about thinking. > http://www.oreilly.com/catalog/hfjejb/ > > The table of contents are available online: > http://www.oreilly.com/catalog/hfjejb/toc.pdf > > ================================================ > Upcoming Events > ================================================ > ***For more events, please see: > http://events.oreilly.com/ > > ***Steve Bass ("PC Annoyances"), APCUG User Group Reception, > Las Vegas, NV--November 16 > The Association of Personal Computer User Groups is hosting a UG > exhibition and reception from 3:00-5:30 p.m. Drop by the O'Reilly table > and say "hi" to me (Marsee Henon) and author Steve Bass, who will be > signing copies of his new book, "PC Annoyances." (O'Reilly is giving away > a free copy of "PC Annoyances" to APCUG Attendees--check your welcome > goodie bag!) > Stardust Resort and Casino, Las Vegas, NV. > http://www.apcug.org/events/comdex/fall2003/index.shtm > > > ***O'Reilly at COMDEX, Las Vegas, NV--November 16-20, 2003 > Tim O'Reilly will be moderating the Power Panel "Open Source: > The Open Source Paradigm Shift" Thursday November 20, 9am. > Panelists include Brian Behlendorf, Apache Co-founder, CTO of Collab.Net > Marten Mickos (CEO MySQL), Allan Vermuelen (CTO Amazon.com) > Jason Matusow (Shared Source Program Manager, Microsoft), > and Stormy Peters (Open Source Program Manager, Hewlett-Packard). > Room N109 at the Las Vegas Convention Center, NV > http://www.comdex.com/lasvegas2003//spec_evts/index.php?s=power_panels > > The Open Source and Linux Innovation Center Theater will include > presentations from Rob Flickenger (Linux Server Hacks & "Wireless Hacks"), > Steve Mallet (O'Reilly Network), and Dan J. Woods ("Enterprise Services > Architecture" & "Packaged Composite Applications"). For more information > and schedule of these events, go to: > http://www.comdex.com/lasvegas2003/exhib/index.php?s=ic_open_source > > > ***ApacheCon, Las Vegas, NV--November 16-19, 2003 > Come by our booth on November 17 and visit me or look for our authors > Brian Aker ("Running Weblogs with Slash"), Stas Bekman ("Practical > mod_perl"), Rich Bowen and Ken Coar ("Apache Cookbook"), Will Iverson > ("Mac OS X for Java Geeks"), Rasmus Lerdorf ("Programming PHP" and "PHP > Pocket Reference"), Doug Tidwell ("XSLT" and "Programming Web Services > with SOAP"), and Adam Trachtenberg ("PHP Cookbook") who are all speaking > at this gathering. Alexis Park Resort, Las Vegas, NV. > http://www.apachecon.com/2003/US/index.html > > > ***David McFarland ("Dreamweaver MX: The Missing Manual"), 2003 Macromedia > MAX, Salt Lake City, UT--Nov 18-21 > Please stop by our booth (#216) and pick up a free excerpt booklet from > Colin Moock's upcoming book, "ActionScript 2.0 Essentials." Be sure to > catch sessions with author David McFarland. Salt Palace Convention Center, > Salt Lake City, UT. > http://macromedia.com/macromedia/conference/ > > ================================================ > Conference News > ================================================ > ***Registration Is Open for ETech 2004--San Diego, CA > Gather with lead users, forward thinkers, and technology activists at > O'Reilly's third annual Emerging Technology Conference to vet the projects > and ideas that will radically alter not just the future of computing, but > the way we live and work. ETech is slated for February 9-12, 2004 in San > Diego, California. Take advantage of our Early Bird discount when you > register before January 9, 2004. > http://conferences.oreilly.com/etech/ > > User Group members who register before January 9, 2004 get a double > discount. Use code DSUG when you register, and receive 20% off the > "Early Bird" price. > > To register for the conference, go to: > http://conferences.oreillynet.com/pub/w/28/register.html > > ================================================ > News From O'Reilly & Beyond > ================================================ > --------------------- > General News > --------------------- > ***Are "How To" Books Archaic? > A reader asked us about O'Reilly's vision for future books given the rate > of change in technology and the growth of the Internet as an information > source. Tim says "how to" books will only become more important as the > paradigm shift that's taking place in computing leads us into uncharted > territory. Read more and share your thoughts on November's Ask Tim. > http://www.oreilly.com/pub/a/oreilly/ask_tim/2003/rateofchange_1103.html > > --------------------- > Open Source > --------------------- > ***Open Source at COMDEX Contest Winners > We nominated 21 projects as potential participants in the Open Source > Innovation Area at COMDEX, and you voted for the six that will attend. > Find out which open source projects will go where only commercial software > vendors have gone before. > http://www.oreillynet.com/pub/wlg/3957 > > > ***GBA Programming with DevKit Advance > Emulation has opened up game programming to hobbyists. While it's possible > to build amazing games on all sorts of obsolete platforms, it's also > possible to build them on modern ones, including the GameBoy Advance. > Howard Wen explores DevKit Advance and interviews its lead developers. > http://linux.oreillynet.com/pub/a/linux/2003/11/06/devkit_advance.html > > > ***Certification in Linux/Unix System Administration > Learn system administration skills online and receive credit from the > University of Illinois. Courses include: The Unix File System, Networking > and DNS, Unix Services, and Scripting for Administrators with sed, awk, > and Perl. Enroll today at the O'Reilly Learning Lab and save $149 per > course. > http://oreilly.useractive.com/courses/sysadmin.php3 > > --------------------- > Java > --------------------- > ***"Head First EJB" Author Interview > Kathy Sierra and Bert Bates have just completed the second title in > O'Reilly's Head First series, the recently released "Head First EJB," a > certification book as unique as the series itself. In this interview, the > authors discuss why the Head First series now includes a certification > book, why the book is essential even if you're not planning to take the > exam, how they've used their unique teaching style to help Java candidates > pass the EJB exam, and much more. > http://www.onjava.com/pub/a/onjava/2003/11/05/HeadFirst_EJB.html > > > ***Inside Class Loaders > Class loading is a topic that separates the Java Jedi from his or her > apprentice. Until you start working with multiple -- and potentially > incompatible -- class loaders, you don't realize the trickiness of keeping > classes straight. Andreas Schaefer's introduction will help expose how > class loading works. > http://www.onjava.com/pub/a/onjava/2003/11/12/classloader.html > > --------------------- > Windows > --------------------- > ***Windows Server 2003: Still Room for Improvement > Windows Server 2003 is indeed an improvement over the earlier Windows 2000 > platform, but with just a wee bit more work, Microsoft could have made it > much easier to use. Mitch Tulloch has a few suggestions that he hopes > Microsoft will take to heart. Mitch is the author of "Windows Server 2003 > in a Nutshell." > http://www.oreillynet.com/pub/a/network/2003/11/11/winserver2003.html > > Windows Server 2003 in a Nutshell > Order Number: 4044 > http://www.oreilly.com/catalog/winsvrian/ > > > ***Shooting the Windows Messenger Service > On November 6, the Federal Trade Commission took the unusual step of > convincing a U.S. District Court to issue a temporary restraining order > shutting down a spamming company for using the Windows Messenger Service > to deliver unwanted pop-ups. In this article, Preston Gralla shows you how > you can permanently solve this pop-up problem in XP by disabling the > Windows Messenger Service, a hack he also covers in his book, "Windows XP > Hacks." > http://www.oreillynet.com/pub/a/network/2003/11/11/winxp_hacks.html > > Windows XP Hacks > Order Number: 5113 > http://www.oreilly.com/catalog/winxphks/index.html > > --------------------- > .NET > --------------------- > ***Using the eBay SDK > Unless you've been living in a cave, you probably already know that eBay > enables people and businesses to buy and sell items online. But you might > not have known that you can write software applications that integrate > with eBay through a handy set of .NET components. Jeffrey McManus gives > you an overview of how to write apps using the eBay SDK for .NET. > http://www.ondotnet.com/pub/a/dotnet/2003/11/10/ebay.html > > --------------------- > Mac > --------------------- > ***Panther Internet Sharing > A quick look at sharing an Internet connection in Panther with IP over > FireWire, which is now built into Mac OS X 10.3, and AirPort, including > the pros and cons of each method. > http://www.macdevcenter.com/pub/a/mac/2003/11/11/panther_internet.html > > > ***Rendezvous Picture Transfer with Panther > You can show others on a Rendezvous network pictures directly from your > camera using the new Image Capture app in Panther. But that's only part of > the good news. Derrick Story shows you the ins and outs of this handy new > Mac OS X 10.3 trick. > http://www.macdevcenter.com/pub/a/mac/2003/11/10/rendezvous_images.html > > Until next time-- > > Marsee > > > > > > > > ----- End forwarded message ----- > > -- > Ed Summers > aim: inkdroid > web: http://www.inkdroid.org > > The deeper I go the darker it gets. [Peter Gabriel] > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 18-Nov-2003 Time: 20:37:24 ---------------------------------- --------------End of forwarded message------------------------- ---------------------------------- E-Mail: Scott T. Hildreth Date: 18-Nov-2003 Time: 20:43:29 ---------------------------------- From mcavoy76 at hotmail.com Tue Nov 18 22:55:13 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] review books available / ora newsletter References: <20031118160129.GB10338@ink.inkdroid.org> <20031119015237.GC12978@ink.inkdroid.org> Message-ID: I'll make you all famous. Chris ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Tuesday, November 18, 2003 7:52 PM Subject: Re: [Chicago-talk] review books available / ora newsletter > On Tue, Nov 18, 2003 at 12:56:22PM -0600, Chris McAvoy wrote: > > I'd like to do the photography book. I'll even post before and after > > pictures to my website, showing what great strides I'll have made as a > > digital photographer. > > Perhaps you could even take some pictures at our next meeting, and we can > put them up on the chicago.pm.org website. > > I've got your mailing address on file so I'll get a copy sent out to you. > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From hachi at kuiki.net Wed Nov 19 09:38:05 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Java API/Perl revisited In-Reply-To: <016c01c3ac61$8332de20$6405a8c0@a30> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net> <016c01c3ac61$8332de20$6405a8c0@a30> Message-ID: <3FBB8E5D.7010503@kuiki.net> Jay, I can't really say how I see using POE in this application, but the moment you start thinking about doing async IO and running a poll loop you have hit an area where you can most likely write the entire thing in POE. POE can be viewed as simply a framework built around a select() loop, but it doesn't have to be select() necessarally. --Jonathan Jay Strauss wrote: > Jonathan, > > I was planning on using POE in a different aspect of what I'm trying to do. > How did you envision using it this application? I have to read a socket > (endlessly), and dispatch methods based on the messages I receive over the > socket, I also have to talk on that socket when necessary > > Jay From me at heyjay.com Wed Nov 19 16:54:05 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Java API/Perl revisited References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net><016c01c3ac61$8332de20$6405a8c0@a30> <3FBB8E5D.7010503@kuiki.net> Message-ID: <001501c3aef3$f8061520$6405a8c0@a30> I've used POE in the past, and will probably use it in this case to allow client apps to get at the stock data. But I 've a long way to go Jay ----- Original Message ----- From: "Jonathan Steinert" To: "Chicago.pm chatter" Sent: Wednesday, November 19, 2003 9:38 AM Subject: Re: [Chicago-talk] Java API/Perl revisited > Jay, > > I can't really say how I see using POE in this application, but the > moment you start thinking about doing async IO and running a poll loop > you have hit an area where you can most likely write the entire thing in > POE. > > POE can be viewed as simply a framework built around a select() loop, > but it doesn't have to be select() necessarally. > > --Jonathan > > Jay Strauss wrote: > > Jonathan, > > > > I was planning on using POE in a different aspect of what I'm trying to do. > > How did you envision using it this application? I have to read a socket > > (endlessly), and dispatch methods based on the messages I receive over the > > socket, I also have to talk on that socket when necessary > > > > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From shild at sbcglobal.net Wed Nov 19 19:57:48 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] FWD: High Performance Mysql Message-ID: I said I would pass the link to the list. -----Fwd: To: shildreth Subject: High Performance Mysql Hi Scott, I looks like Jeremy Zawodny has a website setup for the book. http://highperformancemysql.com/ . Looks like it might even be a daily blog. Where did you hear about the book? I would like to pass that off to him. -Tom --------------End of forwarded message------------------------- -- ---------------------------------- E-Mail: shildreth@emsphone.com Date: 19-Nov-2003 Time: 15:14:31 ---------------------------------- --------------End of forwarded message------------------------- ---------------------------------- E-Mail: Scott T. Hildreth Date: 19-Nov-2003 Time: 19:56:20 ---------------------------------- From jason at multiply.org Wed Nov 19 22:14:18 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] FWD: High Performance Mysql In-Reply-To: References: Message-ID: <025D13D6-1B10-11D8-9FA2-00039394FC90@multiply.org> On Nov 19, 2003, at 7:57 PM, Scott T. Hildreth wrote: > > > > Hi Scott, > I looks like Jeremy Zawodny has a website setup for the book. > http://highperformancemysql.com/ . Looks like it might even be a daily > blog. Where did you hear about the book? I would like to pass that off > to > him. > > -Tom Jeremy has a great blog. I definitely heard about the book there. http://jeremy.zawodny.com/blog/ as a side note, he just posted something about my CVS -> blog hack from my blogging techniques talk of a coupla months ago. yay me. haha -jason scott gessner jason@multiply.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 629 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031119/6ed641bf/attachment.bin From me at heyjay.com Wed Nov 19 23:39:27 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Test::More and Die Message-ID: <007701c3af28$ab349b10$6405a8c0@a30> I'm testing the waters with Test::*, I've re-read Andy's presentation, Test::Tutorial, and Test::More. So if I have a test that I want to carp or die, like I would normally if "really" wrong input was supplied, how can I perform that test (i.e. supply wrong data that would normally make my module error out) and continue with the other tests? Thanks Jay From andy at petdance.com Wed Nov 19 23:45:12 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Test::More and Die In-Reply-To: <007701c3af28$ab349b10$6405a8c0@a30> References: <007701c3af28$ab349b10$6405a8c0@a30> Message-ID: > So if I have a test that I want to carp or die, like I would normally > if > "really" wrong input was supplied, how can I perform that test (i.e. > supply > wrong data that would normally make my module error out) and continue > with > the other tests? Take a look at Test::Warn, which traps and checks for warnings, and Test::Exception, which traps and checks for dying. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From lembark at wrkhors.com Thu Nov 20 08:36:53 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Test::More and Die In-Reply-To: <007701c3af28$ab349b10$6405a8c0@a30> References: <007701c3af28$ab349b10$6405a8c0@a30> Message-ID: <2871532704.1069339013@[192.168.200.4]> -- Jay Strauss > I'm testing the waters with Test::*, I've re-read Andy's presentation, > Test::Tutorial, and Test::More. > > So if I have a test that I want to carp or die, like I would normally if > "really" wrong input was supplied, how can I perform that test (i.e. > supply wrong data that would normally make my module error out) and > continue with the other tests? Same as always: eval it. eval { blah_blah_blah; die; }; if( $@ ) { # something died... } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Thu Nov 20 09:30:43 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Test::More and Die References: <007701c3af28$ab349b10$6405a8c0@a30> Message-ID: <001701c3af7b$4444e5b0$6405a8c0@a30> Ah... Thanks Andy (figured you'd respond, was going to send to you directly, but at least this way its in the archives) Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Wednesday, November 19, 2003 11:45 PM Subject: Re: [Chicago-talk] Test::More and Die > > So if I have a test that I want to carp or die, like I would normally > > if > > "really" wrong input was supplied, how can I perform that test (i.e. > > supply > > wrong data that would normally make my module error out) and continue > > with > > the other tests? > > Take a look at Test::Warn, which traps and checks for warnings, and > Test::Exception, which traps and checks for dying. > > xoa > > -- > Andy Lester > andy@petdance.com, AIM:petdance > http://petdance.com/ http://use.perl.org/~petdance/ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From ehs at pobox.com Fri Nov 21 10:29:30 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Patterns, Principles and Practices Message-ID: <20031121162929.GA30514@ink.inkdroid.org> Apologies if you already saw this announcement [1] elsewhere. At the next UniForum Robert Martin of Object Mentor and author [2] will be talking about Patterns, Principles and Practices in software development. I got to see Martin talk last year at a different venue, about testing and agile methods. He was a really good speaker, and had lots of interesting ideas and observations about software development. This talk looks like it's going to be good as well.. //Ed [1] http://www.uniforum.chi.il.us/meetings/pppswdev.html [2] http://www.amazon.com/exec/obidos/ASIN/0135974445 -- Principles, Patterns, & Practices -- A decade of progress Robert Martin Object Mentor Tuesday, November 25th 2003, 7:00-9:00pm Building SRC, Room 1450a Abstract Principles, Patterns, and Practices -- A decade of progress. Based upon the Jolt Award Winning book. The last ten years have seen remarkable progress in software development technology. This progress includes design principles, design patterns, and agile practices. This keynote summarizes and integrates these areas of progress, describes some of the accomplishments and failures, and then looks to what might be next. Speaker Bio Robert C. Martin (Uncle Bob) has been a software professional since 1970 and an international software consultant since 1990. He is founder and president of Object Mentor Inc., a team of experienced consultants who mentor their clients worldwide in the fields of C++, Java, OO, Patterns, UML, Agile Methodologies, and Extreme Programming. In 1995 Robert authored the best-selling book: Designing Object Oriented C++ Applications using the Booch Method, published by Prentice Hall. From 1996 to 1999 he was the editor-in-chief of the C++ Report. In 1997 he was chief editor of the book: Pattern Languages of Program Design 3, published by Addison Wesley. In 1999 he was the editor of "More C++ Gems" published by Cambridge Press. He is co-author, with James Newkirk, of "XP in Practice", Addision Wesley, 2001. In 2002 he wrote the long awaited "Agile Software Development: Principles, Patterns, and Practices", Prentice Hall, 2002. He has published many dozens of articles in various trade journals, and is a regular speaker at international conferences and trade shows. Getting to the meeting The next general meeting of UniForum Chicago will be from 7:00 pm to 9:00 pm on Tuesday, November 25th, 2003, at the College of DuPage, building SRC - room 1450a. College of DuPage Building SRC, Rm 1450a Fawell Boulevard and Lambert Rd. Glen Ellyn, IL 60137-6599 Take 355 to Butterfield Rd (Rt 56). Take Butterfield West to Lambert Rd, then Lambert Rd North to Circle Drive. Turn right and look for Lot P (fka Lot 8) or the Faculty/Staff parking lot (just north of Lot P). Walk to the SRC building, and enter through the south entryway. Room 1450 is on the first floor, accessable through the cafeteria by walking through it to the far north e nd. All UniForum Chicago general meetings are open to the public free of charge. Contact David Young at (630) 357-5963 or president@uniforum.chi.il.us for additional information. From Andy_Bach at wiwb.uscourts.gov Fri Nov 21 10:48:14 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Patterns, Principles and Practices In-Reply-To: <20031121162929.GA30514@ink.inkdroid.org> Message-ID: Thanks Ed. I'd actually composed a msg copied from the luni post on that, as it seems like the Uniforum stuff is generally useful even when not specifically perl-ish but chickened out as I'm not actually *in* chicago. But, could we ask them to include us on their general posting list? If that's okay w/ everyone else (we'll just take silence as a 'yes'). a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From shawn at owbn.org Fri Nov 21 11:28:12 2003 From: shawn at owbn.org (Shawn C Carroll) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Patterns, Principles and Practices In-Reply-To: References: <20031121162929.GA30514@ink.inkdroid.org> Message-ID: <22993.65.248.243.100.1069435692.squirrel@mail.owbn.org> How about a yes for announcements only? --shawn Andy_Bach@wiwb.uscourts.gov said: > Thanks Ed. > > I'd actually composed a msg copied from the luni post on that, as it seems > like the Uniforum stuff is generally useful even when not specifically > perl-ish but chickened out as I'm not actually *in* chicago. But, could > we ask them to include us on their general posting list? > > If that's okay w/ everyone else (we'll just take silence as a 'yes'). > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > "And do my eyes deceive me, or has Judsys at long last been mentioned by > name in an official Kremlin pronouncement?" unnamed humorist off list > (no offense) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- Shawn Carroll shawn@owbn.org Perl Programmer Soccer Referee From me at heyjay.com Sun Nov 23 17:57:12 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor Message-ID: <000a01c3b21d$856154d0$6405a8c0@a30> I'm using Class::Accessor (though why, I dunno, I'm overriding most every accessor and new). Normally inside the class code it's OK to access the blessed structure directly, like $self->{...} (if the bless thing happens to be a hash). But if I use something like Class::Accessor which creates an internal data structure for me (granted I know it's a hash, and it's keys are the names for the accessors), is it still OK to do $self->{...} in the code? I could see this being a problem if the maintainer of Class::Accessor decide to change the internal structure to something else, though I don't know how likely that is Jay From me at heyjay.com Sun Nov 23 18:07:24 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor References: <000a01c3b21d$856154d0$6405a8c0@a30> Message-ID: <001c01c3b21e$f1797de0$6405a8c0@a30> Oh, one last thing. though I'm not a speed freak, it does seem more sensible to do $self->{...}, than doing $self->accessory, while inside the class ----- Original Message ----- From: "Jay Strauss" To: "chicago-pm" Sent: Sunday, November 23, 2003 5:57 PM Subject: [Chicago-talk] A question of style: Class::Accessor > I'm using Class::Accessor (though why, I dunno, I'm overriding most every > accessor and new). Normally inside the class code it's OK to access the > blessed structure directly, like $self->{...} (if the bless thing happens to > be a hash). But if I use something like Class::Accessor which creates an > internal data structure for me (granted I know it's a hash, and it's keys > are the names for the accessors), is it still OK to do $self->{...} in the > code? > > I could see this being a problem if the maintainer of Class::Accessor decide > to change the internal structure to something else, though I don't know how > likely that is > > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From andy at petdance.com Sun Nov 23 19:51:18 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <001c01c3b21e$f1797de0$6405a8c0@a30> References: <000a01c3b21d$856154d0$6405a8c0@a30> <001c01c3b21e$f1797de0$6405a8c0@a30> Message-ID: > Oh, one last thing. though I'm not a speed freak, it does seem more > sensible to do $self->{...}, than doing $self->accessory, while inside > the > class Yeah, but I'm a big fan of eating one's own dog food. If you're publishing an API, then you should use it as well. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From me at heyjay.com Sun Nov 23 20:59:02 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor References: <000a01c3b21d$856154d0$6405a8c0@a30><001c01c3b21e$f1797de0$6405a8c0@a30> Message-ID: <001f01c3b237$0477eea0$6405a8c0@a30> > > Oh, one last thing. though I'm not a speed freak, it does seem more > > sensible to do $self->{...}, than doing $self->accessory, while inside > > the > > class > > Yeah, but I'm a big fan of eating one's own dog food. If you're > publishing an API, then you should use it as well. except, I'm still inside the class. I'd use the methods, from outside the class (i.e. my $obj = class->new(); $obj->method as opposed to: $obj->{attribute} From merlyn at stonehenge.com Sun Nov 23 21:07:09 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <001c01c3b21e$f1797de0$6405a8c0@a30> References: <000a01c3b21d$856154d0$6405a8c0@a30> <001c01c3b21e$f1797de0$6405a8c0@a30> Message-ID: <86n0am8nxk.fsf@blue.stonehenge.com> >>>>> "Jay" == Jay Strauss writes: Jay> Oh, one last thing. though I'm not a speed freak, it does seem more Jay> sensible to do $self->{...}, than doing $self->accessory, while inside the Jay> class Not if you want subclasses to be able to override that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From andy at petdance.com Sun Nov 23 21:09:59 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <001f01c3b237$0477eea0$6405a8c0@a30> References: <000a01c3b21d$856154d0$6405a8c0@a30><001c01c3b21e$f1797de0$6405a8c0@a30> <001f01c3b237$0477eea0$6405a8c0@a30> Message-ID: > except, I'm still inside the class. I'd use the methods, from outside > the > class I understand that you're still inside the class. I still strongly suggest that you use the accessors that you've provided. 1) What if you have $user->name() and inside the class you use $user->{name} but somewhere down the road you do some manipulation with $user->{name} inside $user->name()? Say you want it to return a proper-cased string? Now you're going to either replicate that code to proper-case the string, or you're going to go and change your $user->{name} to $user->name anyway. 2) If you use your accessor methods, then you're effectively testing them out. What if your accessor is broken somehow? You'll never know. 3) You're tying your code to the specific implementation of your object. Objects don't have to be hashes: Maybe you want to use an array, like in WWW::Mechanize::Link. 4) Maybe you want to change the internal naming convention. You shouldn't have to go retrofit your code to do so. There is only one reason to not use the accessor methods, and that's because for some reason you're microoptimizing your code for speed and you can't afford the function calls. If you've gone ahead and profiled your code, say, with Devel::DProf, and you know that calls to your accessors are causing a slowdown, and you've eliminated other sources of speedup, and you comment your code explaining WHY you're using the attributes directly, then sure, go ahead. Heck, accessors can even be clearer: $user->name vs. $user->{name}. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From andy at petdance.com Sun Nov 23 21:10:38 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <86n0am8nxk.fsf@blue.stonehenge.com> References: <000a01c3b21d$856154d0$6405a8c0@a30> <001c01c3b21e$f1797de0$6405a8c0@a30> <86n0am8nxk.fsf@blue.stonehenge.com> Message-ID: > Not if you want subclasses to be able to override that. Shoot! I missed that one! Add it to the list! xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From me at heyjay.com Sun Nov 23 23:12:32 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor References: <000a01c3b21d$856154d0$6405a8c0@a30><001c01c3b21e$f1797de0$6405a8c0@a30><001f01c3b237$0477eea0$6405a8c0@a30> Message-ID: <001501c3b249$91b79470$6405a8c0@a30> Ok, I'm convinced. Now I just have to rewrite. Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Sunday, November 23, 2003 9:09 PM Subject: Re: [Chicago-talk] A question of style: Class::Accessor > > except, I'm still inside the class. I'd use the methods, from outside > > the > > class > > I understand that you're still inside the class. I still strongly > suggest that you use the accessors that you've provided. > > 1) What if you have $user->name() and inside the class you use > $user->{name} but somewhere down the road you do some manipulation with > $user->{name} inside $user->name()? Say you want it to return a > proper-cased string? Now you're going to either replicate that code to > proper-case the string, or you're going to go and change your > $user->{name} to $user->name anyway. > > 2) If you use your accessor methods, then you're effectively testing > them out. What if your accessor is broken somehow? You'll never know. > > 3) You're tying your code to the specific implementation of your > object. Objects don't have to be hashes: Maybe you want to use an > array, like in WWW::Mechanize::Link. > > 4) Maybe you want to change the internal naming convention. You > shouldn't have to go retrofit your code to do so. > > There is only one reason to not use the accessor methods, and that's > because for some reason you're microoptimizing your code for speed and > you can't afford the function calls. If you've gone ahead and profiled > your code, say, with Devel::DProf, and you know that calls to your > accessors are causing a slowdown, and you've eliminated other sources > of speedup, and you comment your code explaining WHY you're using the > attributes directly, then sure, go ahead. > > Heck, accessors can even be clearer: $user->name vs. $user->{name}. > > xoa > > -- > Andy Lester > andy@petdance.com, AIM:petdance > http://petdance.com/ http://use.perl.org/~petdance/ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Mon Nov 24 00:24:54 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: References: <000a01c3b21d$856154d0$6405a8c0@a30> <001c01c3b21e$f1797de0$6405a8c0@a30> <001f01c3b237$0477eea0$6405a8c0@a30> Message-ID: <98020000.1069655094@[192.168.200.4]> > There is only one reason to not use the accessor methods, and that's > because for some reason you're microoptimizing your code for speed and > you can't afford the function calls. If you've gone ahead and profiled > your code, say, with Devel::DProf, and you know that calls to your > accessors are causing a slowdown, and you've eliminated other sources of > speedup, and you comment your code explaining WHY you're using the > attributes directly, then sure, go ahead. Other reason: you're inside the method itself and do not have sufficient stack for infinite recursion. At some point SOMEthing has to know what the internal format of the data is (even if it's only perlguts knowing how ->{key} works :-). Another reason is that you need to access functionality in the object not provided by the interface. In theory you could sit down and write an accessor for everything you need to perform on the referent, but at that point you may have simply re-written perl itself. Example is using "keys %$obj" to sanity check a list. By the time I've written $obj->keys to extract them it may be simpler to just use what Perl hath wrought and be done with it -- or use an external class to buid the objec out of in the first place. Aside: Perl does a rather nice job of caching method names, so there isn't all that much execution time savings unless you are in really, really tight loops. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jthomasoniii at yahoo.com Mon Nov 24 08:37:00 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <98020000.1069655094@[192.168.200.4]> Message-ID: <20031124143700.80888.qmail@web60203.mail.yahoo.com> > Other reason: you're inside the method itself and do > not > have sufficient stack for infinite recursion. At > some point > SOMEthing has to know what the internal format of > the data > is (even if it's only perlguts knowing how ->{key} > works :-). True, but ideally, you still want that internal structure to be defined and referenced in as few places as possible. Only times I've run out of space on the callstack is when I've got an error. > Another reason is that you need to access > functionality in > the object not provided by the interface. In theory > you could > sit down and write an accessor for everything you > need to > perform on the referent, but at that point you may > have > simply re-written perl itself. Example is using > "keys %$obj" > to sanity check a list. By the time I've written > $obj->keys > to extract them it may be simpler to just use what > Perl hath > wrought and be done with it -- or use an external > class to > buid the objec out of in the first place. I disagree. I mean, it's a major pain in the ass to have to write all of this stuff, but it's a necessary evil. Besides, things like $obj->keys could be easily done by sub keys { my $self = shift; return keys %$self; }; Sure, in that keys method you're referencing the internal hash structure, but you're still only referencing it in this one place, as opposed to every other location that you'd potentially do "keys %$obj". And heck, it's still perl. :) My preferred root class has a method "add_attr" that simply adds an attribute. So the start of a class has an add_attr call with an attribute, and that automagically creates the accessor/mutator. __PACKAGE__->add_attr('foo'); #I now have $obj->foo() and $obj->foo('new value'); Reduces a lot of the work, you get the benefits of encapsulation, and your attributes are pre-declared as well. Though, admittedly, something like ->keys would still be a special case. :*) -Jim....... __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ From me at heyjay.com Mon Nov 24 10:59:15 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Searching the archives Message-ID: <007d01c3b2ac$4ef1bbd0$6405a8c0@a30> Hi, Is there anyway to search the new archives? I mean from a web interface, not downloading the entire gzipped archives and grepping thru them. Jay From Andy_Bach at wiwb.uscourts.gov Mon Nov 24 13:16:11 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Searching the archives In-Reply-To: <007d01c3b2ac$4ef1bbd0$6405a8c0@a30> Message-ID: > Is there anyway to search the new archives? I mean from a web interface, not downloading the entire gzipped archives and grepping thru them. Google hack? a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "And do my eyes deceive me, or has Judsys at long last been mentioned by name in an official Kremlin pronouncement?" unnamed humorist off list (no offense) From lembark at wrkhors.com Mon Nov 24 13:34:41 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] A question of style: Class::Accessor In-Reply-To: <20031124143700.80888.qmail@web60203.mail.yahoo.com> References: <20031124143700.80888.qmail@web60203.mail.yahoo.com> Message-ID: <38040000.1069702480@[192.168.100.3]> -- Jim Thomason >> Other reason: you're inside the method itself and do >> not >> have sufficient stack for infinite recursion. At > > True, but ideally, you still want that internal > structure to be defined and referenced in as few > places as possible. Only times I've run out of space > on the callstack is when I've got an error. For example, the method sub foo { my $item = shift; if( ref $item && $item->foo eq 'bar' ) { ... } else { ... } } won't get all that much done for given referent. My only point was that at some point something will have to access the $item's internals via something like $item->{foo}, etc, and that micro-managing performance is not the only reason to access a data structure directly. > I disagree. I mean, it's a major pain in the ass to > have to write all of this stuff, but it's a necessary > evil. Besides, things like $obj->keys could be easily > done by > > sub keys { > my $self = shift; > return keys %$self; > }; > Sure, in that keys method you're referencing the > internal hash structure, but you're still only > referencing it in this one place, as opposed to every > other location that you'd potentially do "keys %$obj". > > And heck, it's still perl. :) My preferred root class > has a method "add_attr" that simply adds an attribute. > So the start of a class has an add_attr call with an > attribute, and that automagically creates the > accessor/mutator. > > __PACKAGE__->add_attr('foo'); ># I now have $obj->foo() and $obj->foo('new value'); > > Reduces a lot of the work, you get the benefits of > encapsulation, and your attributes are pre-declared as > well. > > Though, admittedly, something like ->keys would still > be a special case. :*) Which is why I suggested using a standard class-generator for the object. The problem is that by the time you're done re-writing keys, all of the named elements, read, write, iterators, string interpolation, numeric to string conversion, string to numeric conversion, boolean to string conversion, string to boolean conversion, existential and defined operators... the resulting bulk is more work to manage than a few isolated cases of %$item. Now nest it a few [dozen] times. And try to debug why it acts flakey one time in 20 :-) Jay was originally using a class-class to handle the accessors, which does make sense if it supports the level of performance he needs. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From andy at petdance.com Mon Nov 24 15:10:21 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Searching the archives In-Reply-To: <007d01c3b2ac$4ef1bbd0$6405a8c0@a30> References: <007d01c3b2ac$4ef1bbd0$6405a8c0@a30> Message-ID: <20031124211021.GB20317@petdance.com> > Is there anyway to search the new archives? I mean from a web interface, > not downloading the entire gzipped archives and grepping thru them. You mean keyword searching the bodies? No. I'm going to submit the page to Google and let's see if they index it for us. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Mon Nov 24 21:50:35 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Searching the archives References: <007d01c3b2ac$4ef1bbd0$6405a8c0@a30> <20031124211021.GB20317@petdance.com> Message-ID: <009801c3b30a$26ea73d0$6405a8c0@a30> That would be nice Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Monday, November 24, 2003 3:10 PM Subject: Re: [Chicago-talk] Searching the archives > > Is there anyway to search the new archives? I mean from a web interface, > > not downloading the entire gzipped archives and grepping thru them. > > You mean keyword searching the bodies? No. > > I'm going to submit the page to Google and let's see if they index it > for us. > > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From bernieleung at mesatech.com Mon Nov 24 21:49:31 2003 From: bernieleung at mesatech.com (Bernie Leung) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work Message-ID: <13232668.1069732171515.JavaMail.Administrator@homer> An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20031124/b698e2bc/attachment.htm From me at heyjay.com Mon Nov 24 23:11:58 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work References: <13232668.1069732171515.JavaMail.Administrator@homer> Message-ID: <010801c3b312$a88e57f0$6405a8c0@a30> Doesn't > /^([^\s]+):(.*)$/ Say: starting at the beginning of the string, capture one or more non-whitespace followed by a colon. which doesn't match anything (because of the whitespace between RCPT and FROM $_ = "RCPT FROM: bernie@mesatech.com"; $_ =~ m/^(.*):\s+(.*)$/; print $1,"\n"; print $2,"\n"; works but is a little reckless. Isn't there some module with a bunch of predefined regexen for parsing mail? Jay From mike at oobak.org Tue Nov 25 01:08:29 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work In-Reply-To: <13232668.1069732171515.JavaMail.Administrator@homer> References: <13232668.1069732171515.JavaMail.Administrator@homer> Message-ID: <1069744109.16587.7.camel@rythm.oobak.org> Bernie, I'm surprised this ever worked, because the pattern will fail as soon as it hits the space between RCPT and FROM. Try this, my ($field, $value) = /^([^:]+): (.*)$/; Or better yet, my ($field, $value) = split ': '; >From what I understand about mail headers, you can always depend on that colon-space to be in the right place. -- Mike Pastore mike@oobak.org On Mon, 2003-11-24 at 21:49, Bernie Leung wrote: > I have a strange Perl problem that I thought PM's can help. I have the > following PERL script that is acting strange (actually not working at > all) on Linux Perl5 (version 8 subversion 0), but is OK in Windows > Perl5 (version 8, suversion 1). > > /^([^\s]+):(.*)$/ > > This is supposed to parse from $_ a line like > > RCPT FROM: bernie@mesatech.com > > and spit out RCPT FROM: as $1 bernie@mesatech.com as $2. This is > used throughout qmail-sanner-queue.pl which uses /usr/perl/suidperl. > > It all seemed to have started happening Nov 16 (Sunday). > When suddenly it stopped working. I know, nothing stops all of a > sudden by itself. But I surely can't find the answer. Does anyone have > any idea what is going on? Thanks for your help. > > > Bernie Leung > > > ______________________________________________________________________ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From mike at oobak.org Tue Nov 25 01:14:47 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work In-Reply-To: <1069744109.16587.7.camel@rythm.oobak.org> References: <13232668.1069732171515.JavaMail.Administrator@homer> <1069744109.16587.7.camel@rythm.oobak.org> Message-ID: <1069744486.16666.1.camel@rythm.oobak.org> On second thought, stick with the regex. :-) Don't use split. Date: Tue, 25 Nov 2003 01:08:29 -0600 This would fail. On Tue, 2003-11-25 at 01:08, Mike Pastore wrote: > Bernie, > > I'm surprised this ever worked, because the pattern will fail as soon as > it hits the space between RCPT and FROM. Try this, > > my ($field, $value) = /^([^:]+): (.*)$/; > > Or better yet, > > my ($field, $value) = split ': '; > > >From what I understand about mail headers, you can always depend on that > colon-space to be in the right place. > > -- > Mike Pastore > mike@oobak.org > > On Mon, 2003-11-24 at 21:49, Bernie Leung wrote: > > I have a strange Perl problem that I thought PM's can help. I have the > > following PERL script that is acting strange (actually not working at > > all) on Linux Perl5 (version 8 subversion 0), but is OK in Windows > > Perl5 (version 8, suversion 1). > > > > /^([^\s]+):(.*)$/ > > > > This is supposed to parse from $_ a line like > > > > RCPT FROM: bernie@mesatech.com > > > > and spit out RCPT FROM: as $1 bernie@mesatech.com as $2. This is > > used throughout qmail-sanner-queue.pl which uses /usr/perl/suidperl. > > > > It all seemed to have started happening Nov 16 (Sunday). > > When suddenly it stopped working. I know, nothing stops all of a > > sudden by itself. But I surely can't find the answer. Does anyone have > > any idea what is going on? Thanks for your help. > > > > > > Bernie Leung > > > > > > ______________________________________________________________________ > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From me at heyjay.com Tue Nov 25 07:17:36 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list Message-ID: <004d01c3b356$7f5397d0$6405a8c0@a30> Hi, I'm not sure how best to explain what I want to do. the code below does what I want, but it seems needlessly complicated. I figure there is probably a nice clean way to do this is less steps but I don't see it: Essentially, I have a list of all the fields "@all", and I want to produce a list of only the fields I'm interested in, and their position in the original list my @all = wq/this that other some junk trash need/; my %all; my @all{@all} = (0..$#all); my @interesting = qw/this that need/; my %interesting; @interesting{@interesting} = delete @all{@interesting}; thanks Jay From hachi at kuiki.net Tue Nov 25 08:47:39 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] POE was Java API/Perl revisited In-Reply-To: <20031116170226.GB30622@ink.inkdroid.org> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net> <016c01c3ac61$8332de20$6405a8c0@a30> <20031116170226.GB30622@ink.inkdroid.org> Message-ID: <3FC36B8B.3000401@kuiki.net> Ed Summers wrote: > hachi: > > >>You could use POE ( http://poe.perl.org ) or fork and use IPC, or you >>could write your own non-blocking IO code. Stem** ( >>http://www.stemsystems.com ) is possible too. It all depends on what >>this socket is doing, and what the main program is doing. > > > I think a talk about POE at one of our tech meetings would be *really* cool. > Would you be willing to do it? I know you've done some practical work with > POE and I think it could be interesting to a lot of folks. > > If you can get away from work, can we pencil you in? If the drive to/from WI > proved to be too much, I'd be willing to pitch in a few bucks to help you > get a hotel room down in Vernon Hills. > > //Ed Whoah, suddenly had a moment where I realized "you never answered on Chicago.pm" So, after thinking for a while, and then forgetting for a couple weeks, I'll agree to do a POE talk (unless I shot my opportunity.) On the upside of things you aren't asking me to give a talk on fast turnaround, or customer service ;) --Jonathan From ehs at pobox.com Tue Nov 25 09:25:13 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] POE was Java API/Perl revisited In-Reply-To: <3FC36B8B.3000401@kuiki.net> References: <001201c3aa00$7fb77fc0$6405a8c0@a30> <3FB3AEB6.2020908@kuiki.net> <016c01c3ac61$8332de20$6405a8c0@a30> <20031116170226.GB30622@ink.inkdroid.org> <3FC36B8B.3000401@kuiki.net> Message-ID: <20031125152513.GA29362@ink.inkdroid.org> On Tue, Nov 25, 2003 at 08:47:39AM -0600, Jonathan Steinert wrote: > So, after thinking for a while, and then forgetting for a couple weeks, > I'll agree to do a POE talk (unless I shot my opportunity.) On the > upside of things you aren't asking me to give a talk on fast turnaround, > or customer service ;) Excellent, can we slot you in for January? //Ed From mike at oobak.org Tue Nov 25 09:59:56 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list In-Reply-To: <004d01c3b356$7f5397d0$6405a8c0@a30> References: <004d01c3b356$7f5397d0$6405a8c0@a30> Message-ID: <1069775995.16954.62.camel@rythm.oobak.org> Jay, After playing around with it for a bit, I think your way is best if you want to keep separate %all and %interesting maps. But if you don't mind modifying the original list, here's an alternative method: my @all = qw/this that other some junk trash need/; my @interesting = qw/this that need/; my %search = map { $_ => 1 } @interesting; for(my $i = $#all; $i >= 0; $i--) { splice @all, $i, not exists $search{$all[$i]}; } Overall, I think your way is best. -- Mike Pastore mike@oobak.org On Tue, 2003-11-25 at 07:17, Jay Strauss wrote: > Hi, > > I'm not sure how best to explain what I want to do. the code below does > what I want, but it seems needlessly complicated. I figure there is > probably a nice clean way to do this is less steps but I don't see it: > > Essentially, I have a list of all the fields "@all", and I want to produce a > list of only the fields I'm interested in, and their position in the > original list > > my @all = wq/this that other some junk trash need/; > my %all; > my @all{@all} = (0..$#all); > > my @interesting = qw/this that need/; > my %interesting; > @interesting{@interesting} = delete @all{@interesting}; > > thanks > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Tue Nov 25 10:12:09 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work In-Reply-To: <13232668.1069732171515.JavaMail.Administrator@homer> References: <13232668.1069732171515.JavaMail.Administrator@homer> Message-ID: <98690000.1069776729@[192.168.100.3]> -- Bernie Leung > > I have a strange Perl problem that I thought PM's can help. I have the > following PERL script that is acting strange (actually not working at > all) on Linux Perl5 (version 8 subversion 0), but is OK in Windows Perl5 > (version 8, suversion 1). > > /^([^\s]+):(.*)$/ > > This is supposed to parse from $_ a line like > > RCPT FROM: bernie@mesatech.com If all you really want to do is split the line in two on the first ':' boundry why not just use split? For example: my( $header, $value ) = split /:/, $_, 2; -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Nov 25 10:18:05 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Need help on a parsing that used to work In-Reply-To: <13232668.1069732171515.JavaMail.Administrator@homer> References: <13232668.1069732171515.JavaMail.Administrator@homer> Message-ID: <100010000.1069777085@[192.168.100.3]> > RCPT FROM: bernie@mesatech.com If you're really addicted to regexen try looking for the shortest match up to a colon: my ($header, $value ) = m{^(.+?):\s*(.+)} If I remember RFC822 headers properly the "\s*" can be changed to "\s+" since there is supposed to be some space after the colon. You can also eliminate the space via my( $header, $value ) = split /:\s*/, $_, 2; DB<1> $a = 'this is a test: it is only a test, do not be alarmed' DB<2> x split /:\s+/, $a, 2; 0 'this is a test' 1 'it is only a test, do not be alarmed' Any time this doesn't work you can try it in the Perl debugger. The original version probably worked for the fairly large number of headers that are single words (e.g., from:, to:) and you never noticed that it fails for headers with ws in their names. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Nov 25 10:22:27 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list In-Reply-To: <004d01c3b356$7f5397d0$6405a8c0@a30> References: <004d01c3b356$7f5397d0$6405a8c0@a30> Message-ID: <101290000.1069777347@[192.168.100.3]> -- Jay Strauss > Hi, > > I'm not sure how best to explain what I want to do. the code below does > what I want, but it seems needlessly complicated. I figure there is > probably a nice clean way to do this is less steps but I don't see it: > > Essentially, I have a list of all the fields "@all", and I want to > produce a list of only the fields I'm interested in, and their position > in the original list > > my @all = wq/this that other some junk trash need/; > my %all; > my @all{@all} = (0..$#all); > > my @interesting = qw/this that need/; > my %interesting; > @interesting{@interesting} = delete @all{@interesting}; Convert the header to a hash of name => offset and slice the hash for the list of offsets that matter to you: my @interesting = qw( what you knead ); my @header = qw( what you get ); my %fieldz = map { $header[$_] => $_ } ( 0..$#header ); my @offsetz = grep { defined } @fieldz{@interesting}; Nice thing about this approach is that you can easily change the order that between @header and @offsetz. This gives you a buffer between input field ordering since you can always get the header fields out in order by name. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Nov 25 14:00:10 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Freed from the tyrany of /usr/share/lib! Message-ID: <145540000.1069790410@[192.168.100.3]> Well, at least your perl modules are :-) They can now live anywere above $FindBin::Bin -- via dir's or symlinks -- and you can find them all with a single "use FindBin::libs". It also slices, dices, etc. One nice use of this is getting current modules into a sandbox for regression testing, another is simply having your modules available via a common symlink in folks' sandboxes. Current project uses it for finding metadata files via the export option. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From walter at torres.ws Tue Nov 25 15:34:18 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:54 2004 Subject: [Chicago-talk] Dec Tech mtg... Message-ID: Are we having one? Is it Dec 1 or Dec 2? Thanks Walter From andy at petdance.com Tue Nov 25 16:17:48 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: References: Message-ID: <20031125221748.GB26760@petdance.com> > Are we having one? > > Is it Dec 1 or Dec 2? Tech meetings are the first Tuesday of the month at 7pm unless otherwise noted in big bold letters. Steven Lembark will be discussing the Perl debugger. http://chicago.pm.org/meetings/ should always have the latest & greatest info. It did say Dec 9th, not the 2nd, until just now. Ooops. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From walter at torres.ws Tue Nov 25 18:26:04 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <20031125221748.GB26760@petdance.com> Message-ID: Thanks! Walter > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester > Sent: Tuesday, November 25, 2003 4:18 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Dec Tech mtg... > > > > Are we having one? > > > > Is it Dec 1 or Dec 2? > > Tech meetings are the first Tuesday of the month at 7pm unless otherwise > noted in big bold letters. > > Steven Lembark will be discussing the Perl debugger. > > http://chicago.pm.org/meetings/ should always have the latest & greatest > info. It did say Dec 9th, not the 2nd, until just now. Ooops. > > xoa > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From me at heyjay.com Tue Nov 25 21:31:18 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list References: <004d01c3b356$7f5397d0$6405a8c0@a30> <101290000.1069777347@[192.168.100.3]> Message-ID: <014c01c3b3ce$5b820b70$6405a8c0@a30> That's not really what I want though. your way, I end up with a hash with everything, and an array that tells me the offsets in my original array. But I want a hash with only the stuff I think is interesting Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Tuesday, November 25, 2003 10:22 AM Subject: Re: [Chicago-talk] Limiting a hash, or producing an interesting list > > > -- Jay Strauss > > > Hi, > > > > I'm not sure how best to explain what I want to do. the code below does > > what I want, but it seems needlessly complicated. I figure there is > > probably a nice clean way to do this is less steps but I don't see it: > > > > Essentially, I have a list of all the fields "@all", and I want to > > produce a list of only the fields I'm interested in, and their position > > in the original list > > > > my @all = wq/this that other some junk trash need/; > > my %all; > > my @all{@all} = (0..$#all); > > > > my @interesting = qw/this that need/; > > my %interesting; > > @interesting{@interesting} = delete @all{@interesting}; > > Convert the header to a hash of name => offset and slice > the hash for the list of offsets that matter to you: > > my @interesting = qw( what you knead ); > > my @header = qw( what you get ); > > my %fieldz = map { $header[$_] => $_ } ( 0..$#header ); > > my @offsetz = grep { defined } @fieldz{@interesting}; > > Nice thing about this approach is that you can easily change > the order that between @header and @offsetz. This gives you > a buffer between input field ordering since you can always > get the header fields out in order by name. > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Tue Nov 25 23:28:10 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list In-Reply-To: <014c01c3b3ce$5b820b70$6405a8c0@a30> References: <004d01c3b356$7f5397d0$6405a8c0@a30> <101290000.1069777347@[192.168.100.3]> <014c01c3b3ce$5b820b70$6405a8c0@a30> Message-ID: <1373000000.1069824490@[192.168.200.4]> -- Jay Strauss > That's not really what I want though. > > your way, I end up with a hash with everything, and an array that tells me > the offsets in my original array. > > But I want a hash with only the stuff I think is interesting ok, assign the slice to a hash instead of an array: my %foo = (); @foo{@knead} = @input{@offsetz}; Learn to think in terms of lists rather than "variables", it's one of the more powerful attributes of Perl -- and perhaps the only reason LISP has survived this long. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Nov 25 23:32:33 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <20031125221748.GB26760@petdance.com> References: <20031125221748.GB26760@petdance.com> Message-ID: <1377140000.1069824753@[192.168.200.4]> > Steven Lembark will be discussing the Perl debugger. General questions: - For people who use the deubber (or ptkdb): what are the things use use most? Why? How? - For people who don't: why not? What would you want to know in order to use it? My own uses are testing constructs before actually committing them to code and finding out why my stream-of-semiconsiousness code blew up on me :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From merlyn at stonehenge.com Wed Nov 26 01:47:09 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <1377140000.1069824753@[192.168.200.4]> References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> Message-ID: <868ym3tvut.fsf@blue.stonehenge.com> >>>>> "Steven" == Steven Lembark writes: Steven> - For people who don't: why not? What would you want to Steven> know in order to use it? I try not to put bugs in in the first place. When I code, I write a few lines, and run it. I write a few more lines, and run that. If anything ever breaks, it's in the last few lines I added. If I need to "debug" anything, I just keep adding print until it works. Sometimes, I use Data::Dumper or YAML. For larger things, I've been using "test-first" methodology. Still no need to ever go more than a few lines of code before running the tests again though. But a debugger? Wouldn't know how to use it. Wouldn't care for one. Don't really understand those who need them, either. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From andy at petdance.com Wed Nov 26 08:05:26 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <1377140000.1069824753@[192.168.200.4]> References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> Message-ID: <95FB8A48-2019-11D8-B581-000393BFA5FA@petdance.com> I think an overview of how it works would be swell, but then I'm interested in the magic world of breakpoints. Setting breakpoints for various conditions has always baffled me. Also, handling debugging in multiple files has always been confusing for me, too. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From ehs at pobox.com Wed Nov 26 08:29:34 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <868ym3tvut.fsf@blue.stonehenge.com> References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> <868ym3tvut.fsf@blue.stonehenge.com> Message-ID: <20031126142934.GA3156@ink.inkdroid.org> On Tue, Nov 25, 2003 at 11:47:06PM -0800, Randal L. Schwartz wrote: > But a debugger? Wouldn't know how to use it. Wouldn't care for one. > Don't really understand those who need them, either. Well, you're not coming to the meeting anyway so we don't care ;) Would be cool if you could make one sometime though and talk about something you *do* like. //Ed From me at heyjay.com Wed Nov 26 09:35:07 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list References: <004d01c3b356$7f5397d0$6405a8c0@a30><101290000.1069777347@[192.168.100.3]><014c01c3b3ce$5b820b70$6405a8c0@a30> <1373000000.1069824490@[192.168.200.4]> Message-ID: <008701c3b432$e48df960$6405a8c0@a30> I think my way: my @heading = someFunc(); my (%all,%offset); my @interesting = qw/symbol expiration strike/; @all{@heading} = (0..$#heading); @offset{@interesting} = delete @all{@interesting}; is better than your way: my @interesting = qw( what you knead ); my @header = qw( what you get ); my %fieldz = map { $header[$_] => $_ } ( 0..$#header ); my @offsetz = grep { defined } @fieldz{@interesting}; my %foo = (); @foo{@knead} = @input{@offsetz}; so there. Ps, How did you arrive at the conclusion I'm thinking in variables? Take a look at my original post. Its all about lists Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Tuesday, November 25, 2003 11:28 PM Subject: Re: [Chicago-talk] Limiting a hash, or producing an interesting list > > > -- Jay Strauss > > > That's not really what I want though. > > > > your way, I end up with a hash with everything, and an array that tells me > > the offsets in my original array. > > > > But I want a hash with only the stuff I think is interesting > > ok, assign the slice to a hash instead of an array: > > my %foo = (); > > @foo{@knead} = @input{@offsetz}; > > Learn to think in terms of lists rather than "variables", > it's one of the more powerful attributes of Perl -- and > perhaps the only reason LISP has survived this long. > > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From Andy_Bach at wiwb.uscourts.gov Wed Nov 26 09:50:31 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <1377140000.1069824753@[192.168.200.4]> Message-ID: I'd love to be more fluent in -d, but ... I have trouble/don't understand setting break points, changing the step (sometimes I want to step through the subs, sometimes not during the same session) getting partial var listings and values. Can you back up? clean restarting? Alter values? okay, so I'm -d clueless, I usually, in desparation, start it, hit 's' single step through every dang line until I hit the trouble spot 'p' print the vars I'm befuddled about, quit and restart a few times between code changes (w/ all the subsequent steppings) and the be done w/ it, once I see the problem. To be honest, I've not been in the debugger in probably a year, due in part to the code I work w/ most often, but also because the above cycle is tiresome, so I just build in my own debug (and try to write better code ;-). a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 The division that includes Windows posted an operating profit of $2.26 billion on revenue of $2.81 billion. --from Reuters via http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html So that's profit of over 400% of investment... with a bit more investment in Windows technology, particularly in the area of reliability, the profit percentage might go down, but so might the bugs and security problems? Seems like it would be a reasonable tradeoff. WalMart earnings are 3.4% of investment." G. Linderman From lembark at wrkhors.com Wed Nov 26 12:38:26 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Limiting a hash, or producing an interesting list In-Reply-To: <008701c3b432$e48df960$6405a8c0@a30> References: <004d01c3b356$7f5397d0$6405a8c0@a30> <101290000.1069777347@[192.168.100.3]><014c01c3b3ce$5b820b70$6405a8c0@a30> <1373000000.1069824490@[192.168.200.4]> <008701c3b432$e48df960$6405a8c0@a30> Message-ID: <1545800000.1069871906@[192.168.100.3]> -- Jay Strauss > I think my way: > > my @heading = someFunc(); > my (%all,%offset); > my @interesting = qw/symbol expiration strike/; > @all{@heading} = (0..$#heading); > @offset{@interesting} = delete @all{@interesting}; > > is better than your way: > > my @interesting = qw( what you knead ); > my @header = qw( what you get ); > my %fieldz = map { $header[$_] => $_ } ( 0..$#header ); > my @offsetz = grep { defined } @fieldz{@interesting}; > my %foo = (); > @foo{@knead} = @input{@offsetz}; Why go to the effort of deleting the items from @all? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Aaron.Young at citadelgroup.com Wed Nov 26 13:13:02 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861EE3E@CORPEMAIL.citadelgroup.com> another thing that might be useful in the debugger is how to extend it to do some things that it cannot currently do this might be out of the scope of your presentation, but some other command line debuggers have a way of remembering the command line passed in, how could this be emulated in the perl debugger, or added on? Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Andy_Bach@wiwb.uscourts.gov > [mailto:Andy_Bach@wiwb.uscourts.gov] > Sent: Wednesday, November 26, 2003 9:51 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Dec Tech mtg... > > > I'd love to be more fluent in -d, but ... I have > trouble/don't understand > setting break points, changing the step (sometimes I want to > step through > the subs, sometimes not during the same session) getting partial var > listings and values. Can you back up? clean restarting? > Alter values? > > okay, so I'm -d clueless, I usually, in desparation, start > it, hit 's' > single step through every dang line until I hit the trouble > spot 'p' print > the vars I'm befuddled about, quit and restart a few times > between code > changes (w/ all the subsequent steppings) and the be done w/ > it, once I > see the problem. To be honest, I've not been in the debugger > in probably > a year, due in part to the code I work w/ most often, but > also because the > above cycle is tiresome, so I just build in my own debug (and > try to write > better code ;-). > > a > > Andy Bach, Sys. Mangler > Internet: andy_bach@wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5030 > > > The division that includes Windows posted an operating > profit of $2.26 > billion on revenue of $2.81 billion. > --from Reuters via > http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html > > So that's profit of over 400% of investment... with a bit > more investment > in Windows technology, particularly in the area of > reliability, the profit > percentage might go down, but so might the bugs and security > problems? > Seems like it would be a reasonable tradeoff. WalMart > earnings are 3.4% of > investment." G. Linderman > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From shild at sbcglobal.net Wed Nov 26 17:04:34 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <1377140000.1069824753@[192.168.200.4]> Message-ID: Use it all the time. I use perl -d -e0 quite a bit. I use to test something as I am coding or to demonstrate for someone how something works. Although I like using ddd or xgdb, I pefer the command line over using a qui for perl. I don't understand how someone would prefer print statements over the debugger. I like that fact that I can load modules while debugging, such as Data::Dumper, or print/dump variables without adding extra code. With debugger it is easier to step into a CPAN module that may not behaving correctly. I have found bugs that way and emailed a patch to the author. I do think that using a log4perl, where the logging level can be set, is good for production code. In conclusion, I find the debugger an valuable tool. :-) On 26-Nov-2003 Steven Lembark wrote: > >> Steven Lembark will be discussing the Perl debugger. > > General questions: > > - For people who use the deubber (or ptkdb): what are > the things use use most? Why? How? > > - For people who don't: why not? What would you want to > know in order to use it? > > > My own uses are testing constructs before actually > committing them to code and finding out why my > stream-of-semiconsiousness code blew up on me :-) > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 26-Nov-2003 Time: 16:43:20 ---------------------------------- From shild at sbcglobal.net Wed Nov 26 17:14:58 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: Message-ID: On 26-Nov-2003 Scott T. Hildreth wrote: > > Use it all the time. I use perl -d -e0 quite a bit. > I use to test something as I am coding or to demonstrate for > someone how something works. Although I like using ddd or > xgdb, I pefer the command line over using a qui for perl. > I don't understand how someone would prefer print statements > over the debugger. I like that fact that I can load modules > while debugging, such as Data::Dumper, or print/dump variables > without adding extra code. With debugger it is easier to step > into a CPAN module that may not behaving correctly. I have > found bugs that way and emailed a patch to the author. I do > think that using a log4perl, where the logging level can be > set, is good for production code. In conclusion, I find the > debugger an valuable tool. :-) > ..whoops, 'a valuable', not 'an valuable'. > On 26-Nov-2003 Steven Lembark wrote: >> >>> Steven Lembark will be discussing the Perl debugger. >> >> General questions: >> >> - For people who use the deubber (or ptkdb): what are >> the things use use most? Why? How? >> >> - For people who don't: why not? What would you want to >> know in order to use it? >> >> >> My own uses are testing constructs before actually >> committing them to code and finding out why my >> stream-of-semiconsiousness code blew up on me :-) >> >> -- >> Steven Lembark 2930 W. Palmer >> Workhorse Computing Chicago, IL 60647 >> +1 888 359 3508 >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > > ---------------------------------- > E-Mail: Scott T. Hildreth > Date: 26-Nov-2003 > Time: 16:43:20 > ---------------------------------- > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 26-Nov-2003 Time: 17:12:49 ---------------------------------- From shild at sbcglobal.net Wed Nov 26 17:30:48 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <868ym3tvut.fsf@blue.stonehenge.com> Message-ID: If you make back this way, I would encourage you to give a talk on Perl6 again. I really enjoyed that one. On 26-Nov-2003 Randal L. Schwartz wrote: >>>>>> "Steven" == Steven Lembark writes: > > Steven> - For people who don't: why not? What would you want to > Steven> know in order to use it? > > I try not to put bugs in in the first place. > > When I code, I write a few lines, and run it. I write a few more > lines, and run that. If anything ever breaks, it's in the last few > lines I added. > > If I need to "debug" anything, I just keep adding print until it works. > Sometimes, I use Data::Dumper or YAML. > > For larger things, I've been using "test-first" methodology. Still no > need to ever go more than a few lines of code before running the tests > again though. > > But a debugger? Wouldn't know how to use it. Wouldn't care for one. > Don't really understand those who need them, either. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 26-Nov-2003 Time: 17:29:05 ---------------------------------- From me at heyjay.com Thu Nov 27 14:02:06 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Class::Accessor Revisited Message-ID: <001501c3b522$d9fb33a0$6405a8c0@a30> If I don't monkey with the internal structure like: $self->{key} = 'blah'; How do I do stuff like: sub last { my $self = shift; $self->quote unless $self->{last}; return $self->{last}; } that is if I want to do something in the accessor if the value hasn't been defined yet? Or are you saying it's ok as long as I'm in the accessor, but don't do it outside the accessor? Thanks Jay From andy at petdance.com Thu Nov 27 19:46:42 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Class::Accessor Revisited In-Reply-To: <001501c3b522$d9fb33a0$6405a8c0@a30> References: <001501c3b522$d9fb33a0$6405a8c0@a30> Message-ID: > that is if I want to do something in the accessor if the value hasn't > been > defined yet? Or are you saying it's ok as long as I'm in the > accessor, but > don't do it outside the accessor? That's a short version. Certianly, if you need to, then go ahead and violate the rule. Plus, in the accessor is safe to do. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From frag at ripco.com Fri Nov 28 02:29:40 2003 From: frag at ripco.com (Mike Fragassi) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <1377140000.1069824753@[192.168.200.4]> References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> Message-ID: On Tue, 25 Nov 2003, Steven Lembark wrote: > - For people who don't: why not? What would you want to > know in order to use it? Here's the thing that gets me...using the debugger on CGI scripts, in concert with using WWW::Mechanize test scripts. I've resigned myself to just printing Data::Dumper::Dumper($foo) all over my error_log, but that's ugly as all hell; I assume that I'm Missing Something Obvious. -- Mike F. From lembark at wrkhors.com Fri Nov 28 14:59:30 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Class::Accessor Revisited In-Reply-To: <001501c3b522$d9fb33a0$6405a8c0@a30> References: <001501c3b522$d9fb33a0$6405a8c0@a30> Message-ID: <3232920000.1070053170@[192.168.200.4]> -- Jay Strauss > If I don't monkey with the internal structure like: $self->{key} = 'blah'; > How do I do stuff like: > > sub last { > my $self = shift; > $self->quote unless $self->{last}; > return $self->{last}; > } > > that is if I want to do something in the accessor if the value hasn't been > defined yet? Or are you saying it's ok as long as I'm in the accessor, > but don't do it outside the accessor? One way to look at it: the whole point of an accessor -- or mutator method for that matter -- is to encapsulate the attribute being read/mangled. The method itself uses what it knows about the data structure (say that the object is a hash referent and uses the name "last" as a key) to manage the data; outside the method all that should be known is the method itself and its calling semantics. Aside: you might want to modify the method above to ensure that it is passed an object and die with a more informative message if called improperly. For example adding an "or die, missing object" could save a lot of debugging. If the quote method returns whatever it manipulates then the item above could be written: sub last { # grab whatever it is and make sure its both true and # a referent. using "$self->isa( __PACKAGE__ )" every # time through gets expensive, however. my $item = shift or croak "Bogus last: no arguments"; ref $item or croak "Bougs last: requires an object"; # at this point it's likely you at least have an # object. if object has a "last" entry then return # it, otherwise pass the request off to the quote # method and hand back whatever it comes up with. $item->{last} or $item->quote } the quote method would then be written to handle quoting, whatever that does. The only problem here is that you may get into the situation where the quote method has to know about a last entry unless last takes an extra argument to act as an initializer. If you REALLY want to encapsulate last then the method might look like: sub last { my $item = shift; ref $item or croak "Bogus last: requires an object"; if( @_ ) { # this assumes that last items can be overwritten. # if not then use $item->{last} ||= shift -- which # hands back the unmolested current value or just # croak "Cannot overwrite $item->{last} with $_[0]" # if $item->{last}; print "Overwriting: $item->{last} with $_[0]" if $verbose && $item->{last}; # caller gets back the current last value in any case. $item->{last} = shift } else { # hand back the last entry or whatever quote thinks # is appropriate. $item->{last} || $item->quote } } With this setup $item->quote can call $item->last( $new_last_value ) to set the new value in $item->{last} without having to know where/how the value is stored and updated. This puts all knowlege of the "last" value within the last method. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Nov 28 15:22:42 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861EE3E@CORPEMAIL.citadelgroup.com> References: <800BCF60D1553144BABCBFCE36249D3D0861EE3E@CORPEMAIL.citadelgroup .com> Message-ID: <3243920000.1070054562@[192.168.200.4]> -- "Young, Aaron" > another thing that might be useful in the debugger is how to extend it > to do some things that it cannot currently do > > this might be out of the scope of your presentation, but some other > command line debuggers have a way of remembering the command line passed > in, how could this be emulated in the perl debugger, or added on? $ perl -d foo --bar --bletch=blort; DB<1> @a = @ARGV ... DB<99> @ARGV = @a; I'm currently on 5.8.2, and the R (restart) operator resets @ARGV for itself: $ perl -d hak --foo --bar=foo /bin/ls DB<1> x @ARGV 0 '--foo' 1 '--bar=foo' 2 '/bin/ls' DB<2> c ... Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. DB<2> x @ARGV 0 '/bin/ls' DB<4> R DB<2> x @ARGV 0 '--foo' 1 '--bar=foo' 2 '/bin/ls' Blanking @ARGV in the debugger doesn't cause problems for the restart either: DB<8> @ARGV = () DB<9> R Warning: some settings and command-line options may be lost! Loading DB routines from perl5db.pl version 1.22 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(hak:3): our @argv = @ARGV unless @argv; DB<8> x @ARGV 0 '--foo' 1 '--bar=foo' 2 '/bin/ls' Net result is that running the thing once then using "R" does a restart with @ARGV populated with the original values. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Nov 28 15:40:44 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> Message-ID: <3252750000.1070055643@[192.168.200.4]> -- Mike Fragassi > > On Tue, 25 Nov 2003, Steven Lembark wrote: > >> - For people who don't: why not? What would you want to >> know in order to use it? > > Here's the thing that gets me...using the debugger on CGI scripts, > in concert with using WWW::Mechanize test scripts. > > I've resigned myself to just printing Data::Dumper::Dumper($foo) all over > my error_log, but that's ugly as all hell; I assume that I'm Missing > Something Obvious. You can set actions for the same lines in the debugger, saves you from having to modify the code in order to get the output. If you want to debug the stuff w/in Apache there is a perl debugger for mod_perl that can be used to watch the CGI code being processed. You could also debug the CGI from the command line. There are wrapper's that will set the appropriate environment var's and open up stdin for the CGI. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508