From eric at uc.org Wed Mar 14 18:57:06 2007 From: eric at uc.org (Eric) Date: Wed, 14 Mar 2007 21:57:06 -0400 (EDT) Subject: [kw-pm] April KWPM Meeting->isTomorrow() Message-ID: Just a quick reminder that the April meeting is tomorrow: Thursday, March 15, 2007 - 7pm Quality versus Speed: Sizing it Up ---------------------------------- Talk by baud. Image resizing is a delicate balance, easily toppled. baud compares implementations, algorithms and results. Meeting is in BMH 1035 at the University of Waterloo, directions are here: http://kw.pm.org/wiki/index.cgi?FAQ To receive delicious pizza, please RSVP here: http://kw.pm.org/wiki/index.cgi?PizzaList As always, meeting is open to all interested. As always, we will retire for beer and conversation at a local establishment afterwards. See you tomorrow, fishbot, nag pumpking pro tem From dc0955 at gates.com Thu Mar 15 09:22:10 2007 From: dc0955 at gates.com (Carr, Dave) Date: Thu, 15 Mar 2007 10:22:10 -0600 Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: References: Message-ID: <71157FC6AFED794AA91333926F0C23F075A38D@EXMAIL2.ec.cf.com> >To receive delicious pizza, please RSVP here: > >http://kw.pm.org/wiki/index.cgi?PizzaList I don't know if it's the firewall I'm behind, the Internet Exploder than I'm forced to use or just bad karma accumulated by missing a bunch of meetings, but I just can't edit the Pizza Wiki from here. So Eric, could you sign me up for veggie? (Not my usual preference, but it's Lent) - Lloyd From daniel at coder.com Thu Mar 15 09:26:35 2007 From: daniel at coder.com (Daniel R. Allen) Date: Thu, 15 Mar 2007 12:26:35 -0400 (EDT) Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: <71157FC6AFED794AA91333926F0C23F075A38D@EXMAIL2.ec.cf.com> Message-ID: Done. Glad to hear from you, and see you tonight! I'll try and check into whether it's an IE weirdness. -D On Thu, 15 Mar 2007, Carr, Dave wrote: > >To receive delicious pizza, please RSVP here: > > > >http://kw.pm.org/wiki/index.cgi?PizzaList > > I don't know if it's the firewall I'm behind, the Internet Exploder than > I'm forced to use or just bad karma accumulated by missing a bunch of > meetings, but I just can't edit the Pizza Wiki from here. So Eric, could > you sign me up for veggie? (Not my usual preference, but it's Lent) > > - Lloyd > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From eric at uc.org Thu Mar 15 10:44:52 2007 From: eric at uc.org (fishbot) Date: Thu, 15 Mar 2007 13:44:52 -0400 (EDT) Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: References: Message-ID: Worked for me in ie6... if you bring a packet capture tonight, we can try to diagnose ;) ---- original message : 2007-03-15 12:26pm : Daniel R. Allen ---- > Done. Glad to hear from you, and see you tonight! > > I'll try and check into whether it's an IE weirdness. > -D > > On Thu, 15 Mar 2007, Carr, Dave wrote: > > > >To receive delicious pizza, please RSVP here: > > > > > >http://kw.pm.org/wiki/index.cgi?PizzaList > > > > I don't know if it's the firewall I'm behind, the Internet Exploder than > > I'm forced to use or just bad karma accumulated by missing a bunch of > > meetings, but I just can't edit the Pizza Wiki from here. So Eric, could > > you sign me up for veggie? (Not my usual preference, but it's Lent) > > > > - Lloyd > > _______________________________________________ > > kw-pm mailing list > > kw-pm at pm.org > > http://mail.pm.org/mailman/listinfo/kw-pm > > > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From matt at sergeant.org Thu Mar 15 11:02:39 2007 From: matt at sergeant.org (Matt Sergeant) Date: Thu, 15 Mar 2007 14:02:39 -0400 Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: References: Message-ID: <5D52F623-612F-4718-8FCE-C2997A326DD7@sergeant.org> You have to bring it as a jpeg though. On 15-Mar-07, at 1:44 PM, fishbot wrote: > > Worked for me in ie6... if you bring a packet capture tonight, we > can try to diagnose ;) > > ---- original message : 2007-03-15 12:26pm : Daniel R. Allen ---- > >> Done. Glad to hear from you, and see you tonight! >> >> I'll try and check into whether it's an IE weirdness. >> -D >> >> On Thu, 15 Mar 2007, Carr, Dave wrote: >> >>>> To receive delicious pizza, please RSVP here: >>>> >>>> http://kw.pm.org/wiki/index.cgi?PizzaList >>> >>> I don't know if it's the firewall I'm behind, the Internet >>> Exploder than >>> I'm forced to use or just bad karma accumulated by missing a >>> bunch of >>> meetings, but I just can't edit the Pizza Wiki from here. So >>> Eric, could >>> you sign me up for veggie? (Not my usual preference, but it's Lent) >>> >>> - Lloyd >>> _______________________________________________ >>> kw-pm mailing list >>> kw-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/kw-pm >>> >> >> _______________________________________________ >> kw-pm mailing list >> kw-pm at pm.org >> http://mail.pm.org/mailman/listinfo/kw-pm >> > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ From kw-pm at datademons.com Thu Mar 15 11:04:26 2007 From: kw-pm at datademons.com (Justin Wheeler) Date: Thu, 15 Mar 2007 14:04:26 -0400 (EDT) Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: <5D52F623-612F-4718-8FCE-C2997A326DD7@sergeant.org> References: <5D52F623-612F-4718-8FCE-C2997A326DD7@sergeant.org> Message-ID: Photographed on a wooden table, then scanned, and printed. Justin On Thu, 15 Mar 2007, Matt Sergeant wrote: > You have to bring it as a jpeg though. > > On 15-Mar-07, at 1:44 PM, fishbot wrote: > >> >> Worked for me in ie6... if you bring a packet capture tonight, we >> can try to diagnose ;) >> >> ---- original message : 2007-03-15 12:26pm : Daniel R. Allen ---- >> >>> Done. Glad to hear from you, and see you tonight! >>> >>> I'll try and check into whether it's an IE weirdness. >>> -D >>> >>> On Thu, 15 Mar 2007, Carr, Dave wrote: >>> >>>>> To receive delicious pizza, please RSVP here: >>>>> >>>>> http://kw.pm.org/wiki/index.cgi?PizzaList >>>> >>>> I don't know if it's the firewall I'm behind, the Internet >>>> Exploder than >>>> I'm forced to use or just bad karma accumulated by missing a >>>> bunch of >>>> meetings, but I just can't edit the Pizza Wiki from here. So >>>> Eric, could >>>> you sign me up for veggie? (Not my usual preference, but it's Lent) >>>> >>>> - Lloyd >>>> _______________________________________________ >>>> kw-pm mailing list >>>> kw-pm at pm.org >>>> http://mail.pm.org/mailman/listinfo/kw-pm >>>> >>> >>> _______________________________________________ >>> kw-pm mailing list >>> kw-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/kw-pm >>> >> _______________________________________________ >> kw-pm mailing list >> kw-pm at pm.org >> http://mail.pm.org/mailman/listinfo/kw-pm >> > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From dc0955 at gates.com Thu Mar 15 11:07:14 2007 From: dc0955 at gates.com (Carr, Dave) Date: Thu, 15 Mar 2007 12:07:14 -0600 Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: References: Message-ID: <71157FC6AFED794AA91333926F0C23F075A3BD@EXMAIL2.ec.cf.com> >Worked for me in ie6... if you bring a packet capture tonight, we >can try to diagnose ;) Can you capture bad karma in a bottle? From kw-pm at datademons.com Thu Mar 15 11:11:43 2007 From: kw-pm at datademons.com (Justin Wheeler) Date: Thu, 15 Mar 2007 14:11:43 -0400 (EDT) Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: <71157FC6AFED794AA91333926F0C23F075A3BD@EXMAIL2.ec.cf.com> References: <71157FC6AFED794AA91333926F0C23F075A3BD@EXMAIL2.ec.cf.com> Message-ID: I know a fair number of people who have bad karma because of a bottle. Does that help? Justin On Thu, 15 Mar 2007, Carr, Dave wrote: >> Worked for me in ie6... if you bring a packet capture tonight, we >> can try to diagnose ;) > > Can you capture bad karma in a bottle? > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From matt at sergeant.org Thu Mar 15 20:28:52 2007 From: matt at sergeant.org (Matt Sergeant) Date: Thu, 15 Mar 2007 23:28:52 -0400 Subject: [kw-pm] April KWPM Meeting->isTomorrow() In-Reply-To: References: Message-ID: Thank you everyone for attending. I'll put slides up later (need to get Keynote to do a decent PDF of those). In the meantime here's the scary ImageMagick sharpening page: http://redskiesatnight.com/Articles/IMsharpen/ Enjoy. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ From rpjday at mindspring.com Sat Mar 17 08:00:33 2007 From: rpjday at mindspring.com (Robert P. J. Day) Date: Sat, 17 Mar 2007 11:00:33 -0400 (EDT) Subject: [kw-pm] how to *delete* all "#if 0" content from a source tree Message-ID: is there a convenient way to, throughout an entire source tree, delete all content in all source or header files that's been de-activated with an "#if 0"? that would, of course, include the "#if 0" line and all content up to and including the terminating "#endif" (which might have some extraneous comment content after it). thoughts? rday From rdice at pobox.com Sat Mar 17 09:13:21 2007 From: rdice at pobox.com (Richard Dice) Date: Sat, 17 Mar 2007 12:13:21 -0400 Subject: [kw-pm] how to *delete* all "#if 0" content from a source tree In-Reply-To: References: Message-ID: <5bef4baf0703170913ja01c480p31a79be533238703@mail.gmail.com> This isn't particularly a Perl question, is it? That said, if you're interested in doing this with Perl, you should look into Damian Conway's module called Text::Balanced. http://search.cpan.org/~dconway/Text-Balanced-v2.0.0/lib/Text/Balanced.pm This only identifies the nested #if 0 ... #endif blocks. Traversing the source tree, keeping what you what in the files, editing and saving the files in place, etc., is all up to you. But these are pretty easy to do with Perl (plus some standard Unix shell tools like "find" and "xargs") too. :-) Cheers, Richard On 3/17/07, Robert P. J. Day wrote: > > > is there a convenient way to, throughout an entire source tree, > delete all content in all source or header files that's been > de-activated with an "#if 0"? that would, of course, include the "#if > 0" line and all content up to and including the terminating "#endif" > (which might have some extraneous comment content after it). > > thoughts? > > rday > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/kw-pm/attachments/20070317/ce34eaf7/attachment.html From eric at uc.org Sun Mar 18 08:36:29 2007 From: eric at uc.org (fishbot) Date: Sun, 18 Mar 2007 11:36:29 -0400 (EDT) Subject: [kw-pm] how to *delete* all "#if 0" content from a source tree In-Reply-To: <5bef4baf0703170913ja01c480p31a79be533238703@mail.gmail.com> References: <5bef4baf0703170913ja01c480p31a79be533238703@mail.gmail.com> Message-ID: I've used Text::Balanced (which is core, incidentally, though I forget the as-of) at $work to great effect, though understanding the API can be a challenge, particularly if you want to do more than basic things. Adding to the trickiness here is that you actually want to track all the #if * ... #endif blocks, but you are only interested in the ones starting with #if 0. That is, you have to track all the nestings, then prune that list. And the interesting #if 0s might be nested in uninteresting #ifs, or vice-versa. Also, modern compilers let you have whitespace before the '#' and between the '#' and the 'if' and 'endif'. Plus #endif can be for #ifs or #ifdefs, etc. So, it's not a trivial challenge. In theory, Text::Balanced extract_tagged/get_extract_tagged, but damned if I can get it to work at all. I rolled my own, I've tested it... just prints the before and after right now, but making it replace files, recurse directories is just a SMOP. Code review/opinions welcome. It's just a Sunday morning coffee-hack, so it doesn't handle extreme cases. It's sloppy with what it accepts as #ifs. Sort of cool is that if you decide you want to expunge #ifdef DEBUG etc. as well, it's just a matter of altering is_interesting(). fishbot ---- original message : 2007-03-17 12:13pm : Richard Dice ---- > This isn't particularly a Perl question, is it? > > That said, if you're interested in doing this with Perl, you should look > into Damian Conway's module called Text::Balanced. > > http://search.cpan.org/~dconway/Text-Balanced-v2.0.0/lib/Text/Balanced.pm > > This only identifies the nested #if 0 ... #endif blocks. Traversing the > source tree, keeping what you what in the files, editing and saving the > files in place, etc., is all up to you. But these are pretty easy to do > with Perl (plus some standard Unix shell tools like "find" and "xargs") too. > :-) > > Cheers, > Richard > > On 3/17/07, Robert P. J. Day wrote: > > > > > > is there a convenient way to, throughout an entire source tree, > > delete all content in all source or header files that's been > > de-activated with an "#if 0"? that would, of course, include the "#if > > 0" line and all content up to and including the terminating "#endif" > > (which might have some extraneous comment content after it). > > > > thoughts? > > > > rday > > _______________________________________________ > > kw-pm mailing list > > kw-pm at pm.org > > http://mail.pm.org/mailman/listinfo/kw-pm > > > -------------- next part -------------- #!/usr/bin/perl use strict; use warnings; use Data::Dumper; # global defs my $ws = qr/[ \t]/; # permitted whitespace my $opener = qr/^$ws*#$ws*if\w*\s+[^\n]+\n?/ms; my $closer = qr/^$ws*#$ws*endif[^\n]*\n?/ms; clean( shift ); # main: takes filename sub clean { my $filename = shift; open my $fh, "<", $filename or die( "couldn't open '$filename': $!" ); my $text = do { local $/; <$fh>; }; print "INPUT:\n"; print $text; print "\nOUTPUT:\n"; print out( parse( toke( $text ))); } # toke: takes text, returns marked tokens sub toke { my $text = shift; my @chunks = split m/($opener|$closer)/, $text; my @seg; for ( @chunks ) { next unless defined; my $type = m/^$opener/ ? 'opener' : m/^$closer/ ? 'closer' : 'text'; push @seg, { type => $type, text => $_ }; } return \@seg; } # parse: takes named tokens, builds nested tree sub parse { my $tokes = shift; my $stack = []; my $root = { data => [] }; push @$stack, $root; for my $t ( @$tokes ) { if ( $t->{type} eq 'text' ) { push @{$stack->[$#$stack]->{data}}, $t; next; } if ( $t->{type} eq 'closer' ) { $stack->[$#$stack]->{closer} = $t->{text}; pop @$stack; next; } my $new = { type => 'nest', data => [], opener => $t->{text}, closer => undef, }; push @{$stack->[$#$stack]->{data}}, $new; push @$stack, $new; } return $root; } # is_interesting: takes node, returns boolean sub is_interesting { my $node = shift; return if $node->{opener} =~ m/^$ws*#$ws*if$ws+0$ws*$/; return 1; } # out: takes node root, returns string, uses is_interesting sub out { my $root = shift; my $out = ""; for ( @{$root->{data}} ) { if ( $_->{type} eq 'text' ) { $out .= $_->{text}; } else { # recurse $out .= $_->{opener} . out( $_ ) . $_->{closer} if is_interesting( $_ ); } } return $out; } __END__ INPUT: # if 1 #if 0 foo bar #if foo # ifdef 0 #endif bar #endif const char * foo = "#endif"; #endif quux # if 0 #endif # endif fnord #if 0 fnord #endif foo OUTPUT: # if 1 quux # endif fnord #if 0 fnord #endif foo From rpjday at mindspring.com Sun Mar 18 09:15:59 2007 From: rpjday at mindspring.com (Robert P. J. Day) Date: Sun, 18 Mar 2007 12:15:59 -0400 (EDT) Subject: [kw-pm] how to *delete* all "#if 0" content from a source tree In-Reply-To: References: <5bef4baf0703170913ja01c480p31a79be533238703@mail.gmail.com> Message-ID: On Sun, 18 Mar 2007, fishbot wrote: > I've used Text::Balanced (which is core, incidentally, though I > forget the as-of) at $work to great effect, though understanding the > API can be a challenge, particularly if you want to do more than > basic things. > > Adding to the trickiness here is that you actually want to track all > the #if * ... #endif blocks, but you are only interested in the ones > starting with #if 0. That is, you have to track all the nestings, > then prune that list. And the interesting #if 0s might be nested in > uninteresting #ifs, or vice-versa. > > Also, modern compilers let you have whitespace before the '#' and > between the '#' and the 'if' and 'endif'. Plus #endif can be for > #ifs or #ifdefs, etc. and on top of that, it's possible to have: #if 0 ... blah blah ... #else ... woof woof ... #endif and the simplification should leave "woof woof" in the file. yes, it gets ugly in a hurry, doesn't it? > So, it's not a trivial challenge. In theory, Text::Balanced > extract_tagged/get_extract_tagged, but damned if I can get it to > work at all. > > I rolled my own, I've tested it... just prints the before and after > right now, but making it replace files, recurse directories is just > a SMOP. > > Code review/opinions welcome. It's just a Sunday morning > coffee-hack, so it doesn't handle extreme cases. It's sloppy with > what it accepts as #ifs. Sort of cool is that if you decide you > want to expunge #ifdef DEBUG etc. as well, it's just a matter of > altering is_interesting(). ok, i'll check this when i get a chance. thanks. rday From daniel at coder.com Tue Mar 27 09:03:51 2007 From: daniel at coder.com (Daniel R. Allen) Date: Tue, 27 Mar 2007 12:03:51 -0400 (EDT) Subject: [kw-pm] [pm_groups] YAPC-NA CFP deadline approaching (fwd) Message-ID: Interested in presenting a talk at YAPC::NA 2007? Houston, TX, June 25-27. Talk deadline in two weeks.. -Daniel ---------- Forwarded message ---------- Date: Mon, 26 Mar 2007 15:42:21 -0500 From: Jeremy Fluhmann To: pm_groups at pm.org Subject: [pm_groups] YAPC-NA CFP deadline approaching Two weeks remain in the Call For Participation! Visit http://conferences.mongueurs.net/yn2007 to register as a new user (or login with your existing account) and submit a talk proposal. If possible, please indicate (in the comments section) if you consider this talk to be suitable for a beginner, intermediate, or advanced Perl user. Some of the comments from last year indicated a desire to know the level of knowledge expected of talk attendees. Official CFP posting at http://conferences.mongueurs.net/yn2007/cfp.html Jeremy Fluhmann http://www.yapc.org/America