From gwadej at anomaly.org Tue Sep 4 05:02:37 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Tue, 4 Sep 2007 07:02:37 -0500 Subject: [pm-h] September Meeting Message-ID: <20070904070237.25a24ac7@sovvan> September's meeting is a week from today. Since we had such a low turnout for the social meeting last month, I guess another technical meeting is in order. If no one else has a topic they would like to present for this month, I was thinking of a presentation on code references and closures as preparation for an eventual talk about "Higher Order Perl". Any other suggestions? G. Wade -- The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague. -- Edsger Dijkstra From rlharris at oplink.net Wed Sep 5 04:38:38 2007 From: rlharris at oplink.net (Russell L. Harris) Date: Wed, 5 Sep 2007 06:38:38 -0500 Subject: [pm-h] can a makefile invoke a perl script? Message-ID: <20070905113838.GA26960@oplink.net> For a week now I've been trying without success to solve this problem using gnu make and bash. Here is what I have been trying to do: The context is my web site, which is automatically regenerated by a single makefile. In the course of modifying the web site, I now need to change the make file so that it transfers a mixed group of files from a main directory, sorting them into several subdirectories. The source files are: main/red-17 main/red-23 main/red-28 main/... main/green-20 main/green-33 main/... main/yellow-5 main/yellow-22 main/... The destination files are: main/sub-red/red-17 main/sub-red/red-23 main/sub-red/red-28 main/sub-red/... main/sub-green/green-20 main/sub-green/green-33 main/sub-green/... main/sub-yellow/yellow-5 main/sub-yellow/yellow-22 main/sub-yellow/... I have been searching for a way to apply 'make' functions such as $(dir ...), $(suffix ...), $(basename ...), $(filter ...), etc., to the index of a bash for-loop, to enable operations such as: directories := red green yellow (for d in $(directories:/=); do (for f in *; do cp $(nodir $$f) $$d; done;) done;) But expressions such as $(nodir $$f) appear not to return a value. It occurs to me that Perl might offer a better approach, if only a makefile can invoke a Perl script. I have not yet found an answer in the GNU make manual. RLH From gwadej at anomaly.org Wed Sep 5 05:13:24 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Wed, 5 Sep 2007 07:13:24 -0500 Subject: [pm-h] can a makefile invoke a perl script? In-Reply-To: <20070905113838.GA26960@oplink.net> References: <20070905113838.GA26960@oplink.net> Message-ID: <20070905071324.53707e87@sovvan> On Wed, 5 Sep 2007 06:38:38 -0500 "Russell L. Harris" wrote: > For a week now I've been trying without success to solve this problem > using gnu make and bash. Here is what I have been trying to do: > > The context is my web site, which is automatically regenerated by a > single makefile. In the course of modifying the web site, I now need > to change the make file so that it transfers a mixed group of files > from a main directory, sorting them into several subdirectories. The > source files are: > > main/red-17 > main/red-23 > main/red-28 > main/... > > main/green-20 > main/green-33 > main/... > > main/yellow-5 > main/yellow-22 > main/... Understood. > The destination files are: > > main/sub-red/red-17 > main/sub-red/red-23 > main/sub-red/red-28 > main/sub-red/... > > main/sub-green/green-20 > main/sub-green/green-33 > main/sub-green/... > > main/sub-yellow/yellow-5 > main/sub-yellow/yellow-22 > main/sub-yellow/... > > I have been searching for a way to apply 'make' functions such as > $(dir ...), $(suffix ...), $(basename ...), $(filter ...), etc., to > the index of a bash for-loop, to enable operations such as: Remember that any make functions are only available at the time the command is built, not when it is executed. > directories := red green yellow > > (for d in $(directories:/=); > do > (for f in *; > do > cp $(nodir $$f) $$d; > done;) > done;) > > But expressions such as $(nodir $$f) appear not to return a value. The way I would normally handle this through bash is (cd main; # now I don't have to remove directories for d in red green yellow; do cp $d* sub-$d/ # no need for the loop, cp can do them all. done) Of course, this only works if the file names and directory names are related as simply as you gave above. Otherwise, I would probably resort to Perl > It occurs to me that Perl might offer a better approach, if only a > makefile can invoke a Perl script. I have not yet found an answer in > the GNU make manual. The "command" portion of the make can be anything you could execute at a shell prompt. So, calling a separate Perl program is no problem. G. Wade -- Don't kill him!! If you kill him, he won't learn nothin'! -- The Riddler, "Batman Forever" From toddr at null.net Wed Sep 5 12:19:39 2007 From: toddr at null.net (Todd Rinaldo) Date: Wed, 5 Sep 2007 14:19:39 -0500 Subject: [pm-h] September Meeting In-Reply-To: <20070904070237.25a24ac7@sovvan> References: <20070904070237.25a24ac7@sovvan> Message-ID: <018001c7eff1$b4d233e0$0201a8c0@covenant> Wade, References are something I definiteley feel weak on, so I for one would welcome your time on this topic. > -----Original Message----- > From: houston-bounces+toddr=null.net at pm.org > [mailto:houston-bounces+toddr=null.net at pm.org] On Behalf Of > G. Wade Johnson > Sent: Tuesday, September 04, 2007 7:03 AM > To: Houston Perl Mongers > Subject: [pm-h] September Meeting > > September's meeting is a week from today. Since we had such a > low turnout for the social meeting last month, I guess > another technical meeting is in order. > > If no one else has a topic they would like to present for > this month, I was thinking of a presentation on code > references and closures as preparation for an eventual talk > about "Higher Order Perl". > > Any other suggestions? > > G. Wade > -- > The competent programmer is fully aware of the limited size > of his own skull. He therefore approaches his task with full > humility, and avoids > clever tricks like the plague. -- Edsger Dijkstra > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ > From gwadej at anomaly.org Sun Sep 9 21:06:01 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Sun, 9 Sep 2007 23:06:01 -0500 Subject: [pm-h] September Houston.pm Meeting Message-ID: <20070909230601.35c9a648@sovvan> This is a quick reminder that the September meeting is this Tuesday at the JP Morgan offices at 1111 Fannin. See the houston.pm.org website for a map. I will be covering Subroutines, Code references, and Closures. If you still need to pick up a t-shirt and will be there, let me know sometime on Monday. G. Wade -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth From gwadej at anomaly.org Tue Sep 11 05:07:29 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Tue, 11 Sep 2007 07:07:29 -0500 Subject: [pm-h] Meeting tonight Message-ID: <20070911070729.66f4aec8@sovvan> Just a final reminder of the Houston.pm meeting tonight. We will be meeting at 1111 Fannin downtown (http://maps.google.com/maps?f=q&hl=en&q=1111+fannin+77002&ie=UTF8&om=1&z=19&ll=29.754784,-95.365013&spn=0.001106,0.002682&t=h) I'll be presenting on Subroutines, Coderefs, and Closures (with Currying if we have time). I hope to see you there. G. Wade -- In theory, there is no difference between theory and practice. But, in practice, there is. -- Jan L.A. van de Snepscheut From gwadej at anomaly.org Sun Sep 16 20:30:40 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Sun, 16 Sep 2007 22:30:40 -0500 Subject: [pm-h] September Presentation is online Message-ID: <20070916223040.7e3fd46e@sovvan> The presentation for September is online at http://houston.pm.org/. I have extended the slides and notes to cover some of some of the questions and discussions from the meeting. G. Wade -- Perl's grammar can not be reduced to BNF. The work of parsing perl is distributed between yacc, the lexer, smoke and mirrors. -- Chaim Frenkel From gwadej at anomaly.org Sun Sep 30 18:23:20 2007 From: gwadej at anomaly.org (G. Wade Johnson) Date: Sun, 30 Sep 2007 20:23:20 -0500 Subject: [pm-h] October Houston.pm meeting Message-ID: <20070930202320.382ba03d@sovvan> It's a little over a week until the next Houston.pm meeting (October 9). Does anyone have any ideas for the meeting? * a topic to present? * a group project to start? * a current project to contribute to as a group? * a social meeting? G. Wade -- Contrary to popular opinion, the plural of 'anecdote' is not 'fact'.