From me at heyjay.com Sun Feb 1 11:07:05 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:04 2004 Subject: [Chicago-talk] Object question - subclass or make two similar classes Message-ID: <000701c3e8e5$d340cce0$6405a8c0@a30> Hi, I have 2 classes that have identical methods. Should I write 2 classes, or a parent and 2 subclasses? The class is "brokerage" as in Ameritrade and InteractiveBrokers. They both have methods like: connect, placeOrder, getQuote, getTransactionHistory... but the code to perform these actions is totally different between classes. I'm just wondering, what do I gain by making a single parent, and subclassing? Thanks Jay From lembark at wrkhors.com Sun Feb 1 11:41:39 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:04 2004 Subject: [Chicago-talk] Object question - subclass or make two similar classes In-Reply-To: <000701c3e8e5$d340cce0$6405a8c0@a30> References: <000701c3e8e5$d340cce0$6405a8c0@a30> Message-ID: <3141330000.1075657299@[192.168.200.4]> -- Jay Strauss > Hi, > > I have 2 classes that have identical methods. Should I write 2 classes, > or a parent and 2 subclasses? The class is "brokerage" as in Ameritrade > and InteractiveBrokers. They both have methods like: connect, placeOrder, > getQuote, getTransactionHistory... but the code to perform these actions > is totally different between classes. > > I'm just wondering, what do I gain by making a single parent, and > subclassing? What you probably want is a generic (a.k.a. 'virtual') base class called "brokerage" that defines the generic methods. That puts most of your boilerplate in one place. The derived classes can then supply their own methods to modify behavior in the base class if necessary. Careful use of data in the derived classes will probably leave the base class doing all the work, or at least most of it. For example, supplying callbacks in the class data might allow a generic "place an order" method to deal with the variety between brokerage houses. Advantages are not having to hack the code in multiple places to fix/extend it and less work the next time you have to add a brokerage (i.e., reusability). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Sun Feb 1 12:31:44 2004 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:28:04 2004 Subject: [Chicago-talk] [OT] Object question - subclass or make two similarclasses In-Reply-To: <3141330000.1075657299@[192.168.200.4]> Message-ID: [OT}: I understand that interfaces aren'tnecessary to OOPerl, but has anyone ever encountered a situation where it was necessary to enforce "design by contract" in OOPerl? -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Sunday, February 01, 2004 11:42 AM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Object question - subclass or make two similarclasses -- Jay Strauss > Hi, > > I have 2 classes that have identical methods. Should I write 2 classes, > or a parent and 2 subclasses? The class is "brokerage" as in Ameritrade > and InteractiveBrokers. They both have methods like: connect, placeOrder, > getQuote, getTransactionHistory... but the code to perform these actions > is totally different between classes. > > I'm just wondering, what do I gain by making a single parent, and > subclassing? What you probably want is a generic (a.k.a. 'virtual') base class called "brokerage" that defines the generic methods. That puts most of your boilerplate in one place. The derived classes can then supply their own methods to modify behavior in the base class if necessary. Careful use of data in the derived classes will probably leave the base class doing all the work, or at least most of it. For example, supplying callbacks in the class data might allow a generic "place an order" method to deal with the variety between brokerage houses. Advantages are not having to hack the code in multiple places to fix/extend it and less work the next time you have to add a brokerage (i.e., reusability). -- 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 me at heyjay.com Sun Feb 1 14:31:24 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:04 2004 Subject: [Chicago-talk] Object question - subclass or make two similarclasses References: <000701c3e8e5$d340cce0$6405a8c0@a30> <3141330000.1075657299@[192.168.200.4]> Message-ID: <001501c3e902$64447400$6405a8c0@a30> I get it Thanks Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Sunday, February 01, 2004 11:41 AM Subject: Re: [Chicago-talk] Object question - subclass or make two similarclasses > > > -- Jay Strauss > > > Hi, > > > > I have 2 classes that have identical methods. Should I write 2 classes, > > or a parent and 2 subclasses? The class is "brokerage" as in Ameritrade > > and InteractiveBrokers. They both have methods like: connect, placeOrder, > > getQuote, getTransactionHistory... but the code to perform these actions > > is totally different between classes. > > > > I'm just wondering, what do I gain by making a single parent, and > > subclassing? > > What you probably want is a generic (a.k.a. 'virtual') base > class called "brokerage" that defines the generic methods. > That puts most of your boilerplate in one place. > > The derived classes can then supply their own methods to > modify behavior in the base class if necessary. Careful > use of data in the derived classes will probably leave the > base class doing all the work, or at least most of it. > > For example, supplying callbacks in the class data might > allow a generic "place an order" method to deal with the > variety between brokerage houses. > > Advantages are not having to hack the code in multiple > places to fix/extend it and less work the next time you > have to add a brokerage (i.e., reusability). > > > > > -- > 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 Sun Feb 1 20:41:04 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:04 2004 Subject: [Chicago-talk] [OT] Object question - subclass or make two similarclasses In-Reply-To: References: Message-ID: <3400630000.1075689664@[192.168.200.4]> -- petemar1 > [OT}: > > I understand that interfaces aren'tnecessary to OOPerl, but has anyone > ever encountered a situation where it was necessary to enforce "design by > contract" in OOPerl? Why wouldn't you want an interface to the class? Profiles are a pain, but that doesn't mean you can't define a solid interface. Design by contract is well-supported, and works (e.g. Class::Contract). The difference with Perl is that you explicitly code the tests -- instead of using them as an error-checking crutch in the compiler. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jthomasoniii at yahoo.com Mon Feb 2 09:56:31 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] a bookmarklet Message-ID: <20040202155631.51051.qmail@web60208.mail.yahoo.com> I don't know about you guys, but I tend to ignore the messages as they come in. I prefer to read 'em on the web. But I don't want to switch to the archive, since it's tougher to reply and have some semblance of thread continuity. Not to worry, I just have a link in my browser bookmark bar to zip over to the monthly archives. Of course, this is mildly annoying when we switch to a new month and I need a new bookmark. Most annoying. So, to save myself that recurring 15 seconds of work, I instead invested time in a javascript bookmarklet to do it instead. You can grab it at: http://www.jimandkoka.com/chicago.pm.html If you're interested, follow the url, and then drag the "Chicago.pm archives" link to your browser toolbar. Do not drag the link to jimandkoka.com itself, drag the Chicago.pm archives link. I didn't want to stick the actual javascript here for fear of it getting hosed by being emailed. And voila. Instant updating access to the current month's thread archives. I know it works under OS X (Safari, IE, Camino), and it should work fine elsewhere, I just haven't tested it on those platforms. Due to lack of access to said platforms. Naturally, having invested the time to write the javascript, I expect to see this functionality incorporated into something server side within nanoseconds, but I'll bask in the glory of the accomplishment while it lasts. -Jim.... __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ From hachi at kuiki.net Mon Feb 2 19:02:36 2004 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Febtober meeting Message-ID: <401EF32C.9070009@kuiki.net> The Febtober technical meeting of the Chicago (area) Perl Mongers will take place at 7PM on 2004/02/02. We will be meeting at our usual place [1] and the initial topic should be POE [2] programing presented by me. Thanks for reading, Jonathan Steinert [1] See http://chicago.pm.org/ for details [2] See http://poe.perl.org/ for information From hachi at kuiki.net Mon Feb 2 20:19:29 2004 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Febtober meeting In-Reply-To: <401EF32C.9070009@kuiki.net> References: <401EF32C.9070009@kuiki.net> Message-ID: <401F0531.3040106@kuiki.net> Jonathan Steinert wrote: > The Febtober technical meeting of the Chicago (area) Perl Mongers will > take place at 7PM on 2004/02/02. > I should like to note that as today is the second already, I actually meant /tommorow/, the third of Febtober as the time of the meeting. Sorry to have screwed that up. > We will be meeting at our usual place [1] and the initial topic should > be POE [2] programing presented by me. > > Thanks for reading, > Jonathan Steinert > > > [1] See http://chicago.pm.org/ for details > [2] See http://poe.perl.org/ for information > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From ehs at pobox.com Tue Feb 3 11:30:38 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] books to give away tonight Message-ID: <20040203173038.GA1893@chloe.inkdroid.org> And if hearing Jonathan talk about POE isn't enough there will be some books to give away tonight including: - Mac OS X: the Missing Manual - Mastering Algorithms with Perl - Perl CD Bookshelf - Perl and LWP - The Joy of Tech - Malware: Fighting Malicious Code Most of these are courtesy of O'Reilly except for Malware which is from Prentice-Hall...which, incidentally has gotten really awesome reviews, including making it into Journal of Object Tehcnology's best books of they year for 2003 [1]. //Ed [1] http://www.jot.fm/books/best2003 From Dooley.Michael at con-way.com Tue Feb 3 12:17:29 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] books to give away tonight Message-ID: anyone coming from and to the wheaton area? Im on butterfiled and Naperville Rd. (3rd cardboard box on the left) -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Ed Summers Sent: Tuesday, February 03, 2004 11:31 AM To: chicago-talk@mail.pm.org Subject: [Chicago-talk] books to give away tonight And if hearing Jonathan talk about POE isn't enough there will be some books to give away tonight including: - Mac OS X: the Missing Manual - Mastering Algorithms with Perl - Perl CD Bookshelf - Perl and LWP - The Joy of Tech - Malware: Fighting Malicious Code Most of these are courtesy of O'Reilly except for Malware which is from Prentice-Hall...which, incidentally has gotten really awesome reviews, including making it into Journal of Object Tehcnology's best books of they year for 2003 [1]. //Ed [1] http://www.jot.fm/books/best2003 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From jt at plainblack.com Tue Feb 3 12:55:24 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] FYI: Coffee and Ice Water Message-ID: Due to the restriction that prohibits us from using the kitchen during PM meetings, I've purchased a pitcher for ice water and a coffee maker. I also got some creamer, sugar, and some cheapo Folgers coffee. There are also napkins, cups, and stir sticks. Everyone's welcome to enjoy the beverages. However, in the future I'm hoping that the coffee drinkers will contribute their own supplies to replenish the stash. See everyone tonight! JT ~ Plain Black Create like a god, command like a king, work like a slave. From Dooley.Michael at con-way.com Tue Feb 3 13:03:19 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] GNUPG Message-ID: anyone use any of the modules on CPAN. there are 3 or 4. was curious if you favored one over the other. my basic use will be to automate encrypting files then ftp them to a host. then retrieve files, decrypt them to a local file name and process them. Mike From jthomasoniii at yahoo.com Tue Feb 3 13:51:43 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities Message-ID: <20040203195143.82390.qmail@web60209.mail.yahoo.com> So. I hope to be arriving in Vernon Hills tonight some time between 6 and 6:15 (depending upon traffic) and probably quite hungry. Hence, I'm suggesting a pre-meeting dinner at El Famous Burrito across the street on Rte 60. For those unaware of the area, El Famous Burrito is on Rte 60, one traffic light west of the meeting location (Lakeview Parkway), though it may be easier to refer to it as simply "behind the Wendy's". Interested parties? El Famous Burrito is quite good. -Jim..... __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ From wiggins at danconia.org Tue Feb 3 13:55:18 2004 From: wiggins at danconia.org (Wiggins d Anconia) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] GNUPG Message-ID: <200402031955.i13JtIs28591@residualselfimage.com> > anyone use any of the modules on CPAN. there are 3 or 4. was curious if you > favored one over the other. > > my basic use will be to automate encrypting files then ftp them to a host. > then retrieve files, decrypt them to a local file name and process them. > Around a year ago I took a pretty exhaustive look at the GnuPG/OpenPGP compatible options and came up with the following summary: "Crypt::OpenPGP - Written in Perl using numerous other Perl modules to simulate OpenPGP (with a gnupg compatibility setting) GnuPG::Interface - An elegant implementation of calling gnupg from the command line, requires gnupg to be installed on the local system. Two other modules exist, one of which uses a deprecated feature of gnupg that we had to avoid (and should probably be avoided and is replaced by the module mentioned above), the other failed to install because of a dependency problem, one we specifically wanted to avoid." My thoughts are basically still the same. If you are looking for pure Perl (or at least no shelling out), don't have very large files (aka that won't fit in memory all at once), and speed isn't critical then the first is excellent. If you are looking for complete gnupg compatibility, or speed is a bigger issue, or you don't want to keep all of the dependencies updated, or your files don't fit in memory, then the second may be a better option. In the end we used neither for a number of reasons, speed being the primary one for the first, in the second case the 'exec' used when calling the gnupg executable caused signal handling problems with the rest of our app, which is conveniently based on POE (tonight's discussion which I can't make :-( ) and using Wheel::Run to handle simultaneous subprocessing. I suspect either would be fine for your task. I haven't done a more recent analysis, and I am not an encryption expert, just a Perl programmer that has to process (both directions) lots of OpenPGP files relatively quickly. Let me know if you have any specific questions, sorry I can't provide code, I haven't gotten that far with this employer yet ;-)... http://danconia.org From andy at petdance.com Tue Feb 3 13:57:33 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities In-Reply-To: <20040203195143.82390.qmail@web60209.mail.yahoo.com> References: <20040203195143.82390.qmail@web60209.mail.yahoo.com> Message-ID: <20040203195733.GA17462@petdance.com> > Interested parties? El Famous Burrito is quite good. AGH! You pick the first meeting in a while where I won't be there. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From hachi at kuiki.net Tue Feb 3 14:13:55 2004 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities In-Reply-To: <20040203195143.82390.qmail@web60209.mail.yahoo.com> References: <20040203195143.82390.qmail@web60209.mail.yahoo.com> Message-ID: <40200103.4020207@kuiki.net> Jim Thomason wrote: > So. I hope to be arriving in Vernon Hills tonight some > time between 6 and 6:15 (depending upon traffic) and > probably quite hungry. Hence, I'm suggesting a > pre-meeting dinner at El Famous Burrito across the > street on Rte 60. For those unaware of the area, El > Famous Burrito is on Rte 60, one traffic light west of > the meeting location (Lakeview Parkway), though it may > be easier to refer to it as simply "behind the > Wendy's". > > Interested parties? El Famous Burrito is quite good. > > -Jim..... > I'm quite interested, however I need to get out of Oshkosh soon enough to get there. You don't have a cell phone do you? --Jonathan From jthomasoniii at yahoo.com Tue Feb 3 14:28:17 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities In-Reply-To: <40200103.4020207@kuiki.net> Message-ID: <20040203202817.19202.qmail@web60205.mail.yahoo.com> > I'm quite interested, however I need to get out of > Oshkosh soon enough > to get there. You don't have a cell phone do you? > > --Jonathan El Famous Burrito ain't exactly a gigantic place, so any mongers that show up shouldn't have much trouble finding each other, I'd wager. Maybe we should put up a "PERL PEOPLE EAT HERE" sign. :) -Jim.... __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ From ehs at pobox.com Tue Feb 3 14:35:40 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities In-Reply-To: <20040203195143.82390.qmail@web60209.mail.yahoo.com> References: <20040203195143.82390.qmail@web60209.mail.yahoo.com> Message-ID: <20040203203540.GA10631@chloe.inkdroid.org> On Tue, Feb 03, 2004 at 11:51:43AM -0800, Jim Thomason wrote: > Interested parties? El Famous Burrito is quite good. I'll be there. We'll have to submit a patch to Acme::PM::Chicago with menu options :) //Ed From jt at plainblack.com Tue Feb 3 15:20:00 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] pre-meeting festivities In-Reply-To: <40200103.4020207@kuiki.net> Message-ID: >> Interested parties? El Famous Burrito is quite good. You should also mention that it's authentic mexican food, not american mexican food. Therefore if you like american or don't like mexican be aware of that. JT ~ Plain Black Create like a god, command like a king, work like a slave. From hachi at kuiki.net Tue Feb 3 21:19:13 2004 From: hachi at kuiki.net (hachi@kuiki.net) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Here's the code you asked for Jay Message-ID: <53091.209.242.29.254.1075864753.squirrel@webmail.kuiki.net> And everyone else can have it too... yay! --Jonathan -------------- next part -------------- A non-text attachment was scrubbed... Name: chat.perl Type: application/octet-stream Size: 1793 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20040203/62b8cb03/chat.obj From jtsmith at brunswickwdi.com Tue Feb 3 12:40:27 2004 From: jtsmith at brunswickwdi.com (jtsmith@brunswickwdi.com) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Free Books Message-ID: Thanks to our new sponsor Sams Publishing (www.samspublishing.com) we are going to be giving away free books about open source software at our meetings from now on. We'll hold a drawing at the end of each meeting, and you must be present to win. Although not necessary, we encourage the winners to write a short review of the book they receive and post it to the OSS Chicago web site and to the Talk mailing list (talk@osschicago.com). Also, Sams has generously offered to ship us a free copy of any book from either the Sams line or their Que (www.quepublishing.com) line of books. The only catch is that any book we request must be reviewed by the requestor and the review must be published publically on the web (at osschicago.com) and a copy of the review must be sent to Sams. So if there are any books you're interested in reviewing, please send me an email and I'll put in the request. JT Smith \\ WDI 200 Fairway Dr, Suite 184, Vernon Hills, IL 60061 P:847-970-6833 F:847-970-6869 C:847-571-1576 http://www.brunswickwdi.com ############################################################# This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to From me at heyjay.com Wed Feb 4 09:43:14 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod Message-ID: <001101c3eb39$5d264c00$6405a8c0@a30> Hi, if I want to create a verbatim paragraph, ascii art, I want to do this: -------- | | /|\ | ==================== | | artist | | |------------------| | | artistid |--- | name | | parentartistid | ==================== The problem is all the leading spaces on the "pigs ear", self reference, throw carriage returns in the resulting pod. Anyone know how to avoid this? Thanks Jay From jason at multiply.org Wed Feb 4 10:39:33 2004 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Kinda OT - redhat enterprise linux for apache/mod_perl Message-ID: <200402041559.i14FxVE26749@tetsuo.mengelt.com> Hi All. I have a proejct that will be an apache/mod_perl/mason|tt2 application. My question is, has anyone used the redhat enterprise linux product? It comes with stronghold, based on apache 2, which does me no good. I am assuming that everyone will say "skip it", but I wanna know what the thoughts are out there about this. I am most familiar with redhat distros, but am wary of running fedora for this app. Thoughts? -jason scott gessner jason@multiply.org From ehs at pobox.com Wed Feb 4 11:05:22 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] poe/class::dbi/ora Message-ID: <20040204170522.GA16812@chloe.inkdroid.org> Last nights POE talk was great. It was a huge topic (just look at all those modules in the distro, and extensions on CPAN), and Jonathan did a great job of providing a view from 1000ft, and then getting into the nitty gritty of building a mini chat server. We also got to hear a few details of how Jonathan is using Perl to talk to his car, but that's another talk eh? :) After giving out the books last night there was some discussion about next months meeting. Jay Strauss has volunteered to talk about the extremely useful Class::DBI [1] database abstraction tool. Jay could you send some details about your talk to the list at some point, and we can update the website? Below is the latest ORA newsletter. If you are willing to review any of the new titles please respond to the list and one will be sent your way. //Ed -- [1] http://search.cpan.org/perldoc?Class::DBI ================================================================ O'Reilly News for User Group Members February 3, 2004 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Hardware Hacking Projects for Geeks -C# Cookbook -Security Assessment -Wicked Cool Shell Scripts ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Darryl Le??n, Ph.D. ("Sequence Analysis in a Nutshell"), San Diego Bioinformatics Forum, San Diego--February 10 -Jesse Liberty ("Programming C#," "Programming Visual Basic .NET"), .NET Face to Face, Atlanta, GA--February 20-22 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -Joe Trippi keynote added to Digital Democracy Teach-In -O'Reilly Emerging Technology Conference -OSCON 2004: Call for Participation--Last Chance ---------------------------------------------------------------- News ---------------------------------------------------------------- -Wireless Mesh Networking -Interviews with Digital Democracy Activists -The Ideal Digital Photographer's Workflow, Part 2 -The New Breed of Version Control Systems -Why Run Free Software on a PDA? -Troubleshooting with Postfix Logs -What's New in Tomcat 5 -Effective Forms Authentication, Part 1 -Serialization in .NET, Part 1 -The Macintosh's Twisted Truth -Smart File Sharing Between Macs and PCs ---------------------------------------------------------------- News From Your Peers ---------------------------------------------------------------- -San Gabriel Valley Linux Users Group Meeting, Pasadena, CA--February 12 ================================================ 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, No Starch, Paraglyph, or Syngress 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 ---------------------------------------------------------------- O'Reilly New Releases ---------------------------------------------------------------- ***Hardware Hacking Projects for Geeks ISBN: 0596003145 >From building a home arcade machine to creating a cubicle intrusion detection system, "Hardware Hacking Projects for Geeks" offers an array of inventive, customized electronics projects for the geek who can't help looking at a gadget and wondering how it might be "upgraded." The book begins with less complex hacking projects then moves into more advanced hacks. Clear step-by-step instructions allow even those with no formal electronics- or hardware-engineering skills to hack real hardware in clever ways. http://www.oreilly.com/catalog/hardwarehks/ Excerpts are available free online: http://www.oreilly.com/catalog/hardwarehks/chapter/index.html ***C# Cookbook ISBN: 0596003390 "C# Cookbook" provides practical answers to day-to-day C# programming questions, using code recipes collected especially for developers working on the .NET platform. In addition to the complete, documented code samples showing how to solve hundreds of specific problems, you'll find discussions of how the underlying technology works as well as material on alternatives, limitations, and other considerations where appropriate. This definitive collection of recipes will help developers of all levels solve problems now. http://www.oreilly.com/catalog/csharpckbk/ Chapter 8, "Regular Expressions," is available free online: http://www.oreilly.com/catalog/csharpckbk/chapter/index.html ---------------------------------------------------------------- Publishing Partners New Releases ---------------------------------------------------------------- ***Security Assessment Publisher: Syngress ISBN: 1932266968 The National Security Agency's INFOSEC Assessment Methodology (IAM) provides guidelines for performing an analysis of how information is handled within an organization: looking at the systems that store, transfer, and process information. It also analyzes the impact to an organization if there is a loss of integrity, confidentiality, or availability. This book shows how to do a complete security assessment based on the NSA's guidelines. http://www.oreilly.com/catalog/1932266968/ ***Wicked Cool Shell Scripts Publisher: No Starch Press ISBN: 1593270127 101 useful, customizable, and fun Linux, Mac OS X and UNIX shell scripts that you can use to solve common problems and personalize your computing environment. Includes an interactive calculator, a spell checker, a disk backup utility, a weather tracker, a web logfile analysis tool, and much more. The cookbook-style examples are all written in Bourne Shell (sh) syntax. http://www.oreilly.com/catalog/1593270127/ ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Darryl Le??n, Ph.D. ("Sequence Analysis in a Nutshell"), San Diego Bioinformatics Forum, San Diego--February 10 Darryl will discuss "Bioinformatics: What is commercially viable and what is not." 5:30-8:00pm Diversa Corporation 4955 Directors Place, San Diego, CA 92121 http://www.sdbioinfo.org/next.html ***Jesse Liberty ("Programming C#," "Programming Visual Basic .NET"), .NET Face to Face, Atlanta, GA--February 20-22 Jesse is a featured speaker at this weekend conference for programmers working in .NET. Marriott Atlanta Century Center, Atlanta, GA. For Registration and information go to: http://www.mentor-network.com/ ================================================ Conference News ================================================ ***Joe Trippi keynote added to Digital Democracy Teach-In Joe Trippi, the man whose ground-breaking use of Internet-based campaigning propelled Howard Dean from obscurity to early front-runner, has just signed on as keynoter at the Digital Democracy Teach-In. Former Dean campaign manager Trippi will take Teach-In participants inside the campaign's unconventional experiment in Internet politics, and look at both victories and lessons learned. While Dean may no longer be leading the pack, the other candidates are rushing to emulate Trippi's Internet strategy--as "Wired News" declared recently, "Internet politics is dead. Long live Internet politics." Trippi will kick off the Teach-In at 8:30 am this coming Monday, February 9, in San Diego, CA. Digital Democracy Teach-In February 9, 2004 Westin Horton Plaza, San Diego, CA http://conferences.oreillynet.com/et2004/edemo.csp Co-located with the O'Reilly Emerging Technology Conference To register, go to: (Sorry, no user group discounts apply.) http://conferences.oreillynet.com/cs/et2004/create/ord_et04?x-t=edemo.create.form ***O'Reilly Emerging Technology Conference February 9-12, 2004 Westin Horton Plaza San Diego San Diego, CA 92101 http://conferences.oreilly.com/etech/ Use code DSUG when you register, and receive 20% off conference pricing. To register for the conference, go to: http://conferences.oreillynet.com/pub/w/28/register.html ***Last Chance--OSCON 2004: Call for Participation Individuals and companies interested in making presentations or giving tutorials at next summer's O'Reilly Open Source Convention in Portland, Oregon are invited to submit proposals. This year's theme is "Opening the Future: Discover, Develop, Deliver." Tracks of interest run the open source gamut from Apache to XML, and we're also looking for proposals for sessions that help attendees add open source to their companies. The deadline for submitting proposals is February 9. To submit a proposal, go to: http://conferences.oreillynet.com/cs/os2004/create/e_sess ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***Wireless Mesh Networking Tomas Krag and Sebastian Buttrich take a look at some of the principles of wireless mesh networking and they demonstrate how to install and run a mesh network on a Linux-based computer. http://www.oreillynet.com/pub/a/wireless/2004/01/22/wirelessmesh.html Tomas will discuss how wireless technologies can bring Internet and Intranet connectivity to the developing world at O'Reilly's upcoming ETech 2004. http://conferences.oreilly.com/etech/ ***Interviews with Digital Democracy Activists On a recent NPR "Fresh Air" program, Terry Gross interviewed William Greene of RightMarch.com, as well as Wes Boyd and Eli Pariser of MoveOn.org. William and Wes will both be featured speakers on February 9 at O'Reilly's Digital Democracy Teach-In. http://freshair.npr.org/day_fa.jhtml?display=day&todayDate=01/21/2004 ***The Ideal Digital Photographer's Workflow, Part 2 Ken Milburn follows up on suggestions he made in Part 1 of this two-part series about creating a minimally destructive workflow for the work you do inside image-editing software. Here he offers five nondestructive editing steps to take once you've downloaded your images. Then he provides some second-stage editing techniques to enhance the impact your images will have on your clients, or your friends and family. Ken is the author of the upcoming "Digital Photography: Expert Techniques." http://www.oreillynet.com/pub/a/javascript/2004/01/21/digital_photography.html --------------------- Open Source --------------------- ***The New Breed of Version Control Systems CVS, part of the glue that holds open source development together, is showing its age. Many competitors have emerged recently, fixing misfeatures and adding new ideas. Shlomi Fish explores several current open source version control systems that may be better for your needs than CVS. http://www.onlamp.com/pub/a/onlamp/2004/01/29/scm_overview.html ***Why Run Free Software on a PDA? As PDAs gain power and capabilities, embedded Linux is more and more attractive. Sharp's Zaurus is a popular Linux PDA. Why aren't more palmtop computers running free software? Guylhem Aznar explores and evangelizes Linux on small devices. http://www.linuxdevcenter.com/pub/a/linux/2004/01/29/zaurus.html ***Troubleshooting with Postfix Logs Kyle Dent, author of "Postfix: The Definitive Guide," discusses Postfix logging in general, how to find all relevant information in the logs, and how to increase the amount of logging when more information is needed. He also suggests a few configuration guidelines that might help prevent problems from the start. http://www.onlamp.com/pub/a/onlamp/2004/01/22/postfix.html --------------------- Java --------------------- ***What's New in Tomcat 5 In December 2003, the Apache Tomcat developers released version 5.0.16 as the first stable release of Tomcat 5. Jason Brittain looks at the latest features and offers insight into the goals established for version 5.0, which had a direct impact on development. http://www.onjava.com/pub/a/onjava/2004/01/28/tomcat5.html Jason is a coauthor of "Tomcat: The Definitive Guide." ISBN: 0596003188 http://www.oreilly.com/catalog/tomcat/index.html --------------------- .NET --------------------- ***Effective Forms Authentication, Part 1 ASP.NET offers several possibilities for authenticating users, but when you come right down to it, there's only one reasonable alternative for most applications: forms authentication. Mike Gunderloy takes you step-by-step through creating a forms authentication project and helps you avoid the potholes. http://www.ondotnet.com/pub/a/dotnet/2004/02/02/effectiveformsauth.html ***Serialization in .NET, Part 1 Serialization of data using built-in .NET support makes persistence easy and reusable. Dan Frumin reviews the support available for serialization and look at a couple of scenarios for using it. http://www.ondotnet.com/pub/a/dotnet/2004/01/26/serializationpt1.html --------------------- Mac --------------------- ***The Macintosh's Twisted Truth Here's a recent "Wired News" article abridged from Owen Linzmayer's new release, "Apple Confidential 2.0: The Definitive History of the World's Most Colorful Company." http://www.wired.com/news/mac/0,2125,61795,00.html Apple Confidential 2.0 No Starch Press ISBN: 1593270100 http://www.oreilly.com/catalog/1593270100/ ***Smart File Sharing Between Macs and PCs There are lots of ways to share files between Macs and PCs, and most of them are aggravating at best. Wei Meng Lee shows you a method that's much easier and cleaner than just about every other solution. http://www.macdevcenter.com/pub/a/mac/2004/01/30/pc_share.html ================================================ News From Your Peers ================================================ ***San Gabriel Valley Linux Users Group Meeting, Pasadena, CA--February 12 Come to the next meeting of SGVLUG to see "Hacking TiVo" by Claude Felizardo. This presentation will cover Tivo hacks, selection criteria, and enhancing one of today's most popular consumer electronics gadgets--the TiVo. Time: 7-9pm Location: Guggenheim Building, Room 101 on the Caltech Campus in Pasadena, CA For directions and more information, go to: http://www.sgvlug.org/ Until next time-- Marsee ----- End forwarded message ----- -- Ed Summers aim: inkdroid web: http://www.inkdroid.org He who binds to himself a joy Does the winged life destroy; But he who kisses the joy as it flies Lives in eternity's sun rise. [William Blake] From ehs at pobox.com Wed Feb 4 13:31:34 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod In-Reply-To: <001101c3eb39$5d264c00$6405a8c0@a30> References: <001101c3eb39$5d264c00$6405a8c0@a30> Message-ID: <20040204193134.GB16812@chloe.inkdroid.org> On Wed, Feb 04, 2004 at 09:43:14AM -0600, Jay Strauss wrote: > The problem is all the leading spaces on the "pigs ear", self reference, > throw carriage returns in the resulting pod. Anyone know how to avoid this? You should be ok if you start each line of your illustration with some whitespace, a la =head1 Example 1 -------- | | /|\ | ==================== | | artist | | |------------------| | | artistid |--- | name | | parentartistid | ==================== =cut You may run into some wrapping issues if the text gets to wide, but that's pretty much unavoidable. //Ed From Dooley.Michael at con-way.com Wed Feb 4 13:48:36 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] GNUPG Message-ID: Just thought I would toss out this update. I got GnuPG 0.09 working on solaris 8 on sparc platform. there was a bug in the module where the authur didn't quote part of his syntax. so I did that and it is working like a charm. kinda niCe to have this avaliable now. since a lot of the communication we do is over the internet. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Wiggins d Anconia Sent: Tuesday, February 03, 2004 1:55 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] GNUPG > anyone use any of the modules on CPAN. there are 3 or 4. was curious if you > favored one over the other. > > my basic use will be to automate encrypting files then ftp them to a host. > then retrieve files, decrypt them to a local file name and process them. > Around a year ago I took a pretty exhaustive look at the GnuPG/OpenPGP compatible options and came up with the following summary: "Crypt::OpenPGP - Written in Perl using numerous other Perl modules to simulate OpenPGP (with a gnupg compatibility setting) GnuPG::Interface - An elegant implementation of calling gnupg from the command line, requires gnupg to be installed on the local system. Two other modules exist, one of which uses a deprecated feature of gnupg that we had to avoid (and should probably be avoided and is replaced by the module mentioned above), the other failed to install because of a dependency problem, one we specifically wanted to avoid." My thoughts are basically still the same. If you are looking for pure Perl (or at least no shelling out), don't have very large files (aka that won't fit in memory all at once), and speed isn't critical then the first is excellent. If you are looking for complete gnupg compatibility, or speed is a bigger issue, or you don't want to keep all of the dependencies updated, or your files don't fit in memory, then the second may be a better option. In the end we used neither for a number of reasons, speed being the primary one for the first, in the second case the 'exec' used when calling the gnupg executable caused signal handling problems with the rest of our app, which is conveniently based on POE (tonight's discussion which I can't make :-( ) and using Wheel::Run to handle simultaneous subprocessing. I suspect either would be fine for your task. I haven't done a more recent analysis, and I am not an encryption expert, just a Perl programmer that has to process (both directions) lots of OpenPGP files relatively quickly. Let me know if you have any specific questions, sorry I can't provide code, I haven't gotten that far with this employer yet ;-)... http://danconia.org _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From wiggins at danconia.org Wed Feb 4 14:44:39 2004 From: wiggins at danconia.org (Wiggins d Anconia) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] GNUPG Message-ID: <200402042044.i14Kidw06851@residualselfimage.com> > Just thought I would toss out this update. > > I got GnuPG 0.09 working on solaris 8 on sparc platform. there was a bug in > the module where the authur didn't quote part of his syntax. so I did that > and it is working like a charm. kinda niCe to have this avaliable now. since > a lot of the communication we do is over the internet. > This is the module I referenced as using a feature of GnuPG that is deprecated. It uses the old '--run-as-shm-coprocess' switch which was deprecated in GnuPG 1.0.7 (I believe, but couldn't find it in the screwed up release notes) and is removed in newer releases, maybe even 1.2.x's, and I would imagine for sure in 1.3.x's (dev branch). The replacement is to use --command-fd with --status-fd which is what the GnuPG::Interface module uses that I referenced below. I did actually like the GnuPG.pm interface at the time but couldn't rely on it not working with newer GnuPG versions. Beware it may stop working at any time and since it doesn't seem to be maintained..... Unless of course the reigns get picked up and the module switches to use the newer interface, though I imagine that breaks backwards compatibility for anyone already using it.... http://danconia.org > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Wiggins d Anconia > Sent: Tuesday, February 03, 2004 1:55 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] GNUPG > > > > anyone use any of the modules on CPAN. there are 3 or 4. was curious > if you > > favored one over the other. > > > > my basic use will be to automate encrypting files then ftp them to a host. > > then retrieve files, decrypt them to a local file name and process them. > > > > Around a year ago I took a pretty exhaustive look at the GnuPG/OpenPGP > compatible options and came up with the following summary: > > "Crypt::OpenPGP - Written in Perl using numerous other Perl modules to > simulate OpenPGP (with a gnupg compatibility setting) > > GnuPG::Interface - An elegant implementation of calling gnupg from the > command line, requires gnupg to be installed on the local system. > > Two other modules exist, one of which uses a deprecated feature of gnupg > that we had to avoid (and should probably be avoided and is replaced by > the module mentioned above), the other failed to install because of a > dependency problem, one we specifically wanted to avoid." > > My thoughts are basically still the same. If you are looking for pure > Perl (or at least no shelling out), don't have very large files (aka > that won't fit in memory all at once), and speed isn't critical then the > first is excellent. If you are looking for complete gnupg > compatibility, or speed is a bigger issue, or you don't want to keep all > of the dependencies updated, or your files don't fit in memory, then the > second may be a better option. > > In the end we used neither for a number of reasons, speed being the > primary one for the first, in the second case the 'exec' used when > calling the gnupg executable caused signal handling problems with the > rest of our app, which is conveniently based on POE (tonight's > discussion which I can't make :-( ) and using Wheel::Run to handle > simultaneous subprocessing. I suspect either would be fine for your > task. I haven't done a more recent analysis, and I am not an encryption > expert, just a Perl programmer that has to process (both directions) > lots of OpenPGP files relatively quickly. > > Let me know if you have any specific questions, sorry I can't provide > code, I haven't gotten that far with this employer yet ;-)... > From lembark at wrkhors.com Wed Feb 4 18:50:01 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] poe/class::dbi/ora In-Reply-To: <20040204170522.GA16812@chloe.inkdroid.org> References: <20040204170522.GA16812@chloe.inkdroid.org> Message-ID: <279240000.1075942201@[192.168.200.4]> > Below is the latest ORA newsletter. If you are willing to review any of > the new titles please respond to the list and one will be sent your way. I'd actually like to get the copy O'Reilly promised me to review... I'd take a shot at the Hardware book. I'm not the world's best solder-jockey; probably be a good guinea pig for it. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Thu Feb 5 08:04:21 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod References: <001101c3eb39$5d264c00$6405a8c0@a30> <20040204193134.GB16812@chloe.inkdroid.org> Message-ID: <00ae01c3ebf1$dacbf070$6405a8c0@a30> Yes, I did, before posting, but it still didn't work. It may have been the line --------- doing something unintended Jay ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Wednesday, February 04, 2004 1:31 PM Subject: Re: [Chicago-talk] Multiple spaces, ascii art, pod > On Wed, Feb 04, 2004 at 09:43:14AM -0600, Jay Strauss wrote: > > The problem is all the leading spaces on the "pigs ear", self reference, > > throw carriage returns in the resulting pod. Anyone know how to avoid this? > > You should be ok if you start each line of your illustration with some > whitespace, a la > > =head1 Example 1 > > -------- > | | > /|\ | > ==================== | > | artist | | > |------------------| | > | artistid |--- > | name | > | parentartistid | > ==================== > > =cut > > You may run into some wrapping issues if the text gets to wide, but that's > pretty much unavoidable. > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From ehs at pobox.com Thu Feb 5 08:16:48 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod In-Reply-To: <00ae01c3ebf1$dacbf070$6405a8c0@a30> References: <001101c3eb39$5d264c00$6405a8c0@a30> <20040204193134.GB16812@chloe.inkdroid.org> <00ae01c3ebf1$dacbf070$6405a8c0@a30> Message-ID: <20040205141648.GA22743@chloe.inkdroid.org> On Thu, Feb 05, 2004 at 08:04:21AM -0600, Jay Strauss wrote: > --------- > doing something unintended file: test.pod =head1 Example 1 -------- | | /|\ | ==================== | | artist | | |------------------| | | artistid |--- | name | | parentartistid | ==================== =cut % pod2text test.pod Example 1 -------- | | /|\ | ==================== | | artist | | |------------------| | | artistid |--- | name | | parentartistid | ==================== Looks ok to me :) //Ed From me at heyjay.com Thu Feb 5 10:39:23 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod References: <001101c3eb39$5d264c00$6405a8c0@a30><20040204193134.GB16812@chloe.inkdroid.org><00ae01c3ebf1$dacbf070$6405a8c0@a30> <20040205141648.GA22743@chloe.inkdroid.org> Message-ID: <003201c3ec06$9d507300$6405a8c0@a30> I think its, maybe, a paging issue Jay ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Thursday, February 05, 2004 8:16 AM Subject: Re: [Chicago-talk] Multiple spaces, ascii art, pod > On Thu, Feb 05, 2004 at 08:04:21AM -0600, Jay Strauss wrote: > > --------- > > doing something unintended > > file: test.pod > > =head1 Example 1 > > -------- > | | > /|\ | > ==================== | > | artist | | > |------------------| | > | artistid |--- > | name | > | parentartistid | > ==================== > > =cut > > % pod2text test.pod > > Example 1 > -------- > | | > /|\ | > ==================== | > | artist | | > |------------------| | > | artistid |--- > | name | > | parentartistid | > ==================== > > Looks ok to me :) > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From jthomasoniii at yahoo.com Thu Feb 5 11:08:34 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod In-Reply-To: <003201c3ec06$9d507300$6405a8c0@a30> Message-ID: <20040205170834.30686.qmail@web60202.mail.yahoo.com> Make sure that you've got empty lines around your =pod and =cut lines. =pod (stuff) =cut And make sure there's no spaces or anything on those empty lines. They need to be truly empty. + =pod + (stuff) + =cut + Those lines with the plusses up there. I've seen wacky pod things w/o the blank line that's really blank. Also, maybe try getting rid of the === line, it may be getting confused and thinking it's a pod directive. Of course, I'm rather disappointed with this whole thread, since when I saw the subject, I got my hopes up when I saw "multiple spaces" and "ascii art" that it might be about multiple dimensional ascii art, and (you see) I wrote a program to do that a few years back. http://www.jimandkoka.com/hyper.cgi http://www.jimandkoka.com/hyper.txt for the source Not terribly easy to understand or well written, though. -Jim..... --- Jay Strauss wrote: > I think its, maybe, a paging issue > > Jay > ----- Original Message ----- > From: "Ed Summers" > To: "Chicago.pm chatter" > Sent: Thursday, February 05, 2004 8:16 AM > Subject: Re: [Chicago-talk] Multiple spaces, ascii > art, pod > > > > On Thu, Feb 05, 2004 at 08:04:21AM -0600, Jay > Strauss wrote: > > > --------- > > > doing something unintended > > > > file: test.pod > > > > =head1 Example 1 > > > > -------- > > | | > > /|\ | > > ==================== | > > | artist | | > > |------------------| | > > | artistid |--- > > | name | > > | parentartistid | > > ==================== > > > > =cut > > > > % pod2text test.pod > > > > Example 1 > > -------- > > | | > > /|\ | > > ==================== | > > | artist | | > > |------------------| | > > | artistid |--- > > | name | > > | parentartistid | > > ==================== > > > > Looks ok to me :) > > > > //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 __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From ehs at pobox.com Thu Feb 5 11:43:51 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod In-Reply-To: <20040205170834.30686.qmail@web60202.mail.yahoo.com> References: <003201c3ec06$9d507300$6405a8c0@a30> <20040205170834.30686.qmail@web60202.mail.yahoo.com> Message-ID: <20040205174351.GF22743@chloe.inkdroid.org> On Thu, Feb 05, 2004 at 09:08:34AM -0800, Jim Thomason wrote: > http://www.jimandkoka.com/hyper.cgi > http://www.jimandkoka.com/hyper.txt for the source I vote for putting some of these on our chicago.pm t-shirts. > Not terribly easy to understand or well written, > though. It's formatted nicely, and has some nice comments at the top. It doesn't say "fuck it, i'll use the fix" at the bottom though :) Perhaps applying [1] some Acme::EyeDrops [2] helps. //Ed [1] http://www.inkdroid.org/tmp/hypercamel.pl [2] http://search.cpan.org/perldoc?Acme::EyeDrops From jthomasoniii at yahoo.com Thu Feb 5 12:18:15 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod In-Reply-To: <20040205174351.GF22743@chloe.inkdroid.org> Message-ID: <20040205181815.22932.qmail@web60205.mail.yahoo.com> > It doesn't say "fuck it, i'll use the fix" at the > bottom though :) Okay, I'll fill in the rest of the list of the story I related to Ed and Jason at El Famous Burrito on Tuesday. It's the documentation gaffe that I never managed to live down. Apparently, in a script I wrote, I started it off something like this: . . . #set up database handle my $dbh = UtilityModule->connect(); So the guy maintaining it looked at it and said, "Well. This is promising. Should be well documented!" I then proceeded to comment absolutely nothing else for the entire duration of the program (a few hundred lines, I think) until about 15 lines from the bottom, where there was the single comment: #fuck it, I'll use the fix He marvelled for months at the great potential that program showed for documentation and how much it completely, utterly, collapsed. -Jim.... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From ehs at pobox.com Thu Feb 5 13:37:30 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] gaffes, was: Multiple spaces, ascii art, pod In-Reply-To: <20040205181815.22932.qmail@web60205.mail.yahoo.com> References: <20040205174351.GF22743@chloe.inkdroid.org> <20040205181815.22932.qmail@web60205.mail.yahoo.com> Message-ID: <20040205193730.GH22743@chloe.inkdroid.org> On Thu, Feb 05, 2004 at 10:18:15AM -0800, Jim Thomason wrote: > It's the documentation gaffe that I never managed to > live down. Since we're trading gaffes... Imagine first day on a job; having fun working with Oracle for the first time since it has views (unlike MySQL at the time); building a view of some data in another table (which turns out to be a very important); finished with view so the view is deleted: delete from myview; instead of drop myview; Quit out of SQL*Plus session (commiting transaction). Feel heart rate increase sharply while DBA remains calm saying "now would be a good time to test those backups!". //Ed From me at heyjay.com Thu Feb 5 22:10:14 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod References: <20040205170834.30686.qmail@web60202.mail.yahoo.com> Message-ID: <00a401c3ec67$99435820$6405a8c0@a30> Jim that seemed to work (although I'm not sure if it just made it page correctly) Jay ----- Original Message ----- From: "Jim Thomason" To: "Chicago.pm chatter" Sent: Thursday, February 05, 2004 11:08 AM Subject: Re: [Chicago-talk] Multiple spaces, ascii art, pod > Make sure that you've got empty lines around your =pod > and =cut lines. > > =pod > > (stuff) > > =cut > > And make sure there's no spaces or anything on those > empty lines. They need to be truly empty. > > + > =pod > + > (stuff) > + > =cut > + > > Those lines with the plusses up there. I've seen wacky > pod things w/o the blank line that's really blank. > Also, maybe try getting rid of the === line, it may be > getting confused and thinking it's a pod directive. > > Of course, I'm rather disappointed with this whole > thread, since when I saw the subject, I got my hopes > up when I saw "multiple spaces" and "ascii art" that > it might be about multiple dimensional ascii art, and > (you see) I wrote a program to do that a few years > back. > > http://www.jimandkoka.com/hyper.cgi > > http://www.jimandkoka.com/hyper.txt for the source > > Not terribly easy to understand or well written, > though. > > -Jim..... > --- Jay Strauss wrote: > > I think its, maybe, a paging issue > > > > Jay > > ----- Original Message ----- > > From: "Ed Summers" > > To: "Chicago.pm chatter" > > Sent: Thursday, February 05, 2004 8:16 AM > > Subject: Re: [Chicago-talk] Multiple spaces, ascii > > art, pod > > > > > > > On Thu, Feb 05, 2004 at 08:04:21AM -0600, Jay > > Strauss wrote: > > > > --------- > > > > doing something unintended > > > > > > file: test.pod > > > > > > =head1 Example 1 > > > > > > -------- > > > | | > > > /|\ | > > > ==================== | > > > | artist | | > > > |------------------| | > > > | artistid |--- > > > | name | > > > | parentartistid | > > > ==================== > > > > > > =cut > > > > > > % pod2text test.pod > > > > > > Example 1 > > > -------- > > > | | > > > /|\ | > > > ==================== | > > > | artist | | > > > |------------------| | > > > | artistid |--- > > > | name | > > > | parentartistid | > > > ==================== > > > > > > Looks ok to me :) > > > > > > //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 > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance: Get your refund fast by filing online. > http://taxes.yahoo.com/filing.html > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Thu Feb 5 22:13:30 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Multiple spaces, ascii art, pod References: <20040205170834.30686.qmail@web60202.mail.yahoo.com> Message-ID: <00a501c3ec67$9975b2c0$6405a8c0@a30> Jim, What would have been really nice is if the user could supply size information and have boxes built to the desired size. Now that would have saved me some time Jay ----- Original Message ----- From: "Jim Thomason" To: "Chicago.pm chatter" Sent: Thursday, February 05, 2004 11:08 AM Subject: Re: [Chicago-talk] Multiple spaces, ascii art, pod > Make sure that you've got empty lines around your =pod > and =cut lines. > > =pod > > (stuff) > > =cut > > And make sure there's no spaces or anything on those > empty lines. They need to be truly empty. > > + > =pod > + > (stuff) > + > =cut > + > > Those lines with the plusses up there. I've seen wacky > pod things w/o the blank line that's really blank. > Also, maybe try getting rid of the === line, it may be > getting confused and thinking it's a pod directive. > > Of course, I'm rather disappointed with this whole > thread, since when I saw the subject, I got my hopes > up when I saw "multiple spaces" and "ascii art" that > it might be about multiple dimensional ascii art, and > (you see) I wrote a program to do that a few years > back. > > http://www.jimandkoka.com/hyper.cgi > > http://www.jimandkoka.com/hyper.txt for the source > > Not terribly easy to understand or well written, > though. > > -Jim..... > --- Jay Strauss wrote: > > I think its, maybe, a paging issue > > > > Jay > > ----- Original Message ----- > > From: "Ed Summers" > > To: "Chicago.pm chatter" > > Sent: Thursday, February 05, 2004 8:16 AM > > Subject: Re: [Chicago-talk] Multiple spaces, ascii > > art, pod > > > > > > > On Thu, Feb 05, 2004 at 08:04:21AM -0600, Jay > > Strauss wrote: > > > > --------- > > > > doing something unintended > > > > > > file: test.pod > > > > > > =head1 Example 1 > > > > > > -------- > > > | | > > > /|\ | > > > ==================== | > > > | artist | | > > > |------------------| | > > > | artistid |--- > > > | name | > > > | parentartistid | > > > ==================== > > > > > > =cut > > > > > > % pod2text test.pod > > > > > > Example 1 > > > -------- > > > | | > > > /|\ | > > > ==================== | > > > | artist | | > > > |------------------| | > > > | artistid |--- > > > | name | > > > | parentartistid | > > > ==================== > > > > > > Looks ok to me :) > > > > > > //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 > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance: Get your refund fast by filing online. > http://taxes.yahoo.com/filing.html > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From pbaker at where2getit.com Fri Feb 6 19:37:58 2004 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Kinda OT - redhat enterprise linux for apache/mod_perl In-Reply-To: <200402041559.i14FxVE26749@tetsuo.mengelt.com> References: <200402041559.i14FxVE26749@tetsuo.mengelt.com> Message-ID: <420DB0A2-590E-11D8-A513-000A95D9DE04@where2getit.com> On Feb 4, 2004, at 10:39 AM, jason gessner wrote: > Hi All. > > I have a proejct that will be an apache/mod_perl/mason|tt2 application. > > My question is, has anyone used the redhat enterprise linux product? > It > comes with stronghold, based on apache 2, which does me no good. Does RHE not come with mod_perl? I would expect that it does. > I am assuming that everyone will say "skip it", but I wanna know what > the > thoughts are out there about this. I am most familiar with redhat > distros, > but am wary of running fedora for this app. Thoughts? If you are thinking about going the fedora route, you might as well go with Debian. Afterall, fedora is just Redhat's attempt at being Debian which as we all know is the best distribution, and also the fastest growing[1], mainly because everyone is finally coming to realize how much Redhat sucks. Not to mention your Debian setup will be as simple as doing: apt-get install libapache-mod-perl libhtml-mason-perl 1. http://news.netcraft.com/archives/2004/01/28/ debian_fastest_growing_linux_distribution.html -- Paul Baker "Reality is that which, when you stop believing in it, doesn't go away." -- Philip K. Dick GPG Key: http://homepage.mac.com/pauljbaker/public.asc From lembark at wrkhors.com Fri Feb 6 23:47:50 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Kinda OT - redhat enterprise linux for apache/mod_perl In-Reply-To: <420DB0A2-590E-11D8-A513-000A95D9DE04@where2getit.com> References: <200402041559.i14FxVE26749@tetsuo.mengelt.com> <420DB0A2-590E-11D8-A513-000A95D9DE04@where2getit.com> Message-ID: <1094860000.1076132870@[192.168.200.4]> > If you are thinking about going the fedora route, you might as well go > with Debian. Afterall, fedora is just Redhat's attempt at being Debian > which as we all know is the best distribution, and also the fastest > growing[1], mainly because everyone is finally coming to realize how > much Redhat sucks. Not to mention your Debian setup will be as simple as > doing: apt-get install libapache-mod-perl libhtml-mason-perl > > 1. http://news.netcraft.com/archives/2004/01/28/ > debian_fastest_growing_linux_distribution.html That or use SuSE. Main difference is in things like the startup, which is quite a bit cleaner than debian's, and comes with the standard servers. "Growing" depends heavily on how you ask people. Looking at lpars, they're about 100% SuSE-derived. Most office servers I deal with are RH or SuSE. RH make the big mistake of letting entropy catch up with them in a big, big way. If they concentrate on the server market they'll have to clean things up a bit (or die "trying: $!"... :-). In the meantime, unless you really need a server distro (e.g., owl), I'd suggest SuSE as being simpler to install and manage than any of the others. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Sun Feb 8 22:58:22 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Class::DBI talk next month Message-ID: <002001c3eec9$58e55e90$6405a8c0@a30> A stroll through Class::DBI by Jay Strauss SUMMARY In summary, Class::DBI maps an instance of an object to a row in a relational database table. When you operate upon the object, you affect the underlying database. Class::DBI takes care of generating all the select, inserts, updates, deletes... for you. It makes working with a relational databases almost trivial. INTRODUCTION If your anything like me, you started interacting with your Relational Database Management System (RDBMS), such as: Oracle, Postgres, MySQL, Sybase, SQLServer... (in my order of preference :) using Perl via the vendor supplied command line tool. Shelling out in your script, launching the command line tool to execute some SQL, catching the output, parsing it, and using it in your Perl in some meaningful way. Then I found out about DBI, and the world was beautiful. I could now connect and execute SQL within perl in an con- sise and intuitive way. But then I got lazy (a good thing). And I started writing all kinds of helper modules, to do all the things I was doing over and over. Then, I though, "dummy I bet someone has already done this", so I searched around the web and CPAN, and found Class::DBI. Since then I've been doing my database inter- action exclusively via Class::DBI. Wanna learn more before the meeting? Check out: http://search.cpan.org/~tmtm/Class-DBI-0.95/ From me at heyjay.com Mon Feb 9 07:59:03 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Fw: Class::DBI talk next month Message-ID: <003801c3ef14$e2c56ec0$6405a8c0@a30> I suppose I should have said: This is the topic of the Perl meeting next month: March 2, 2004 @ 7:00 at the WDI facility see: http://chicago.pm.org/meetings/ for more info. Jay ----- Original Message ----- From: "Jay Strauss" To: "chicago-pm" Cc: ; "Tony Bowden" Sent: Sunday, February 08, 2004 10:58 PM Subject: Class::DBI talk next month > A stroll through Class::DBI > by Jay Strauss > > SUMMARY > In summary, Class::DBI maps an instance of an object to a > row in a relational database table. When you operate upon > the object, you affect the underlying database. > Class::DBI takes care of generating all the select, > inserts, updates, deletes... for you. It makes working with > a relational databases almost trivial. > > INTRODUCTION > If your anything like me, you started interacting with > your Relational Database Management System (RDBMS), such > as: Oracle, Postgres, MySQL, Sybase, SQLServer... (in my > order of preference :) using Perl via the vendor supplied > command line tool. Shelling out in your script, launching > the command line tool to execute some SQL, catching the > output, parsing it, and using it in your Perl in some > meaningful way. > > Then I found out about DBI, and the world was beautiful. > I could now connect and execute SQL within perl in an con- > sise and intuitive way. But then I got lazy (a good > thing). And I started writing all kinds of helper modules, > to do all the things I was doing over and over. > > Then, I though, "dummy I bet someone has already done > this", so I searched around the web and CPAN, and found > Class::DBI. Since then I've been doing my database inter- > action exclusively via Class::DBI. > > Wanna learn more before the meeting? Check out: > http://search.cpan.org/~tmtm/Class-DBI-0.95/ > > > From ehs at pobox.com Mon Feb 9 11:48:53 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] chicago/perl job Message-ID: <20040209174853.GA6353@chloe.inkdroid.org> Just in case you're not on the jobs.perl.org list. //Ed -- Date: 9 Feb 2004 15:42:03 -0000 From: Perl Jobs To: jobs@perl.org X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/ Subject: [Perl Jobs] Perl Developer (onsite), United States, IL, Chicago Online URL for this job: http://jobs.perl.org/job/1229 To subscribe to this list, send mail to jobs-subscribe@perl.org. To unsubscribe, send mail to jobs-unsubscribe@perl.org. Posted: February 9, 2004 Job title: Perl Developer Company name: Performics Internal ID: SRPRL Location: United States, IL, Chicago Travel: 0% Terms of employment: Salaried employee Hours: Full time Onsite: yes Description: This position works closely with team members, management, and the Performics staff to continue the development and technological advancement of all Performics software and applications. Must demonstrate positive interpersonal skills and be able to effectively communicate complex technical issues with both technical and non-technical personnel. Essential Job Functions: Work with other team members to implement distributed Internet based systems involving real-time data gathering, complex relational database interactions, and sophisticated reporting. Analyze systems, originate and extend technical design documents, and develop code. Provide testing and deployment assistance to quality assurance and operations groups. Function as a mentor to other peer software developers Required skills: - Bachelors degree in Computer Science or related field or equivalent experience in lieu of formal education. - 5+ years Perl development (Mod_Perl, object Perl, not just Perl scripting) - 5+ years OOD/OOA/OOP experience - 3+ years experience in SQL, database architecture, schema, design, and implementation including Apache::DBI -- Experience working with mod_perl and creating custom Perl modules Extensive experience developing for Apache in a Linux environment High competency level in HTML, Javascript - Experience in a commercial business software environment through all phases of product development (requirements through release). - Self-motivated and able to work independently. - Good oral and written communication skills. Desired skills: Apache and Linux system administration a plus. URL for more information: http://www.performics.com/ Contact information: jobs@performics.com From jthomasoniii at yahoo.com Tue Feb 10 15:45:08 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Mostly off-topic and blatent self-promotion Message-ID: <20040210214508.63109.qmail@web60207.mail.yahoo.com> Well, I figured this could be useful to some of you guys, so I'll pass it along. http://www.lunchmanager.com/ Finally publically accessible. So what's the Lunch Manager do? It coordinates lunch activities. Think of all the times that someone has popped up and said, "Hey, how about eating at so-and-so" only to hear that 3 other people faxed in their order 20 minutes ago and someone's already on the way to pick it up. Well no more! Now you can log in to the lunch manager, propose a lunch activity, and sit back and wait as people respond to your beautiful suggestion of going to McDonald's. Then just round 'em up at 11:45 (they already agreed to go then!) and you're set to go. No fuss, no muss. It's all very exciting, perhaps. Anyway, you may all hit http://www.lunchmanager.com to sign up and log in. And now no more complaining if you didn't hear about a lunch proposal. :-) It's still a bit rough around the edges, but it hasn't been used enough to motivate me to add in the more advanced features that I've got percolating. To keep this more topical to perl-ish things, I'll let you all know that the lunch manager is a 100% pure perl powered site running on linux w/a mysql backend. Total development time is hovering right around 8 hours or so for everything on there, largely due to my applications framework on the backend. To extoll a bit of philosophy here, I highly highly highly recommend doing development in an environment sitting on top of a framework of some sort, whatever it may be. Simply, a good framework allows you to worry about building your actual application instead of all of the nitty gritty details that you shouldn't need to worry about. Things like accessors, mutators, loading objects from the database, committing back to the database, grouping objects, permissions, etc. If you're spending your time re-inventing those wheels, you're not spending it on actually developing your application and you're slowing yourself down. (yes, yes, I'm quite well known as a wheel re-inventer myself. The framework I use is completely homemade, after all) Suggestions or feedback on the lunch manager would be appreciated, but should probably be moved off list. Design philosophy discussion may naturally continue, though. :) -Jim..... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From starbuck at hawaii.rr.com Wed Feb 11 10:49:29 2004 From: starbuck at hawaii.rr.com (Christopher Nava) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl Message-ID: <001301c3f0bf$0499e480$6400a8c0@vector> Does anyone have experience with XSLT processing in Perl? What module do you recommend? I'm attempting to process some XML/XSLT and I'd like to use Perl. I tried downloading the XML::XSLT module from CPAN. However, it hasn't been updated in over 2 years and I'm running into some bugs (more like incomplete functionality since what's been implemented seems to work fine.) I saw XSL::Xalan and XSL::Xerces listed as well... (Are ether of these any good?) I need something that does XSLT transformations and is a relatively complete implementation. I'd LIKE something that exposes the DOM to Perl so I can do a few XPath searches and the like. (But it's not required.) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20040211/706f48ec/attachment.htm From ehs at pobox.com Wed Feb 11 14:15:46 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <001301c3f0bf$0499e480$6400a8c0@vector> References: <001301c3f0bf$0499e480$6400a8c0@vector> Message-ID: <20040211201546.GA17468@chloe.inkdroid.org> On Wed, Feb 11, 2004 at 06:49:29AM -1000, Christopher Nava wrote: > Does anyone have experience with XSLT processing in Perl? > What module do you recommend? > > I need something that does XSLT transformations and is a relatively complete > implementation. > > I'd LIKE something that exposes the DOM to Perl so I can do a few XPath > searches and the like. (But it's not required.) The Apache AxKit [1] project uses XML::Sablotron [2] for XSLT processing. This module is basicallying Perl bindings to the speedy Sablotron C++ library [3]. I've heard lots of good things about AxKit, and seen it being used in production systems before. Matt Sergeant also has a CPAN module XML::XPath which can process XPath searches on a DOM. Matt does great work, I've used his XML::SAX package heavily, and would recommend you check it out. I know XML is a dirty word in some circles but I have been thinking about offering up a talk proposal for chicago-pm on using XML data from Perl. There are lots of modules available, and I was thinking I could provide a view from 1000 ft on parsing XML from Perl, and some practical examples of the various module uses, including guidance on when one approach is more suitable than another. If anyone is interested in this let me know, and I'll start collecting stuff. //Ed [1] http://axkit.org/ [2] http://search.cpan.org/perldoc?XML::Sablotron [3] http://www.gingerall.com/charlie/ga/xml/x_sabperl.xml?s=org -- Ed Summers aim: inkdroid web: http://www.inkdroid.org To see a World in a Grain of Sand And a Heaven in a Wild Flower, Hold Infinity in the palm of your hand And Eternity in an hour. [William Blake] From lembark at wrkhors.com Wed Feb 11 15:24:54 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <20040211201546.GA17468@chloe.inkdroid.org> References: <001301c3f0bf$0499e480$6400a8c0@vector> <20040211201546.GA17468@chloe.inkdroid.org> Message-ID: <339240000.1076534694@[192.168.200.4]> > The Apache AxKit [1] project uses XML::Sablotron [2] for XSLT processing. > This module is basicallying Perl bindings to the speedy Sablotron C++ > library [3]. I've heard lots of good things about AxKit, and seen it > being used in production systems before. > > Matt Sergeant also has a CPAN module XML::XPath which can process XPath > searches on a DOM. Matt does great work, I've used his XML::SAX package > heavily, and would recommend you check it out. > > I know XML is a dirty word in some circles but I have been thinking about > offering up a talk proposal for chicago-pm on using XML data from Perl. > There are lots of modules available, and I was thinking I could provide > a view from 1000 ft on parsing XML from Perl, and some practical > examples of the various module uses, including guidance on when one > approach is more suitable than another. If anyone is interested in this > let me know, and I'll start collecting stuff. A decent set of examples developing a nested SAX in stages would be helpful. All the doc's I can find start with a glaringly simple example then skip to messy one in a single step. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ehs at pobox.com Wed Feb 11 15:27:12 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <339240000.1076534694@[192.168.200.4]> References: <001301c3f0bf$0499e480$6400a8c0@vector> <20040211201546.GA17468@chloe.inkdroid.org> <339240000.1076534694@[192.168.200.4]> Message-ID: <20040211212712.GB17468@chloe.inkdroid.org> On Wed, Feb 11, 2004 at 03:24:54PM -0600, Steven Lembark wrote: > A decent set of examples developing a nested SAX in > stages would be helpful. All the doc's I can find start > with a glaringly simple example then skip to messy one > in a single step. SAX is nice yeah, especially for those large XML documents where building a DOM is out of the question. I'll put together some notes, and maybe later this year I could do the talk if there is enough interest. //Ed From flateyjarbok at yahoo.com Wed Feb 11 15:45:55 2004 From: flateyjarbok at yahoo.com (Richard Solberg) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <20040211212712.GB17468@chloe.inkdroid.org> Message-ID: <20040211214555.33282.qmail@web14708.mail.yahoo.com> --- Ed Summers wrote: > > SAX is nice yeah, especially for those large XML > documents where building > a DOM is out of the question. I'll put together some > notes, and maybe later > this year I could do the talk if there is enough > interest. > Ed, Put me down as wanting to hear something about XML using PERL. Richard Solberg __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From jt at plainblack.com Wed Feb 11 16:16:26 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <20040211214555.33282.qmail@web14708.mail.yahoo.com> Message-ID: >> SAX is nice yeah, especially for those large XML >> documents where building >> a DOM is out of the question. I'll put together some >> notes, and maybe later >> this year I could do the talk if there is enough >> interest. I'd be interested in hearing it too. JT ~ Plain Black Create like a god, command like a king, work like a slave. From Dooley.Michael at con-way.com Wed Feb 11 16:20:51 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl Message-ID: provided I can actually make the meeting I am sure almost anything would be better then the "Perl & XML" book. not that its poor authoring, but I find it to be for someone that is already in the "know". and a bit on the dry side. I would have perfered it w/ a twist or olive. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of JT Smith Sent: Wednesday, February 11, 2004 4:16 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Processing XSLT with Perl >> SAX is nice yeah, especially for those large XML >> documents where building >> a DOM is out of the question. I'll put together some >> notes, and maybe later >> this year I could do the talk if there is enough >> interest. I'd be interested in hearing it too. 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 ehs at pobox.com Wed Feb 11 16:25:07 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: References: Message-ID: <20040211222507.GC17468@chloe.inkdroid.org> On Wed, Feb 11, 2004 at 02:20:51PM -0800, Dooley, Michael wrote: > I would have perfered it w/ a twist or olive. I think this could be arranged ... JT, are martinis allowed in the pit? Seriously, thanks for the feedback. Now where do I get slod :) //Ed From andy at petdance.com Wed Feb 11 17:01:43 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl In-Reply-To: <20040211222507.GC17468@chloe.inkdroid.org> References: <20040211222507.GC17468@chloe.inkdroid.org> Message-ID: <20040211230143.GA14177@petdance.com> > Seriously, thanks for the feedback. Now where do I get slod :) http://search.cpan.org/dist/slide/ -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Wed Feb 11 20:18:59 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl References: <001301c3f0bf$0499e480$6400a8c0@vector> <20040211201546.GA17468@chloe.inkdroid.org> Message-ID: <009801c3f112$2b8e3070$6405a8c0@a30> I'll come ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Wednesday, February 11, 2004 2:15 PM Subject: Re: [Chicago-talk] Processing XSLT with Perl > On Wed, Feb 11, 2004 at 06:49:29AM -1000, Christopher Nava wrote: > > Does anyone have experience with XSLT processing in Perl? > > What module do you recommend? > > > > I need something that does XSLT transformations and is a relatively complete > > implementation. > > > > I'd LIKE something that exposes the DOM to Perl so I can do a few XPath > > searches and the like. (But it's not required.) > > The Apache AxKit [1] project uses XML::Sablotron [2] for XSLT processing. This > module is basicallying Perl bindings to the speedy Sablotron C++ library [3]. > I've heard lots of good things about AxKit, and seen it being used in > production systems before. > > Matt Sergeant also has a CPAN module XML::XPath which can process XPath > searches on a DOM. Matt does great work, I've used his XML::SAX package heavily, > and would recommend you check it out. > > I know XML is a dirty word in some circles but I have been thinking about > offering up a talk proposal for chicago-pm on using XML data from Perl. There > are lots of modules available, and I was thinking I could provide a view from > 1000 ft on parsing XML from Perl, and some practical examples of the various > module uses, including guidance on when one approach is more suitable than > another. If anyone is interested in this let me know, and I'll start > collecting stuff. > > //Ed > > [1] http://axkit.org/ > [2] http://search.cpan.org/perldoc?XML::Sablotron > [3] http://www.gingerall.com/charlie/ga/xml/x_sabperl.xml?s=org > > -- > Ed Summers > aim: inkdroid > web: http://www.inkdroid.org > > To see a World in a Grain of Sand And a Heaven in a Wild Flower, Hold Infinity in the palm of your hand And Eternity in an hour. [William Blake] > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From starbuck at hawaii.rr.com Thu Feb 12 02:00:46 2004 From: starbuck at hawaii.rr.com (Christopher Nava) Date: Mon Aug 2 21:28:05 2004 Subject: [Chicago-talk] Processing XSLT with Perl References: <001301c3f0bf$0499e480$6400a8c0@vector> <20040211201546.GA17468@chloe.inkdroid.org> Message-ID: <002b01c3f13e$529f8c00$6400a8c0@vector> Ed, Thanks for the info. I'll give XML::Sablotron and XML:Path a try. In my case XSL/XPath is just the ticket (since my input data is already in XML format and it's my intended output format as well.) I intend to use Perl for FTP opload, and a bit of logic, while XSL will do the bulk of the data manipulation. I'll post a write up when it's done. I'd love to attend your talk. Unfortunatly, my car can't make the drive from Hawaii. Any chance of a webcast? ;-) --Chris Nava ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Wednesday, February 11, 2004 10:15 AM Subject: Re: [Chicago-talk] Processing XSLT with Perl > On Wed, Feb 11, 2004 at 06:49:29AM -1000, Christopher Nava wrote: > > Does anyone have experience with XSLT processing in Perl? > > What module do you recommend? > > > > I need something that does XSLT transformations and is a relatively complete > > implementation. > > > > I'd LIKE something that exposes the DOM to Perl so I can do a few XPath > > searches and the like. (But it's not required.) > > The Apache AxKit [1] project uses XML::Sablotron [2] for XSLT processing. This > module is basicallying Perl bindings to the speedy Sablotron C++ library [3]. > I've heard lots of good things about AxKit, and seen it being used in > production systems before. > > Matt Sergeant also has a CPAN module XML::XPath which can process XPath > searches on a DOM. Matt does great work, I've used his XML::SAX package heavily, > and would recommend you check it out. > > I know XML is a dirty word in some circles but I have been thinking about > offering up a talk proposal for chicago-pm on using XML data from Perl. There > are lots of modules available, and I was thinking I could provide a view from > 1000 ft on parsing XML from Perl, and some practical examples of the various > module uses, including guidance on when one approach is more suitable than > another. If anyone is interested in this let me know, and I'll start > collecting stuff. > > //Ed > > [1] http://axkit.org/ > [2] http://search.cpan.org/perldoc?XML::Sablotron > [3] http://www.gingerall.com/charlie/ga/xml/x_sabperl.xml?s=org > > -- > Ed Summers > aim: inkdroid > web: http://www.inkdroid.org > > To see a World in a Grain of Sand And a Heaven in a Wild Flower, Hold Infinity in the palm of your hand And Eternity in an hour. [William Blake] > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From jthomasoniii at yahoo.com Thu Feb 12 11:34:02 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] A question of design Message-ID: <20040212173402.51381.qmail@web60205.mail.yahoo.com> Okay, in my free time for the last week or so, I've been designing and building a generic state machine (DFSA, I'm not that much of a masochist). POE inspired me to run off and do it, so blame Jonathan. :*) Basically, everything on my site (and lunchmanager, for those of you signed up for it) is pure MVC. Now, I like my model (modules talking to the database), it's fairly robust and well built. I like my view (the templates I use), because all the presentation is there (although, admittedly, I have a bit more program logic in there than I really should in places). But my controllers (the CGIs in between) I've never been happy with. For one thing, they largely do the same abstract thing (load an object, display it, modify it if necessary). It boils down to this: +-------+ +------------+ +---------+ | | | | | | | Login Y------> Returning? N--+ | Display | | | | | +-> object | +---N---+ +---Y--------+ | | | | +---^-----+ +---V--------+ +----+ | | | +---V---------+ | | Fail <---+ | | | | | +--N Authorized? | | +---^--------+ | | | | +---Y---------+ | | | | | +---V---------+ | | | | | | | Edit object | | | | | | | +---V---------+ | | | | | +---V---------+ | | | | | +---------------N Success? Y--+ | | +-------------+ (My apologies to those not using a fixed width mail client. And man, I have *really* gotta update Text::Flowchart. I haven't touched that thing in 4 years. Still faster using it than it would've been to draw that by hand) Now, naturally, the individual pieces are radically different (again, using the lunch manager, storing a user is completely different than storing a meal or a proposal). Different methods, different validation checks, etc. Nonetheless, it's conceptually the same, so I've been gnawing at it trying to genericize it. I don't like having similar chains of mostly hard-to-read if/else/error ladders as the basis of my CGIs. So I've been designing machines. The present result is this machine implementation which does what I want. For example, say there's a screen that edits a user. Requires name, username, and password, nothing fancy. That's easily done with a new CGI machine: my $machine = JIM::Machine->new( 'type' => 'cgi',#JIM::Machine does have abstract factory ability 'parameters' => [qw(name username password)], 'validTemplate' => 'success.tpl', 'invalidTemplate' => 'failure.tpl', 'message' => 'Success! User updated', 'states' => { 'creation' => sub { my $machine = shift; my $user = JIM::User->load($username) || JIM::User->new(); $machine->heap('user', $user); } } ) || die JIM::Machine->error(); $machine->run(); Voila. That loads the parameters, validates them, commits the object, and redirects the user as appropriate, with a useful message of some sort. You'll also note that the 'creation' state of the machine is overridden with the logic specific to this machine instance (namely, how to create a user object) (yes, states that can/should be overridden are documented in the module). I debate genericizing that step as well, but I don't know if I want to implement an abstract factory in my root class. But I digress. It does gloss over some of the steps (such as permissions), but the gyst is there and I didn't want to bog down with too big an example. Does this seem sound to you guys? I'm trying to convince myself that it's close to the decorator pattern (http://wiki.slowass.net/?DecoratorPattern), but I have a nagging suspicion that it's closer to a MixIn (http://wiki.slowass.net/?MixIns). I'm leaning more and more towards it being a decorater, but I just haven't convinced myself. So what do you guys think? Sound like good design or bad? Probably tomorrow I'm going to start re-factoring the Lunch Manager to use machines like this, since that's going to be my test case to see how easy and/or feasible this approach is in practice. But suggestions about theory would still be welcome. If somebody looks at it and says, "Ah ha! That will bite you in the ass because of *mumble mumble*" it'll invariably save me some headaches. -Jim.... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From pbaker at where2getit.com Thu Feb 12 12:35:44 2004 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] A question of design In-Reply-To: <20040212173402.51381.qmail@web60205.mail.yahoo.com> References: <20040212173402.51381.qmail@web60205.mail.yahoo.com> Message-ID: <44A99937-5D8A-11D8-BDF4-000A95D9DE04@where2getit.com> On Feb 12, 2004, at 11:34 AM, Jim Thomason wrote: > 'validTemplate' => 'success.tpl', > 'invalidTemplate' => 'failure.tpl', Why do you use a different template to signify a failure? Wouldn't it be better to just give them back the original form and display what the problem was inline above the field in question? Also I'm curious what module you are using for the templates. -- 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 jthomasoniii at yahoo.com Thu Feb 12 12:48:07 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] A question of design In-Reply-To: <44A99937-5D8A-11D8-BDF4-000A95D9DE04@where2getit.com> Message-ID: <20040212184807.23151.qmail@web60201.mail.yahoo.com> > > 'validTemplate' => 'success.tpl', > > 'invalidTemplate' => 'failure.tpl', > > Why do you use a different template to signify a > failure? Wouldn't it > be better to just give them back the original form > and display what the > problem was inline above the field in question? > > Also I'm curious what module you are using for the > templates. Two reasons. One is simply flexibility - make it easier to have two different templates in the future. There's no reason that you can't use the same template for both success and failure right now, and I figured I'd rather duplicate it there than have to hack something in later. Regardless, you're correct about how I use it, a lot of the time. Most of the time I'd set the invalid template to the form page they're currently at, and the success template would be the different thing that they get bounced to (potentially). success.tpl and failure.tpl were just example filenames. As for the templating system, it's homemade, like most of my other stuff. -Jim..... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From ehs at pobox.com Fri Feb 13 13:40:25 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] foaf - friend of a friend Message-ID: <20040213194025.GB5739@chloe.inkdroid.org> Anyone other chicago folks use FOAF [1]? I just discoverd Eric Sinclair's FOAF file [2] and thought perhaps there might be other chicago-pm folks who have one. If you do let me know so I can add you to mine [3]. [1] http://www.foaf-project.org/ [2] http://www.kittyjoyce.com/eric/foaf.rdf [3] http://www.inkdroid.org/ehsfoaf.rdf -- Ed Summers aim: inkdroid web: http://www.inkdroid.org The machine that we built would never save us, that's what they say... [Jimi Hendrix] From ehs at pobox.com Fri Feb 13 14:57:22 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] YCTP needs mentors Message-ID: <20040213205722.GC5739@chloe.inkdroid.org> Sorry if you saw this already (on luni) but I figured there might be some chicago perl folks who are interested. //Ed -- From: john stanton To: techtalk@npotechs.org, luni@luni.org Date: Fri, 13 Feb 2004 13:36:26 -0600 Hello all, The Youth Community Technology Program http://www.yctp.org needs several people to act as an "IT mentor" for the young people in our program. The Youth Community Technology Program (YCTP) is looking for technology professionals to mentor young people ages 14-21. Our students come from all over Chicago and represent many ethnicities and cultural backgrounds. The Youth Community Technology Program offers a free computer repair and refurbishment program for "at-risk" youth. Young people enrolled in the program learn how to build and maintain computers, gain valuable experience through internships in area non-profits, and benefit from the experience and companionship of people from the IT industry. One of the neat things about the course is that it includes an Open Source and community service component. In addition to the technical portion of the program, the YCTP offers education assistance, one-on-one counseling and social service referrals, soft skills workshops and job and education placement assistance. Mentors meet twice a month on Saturday's from 11 AM- 2 PM. We ask the mentors to share information about their professions, their educations, and their passions. Mentor and mentees work together to develop a relationship grounded in respect and trust. The meetings are held at Korean American Community Services 4300 North California Ave. (near the intersection of California and Montrose) and are convenient to public transportation. If you are interested please contact me. Thanks! John ------------------ Check out our latest success storys at: http://connectchicago.org/success.aspx?story=kacs2 http://connectchicago.org/success.aspx?story=kacs3 http://www.connectchicago.net/success.aspx?story=kacs ---------------- John Stanton Community Technology Programs Director Korean American Community Services 4300 N. California Ave Chicago, IL 60618 (p)773.583.5501 x247 (f)773.583.7009 http://www.yctp.org http://www.npotechs.org http://www.girlsgetdigtial.org From andy at petdance.com Mon Feb 16 12:46:31 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Slides for my command line options talk In-Reply-To: <20040211171856.GA329820@lidp.com> References: <20040211142355.GA286684@lidp.com> <20040211144857.GA13398@petdance.com> <20040211171856.GA329820@lidp.com> Message-ID: <20040216184631.GA2306@petdance.com> > I didn't see the slides for the command line options on your > web page http://petdance.com/perl/. Am I not looking in the > right place? I hadn't posted the slides for my talk on command line options. It's now available at http://petdance.com/perl/. Right now it's a PDF, but I want to make it be HTML slides soon. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Mon Feb 16 14:09:05 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Data structures in Perl Message-ID: <2364600000.1076962145@[192.168.200.4]> People have asked about data structures in Perl before. Here is an example of one case where I saved a huge amount of time by switching from arrays to hashes for storing sorted, numerically indexed values. The basic problem is to run whole-gene comparisons of organisms by sucking their gens and dna from GenBank files. Genes with length mismatches more than 15% are not worth making detailed comparisions of and can be pruned up front. One way to handle this is: my $min_mult = 1 - $length_factor; my $max_mult = 1 + $length_factor; # @listX = ( [ $name, $dna ], [$name, $dna] ... ) for my $g1 ( @list1 ) { for my $g2 ( @list2 ) { my $i = length $g1; my $j = $i * $min_mult; my $k = $i * $max_mult; my $l = length $g2; next unless $j <= $l && $l <= $k; compare_genes $g1, $g2 } } Problem with this method is that I am running a cartesian product and have to recompute $i, $j, $k, & $l millions of times. The first improvement I made was using arrays to store the genes by length (saves re-computing that each time). At that the comparision is replaced by an array slice: # push @{ $listX[length $dna] }, [ $name, $dna ] for my $g1 ( @list1 ) { my $i = length $g1; my $j = $i * $min_mult; my $k = $i * $max_mult; for my $g2 ( @list2[$j..$k] ) { # compare_genes now does its own # product of @$g1 : @$g2 compare_genes $g1, @$g2 } } This still leves me computing $i, $j, & $k each time. The array slices are not all that effecient, partly because the arrays are long partly because I have to re- scan up to $min each time. I could shift things off the front to save work, but would then have to re-compute the effective offset for the lengths each pass which adds work. The usual rule is that hashes are better for storing sparse data. So... Instead of storing the genes on lists I put them into a hash keyed by the gene length: $base->{$dna_length}{$gene_name} = $gene_dna_string; For the base species (the one being compared to all of the others) I can compute the lengths once and queue them for more effecient run times in the cluster in one pass: my @length_que = map { [ $_, int $_ * $min_mult, int $_ * $max_mult ] } sort { $b <=> $a } keys %$base ; [Thankfully, Perl's base data storage is an encapsulated, polymorphic object so I don't have to deal with hash keys being strings, numeric sorts, numeric math, and re-accessing the keys as strings. Anyone with a stronger stomach than mine is welcome to try this in C++, Java, or Python and see how much code it adds :-] After that, iterating the input files is just a matter of putting them into the same hash format as the base gene and grabbing all of the matching length keys: for( @ARGV ) { my( $name, $alt_genz ) = read_genbank $_; for( @length_que ) { # syntatic sugar my( $l, $min, $max ) = @$_; # the hash slice delivers its values in # sorted order, the map expands the sub- # hashes to simplify the structure. next unless my %alt = map { (defined) ? %$_ : () } @{$alt_genz}{ $min..$max } ; compare_genes $base{$l}, \%alt; } } This allows running all of the math only once: the queue built for effecient average runtime in the cluster, the length values are computed only once, and the hash quickly grabs the necessary values without reading over [a usually long] array to get them multiple times. This arrangement saved me around 20 minutes of runtime. Along with a few other tweaks, it takes my test harness for comparing the full genome of m.genitalium with m.pneumoniae from 45 to 8 minutes. For comparison, BLAST2 or Fasta take just over 40 hours to run the same set of comparisions. Things to notice are that people normally use arrays for numeric indexing and storing sorted values. For sparse or very long arrays being sliced, however, it may be far more effecient to deal with a hash using numbers for keys. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jtsmith at brunswickwdi.com Mon Feb 16 13:04:53 2004 From: jtsmith at brunswickwdi.com (jtsmith@brunswickwdi.com) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] O'Reilly Sponsorship Message-ID: I'm proud to announce that O'Reilly is now sponsoring OSS Chicago with free books, and book and conference discounts. We'll be handing out the books and the coupons at the next OSS Chicago meeting this Thursday. JT Smith \\ WDI 200 Fairway Dr, Suite 184, Vernon Hills, IL 60061 P:847-970-6833 F:847-970-6869 C:847-571-1576 http://www.brunswickwdi.com ############################################################# This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to From tpatterson at brunswickwdi.com Mon Feb 16 15:14:17 2004 From: tpatterson at brunswickwdi.com (tpatterson@brunswickwdi.com) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] OSS Chicago - Feb.19th - Content Management Systems Message-ID: I wanted pass along a personal invitation, I hope that you will be able to attend our next open source software event. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Please join Open Source Software Chicago on Feb.19th as we bring you: "Content Management Systems" Presenter: JT Smith ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ JT will be demoing several of the more sophisticated open source content management systems including Plone (python), WebGUI (perl), PostNuke (php), and Magnolia (java). He'll also discuss the differences between content management systems, portals, blogs, and content management frameworks. And finally he'll provide many resources for evaluating content management systems for your needs. JT has been working on the Internet since 1992, and has been intimately involved in open source software for the past eight years. He has worked with more than 20 content management systems and develops an open source content management system in his spare time. He is also the Director of Technology at WDI, the sponsor of OSS Chicago, where he leads a team of developers building an open source integration system called BIE. What: OSS Chicago's regular meetings Where: 200 Fairway Drive, Ste 204, Vernon Hills IL (look for the OSS Banner) When: February 19, 2004 Time: 6:30 p.m. -- doors open 7:00 p.m. -- Introductions and presentations 7:30 p.m. -- Q&A 7:45 p.m. -- Open discussions start Water & Coffee will be served. More information can be found on the Chicago Open Source website located at: http://www.OSSChicago.com OSS Chicago is sponsored by WDI, a division of Brunswick New Technologies. There are so many different applications out there that are Open Source (no cost) that can help all of us in today's economy. We figured the best way to accomplish this is to collaborate with other businesses and professionals that are using open source or have the same general interest in Open Source. Meetings will be held monthly with different featured speakers. More information about our group and what Open Source is can be found on our website: http://www.OSSChicago.com . Thank you for your time. If you have any questions at all please feel free to email me or call direct. Best Regards, Tiffany Patterson WDI, sponsor of Open Source Software Chicago email: ossinfo@osschicago.com website: http://www.OSSChicago.com OSS CHICAGO IS NOW SPONSORED BY: - WDI, a division of Brunswick New Technologies (Primary Sponsor) - O'Reilly - Sam's Publishing Please let us know whether you want to stay updated with our meeting information on our website at: http://www.osschicago.com/mailing_lists . ############################################################# This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to From ehs at pobox.com Mon Feb 16 19:11:44 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Chicago.pm talk from UniqueID guy Message-ID: <20040217011144.GB6746@chloe.inkdroid.org> This is jumping the gun a bit, but Alan de Smet has asked if he is still on for his UniqueID talk for chicago-pm. Can we give him the go ahead for April's meeting? Details about the proposed talk are below. //Ed -- UniqueID - or - How I learned to stop worrying and love the bless. The UniqueID identifier number software (http://www.highprogrammer.com/alan/numbers/) started life as a trivial experiment in Perl and CGI programming for Alan De Smet in the mid-90s. As Alan's understanding of programming and Perl has grown and been refined, so has that software grown and been refined. A talk on what Perl has taught one hacker. -- Alan De Smet http://www.highprogrammer.com/alan From shild at sbcglobal.net Mon Feb 16 19:42:25 2004 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Chicago.pm talk from UniqueID guy In-Reply-To: <20040217011144.GB6746@chloe.inkdroid.org> Message-ID: Just checked out the website very interesting "stuff". On 17-Feb-2004 Ed Summers wrote: > This is jumping the gun a bit, but Alan de Smet has asked if he is still > on for his UniqueID talk for chicago-pm. Can we give him the go ahead for > April's meeting? Details about the proposed talk are below. > > //Ed > > -- > > UniqueID - or - How I learned to stop worrying and love the > bless. > > The UniqueID identifier number software > (http://www.highprogrammer.com/alan/numbers/) started life as > a trivial experiment in Perl and CGI programming for Alan > De Smet in the mid-90s. As Alan's understanding of programming > and Perl has grown and been refined, so has that software > grown and been refined. A talk on what Perl has taught one > hacker. > > -- > Alan De Smet http://www.highprogrammer.com/alan > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 16-Feb-2004 Time: 19:41:40 ---------------------------------- From jthomasoniii at yahoo.com Tue Feb 17 14:40:04 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good Message-ID: <20040217204004.31578.qmail@web60208.mail.yahoo.com> So, as I implement a notification center in perl, it occurred to me: Are there any useful concepts or techniques that you guys have stolen from other languages? Surely, cool though perl is, it's not the be-all, end-all of development. Other groups have different paradigms, different thoughts, different constructs, different approaches. And it's silly to ignore them just because they're not perl. The good things can be adapted and made perl-ish and we end up with new techniques and approaches and more tools. More tools are always a good thing. Golden hammers are scary. So what, if anything, have you guys pirated from other languages? Surely, LISP must do something neat that we'd like. Or Ruby. Or Ada. I'd assume that someone out there somewhere has looked at a perl problem and said, "Hrm, this would be so much easier if I only had (insert feature) from (insert language). Hey! I'll just write it!" Me? I've swiped two concepts from objective-c (well, the cocoa foundation frameworks, specifically (well, they also may not have originated there, but it's where I got exposure to them)) and incorporated them into my code. I'll be swiping more in the future, I'm sure. Right now I found immediate need for delegates and a notification center. delegates allow you to extend objects without subclassing. This is useful for times when a particular behavior is nonstandard and makes subclassing excessive. It's easy to implement. #make your class aware of it having a delegate, using #whatever technique is appropriate for your system. __PACKAGE__->add_attribute('delegate'); The delegate will just be another object. Let's assume that you have some sort of mystery class called TableMaker. The TableMaker class creates TableMaker objects which write out data into an HTML table. The problem is getting the data into the TableMaker object. Ideally, you'd like it to come in from multiple sources. Files of different formats (XML, text, dbm, etc.), databases, web sites, user input, whathaveyou. Sure, you can subclass the TableMaker and override the load_data method for each different way to do it, but you'll potentially have a lot of subclasses. Further, unless you have an abstract factory in your super class, you'll need to keep changing your code around depending upon your data source to always have the proper subclass. Easy solution? Use a delegate. We know from above that our TableMaker class has a "delegate" attribute. So now we'll use it. #in TableMaker. sub load_data { my $self = shift; my $data = undef; if (defined $self->delegate) { $data = $self->delegate->load_data(); $self->data($data); } else { #oops! An error, inform someone somehow. } return $data; #in case anyone wants it. }; To use it, just set a delegate for your TableMaker. my $tableMaker = TableMaker->new( 'delegate' => XMLLoader->new( 'file' => '/tmp/file.txt' ) }; Voila! Change your delegate as necessary to load from different places. Need to load from another data source? Then write a new delegate object to do it. Of course, there are plenty of other delegate uses as well. The other thing I've swiped (the notification center) is more complicated and did require a module. But I also find it much much more useful. I may toss this one up on CPAN since I don't think there's anything that provides similar functionality. You can get up to speed rapidly on it by reading Apple's docs for their NSNotificationCenter class. http://tinyurl.com/32ure Basically, a center like this allows two objects to communicate w/o knowing anything about each other. You post notifications to the center, and the center doles out the notes to anything that cares about them, or nothing if nobody cares. A quick example may be easiest. #create a logging object, of some type my $logger = SomeLoggerPackage->new('/path/to/log/file'); #add it as an observer to our center NotificationCenter->addObserver( 'observer' => $logger, 'notification' => 'weasels', 'method' => 'log' ); #and post a notification. NotificationCenter->postNotification( 'object' => $the_hen_house, 'notification' => 'weasels', 'args' => ["There are weasels in the hen house"] ); Voila! $the_hen_house object posts a weasels notification and then goes on doing whatever it was doing before. The notification shows up in the center, which looks to see if anything is observing such notifications. In this case, we have our $logger object which cares, and it'll call its log method on the arguments. In short, the posting to the center causes this to happen: $logger->log("There are weasels in the hen house"); But the $the_hen_house object doesn't need to know or worry about the fact that the logger is logging it. If you later decide that you don't want to log, then remove the observer (or never add it, whichever is appropriate). If you want to do something else in addition, then add another observer. NotificationCenter->addObserver( 'observer' => $shotgun 'notification' => 'weasels', 'method' => 'fire' ); Now when the hen house posts its 'weasels' notification, it gets logged to the log file, and the shotgun fires. All without the hen house's needing to know anything. It's just letting it be known that there are weasels and leaves it up to any other interested objects to respond appropriately. And I wouldn't be using either of those if I didn't know objective-C. So what about everyone else? Any other tips/tricks/techniques/etc that you've swiped from another language or environment and use in perl now? The more tools, the better. :) -Jim... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From jthomasoniii at yahoo.com Tue Feb 17 15:05:22 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Re: theft is good Message-ID: <20040217210522.66117.qmail@web60202.mail.yahoo.com> Aha! A little more poking around unearthes a CPAN module that serves the same purpose. http://tinyurl.com/3gm2y Finally found it by searching for "observe" instead of "notify". I think I have the slicker interface, though. But bias towards one's own code is natural. -Jim.... __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html From merlyn at stonehenge.com Tue Feb 17 16:35:19 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good In-Reply-To: <20040217204004.31578.qmail@web60208.mail.yahoo.com> References: <20040217204004.31578.qmail@web60208.mail.yahoo.com> Message-ID: <86ekstpc65.fsf@blue.stonehenge.com> >>>>> "Jim" == Jim Thomason writes: Jim> delegates allow you to extend objects without Jim> subclassing. This is useful for times when a Jim> particular behavior is nonstandard and makes Jim> subclassing excessive. It's easy to implement. You might look in to Class::Prototyped instead. It implements a Self-like "prototype" system that probably does mostly what you want it to do, with very little overhead. Jim> Basically, a center like this allows two objects to Jim> communicate w/o knowing anything about each other. You Jim> post notifications to the center, and the center doles Jim> out the notes to anything that cares about them, or Jim> nothing if nobody cares. A quick example may be Jim> easiest. See POE, which uses the concepts of "posting an event" extensively. Jim> So what about everyone else? Any other Jim> tips/tricks/techniques/etc that you've swiped from Jim> another language or environment and use in perl now? I use stuff from my 20 years of programming prior to Perl, yes. -- 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 lembark at wrkhors.com Tue Feb 17 22:24:16 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good In-Reply-To: <20040217204004.31578.qmail@web60208.mail.yahoo.com> References: <20040217204004.31578.qmail@web60208.mail.yahoo.com> Message-ID: <3173600000.1077078256@[192.168.200.4]> -- Jim Thomason > So, as I implement a notification center in perl, it > occurred to me: > > Are there any useful concepts or techniques that you > guys have stolen from other languages? Read the Camel, there are dozens of references. At the very least, Perl began as a mix of shell, C, unistd.h, lisp, ada, sed, awk, and whatever natural languages Larry studied in college. Over time it's added a few functional ideas from C++/Java/Python (largely by avoiding their mistakes). The Lisp/C/Shell/sed+awk roots are still quite obvious. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Wed Feb 18 00:32:29 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket Message-ID: <000c01c3f5e9$e7271870$6405a8c0@a30> Hi, I'm wondering if the is an easier (better) way to read a socket. I'm doing (roughly) like below. I noticed in POE you can just give it a message terminator, and if automatically reads it correctly. Is there a way to do this with IO::Socket::INET or maybe with sysread? my $s = IO::Socket::INET->new(Proto=>'tcp',PeerAddr=>$host,PeerPort =>$port); my $field = receive; # Read the bytes of the line one at a time until we find an ascii "0" # which the server uses to indicate end of message. Build up the return string # byte by byte and return it. sub receive { my ($result,$byte); while (sysread($s, $byte, 1) == 1) { last if ord($byte) == 0; $result .= $byte; } return $result; } Thanks Jay From jthomasoniii at yahoo.com Wed Feb 18 10:01:30 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good In-Reply-To: <3173600000.1077078256@[192.168.200.4]> Message-ID: <20040218160133.91038.qmail@web60203.mail.yahoo.com> > Read the Camel, there are dozens of references. At > the > very least, Perl began as a mix of shell, C, > unistd.h, > lisp, ada, sed, awk, and whatever natural languages > Larry studied in college. > > Over time it's added a few functional ideas from > C++/Java/Python (largely by avoiding their > mistakes). > > The Lisp/C/Shell/sed+awk roots are still quite > obvious. I hadn't realized you guys were in management. Your answers are swift, complete, answer the question, and provide no new information whatsoever. ;) While I will freely admit that I have been rather guilty of tunnel vision regarding development over the years, I think it's rather pompous to assume that there are no new techniques or tricks or paradigms from other languages that have not yet been appropriated. I'm well aware of perl's history. It's also possible that every single nifty thing that's ever been done in any other language ever already exists in some obscure module on CPAN. Still, reading the docs for Class::Observable I never would've thought it something interesting to use (POE would be overkill for a notification center, I think) until I cross-referenced it with my objective-c experience. Surely I'm not the only one that frequently uses a language other than perl, and surely I'm not the only one that looked at the way things are done in another language and said, "Hey, that's neat. I can use that in perl." And yes, downloading something from CPAN counts. And that's what I'd be interested in hearing about. -Jim.... __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools From andy at petdance.com Wed Feb 18 10:06:00 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good In-Reply-To: <20040218160133.91038.qmail@web60203.mail.yahoo.com> References: <3173600000.1077078256@[192.168.200.4]> <20040218160133.91038.qmail@web60203.mail.yahoo.com> Message-ID: <20040218160600.GB13589@petdance.com> > Surely I'm not the only one that frequently uses a > language other than perl, and surely I'm not the only > one that looked at the way things are done in another > language and said, "Hey, that's neat. I can use that > in perl." And yes, downloading something from CPAN > counts. And that's what I'd be interested in hearing > about. I'd like to see more stuff like Simon's rubyisms.pm, which gives yield functionality in Perl, sort of. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Wed Feb 18 10:47:45 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket In-Reply-To: <000c01c3f5e9$e7271870$6405a8c0@a30> References: <000c01c3f5e9$e7271870$6405a8c0@a30> Message-ID: <3558740000.1077122865@[192.168.200.4]> -- Jay Strauss > Hi, I'm wondering if the is an easier (better) way to read a socket. I'm > doing (roughly) like below. I noticed in POE you can just give it a > message terminator, and if automatically reads it correctly. Is there a > way to do this with IO::Socket::INET or maybe with sysread? > Once you're into sockets it's sysread time. You're dealing with a simple file descriptor at that point. If you consider it a useful exercise, write your own sendbuf/recvbuf wrappers or pick any of Net::Blah items that wrap the sockets for you. If you check CPAN there are a few socket-wrapper classes that deal with the read/write/error cycle in different ways. Taking the time to write effecient wrappers once was useful for me. It gave me a better feeling for what might be going wrong inside of other modules. Dealing with out-of-band data looks a bit flakey until you get a feel for it. Lincon's Network Prog. w/ Perl book also describes the socket-wrapper classes with examples. You might just want to eyeball that and pick the one that looks useful to you. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From pbaker at where2getit.com Wed Feb 18 10:43:56 2004 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket In-Reply-To: <000c01c3f5e9$e7271870$6405a8c0@a30> References: <000c01c3f5e9$e7271870$6405a8c0@a30> Message-ID: On Feb 18, 2004, at 12:32 AM, Jay Strauss wrote: > Hi, I'm wondering if the is an easier (better) way to read a socket. > I'm > doing (roughly) like below. I noticed in POE you can just give it a > message > terminator, and if automatically reads it correctly. Is there a way > to do > this with IO::Socket::INET or maybe with sysread? Could you set the input record separater to null? Similar to doing slurp mode where you set it to undef? > my $s = IO::Socket::INET->new(Proto=>'tcp',PeerAddr=>$host,PeerPort > =>$port); > > my $field = receive; > > # Read the bytes of the line one at a time until we find an ascii "0" > # which the server uses to indicate end of message. Build up the > return > # byte by byte and return it. > sub receive { > my ($result,$byte); > { local $/ = char(0); $result = <$s>; } > return $result; > } I don't know if that would work, but it seems to me to be the perlish way to do it. -- Paul Baker "Reality is that which, when you stop believing in it, doesn't go away." -- Philip K. Dick GPG Key: http://homepage.mac.com/pauljbaker/public.asc From shawn at owbn.org Wed Feb 18 12:31:47 2004 From: shawn at owbn.org (Shawn C Carroll) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third Message-ID: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> I'm gonna ask before I go write something... Is there a way to take two dir tree's with simular structure and merge them into a third tree? I've seen some pointers to diff, but I don't want to compare files ( none are gonna match ) I just want to be able to take dira/apple/this.txt and dirb/apple/that.txt and end up with dirc/apple/this.txt dirc/apple/that.txt -- Shawn Carroll shawn@owbn.org Perl Programmer Soccer Referee From merlyn at stonehenge.com Wed Feb 18 12:41:36 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> References: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> Message-ID: <868yj0i61u.fsf@blue.stonehenge.com> >>>>> "Shawn" == Shawn C Carroll writes: Shawn> I'm gonna ask before I go write something... Shawn> Is there a way to take two dir tree's with simular structure and merge Shawn> them into a third tree? Shawn> I've seen some pointers to diff, but I don't want to compare files ( none Shawn> are gonna match ) I just want to be able to take Shawn> dira/apple/this.txt Shawn> and Shawn> dirb/apple/that.txt Shawn> and end up with Shawn> dirc/apple/this.txt Shawn> dirc/apple/that.txt What do you do when the filenames *do* match? What do you do when a filename of one is a directory name of the other? -- 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 shawn at owbn.org Wed Feb 18 12:47:20 2004 From: shawn at owbn.org (Shawn C Carroll) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <868yj0i61u.fsf@blue.stonehenge.com> References: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> <868yj0i61u.fsf@blue.stonehenge.com> Message-ID: <25428.65.248.243.100.1077130040.squirrel@mail.owbn.org> Randal L. Schwartz said: >>>>>> "Shawn" == Shawn C Carroll writes: > > Shawn> I'm gonna ask before I go write something... > > Shawn> Is there a way to take two dir tree's with simular structure and > merge > Shawn> them into a third tree? > > Shawn> I've seen some pointers to diff, but I don't want to compare files > ( none > Shawn> are gonna match ) I just want to be able to take > Shawn> dira/apple/this.txt > Shawn> and > Shawn> dirb/apple/that.txt > > Shawn> and end up with > > Shawn> dirc/apple/this.txt > Shawn> dirc/apple/that.txt > > What do you do when the filenames *do* match? > > What do you do when a filename of one is a directory name of the other? > In this case, neither is an issue. But, in the first case then I'd take dira over dirb. In the second, that isn't a case I have deal with in these dir's -- Shawn Carroll shawn@owbn.org Perl Programmer Soccer Referee From Aaron.Young at citadelgroup.com Wed Feb 18 12:54:25 2004 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third Message-ID: <800BCF60D1553144BABCBFCE36249D3D0C787620@CORPEMAIL.citadelgroup.com> you may want to just tar one directory and then untar it into the other if there aren't any clashes, this should work out pretty well though you may want to keep a backup tar of both diretories just in case Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Shawn C Carroll [mailto:shawn@owbn.org] > Sent: Wednesday, February 18, 2004 12:47 PM > To: Chicago.pm chatter > Cc: Chicago.pm chatter > Subject: Re: [Chicago-talk] Merging two dir's into a third > > > > Randal L. Schwartz said: > >>>>>> "Shawn" == Shawn C Carroll writes: > > > > Shawn> I'm gonna ask before I go write something... > > > > Shawn> Is there a way to take two dir tree's with simular > structure and > > merge > > Shawn> them into a third tree? > > > > Shawn> I've seen some pointers to diff, but I don't want to > compare files > > ( none > > Shawn> are gonna match ) I just want to be able to take > > Shawn> dira/apple/this.txt > > Shawn> and > > Shawn> dirb/apple/that.txt > > > > Shawn> and end up with > > > > Shawn> dirc/apple/this.txt > > Shawn> dirc/apple/that.txt > > > > What do you do when the filenames *do* match? > > > > What do you do when a filename of one is a directory name > of the other? > > > > In this case, neither is an issue. But, in the first case > then I'd take > dira over dirb. In the second, that isn't a case I have deal with in > these dir's > > > -- > Shawn Carroll > shawn@owbn.org > Perl Programmer > Soccer Referee > _______________________________________________ > 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 don at drakeconsult.com Wed Feb 18 12:56:13 2004 From: don at drakeconsult.com (Don Drake) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> Message-ID: <005b01c3f650$e23b75b0$c201ac0a@attbi.com> This will work: # cd dira # tar cvf - * | (cd ../dirc; tar xvf -) # cd ../dirb # tar cvf - * | (cd ../dirc; tar xvf -) -Don > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Shawn C Carroll > Sent: Wednesday, February 18, 2004 12:32 PM > To: chicago-talk@mail.pm.org > Subject: [Chicago-talk] Merging two dir's into a third > > > > I'm gonna ask before I go write something... > > Is there a way to take two dir tree's with simular structure and merge > them into a third tree? > > I've seen some pointers to diff, but I don't want to compare > files ( none > are gonna match ) I just want to be able to take > dira/apple/this.txt > and > dirb/apple/that.txt > > and end up with > > dirc/apple/this.txt > dirc/apple/that.txt > > -- > Shawn Carroll > shawn@owbn.org > Perl Programmer > Soccer Referee > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Wed Feb 18 13:30:13 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> References: <55542.65.248.243.100.1077129107.squirrel@mail.owbn.org> Message-ID: <3654690000.1077132613@[192.168.200.4]> > dira/apple/this.txt > and > dirb/apple/that.txt > > and end up with > > dirc/apple/this.txt > dirc/apple/that.txt for i in $dira $dirb; do ( cd $i; find . | cpio -pdv $dirc ) done You could use File::Find::finddepth and a with a mkdir or rename but cpio is going to handle all of the types properly (and exits nonzero if the filesystem gets full, which tar won't). enjoi -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Wed Feb 18 13:33:19 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <005b01c3f650$e23b75b0$c201ac0a@attbi.com> References: <005b01c3f650$e23b75b0$c201ac0a@attbi.com> Message-ID: <3656840000.1077132799@[192.168.200.4]> -- Don Drake > > This will work: > ># cd dira ># tar cvf - * | (cd ../dirc; tar xvf -) ># cd ../dirb ># tar cvf - * | (cd ../dirc; tar xvf -) Problem with this is that tar exits zero on most errors, which makes it hard to tell if the job completed. For example, this will exit zero on a filesystem-full error (at least with the tar's I've used on linux, solaris, hp-ux, osf/1, and aix). cpio exits non-zero if it cannot complete a file: -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From don at drakeconsult.com Wed Feb 18 13:53:20 2004 From: don at drakeconsult.com (Don Drake) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <3656840000.1077132799@[192.168.200.4]> Message-ID: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> > > -- Don Drake > > > > > This will work: > > > ># cd dira > ># tar cvf - * | (cd ../dirc; tar xvf -) > ># cd ../dirb > ># tar cvf - * | (cd ../dirc; tar xvf -) > > Problem with this is that tar exits zero on most > errors, which makes it hard to tell if the job > completed. For example, this will exit zero on > a filesystem-full error (at least with the tar's > I've used on linux, solaris, hp-ux, osf/1, and > aix). > This is not true. My tar command on Linux and Solaris return non-zero upon failure. Maybe time for an upgrade? However, my example will return 0 if the disk fills, because the command "tar cvf - *" was successful, and the rest of the commands were piped and failed. Wrapping the entire line in parentheses "(tar cvf - * | (cd ../dirc; tar xvf -) )" would fix that. -Don From merlyn at stonehenge.com Wed Feb 18 14:02:52 2004 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> References: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> Message-ID: <86znbggnpx.fsf@blue.stonehenge.com> >>>>> "Don" == Don Drake writes: Don> This is not true. My tar command on Linux and Solaris return non-zero upon Don> failure. Maybe time for an upgrade? Don> However, my example will return 0 if the disk fills, because the command Don> "tar cvf - *" was successful, and the rest of the commands were piped and Don> failed. Don> Wrapping the entire line in parentheses "(tar cvf - * | (cd ../dirc; tar Don> xvf -) )" would fix that. So would: rsync -av /src/dir1/ /dst/dir/ rsync -av /src/dir2/ /dst/dir/ -- 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 lembark at wrkhors.com Wed Feb 18 17:20:05 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> References: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> Message-ID: <3762610000.1077146405@[192.168.200.4]> -- Don Drake > However, my example will return 0 if the disk fills, because the command > "tar cvf - *" was successful, and the rest of the commands were piped and > failed. > > Wrapping the entire line in parentheses "(tar cvf - * | (cd ../dirc; tar > xvf -) )" would fix that. Or using "find . | cpio -pdv". This is a bit more effecient also because you don't need to encode and decode the file or move it over the pipe through kernel buffers. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From mike at oobak.org Wed Feb 18 17:23:36 2004 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <3762610000.1077146405@[192.168.200.4]> References: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> <3762610000.1077146405@[192.168.200.4]> Message-ID: <1077146616.2998.24.camel@woody.star.niu.edu> Am I missing something?? $ mkdir -p dira/apple dirb/apple dirc $ touch dira/apple/this.txt dirb/apple/that.txt $ cp -r dira/* dirb/* dirc/ $ ls dirc/apple/ that.txt this.txt Use `cp -i' for prompting. Use `cp -f' and change your directory order to prioritize one directory over another (ie, copy dirb first then overwrite it with dira). -- Mike Pastore mike@oobak.org On Wed, 2004-02-18 at 17:20, Steven Lembark wrote: > -- Don Drake > > > However, my example will return 0 if the disk fills, because the command > > "tar cvf - *" was successful, and the rest of the commands were piped and > > failed. > > > > Wrapping the entire line in parentheses "(tar cvf - * | (cd ../dirc; tar > > xvf -) )" would fix that. > > Or using "find . | cpio -pdv". This is a bit more > effecient also because you don't need to encode and > decode the file or move it over the pipe through > kernel buffers. > > > -- > 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 me at heyjay.com Wed Feb 18 22:32:07 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket References: <000c01c3f5e9$e7271870$6405a8c0@a30> Message-ID: <016201c3f6a1$56221e70$6405a8c0@a30> > Could you set the input record separater to null? Similar to doing > slurp mode where you set it to undef? ... > { local $/ = char(0); $result = <$s>; } > > > return $result; > > } Thanks Paul, That's what I was wondering (albeit inarticulately). I'll try it tomorrow, and report back. Jay From me at heyjay.com Thu Feb 19 07:44:49 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] nit on chicago.pm.org Message-ID: <002501c3f6ee$8cf1c4d0$6405a8c0@a30> When you navigate from home->discuss there is a link to archives the archives doesn't take you to the archives at: http://mail.pm.org/pipermail/chicago-talk/ instead it take you to: http://mail.pm.org/mailman/listinfo/chicago-talk where you can get to the archives Maybe it was intentional? Jay From ehs at pobox.com Thu Feb 19 07:47:21 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] nit on chicago.pm.org In-Reply-To: <002501c3f6ee$8cf1c4d0$6405a8c0@a30> References: <002501c3f6ee$8cf1c4d0$6405a8c0@a30> Message-ID: <20040219134721.GC28279@chloe.inkdroid.org> On Thu, Feb 19, 2004 at 07:44:49AM -0600, Jay Strauss wrote: > Maybe it was intentional? No, it was an accident, and it has been bugging me as well :) Consider it fixed (soonish). //Ed From ehs at pobox.com Thu Feb 19 08:12:19 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] theft is good In-Reply-To: <20040217204004.31578.qmail@web60208.mail.yahoo.com> References: <20040217204004.31578.qmail@web60208.mail.yahoo.com> Message-ID: <20040219141219.GD28279@chloe.inkdroid.org> On Tue, Feb 17, 2004 at 12:40:04PM -0800, Jim Thomason wrote: > So what about everyone else? Any other > tips/tricks/techniques/etc that you've swiped from > another language or environment and use in perl now? It's funny I guess I'm spoiled: the only language I've done lots of development in is Perl. Since Perl borrows lots from other languages I imagine I've probably been borrowing without even knowing it :) I do read lots, and it often seems like Java is lingua franca for techbooks these days. So I've picked up lots of OO terminology that way. Lately I've been enjoying reading about the pattern movement (which has lots of parallels to what your email was about). While it's a book about architecture The Timeless Way of Building was a really beautiful book, that has lots of inspiring stuff in it for programmer folks. http://www.amazon.com/exec/obidos/tg/detail/-/0195024028 TWoB really changed the way I think about creating and maintaining software. And for how groups of people can create software. Another book that informed my Perl programming alot is The Little Schemer, which is an inventive look at the Scheme programming language. http://www.ccs.neu.edu/home/matthias/BTLS/ The book changed forever the way I look at list context in Perl. And it made things like the Schwwartzian transform fit my brain even better. I was in irc on #perl the other day and I overheard waltman saying he was planning a talk about Perl & Ruby for YAPC this year. You should *really* consider proposing a talk about Objective C. If you are interested perhaps you could try it out on us first in May? //Ed -- Ed Summers aim: inkdroid web: http://www.inkdroid.org From pbaker at where2getit.com Thu Feb 19 10:44:51 2004 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket In-Reply-To: <016201c3f6a1$56221e70$6405a8c0@a30> References: <000c01c3f5e9$e7271870$6405a8c0@a30> <016201c3f6a1$56221e70$6405a8c0@a30> Message-ID: On Feb 18, 2004, at 10:32 PM, Jay Strauss wrote: >> Could you set the input record separater to null? Similar to doing >> slurp mode where you set it to undef? > ... >> { local $/ = char(0); $result = <$s>; } >> >>> return $result; >>> } > > Thanks Paul, > > That's what I was wondering (albeit inarticulately). I'll try it > tomorrow, > and report back. Oh and ooops, it should be chr(0) not char(0). My bad. -- Paul Baker "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 GPG Key: http://homepage.mac.com/pauljbaker/public.asc From me at heyjay.com Thu Feb 19 11:09:02 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Reading from a socket References: <000c01c3f5e9$e7271870$6405a8c0@a30><016201c3f6a1$56221e70$6405a8c0@a30> Message-ID: <012a01c3f70b$43dcca70$6405a8c0@a30> Yeah I already got that Thanks |Jay ----- Original Message ----- From: "Paul Baker" To: "Chicago.pm chatter" Sent: Thursday, February 19, 2004 10:44 AM Subject: Re: [Chicago-talk] Reading from a socket > > On Feb 18, 2004, at 10:32 PM, Jay Strauss wrote: > > >> Could you set the input record separater to null? Similar to doing > >> slurp mode where you set it to undef? > > ... > >> { local $/ = char(0); $result = <$s>; } > >> > >>> return $result; > >>> } > > > > Thanks Paul, > > > > That's what I was wondering (albeit inarticulately). I'll try it > > tomorrow, > > and report back. > > Oh and ooops, it should be chr(0) not char(0). My bad. > > -- > Paul Baker > > "They that can give up essential liberty to obtain a little temporary > safety deserve neither liberty nor safety." > -- Benjamin Franklin, 1759 > > GPG Key: http://homepage.mac.com/pauljbaker/public.asc > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Thu Feb 19 12:10:51 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <1077146616.2998.24.camel@woody.star.niu.edu> References: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> <3762610000.1077146405@[192.168.200.4]> <1077146616.2998.24.camel@woody.star.niu.edu> Message-ID: <4195730000.1077214251@[192.168.200.4]> -- Mike Pastore > Am I missing something?? > > $ mkdir -p dira/apple dirb/apple dirc > $ touch dira/apple/this.txt dirb/apple/that.txt > $ cp -r dira/* dirb/* dirc/ > $ ls dirc/apple/ > that.txt this.txt cp -r looses ctime, mtime (reset due to new file). Might also loose ownership (unless you own the originals) and mods (uses umask by default). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From mike at oobak.org Thu Feb 19 12:15:08 2004 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] Merging two dir's into a third In-Reply-To: <4195730000.1077214251@[192.168.200.4]> References: <000f01c3f658$dd5c1420$c201ac0a@attbi.com> <3762610000.1077146405@[192.168.200.4]> <1077146616.2998.24.camel@woody.star.niu.edu> <4195730000.1077214251@[192.168.200.4]> Message-ID: <1077214508.5248.6.camel@woody.star.niu.edu> On Thu, 2004-02-19 at 12:10, Steven Lembark wrote: > -- Mike Pastore > > > Am I missing something?? > > cp -r looses ctime, mtime (reset due to new file). Might > also loose ownership (unless you own the originals) and > mods (uses umask by default). I don't believe this functionality was originally requested, however you can use `cp -p' to satisfy these issues. I'm also quite fond of `cp -a', which is equivalent to `cp -dpR' (do not dereference symbolic links, preserve mode, ownership, and timestamps, and copy directories recursively). Mike From jt at plainblack.com Thu Feb 19 13:20:56 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago Message-ID: I'll be giving a talk on open source content management systems tonight at OSS Chicago. OSS Chicago is held in the same facility we use for perl mongers. Doors open tonight at 6:30pm if you're interested. Next month: Andy Lester on Automated Testing JT ~ Plain Black Create like a god, command like a king, work like a slave. From andy at petdance.com Thu Feb 19 13:19:41 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: References: Message-ID: <20040219191941.GA18133@petdance.com> > Next month: Andy Lester on Automated Testing Oh? -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From jt at plainblack.com Thu Feb 19 13:45:08 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: <20040219191941.GA18133@petdance.com> Message-ID: Yes. Don't try to back out now. On Thu, 19 Feb 2004 13:19:41 -0600 Andy Lester wrote: >> Next month: Andy Lester on Automated Testing > >Oh? > >-- >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 JT ~ Plain Black Create like a god, command like a king, work like a slave. From andy at petdance.com Thu Feb 19 13:35:38 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: References: <20040219191941.GA18133@petdance.com> Message-ID: <20040219193538.GA18173@petdance.com> > Yes. Don't try to back out now. Huh. I thought we were still in the "maybe we should do this" stage. Well. Good, there was a tiny sliver of space on my plate. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Thu Feb 19 14:04:49 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: <20040219191941.GA18133@petdance.com> References: <20040219191941.GA18133@petdance.com> Message-ID: <77412704.1077221089@[192.168.200.4]> >> Next month: Andy Lester on Automated Testing > > Oh? Ain't it nice to be loved? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jt at plainblack.com Thu Feb 19 14:22:31 2004 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: <20040219193538.GA18173@petdance.com> Message-ID: If you don't want to do it, that's ok. I'm sure we can find someone else to slide in there. On Thu, 19 Feb 2004 13:35:38 -0600 Andy Lester wrote: >> Yes. Don't try to back out now. > >Huh. I thought we were still in the "maybe we should do this" stage. > >Well. Good, there was a tiny sliver of space on my plate. > >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 JT ~ Plain Black Create like a god, command like a king, work like a slave. From andy at petdance.com Thu Feb 19 14:15:57 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] reminder: OSS Chicago In-Reply-To: References: <20040219193538.GA18173@petdance.com> Message-ID: <20040219201557.GA18197@petdance.com> > If you don't want to do it, that's ok. I'm sure we can find someone else to > slide in there. Nope. I'd be glad to. It's just that I didn't realize it was a definite. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From esinclai at pobox.com Wed Feb 18 19:56:34 2004 From: esinclai at pobox.com (Eric Sinclair) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] YCTP needs mentors In-Reply-To: <20040213205722.GC5739@chloe.inkdroid.org> References: <20040213205722.GC5739@chloe.inkdroid.org> Message-ID: Hey Ed- Were you thinking of doing this? It certainly looks interesting. -Eric On Feb 13, 2004, at 2:57 PM, Ed Summers wrote: > Sorry if you saw this already (on luni) but I figured there might > be some chicago perl folks who are interested. //Ed > > -- > > From: john stanton > To: techtalk@npotechs.org, luni@luni.org > Date: Fri, 13 Feb 2004 13:36:26 -0600 > > Hello all, > > The Youth Community Technology Program > http://www.yctp.org needs several people to act as an "IT mentor" > for the young people in our program. > > The Youth Community Technology Program (YCTP) is looking for technology > professionals to mentor young people ages 14-21. Our students come > from all over > Chicago and represent many ethnicities and cultural backgrounds. > > The Youth Community Technology Program offers a free computer repair > and > refurbishment program for "at-risk" youth. Young people enrolled in the > program learn how to build and maintain computers, gain valuable > experience > through internships in area non-profits, and benefit from the > experience and > companionship of people from the IT industry. One of the neat things > about the course is that it includes an Open Source and community > service component. > > In addition to the technical portion of the program, the YCTP offers > education assistance, one-on-one counseling and social service > referrals, soft skills workshops and job and education placement > assistance. > > Mentors meet twice a month on Saturday's from 11 AM- 2 PM. We ask the > mentors to share information about their professions, their educations, > and their passions. Mentor and mentees work together to develop a > relationship grounded in respect and trust. > > The meetings are held at Korean American Community Services 4300 North > California Ave. (near the intersection of California and Montrose) and > are convenient to public transportation. > > If you are interested please contact me. > > Thanks! > > John > > ------------------ > > Check out our latest success storys at: > > http://connectchicago.org/success.aspx?story=kacs2 > > http://connectchicago.org/success.aspx?story=kacs3 > > http://www.connectchicago.net/success.aspx?story=kacs > > ---------------- > John Stanton > Community Technology Programs Director > Korean American Community Services > 4300 N. California Ave > Chicago, IL 60618 > (p)773.583.5501 x247 > (f)773.583.7009 > http://www.yctp.org > http://www.npotechs.org > http://www.girlsgetdigtial.org > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > -- esinclai@pobox.com aim: esinclai http://www.kittyjoyce.com/eric/log/ From ehs at pobox.com Fri Feb 20 10:14:54 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:06 2004 Subject: [Chicago-talk] YCTP needs mentors In-Reply-To: References: <20040213205722.GC5739@chloe.inkdroid.org> Message-ID: <20040220161454.GA13425@chloe.inkdroid.org> On Wed, Feb 18, 2004 at 07:56:34PM -0600, Eric Sinclair wrote: > Were you thinking of doing this? It certainly looks interesting. Yes, I was thinking about it. I used to do similar volunteer work back in Brooklyn, and was looking to do something similar here. I wonder if they would be interested in using Perl :) //Ed From jthomasoniii at yahoo.com Fri Feb 20 10:53:39 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] How perl will help me win the Lottery Message-ID: <20040220165339.41229.qmail@web60208.mail.yahoo.com> Unless you've been living under a rock, you're aware of the fact that the multi-state Mega Millions lottery game hasn't been won lately, pushing the jackpot up to an estimated $220 million. The drawing is tonight at 10 o'clock on WGN Channel 9. Now, of course, the lottery is an utterly random event. There is no way to predict its outcome, no way to guess what it'll be, no system to play that will work. It's purely random. Nonetheless, people like to have control over things, even if it's only perceived control. If you just get a random quick pick and lose, you may sit back and wonder if you really did all you could to win. Maybe you should have played your favorite pet's birthday or your lucky number. Maybe it would have made a difference. Fortunately, perl can help assuage that future guilt. The lottery people are helpful enough to provide us with a list of past lotto winners for the mega millions game, available at: http://tinyurl.com/2pkxd But that's a lot of data to look through. Sure, the 22nd is my birthday, and I see a lot of 22s in there, but how many are there really? Well, never fear. Perl can help us immensely. The mega millions data cruncher is attached. Basically, it'll iterate through your data file and enumerate out the most popular numbers chosen (5 or 47, chosen 84 times each); the most chosen 2 digit combo (1 & 22 (score!), 16 times) and so on. Now, how you use that data is left as an exercise for the reader. I included a few example tickets to build. For example, the ticket constructed out of the most frequently chosen numbers is 4, 5, 26, 32, 47 with a megaball of 3. But acquiring the data is easy, figuring out how you want to combine it together and use it is the tricky part. Naturally, this is all purely for entertainment purposes and I really don't care to have someone start emailing me saying that all of the analysis in the world will have no bearing at all on the outcome. Still. People do like having control over things. I'll expect a 10% commission if anybody wins big off of this. ;) -Jim...... __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools -------------- next part -------------- use strict; use warnings; #okay, we're going to need to figure out all the combinations of a given set of white balls. #that way we can do analysis on how many times a ball appeared, appeared with 1 other ball, 2 other balls, etc # #The function is recursive. If we're choosing one, then return a list of all digits. If we're choosing more than #one, then iterate through the digits we have and choose (n - 1) on the remainder. Iterate through what's returned #and tack on the digit we have to get the current combination. sub combine { my $choose = shift; my @digits = @_ or return (); if ($choose == 1) { return map {[$_]} @digits; } else { my @return = (); foreach my $idx (0..$#digits) { my @combos = combine($choose - 1, @digits[$idx + 1 .. $#digits]); foreach my $combo (@combos) { push @return, [$digits[$idx], @$combo]; }; }; return @return; } }; #set up some space to store the combinations choose 1, choose 2, choose 3, etc. my $combinations = [undef, {}, {}, {}, {}, {}]; #set up a hash table to store the megaballs my %megaballs = (); while () { #parse out the whiteballs and the megaball my @whiteballs = /(\d+),(\d+),(\d+),(\d+),(\d+).+Mega Ball:\s*(\d+)/g; my $megaball = pop @whiteballs; #sort the whiteballs, just to be clean (makes the output easier to read) @whiteballs = sort {$a <=> $b} @whiteballs; #iterate through the combinations (choose 1, choose 2, etc.) foreach my $combination (1..@whiteballs) { #grab the combos my @combos = combine($combination, @whiteballs); #and for each of those, join the arrayref into a string and iterate its count foreach my $combo (@combos) { $combo = join(',', @$combo); $combinations->[$combination]->{$combo}++; }; }; $megaballs{$megaball}++; }; #Done! Now start building sample tickets. #for example, build a lottery ticket made out of the top 5 selected numbers + the top selected mega ball #grab the white balls for our choose 1 set, that is the balls that appeared most individually my $whiteballs = $combinations->[1]; my @top5white = sort {$a <=> $b} (sort {$whiteballs->{$b} <=> $whiteballs->{$a} || $a cmp $b} keys %$whiteballs)[0..4]; my ($mega1, $mega2, $mega3) = (sort {$megaballs{$b} <=> $megaballs{$a} || $a cmp $b} keys %megaballs)[0,1,2]; print "Most likely combo is White balls: @top5white Megaball: $mega1\n"; #of course, we shouldn't put all our eggs in one basket. Let's also build a ticket with the #2 mega ball. print "Most likely combo is White balls: @top5white #2 Megaball: $mega2\n"; #for example, build a lottery ticket made out of the top selected 2 ball combo + the top selected 3 ball combo # + the top selected mega ball my $whiteballsChoose2 = $combinations->[2]; my $whiteballsChoose3 = $combinations->[3]; #technically, there could be an overlap here, since the most chosen 2 ball combo could share a digit with the most #chosen 3 ball combo, but in this case, I know that they don't. my $top5whiteChoose2 = (sort {$whiteballsChoose2->{$b} <=> $whiteballsChoose2->{$a} || $a cmp $b} keys %$whiteballsChoose2)[0]; my $top5whiteChoose3 = (sort {$whiteballsChoose3->{$b} <=> $whiteballsChoose3->{$a} || $a cmp $b} keys %$whiteballsChoose3)[0]; print "Most likely 2 + 3 is White balls : $top5whiteChoose2,$top5whiteChoose3 Megaball: $mega1\n"; #okay, let's also build a ticket with the most chosen 4 ball combo + the top chosen ball + the #3 mega ball #(same overlap could exist between the 4 ball combo and the #1 ball, so be careful) my $whiteballsChoose4 = $combinations->[4]; my $top5whiteChoose4 = (sort {$whiteballsChoose4->{$b} <=> $whiteballsChoose4->{$a} || $a cmp $b} keys %$whiteballsChoose4)[0]; print "Most likely 4 + 1 is White balls : $top5whiteChoose4,$top5white[0] #3 Megaball: $mega3\n"; __DATA__ #insert your mega millions data here, download from #http://www.megamillions.com/winningpicks/download_numbers_execute.asp 9-6-1996; : 5,11,29,47,50; Mega Ball: 17 9-13-1996; 3,4,9,30,47; Mega Ball: 1 . . . From petemar1 at perlmonk.org Fri Feb 20 21:39:49 2004 From: petemar1 at perlmonk.org (Marc Peters) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] How perl will help me win the Lottery In-Reply-To: <20040220165339.41229.qmail@web60208.mail.yahoo.com> Message-ID: Not a rock, but a SPARC assembly bootloader and Yalnix kernel. >> -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Jim Thomason Sent: Friday, February 20, 2004 10:54 AM To: chicago-talk@mail.pm.org Subject: [Chicago-talk] How perl will help me win the Lottery Unless you've been living under a rock, you're aware ... >> From me at heyjay.com Sat Feb 21 10:59:33 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? Message-ID: <000701c3f89c$1938b800$6405a8c0@a30> Hi, If I have some one time processing, then a endless loop (till the proc is killed). Which is faster or are they the same: if ($firstTime) { ...stuff... $firstTime = 0; } else { ...stuff... } or if (! $firstTime) { ...stuff... } else { ...stuff... $firstTime = 0; } Just curious Jay From ehs at pobox.com Sat Feb 21 11:01:35 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Newsletter from O'Reilly UG Program, February 20 Message-ID: <20040221170135.GA4616@chloe.inkdroid.org> Lots of review titles available from ORA this time. Let me know if you are interested and the request will be forwarded along: - Linux Pocket Guide - Ethereal Packet Sniffing - Getting Started with LEGO Trains - iPod & iTunes: The Missing Manual - Check Point Next Generation with Application Intelligence - Hardware Hacking: Have Fun While Voiding Your Warranty - Oracle Essentials, 3rd Edition: Oracle Database 10g - Squid: The Definitive Guide //Ed ================================================================ O'Reilly News for User Group Members February 20, 2004 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Linux Pocket Guide -Ethereal Packet Sniffing -Getting Started with LEGO Trains -iPod & iTunes: The Missing Manual -Check Point Next Generation with Application Intelligence Security Administration -Hardware Hacking: Have Fun While Voiding Your Warranty -Oracle Essentials, 3rd Edition: Oracle Database 10g -Squid: The Definitive Guide ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Tony Stubblebine ("Regular Expression Pocket Reference"), Oakland, CA--March 9 -Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -O'Reilly's Digital Democracy Teach-In a Success -Annotating Everything: Marc A. Smith at ETech ---------------------------------------------------------------- News ---------------------------------------------------------------- -Happy Hacking! -Finalists for the 2004 Jolt Awards -Safari Gets Bigger and Better -Things Squid Administrators Should Know -A Ticketing System for a Three-Tiered Architecture -Home Automation with Mac OS X, Part 1 -Automated Backups with Existing Tools -Protect Yourself Against Denial-of-Service Attacks -Book Preview: Eclipse -Six Cool New JSP and Servlet Features -O'Reilly Network Is SXSW Web Awards Finalist -Cooking with C# -ADO.NET Connection Pooling Explained ---------------------------------------------------------------- News From Your Peers ---------------------------------------------------------------- Check out the new O'Reilly User Group Wiki for the latest news ================================================ 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, No Starch, Paraglyph, or Syngress 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 ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***Linux Pocket Guide Publisher: O'Reilly ISBN: 0-596-00628-4 "Linux Pocket Guide" gets you up to speed quickly on day-to-day Linux use. The book begins with general concepts like files and directories, the shell, and X windows, and then presents detailed overviews of the most essential commands. You'll learn each command's purpose, usage, options, location on disk, and even the RPM package that installed it. Throw in a host of valuable power user tips and a friendly, accessible style, and you'll find this practical, to-the-point book a small but mighty resource for Linux users. http://www.oreilly.com/catalog/linuxpg/ Sample excerpts are available online: http://www.oreilly.com/catalog/linuxpg/chapter/index.html. ***Ethereal Packet Sniffing Publisher: Syngress ISBN: 1-932266-82-8 "Ethereal Packet Sniffing" is the first book available on Ethereal, the premier open source protocol analyzer for Windows and Unix. Ethereal offers more protocol decoding and reassembly than any free sniffer out there, and this book will show you how to make the most of it. You'll learn how to use Tethereal, the command-line version of Ethereal; install and build Ethereal from source; pinpoint network problems using filters to manage network operations and traffic; import and export files between Ethereal and various compatible products; and so much more. http://www.oreilly.com/catalog/1932266828/ ***Getting Started with LEGO Trains Publisher: No Starch Press ISBN: 1593270062 Learn to build LEGO Trains, from setting up train tracks to building custom freight cars. Jacob H. McKee, an authority on LEGO Trains, teaches basic building techniques and shares some of his most fascinating and original train designs. You'll learn how to build a North American-style locomotive, a 1940's refrigerator car, and an intermodal container car, plus you'll gain the skills to create your own designs. Four color throughout. http://www.oreilly.com/catalog/1593270062/ ***iPod & iTunes: The Missing Manual Publisher: O'Reilly ISBN: 0-596-00658-6 iTunes and the iTunes music store aren't just for Mac fans anymore. Anyone running Windows XP or 2000 can now cash in on all the capabilities of this music store jukebox. Our new version of "iPod & iTunes: The Missing Manual" has been thoroughly updated to reflect these changes. No matter what kind of music moves you, this book will help you get much more out of your iPod--and much more into it. http://www.oreilly.com/catalog/ipodtmm2/ ***Check Point Next Generation with Application Intelligence Security Administration Publisher: Syngress ISBN: 1-932266-89-5 >From the authors of Syngress's best-selling "Check Point NG Security Administration" comes the definitive work on Check Point's latest product release: Check Point NG Feature Pack 4. No competing book covers every product contained within FP 4 (SMART, SecurePlatform, SecureXL, ClusterXL, and Performance Pack). Although not a study guide, this book will cover all objectives on Check Point's CCSA exam and a free exam simulator will be available from syngress.com http://www.oreilly.com/catalog/1932266895/ ***Hardware Hacking: Have Fun While Voiding Your Warranty Publisher: Syngress ISBN: 1932266836 "Hardware Hacking" is for people who dream of running Linux on an Xbox and opening a garage door with a PDA. To successfully hack consumer and SOHO electronic devices, you need knowledge of electrical engineering, operating systems, software coding, and mechanics; the first part of this book is a primer on these topics. Then the real fun begins. You'll learn how to hack mobile devices (PDAs, cell phones), gaming systems (Xbox, PS/2, Atari), audio/visual equipment (TiVo boxes, home theater PCs), computer equipment (iMacs, laptops, mini-motherboards), and much more. http://www.oreilly.com/catalog/1932266836/ ***Oracle Essentials, 3rd Edition: Oracle Database 10g Publisher: O'Reilly ISBN: 0-596-00585-7 "Oracle Essentials, 3rd Edition: Oracle Database 10g" distills a vast amount of knowledge into an easy-to-read volume. The new edition of this classic book covers the full range of Oracle's features and technologies, including the product line, architecture, data structures, networking, concurrency, and tuning. With a new overview of Oracle 10g, as well as coverage of recent releases 9i and 8i, this book provides everything you need to install and run Oracle databases. If you're new to Oracle or upgrading to Oracle 10g, you'll find this comprehensive guide essential. http://www.oreilly.com/catalog/oressentials3/ Chapter 1, "Introducing Oracle," is available online: http://www.oreilly.com/catalog/oressentials3/chapter/index.html ***Squid: The Definitive Guide Publisher: O'Reilly ISBN: 0596001622 Squid is the most popular web caching software in use today, and it works on a variety of platforms including Linux, FreeBSD, and Windows. Written by Duane Wessels, the creator of Squid, this book will help you configure and tune Squid for your particular situation. Newcomers to Squid will learn how to download, compile, and install code. Seasoned users will be able to dive into advanced topics such as high-performance storage options, rewriting requests, HTTP server acceleration, monitoring, debugging, and troubleshooting Squid. http://www.oreilly.com/catalog/squid/ Chapter 8, "Advanced Disk Cache Topics," is available online. http://www.oreilly.com/catalog/squid/chapter/index.html ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Tony Stubblebine ("Regular Expression Pocket Reference"), Oakland, CA--March 9 Tony will explain how to decrease development time while increasing reliability and readability of regular expressions. March 9, 7:30-9:30pm For more information, go to: http://oakland.pm.org/ ***Mac User Group Day at O'Reilly in Sebastopol, CA--April 24 Join O'Reilly and NCMUG for a special Mac User Group Day in Sebastopol, California on Saturday, April 24 from 2-6pm. Speakers include Derrick Story ("Digital Photography Pocket Guide, 2nd Edition," "iPhoto 2: The Missing Manual"), Chris Stone ("Mac OS X Panther in a Nutshell"), Tom Negrino & Dori Smith ("Mac OS X Unwired"), and Scott Fullam ("Hardware Hacking Projects for Geeks"). For more information and a complete schedule of events, go to: http://ug.oreilly.com/banners/macugday_hi_res.pdf Please RSVP to let us know you will be attending at mugevent@oreilly.com. Mac User Group Day 2:00pm-6:00pm, Saturday, April 24 O'Reilly 1005 Gravenstein Hwy North Sebastopol, CA 95472 800-998-9938 Ext. 7103 For directions, go to: http://www.oreilly.com/oreilly/seb_directions.html ================================================ Conference News ================================================ ***O'Reilly's Digital Democracy Teach-In This year's O'Reilly Emerging Technology Conference began with an impressive set of tutorials. But you also had the option to spend the first day of the conference at the Digital Democracy Teach-In, learning how to take back control of a different sort of operating system. Daniel Steinberg reports on sessions by Joe Trippi, former campaign manager for Howard Dean; Wes Boyd, co-founder of MoveOn.org; Scott Heiferman, co-founder and CEO of Meetup.com; and many more. http://www.oreillynet.com/pub/a/network/2004/02/10/digdemo.html ***Annotating Everything: Marc A. Smith at ETech Daniel Steinberg reports from O'Reilly's Emerging Technology Conference with an in-depth look at Marc A. Smith's session "Catalyzing Collective Action on the Net." Marc demonstrated several tools that show promise as ways to enhance online communities. http://www.oreillynet.com/pub/a/network/2004/02/11/etech_keynotes.html Find complete news coverage, the conference wiki, weblogs, photos, and much more on O'Reilly Network's ETech 2004 Conference Coverage page: http://www.oreillynet.com/et2004/ ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***Happy Hacking! Mike Langberg writes, "Most of us look at a toaster and see a kitchen appliance for crisping bread. Scott Fullam looks at a toaster and sees an engineering challenge...," in this "Mercury News" book review of "Hardware Hacking Projects for Geeks." http://www.mercurynews.com/mld/mercurynews/business/technology/7889687.htm Hardware Hacking Projects for Geeks ISBN: 0596003145 http://www.oreilly.com/catalog/hardwarehks/ ***Finalists for the 2004 Jolt Awards Software Development magazine recently announced the finalists for the 14th annual Jolt Product Excellence and Productivity Awards. Among the finalists are java.net and the O'Reilly Network in the category of "Websites and Developer Networks," and Head First Java and Programming .NET Windows Applications in the "Books--Technical" category. The awards ceremony will take place on March 17 during SD West 2004. http://sdmagazine.com/jolts/ ***Safari Gets Bigger and Better Safari Bookshelf, the premier electronic reference library for IT professionals and programmers, now holds more than 2,000 books from the industry's leading technical publishers. As the library grows, so does its functionality: searches are powerfully precise and as broad or specific as you wish. And now, with a Safari Max subscription, you can download chapters to read offline. Safari will help you save time, reduce errors, keep current, and save more money than ever with up to 35% off print copies of your favorite books. If you haven't yet gone on Safari, get a free trial subscription. https://secure.safaribooksonline.com/promo.asp?code=ORAUG&portal=oreilly&CMP=BAC-TP2974244892 --------------------- Open Source --------------------- ***Things Squid Administrators Should Know New users often struggle with the same frustrating set of idiosyncrasies involved in learning Squid, the popular web caching software. Here are six things you should know about using Squid from the get-go, from Duane Wessels, creator of Squid and author of "Squid: The Definitive Guide." http://www.onlamp.com/pub/a/onlamp/2004/02/12/squid.html ***A Ticketing System for a Three-Tiered Architecture Modern business apps often use a three-tiered architecture, separating the user interface from the data store from the application logic. Of course, this separation can add wait time, as users wait for their requests to process. Elena Garderman and Howard Feldman explain how adding a ticketing system can improve the process. http://www.onlamp.com/pub/a/onlamp/2004/02/12/ticket_system.html --------------------- Mac --------------------- ***Home Automation with Mac OS X, Part 1 Having more control over how your home operates isn't just a geek fantasy. You can lower energy costs, improve security, and enhance the overall ambiance of your humble abode. Alan Graham shows you how to leverage your Mac OS X computer and get started. http://www.macdevcenter.com/pub/a/mac/2004/02/13/home_automation.html ***Automated Backups with Existing Tools Backing up your hard disc is the job nobody wants to do--and even more so, no one wants to spend a lot of money doing it. Fortunately, Apple gives you everything you need in Mac OS X. You just have to pull it together. Peter Hickman shows you how. http://www.macdevcenter.com/pub/a/mac/2004/02/10/backup.html --------------------- Windows --------------------- ***Protect Yourself Against Denial-of-Service Attacks The only way to defend yourself is to understand your attacker in-depth. This excerpt from the recently released "Security Warrior" by Cyrus Peikari and Anton Chuvakin details denial-of-service attacks against Windows XP. Read it and prepare yourself. http://www.oreillynet.com/pub/a/windows/excerpt/swarrior_ch13/index1.html --------------------- Java --------------------- ***Book Preview: Eclipse The new Eclipse Foundation was recently announced at EclipseCon, and the Eclipse project is moving toward a June release of Eclipse 3.0. O'Reilly will publish Steve Holzner's "Eclipse: A Java Developer's Guide" this summer. http://www.onjava.com/pub/a/onjava/2004/02/04/AntEclipse.html A beta preview of Chapter 5, "Building Eclipse Projects Using Ant," is available online: http://www.onjava.com/onjava/2004/02/04/AntEclipse.pdf ***Six Cool New JSP and Servlet Features Bruce Perry describes six cool new features that Java developers who use Tomcat 5.x and other Servlet-API-2.4- and JSP-2.0-compliant containers will want to use in their projects. Bruce is the author of "Java Servlet & JSP Cookbook." http://www.onjava.com/pub/a/onjava/2004/02/11/jspcookbook.html --------------------- Web --------------------- ***O'Reilly Network Is SXSW Web Awards Finalist South by Southwest (SXSW) has announced the finalists for its 2004 Web Awards, and the O'Reilly Network has been selected as a finalist in the "Classic" category. Cast your vote for your favorite finalist by March 5; winners will be announced at the Web Awards gala on March 14 in Austin, Texas. http://sxsw.com/interactive/web_awards/finalists/ Vote today: http://www.sxsw.com/vote/peoples_choice/ --------------------- .NET --------------------- ***ADO.NET Connection Pooling Explained Because the .NET managed providers manage the connection pool for us, using shared database connections is as easy as a summertime splash in the kiddie pool. But if those connections unexpectedly become invalid you could find yourself floundering in the deep end. In this new article, James Still will have you doing laps in no time. http://www.ondotnet.com/pub/a/dotnet/2004/02/09/connpool.html ***Cooking with C# Learn how to convert a string returned as a Byte[ ] back into a string and how to handle an exception that occurs within a method invoked via reflection in these sample recipes from O'Reilly's recently released "C# Cookbook." http://www.ondotnet.com/pub/a/dotnet/excerpt/csharpckbk_chap01/index.html ================================================ News From Your Peers ================================================ ***Check out the new O'Reilly User Group Wiki for the latest news You can look for a meeting, user group, or post information any time you want. http://wiki.oreillynet.com/usergroups/view?HomePage Until next time-- Marsee ----- End forwarded message ----- -- Ed Summers aim: inkdroid web: http://www.inkdroid.org I gotta go right now, someone is videotaping me in my spaceship. [Beck] From jthomasoniii at yahoo.com Sat Feb 21 12:41:39 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? In-Reply-To: <000701c3f89c$1938b800$6405a8c0@a30> Message-ID: <20040221184139.64329.qmail@web60205.mail.yahoo.com> This actually caught my attention and I figured I'd give it a crack. I was quite surprised with the results. use Benchmark; timethese(500000, { 'if' => sub { my $x = 5; if ($x - 5 != 0) { foreach my $idx (1..100) { my $foo = $idx ** 2; $foo -= 17; } } else { #who cares? } }, 'else' => sub { my $x = 5; if ($x - 5 == 0) { #who cares? } else { foreach my $idx (1..100) { my $foo = $idx ** 2; $foo -= 17; } } } }); Benchmark: timing 500000 iterations of else, if... else: 2 wallclock secs ( 0.70 usr + 0.10 sys = 0.80 CPU) @ 625000.00/s (n=500000) if: 7 wallclock secs ( 1.96 usr + 0.00 sys = 1.96 CPU) @ 255102.04/s (n=500000) Naturally, I have no clue what your code is like, so I just inserted a time waster. As you can see, the else clobbers the if, running slightly more than twice as fast. I would've expected the if to be slightly faster, just assuming that the 'else' would have to jump in the code but the 'if' would have the code in place (I have no basis for that assumption, just seemed logical to me). Not knowing squat about the perl internals, I can't even hypothesize as to why the else is so much faster. Perhaps my test was flawed in some manner I'm not seeing. Regardless, also note that the difference is 255,000/sec vs. 625,000/sec. Realistically, I'd say this "optimization" will be utterly completely totally negligible. If you're trying to squeeze out performance, look elsewhere. Result? Write whichever one looks more clear in the code. Maintainability would be the issue here, not speed. Also, you might want to consider moving the "first time" check out of the loop and doing it in advance. If that's your only special case, you could step through it and do it, and then begin your infinite loop w/o the special case. Assuming your code would allow you to break it out of the loop, of course. -Jim..... --- Jay Strauss wrote: > Hi, > > If I have some one time processing, then a endless > loop (till the proc is > killed). Which is faster or are they the same: > > if ($firstTime) { > ...stuff... > $firstTime = 0; > } > else { > ...stuff... > } > > > or > > > if (! $firstTime) { > ...stuff... > } > else { > ...stuff... > $firstTime = 0; > } > > > Just curious > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools From lembark at wrkhors.com Sat Feb 21 13:53:31 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? In-Reply-To: <000701c3f89c$1938b800$6405a8c0@a30> References: <000701c3f89c$1938b800$6405a8c0@a30> Message-ID: <1364772704.1077393211@[192.168.200.4]> -- Jay Strauss > Hi, > > If I have some one time processing, then a endless loop (till the proc is > killed). Which is faster or are they the same: > > if ($firstTime) { > ...stuff... > $firstTime = 0; > } > else { > ...stuff... > } > > > or > > > if (! $firstTime) { > ...stuff... > } > else { > ...stuff... > $firstTime = 0; > } Probably simpler to deal with it via two calls. sub do_something { ... } do_something @first_time_args; # the first time for(;;) { do_something @other_time_args; } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Sat Feb 21 17:59:14 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? References: <20040221184139.64329.qmail@web60205.mail.yahoo.com> Message-ID: <002401c3f8d6$b859ab80$6405a8c0@a30> Thanks Jim, I thought the if would be faster too. I wasn't really trying to be a speed demon but thought it was an interesting question. Jay ----- Original Message ----- From: "Jim Thomason" To: "Chicago.pm chatter" Sent: Saturday, February 21, 2004 12:41 PM Subject: Re: [Chicago-talk] Which "if" structure is faster? > This actually caught my attention and I figured I'd > give it a crack. I was quite surprised with the > results. > > use Benchmark; > > timethese(500000, { > 'if' => sub { > my $x = 5; > if ($x - 5 != 0) { > foreach my $idx (1..100) { > my $foo = $idx ** 2; > $foo -= 17; > } > } else { > #who cares? > } > }, > 'else' => sub { > my $x = 5; > if ($x - 5 == 0) { > #who cares? > } else { > foreach my $idx (1..100) { > my $foo = $idx ** 2; > $foo -= 17; > } > } > } > }); > > Benchmark: timing 500000 iterations of else, if... > else: 2 wallclock secs ( 0.70 usr + 0.10 sys = > 0.80 CPU) @ 625000.00/s (n=500000) > if: 7 wallclock secs ( 1.96 usr + 0.00 sys = 1.96 > CPU) @ 255102.04/s (n=500000) > > Naturally, I have no clue what your code is like, so I > just inserted a time waster. > > As you can see, the else clobbers the if, running > slightly more than twice as fast. I would've expected > the if to be slightly faster, just assuming that the > 'else' would have to jump in the code but the 'if' > would have the code in place (I have no basis for that > assumption, just seemed logical to me). Not knowing > squat about the perl internals, I can't even > hypothesize as to why the else is so much faster. > Perhaps my test was flawed in some manner I'm not > seeing. > > Regardless, also note that the difference is > 255,000/sec vs. 625,000/sec. Realistically, I'd say > this "optimization" will be utterly completely totally > negligible. If you're trying to squeeze out > performance, look elsewhere. > > Result? Write whichever one looks more clear in the > code. Maintainability would be the issue here, not > speed. Also, you might want to consider moving the > "first time" check out of the loop and doing it in > advance. If that's your only special case, you could > step through it and do it, and then begin your > infinite loop w/o the special case. Assuming your code > would allow you to break it out of the loop, of > course. > > -Jim..... > > --- Jay Strauss wrote: > > Hi, > > > > If I have some one time processing, then a endless > > loop (till the proc is > > killed). Which is faster or are they the same: > > > > if ($firstTime) { > > ...stuff... > > $firstTime = 0; > > } > > else { > > ...stuff... > > } > > > > > > or > > > > > > if (! $firstTime) { > > ...stuff... > > } > > else { > > ...stuff... > > $firstTime = 0; > > } > > > > > > Just curious > > Jay > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. > http://antispam.yahoo.com/tools > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Sat Feb 21 17:55:12 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? References: <000701c3f89c$1938b800$6405a8c0@a30> <1364772704.1077393211@[192.168.200.4]> Message-ID: <002301c3f8d6$b82bbdb0$6405a8c0@a30> I don't really have that option unfortunately Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Saturday, February 21, 2004 1:53 PM Subject: Re: [Chicago-talk] Which "if" structure is faster? > > > -- Jay Strauss > > > Hi, > > > > If I have some one time processing, then a endless loop (till the proc is > > killed). Which is faster or are they the same: > > > > if ($firstTime) { > > ...stuff... > > $firstTime = 0; > > } > > else { > > ...stuff... > > } > > > > > > or > > > > > > if (! $firstTime) { > > ...stuff... > > } > > else { > > ...stuff... > > $firstTime = 0; > > } > > Probably simpler to deal with it via two calls. > > sub do_something > { > ... > } > > do_something @first_time_args; # the first time > > for(;;) > { > do_something @other_time_args; > } > > -- > 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 Mon Feb 23 10:39:14 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? In-Reply-To: <002301c3f8d6$b82bbdb0$6405a8c0@a30> References: <000701c3f89c$1938b800$6405a8c0@a30> <1364772704.1077393211@[192.168.200.4]> <002301c3f8d6$b82bbdb0$6405a8c0@a30> Message-ID: <2128282704.1077554354@[192.168.200.4]> -- Jay Strauss > I don't really have that option unfortunately Update a closure after the first pass through the handler. First time around the variable contains first time arguments, after that it contains the remaining arguments: my $sub = 0; my $after = sub { remaining_passes @remaining_args; # returns nonzero on completion $finished }; my $prior = sub { first_pass @first_time_args; $sub = $after; }; ... # no if logic required: the first pass through the # closure calls do_soemthing and then updates the # reference variable to call the after-the-fisrt-pass. # # these could be the same sub with different args or # two different subs: the infinite loop exits whenever # the $after closure returns true. for(;;) { $sub->() && last } Point here is that no if-logic is required: the first pass updates the value $sub to accomodate the remianing passes. You could have multiple state handlers this way, so long as each one knows how to pass of the processing to the state handler that follows it. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Feb 23 23:23:07 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Which "if" structure is faster? In-Reply-To: <2128282704.1077554354@[192.168.200.4]> References: <000701c3f89c$1938b800$6405a8c0@a30> <1364772704.1077393211@[192.168.200.4]> <002301c3f8d6$b82bbdb0$6405a8c0@a30> <2128282704.1077554354@[192.168.200.4]> Message-ID: <2427282704.1077600187@[192.168.200.4]> > my $sub = 0; > > my $after = > sub > { > remaining_passes @remaining_args; > > # returns nonzero on completion > > $finished > }; > > my $prior = > sub > { > first_pass @first_time_args; > $sub = $after; > }; > > ... > > # no if logic required: the first pass through the > # closure calls do_soemthing and then updates the > # reference variable to call the after-the-fisrt-pass. > # > # these could be the same sub with different args or > # two different subs: the infinite loop exits whenever > # the $after closure returns true. > > for(;;) { $sub->() && last } Follow up: One common issue is the setup -> first pass -> process -> cleanup cycle. If-logic slows this down quite a bit during the execution. It also complicates things due to state variables and the added if-logic used to check them. Easier way out: package Frobnicate; my $sub = 0; my @handlerz = ( sub { # initialize inputs, etc. # this doesn't read any input, it just initializes # the input stream and passes off the real work to # the first record handler (or whatever follows it # in the handler stack). ... $sub = shift @handlerz; }, sub { # handle the first record. # note that this may be expensive, and is # worth putting off until a record that # requires handling is available. good # example of this are DBI connections w/in # mod_perl: having all of the forked handlers # initate DBI connections at once can be # painful; this puts off the real work until # the apache process actually handles something. # # this can also be useful for XML processing, # there the prior handler did nothing more than # include Perl::SAX, this can generate a full # grammer from a schema, and then hand off input # to the main data stream to the next processor. # # after doing its work this passes off control # to the "normal" record handler. ... $sub = shift @handlerz; }, sub { # handle records until an end of stream is # detected -- which may be never, which case # the if at the end here is unnecessary. ... $sub = shift @handlers if $finished }, sub { # tear down any structures, clean up, and # exit the handler. this will never be # called if the prior loop never updates # $sub. this stops the for loop since it # returns false -- indicating the end of # stream has been detected. ... 0 } ); sub handler_stack { \@handlerz }; ... package Foo::Bar; # main input loop keeps going until the handler # returns false. my $handler_class = shift; # whatever... eval "use $handler_class"; my $get_stack = $handler_class->can( 'handler_stack' ) or die "Bogus handler class: $handler_class cannot 'handler_stack'"; my $handlerz = $handler_class->$get_stack->() or die "Bogus handler class: $handler_class returns false stack"; for( my $sub = shift @handlerz ; $sub->() ; ) {} Nice thing about this is that you can choose the handler stack class at runtime (via config file or command line) and the dispatcher has no idea what is really going on. All it does is call handlers until they return false. enjoi -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Tue Feb 24 13:24:48 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Problems with split (removing trailing fields) Message-ID: <000b01c3fb0b$e80ca260$6405a8c0@a30> Hi, I'm trying to parse a data stream whose delimiter is a chr(0). The problem is split " By default, empty leading fields are preserved, and empty trailing ones are deleted." Basically, I'm loosing data that I need. 1) can I change splits default behavior? (it doesn't mention it in the perldoc) 2) can someone show me a regex that would split the data into the proper fields? # below is an example of what is happening. Specifically, I'm loosing the final field. sub get_one { my $self = shift; $self->[FRAMING_BUFFER] =~ s/$self->[DELIMITER]/\|/g; print "B:", $self->[FRAMING_BUFFER],"\n"; my @a = split /\|/, $self->[FRAMING_BUFFER]; print "A:", join("|", @a),"\n"; } B:1|2|404|1||1|2|404|2||1|2|404|4||2|2|404|0|0|2|2|404|3|0|2|2|404|5|0|1|2|4 04|6||1|2|404|7||2|2|404|8|0|1|2|404|9|| A:1|2|404|1||1|2|404|2||1|2|404|4||2|2|404|0|0|2|2|404|3|0|2|2|404|5|0|1|2|4 04|6||1|2|404|7||2|2|404|8|0|1|2|404|9 Thanks Jay From andy at petdance.com Tue Feb 24 13:29:22 2004 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Problems with split (removing trailing fields) In-Reply-To: <000b01c3fb0b$e80ca260$6405a8c0@a30> References: <000b01c3fb0b$e80ca260$6405a8c0@a30> Message-ID: <20040224192922.GA12691@petdance.com> On Tue, Feb 24, 2004 at 01:24:48PM -0600, Jay Strauss (me@heyjay.com) wrote: > Hi, I'm trying to parse a data stream whose delimiter is a chr(0). The > problem is split " By default, empty leading fields are preserved, and empty > trailing ones are deleted." Basically, I'm loosing data that I need. Yes, if you want the final fields preserved, you set the third parm to split to a negative number. If LIMIT is specified and positive, it represents the maximum number of fields the EXPR will be split into, though the actual number of fields returned depends on the number of times PAT- TERN matches within EXPR. If LIMIT is unspecified or zero, trailing null fields are stripped (which potential users of "pop" would do well to remember). If LIMIT is negative, it is treated as if an arbitrarily large LIMIT had been specified. Note that splitting an EXPR that evaluates to the empty string always returns the empty list, regardless of the LIMIT specified. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Tue Feb 24 13:49:05 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Problems with split (removing trailing fields) References: <000b01c3fb0b$e80ca260$6405a8c0@a30> <20040224192922.GA12691@petdance.com> Message-ID: <000b01c3fb0f$4592ddc0$6405a8c0@a30> Thanks Andy, I read that but it didn't give me the impression that is would preserve trailing fields Jay ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Tuesday, February 24, 2004 1:29 PM Subject: Re: [Chicago-talk] Problems with split (removing trailing fields) > On Tue, Feb 24, 2004 at 01:24:48PM -0600, Jay Strauss (me@heyjay.com) wrote: > > Hi, I'm trying to parse a data stream whose delimiter is a chr(0). The > > problem is split " By default, empty leading fields are preserved, and empty > > trailing ones are deleted." Basically, I'm loosing data that I need. > > Yes, if you want the final fields preserved, you set the third parm to > split to a negative number. > > > If LIMIT is specified and positive, it represents the maximum number of > fields the EXPR will be split into, though the actual number of fields > returned depends on the number of times PAT- TERN matches within EXPR. > If LIMIT is unspecified or zero, trailing null fields are stripped > (which potential users of "pop" would do well to remember). If LIMIT > is negative, it is treated as if an arbitrarily large LIMIT had been > specified. Note that splitting an EXPR that evaluates to the empty > string always returns the empty list, regardless of the LIMIT specified. > > -- > 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 shild at sbcglobal.net Tue Feb 24 16:40:38 2004 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Apache::Session - Cookie Question Message-ID: <1077662437.40509.59.camel@localhost> We are using Request Tracker at work, which is using Mysql as the backend db. So RT is using Apache::Session::Mysql to store the cookie and other seesion data. We have a intranet that has a login screen that sets a cookie, allowing access to all the web pages without additional logins. They would like to have RT use that cookie as a login status as well. Not being much of a web developer, I've had to learn a lot about mod_perl, Html::Mason, apache, and cookies in a short time period. Has been fun, I've been wanting to work with this environment for a while. I have had the Mason Book and Apache Module books for some time, now I get to actually use them. Okay back to my question :-), when I use the mozilla cookie manager, I can see all the cookies including the RT one. In my ~/.mozilla dir I can see all the cookies except the RT one in the cookies.txt file. The RT cookie is serialized in the Mysql db. When the RT::mason handler is called via a browser, there is a Setupsession Component that makes a CGI::Cookie->fetch() call. This only returns the cookie that is serialized in the db and not the cookies that are in the cookies.txt file, even though the domain is the same(which is localhost for my testing). I think I understand that the request is handed off to a mod_per/Mason handler which is ,for a lack of better understanding, its own environment/process. How does CGI::Cookie get pointed to the stored session data and not retrieve the on disk cookies as well? Does anyone have any ideas or tips on how to get the on disk cookie to be returned to the session? I hope this makes sense, I am not really sure how to word it since I am not quite sure what is going on. Thanks, STH From shild at sbcglobal.net Tue Feb 24 18:43:37 2004 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Apache::Session - Cookie Question In-Reply-To: <1077662437.40509.59.camel@localhost> References: <1077662437.40509.59.camel@localhost> Message-ID: <1077669816.40509.75.camel@localhost> I think I got...sort of, the cookies.txt is the serialized cookies as the Apache::Session::MySQL is for the RT cookie. The mozilla is caching the cookies in memory, that is how the cookie manager is accessing all the cookies. So CGI::Cookies->fetch() is still getting the cookies from the request header. Right? On Tue, 2004-02-24 at 16:40, Scott T. Hildreth wrote: > We are using Request Tracker at work, which is using Mysql as the > backend db. So RT is using Apache::Session::Mysql to store the cookie > and other seesion data. We have a intranet that has a login screen that > sets a cookie, allowing access to all the web pages without additional > logins. They would like to have RT use that cookie as a login status as > well. Not being much of a web developer, I've had to learn a lot about > mod_perl, Html::Mason, apache, and cookies in a short time period. Has > been fun, I've been wanting to work with this environment for a while. > I have had the Mason Book and Apache Module books for some time, now I > get to actually use them. Okay back to my question :-), when I use the > mozilla cookie manager, I can see all the cookies including the RT one. > In my ~/.mozilla dir I can see all the cookies except the RT one in the > cookies.txt file. The RT cookie is serialized in the Mysql db. When > the RT::mason handler is called via a browser, there is a Setupsession > Component that makes a CGI::Cookie->fetch() call. This only returns the > cookie that is serialized in the db and not the cookies that are in the > cookies.txt file, even though the domain is the same(which is localhost > for my testing). I think I understand that the request is handed off to > a mod_per/Mason handler which is ,for a lack of better understanding, > its own environment/process. How does CGI::Cookie get pointed to the > stored session data and not retrieve the on disk cookies as well? Does > anyone have any ideas or tips on how to get the on disk cookie to be > returned to the session? I hope this makes sense, I am not really sure > how to word it since I am not quite sure what is going on. > > > Thanks, > STH > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From ehs at pobox.com Tue Feb 24 21:23:05 2004 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] O'Reilly Looking for a Software Engineer--Sebastopol, CA Message-ID: <20040225032305.GA16899@chloe.inkdroid.org> In case anyone wants to move... //Ed -- From: Marsee Henon To: ehs@pobox.com Date: Tue, 24 Feb 2004 13:32:02 -0800 Hello, Thought you should you know about this to pass along to any UG members or friends. (This information is available online at: http://www.oreillynet.com/pub/j/5) Software Engineer, Sebastopol, CA O'Reilly is looking for a Software Engineer to work as a part of the development team in our Sebastopol office. This position will be primarily responsible for supporting our production staff in the development and maintenance of program tools to convert incoming manuscripts to final book form. Minimum Requirements: Advanced knowledge of system analysis and design. This should include structured methodologies, logical and physical database design, and business process engineering. Practical experience in XML and web services. Ability to use XML in document preparation. Must have knowledge of XSL-FO and XSLT. Experience with DocBook is preferred. Knowledge of FrameMaker is a real plus. Expertise in Perl and at least one other programming language (preferably Java or C/C++) and application development experience in web-based systems and client-server environments. Minimum of a Bachelors degree in Computer Sciences or related field OR 6-8 years of actual related business experience. Proven project management skills. Ability to solve complex technical and business issues with direction/approval. Must possess good communication skills, both verbal and written with demonstrated success in a team environment. Ability to interpret, evaluate and respond to problems and requests received from business users. Working knowledge of the publishing industry is desirable. Organized, deadline driven and pays attention to detail. Location: Sebastopol, CA Status: Full-time Education: College Travel: Yes Telecommuting: no Contact Us Jobs@O'Reilly O'Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 Fax: 707-829-9610 Email: jobs@oreilly.com No phone calls please. From shild at sbcglobal.net Tue Feb 24 22:03:33 2004 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Apache::Session - Cookie Question In-Reply-To: <1077669816.40509.75.camel@localhost> References: <1077662437.40509.59.camel@localhost> <1077669816.40509.75.camel@localhost> Message-ID: <1077681812.40509.99.camel@localhost> Figured it out, after re-reading CGI::Cookie perldoc, I added -domain in the cookie creation component of RT. I tried this in my local server at home, but the $r->header_out() would not create the cookie when I added -domain. I logged into work and tried on the production server and it worked. The cookies all have the same domain name, so all the cookies are passed by the browser. When I am on my server at home, the host defaults to localhost, so I thought the browser would pass all the cookies that had the 'host => 127.0.0.1'. I tried setting the domain to my servers hostname which would work with the cgi_test prog, but like I said earlier the mod_perl's $r-header_out would not set the cookie whenever I set the -domain. Forgive my rambling, I spent hours on this and turns out my test environment was hindering my success. I'm just happy the damn thing works now. =) STH On Tue, 2004-02-24 at 18:43, Scott T. Hildreth wrote: > I think I got...sort of, the cookies.txt is the serialized cookies as > the Apache::Session::MySQL is for the RT cookie. The mozilla is caching > the cookies in memory, that is how the cookie manager is accessing all > the cookies. So CGI::Cookies->fetch() is still getting the cookies from > the request header. Right? > > On Tue, 2004-02-24 at 16:40, Scott T. Hildreth wrote: > > We are using Request Tracker at work, which is using Mysql as the > > backend db. So RT is using Apache::Session::Mysql to store the cookie > > and other seesion data. We have a intranet that has a login screen that > > sets a cookie, allowing access to all the web pages without additional > > logins. They would like to have RT use that cookie as a login status as > > well. Not being much of a web developer, I've had to learn a lot about > > mod_perl, Html::Mason, apache, and cookies in a short time period. Has > > been fun, I've been wanting to work with this environment for a while. > > I have had the Mason Book and Apache Module books for some time, now I > > get to actually use them. Okay back to my question :-), when I use the > > mozilla cookie manager, I can see all the cookies including the RT one. > > In my ~/.mozilla dir I can see all the cookies except the RT one in the > > cookies.txt file. The RT cookie is serialized in the Mysql db. When > > the RT::mason handler is called via a browser, there is a Setupsession > > Component that makes a CGI::Cookie->fetch() call. This only returns the > > cookie that is serialized in the db and not the cookies that are in the > > cookies.txt file, even though the domain is the same(which is localhost > > for my testing). I think I understand that the request is handed off to > > a mod_per/Mason handler which is ,for a lack of better understanding, > > its own environment/process. How does CGI::Cookie get pointed to the > > stored session data and not retrieve the on disk cookies as well? Does > > anyone have any ideas or tips on how to get the on disk cookie to be > > returned to the session? I hope this makes sense, I am not really sure > > how to word it since I am not quite sure what is going on. > > > > > > Thanks, > > STH > > _______________________________________________ > > 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 lembark at wrkhors.com Tue Feb 24 22:55:54 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Problems with split (removing trailing fields) In-Reply-To: <000b01c3fb0b$e80ca260$6405a8c0@a30> References: <000b01c3fb0b$e80ca260$6405a8c0@a30> Message-ID: <3042432704.1077684954@[192.168.200.4]> -- Jay Strauss > Hi, I'm trying to parse a data stream whose delimiter is a chr(0). The One way to sanity check delimeters is to use a capturing regex with split: my $delim = chr( 0 ); my @result = split /($delim)/, $input; This will give you an array which indludes the delimeters. Normally this is nice for generating hashes out of input. It is also handy for checking whether the fields got through. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jason at multiply.org Thu Feb 26 12:56:09 2004 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Interesting sort question Message-ID: <200402261856.i1QIu9E04984@tetsuo.mengelt.com> Hi All. I am having a brain freeze and am turning to you for help. I have a list that looks like this: [ [39, 29.7600], [33, 51.4300], [37, 77.0400], [41, 106.5900], [45, 124.3200], [35, 142.0500], [43, 167.6600] ] For the sublists, the first point is simply an ID, the 2nd is the center point Y value for the element. Each of these elements represents an item on a vertical bar. Users can drag elements along the bar, but the labels (the 2nd element in each array item is the y position for the given element number (1st element) ). Items cannot exceed MAX_Y or go below MIN_Y (top and bottom locations of the bar). items need to be separated by MIN_DIST of distance. if an item overlaps with another then the item, and the item it overlaps with need to move a bit, just enough to give them MIN_DIST apart. Keep in mind that an item can't go above MAX_Y or below MIN_Y. I can get it to go for the first pass, but it falls down when there are a lot of them near each other. Beer at the next meeting for whomever helps unstick my head on this one. -jason scott gessner jason@multiply.org From brian at deadtide.com Thu Feb 26 17:16:27 2004 From: brian at deadtide.com (Brian Drawert) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Interesting sort question In-Reply-To: <200402261856.i1QIu9E04984@tetsuo.mengelt.com> References: <200402261856.i1QIu9E04984@tetsuo.mengelt.com> Message-ID: Hi, I've attached a perl file with the function 'move_points()', and 3 helper functions and some sample code (all in perl of course). I've done a moderate amount of testing, but anybody on this list who feels inclined can test it out and let me know if I messed anything up. The only bug I am aware of is that it has no infinite recursion catch, so if you have too many data-points for the min-to-max-by-dist it will probably run forever. Also it expects the array to be an ordered list. Let me know how this works out. Thanks, Brian Drawert -------------- next part -------------- A non-text attachment was scrubbed... Name: ct_ptmv.pl Type: application/text Size: 7991 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20040226/2668f9b6/ct_ptmv.bin -------------- next part -------------- On Feb 26, 2004, at 12:56 PM, jason gessner wrote: > Hi All. > > I am having a brain freeze and am turning to you for help. > > I have a list that looks like this: > > [ > [39, 29.7600], > [33, 51.4300], > [37, 77.0400], > [41, 106.5900], > [45, 124.3200], > [35, 142.0500], > [43, 167.6600] > ] > > For the sublists, the first point is simply an ID, the 2nd is the > center > point Y value for the element. > > Each of these elements represents an item on a vertical bar. > > Users can drag elements along the bar, but the labels (the 2nd element > in > each array item is the y position for the given element number (1st > element) > ). > > Items cannot exceed MAX_Y or go below MIN_Y (top and bottom > locations of the bar). > items need to be separated by MIN_DIST of distance. > if an item overlaps with another then the item, and the item it > overlaps with need to move a bit, just enough to give them MIN_DIST > apart. > Keep in mind that an item can't go above MAX_Y or below MIN_Y. > > I can get it to go for the first pass, but it falls down when there > are a > lot of them near each other. > > Beer at the next meeting for whomever helps unstick my head on this > one. > > -jason scott gessner > jason@multiply.org > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From brian at deadtide.com Thu Feb 26 17:23:03 2004 From: brian at deadtide.com (Brian Drawert) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] Interesting sort question In-Reply-To: References: <200402261856.i1QIu9E04984@tetsuo.mengelt.com> Message-ID: UPDATE now with an infinite recursion catch. -------------- next part -------------- A non-text attachment was scrubbed... Name: ct_ptmv.pl Type: application/text Size: 8310 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20040226/66b1f861/ct_ptmv.bin -------------- next part -------------- On Feb 26, 2004, at 5:16 PM, Brian Drawert wrote: > Hi, I've attached a perl file with the function 'move_points()', and 3 > helper functions and some sample code (all in perl of course). I've > done a moderate amount of testing, but anybody on this list who feels > inclined can test it out and let me know if I messed anything up. The > only bug I am aware of is that it has no infinite recursion catch, so > if you have too many data-points for the min-to-max-by-dist it will > probably run forever. Also it expects the array to be an ordered > list. > > Let me know how this works out. > > Thanks, > Brian Drawert > > > > > > On Feb 26, 2004, at 12:56 PM, jason gessner wrote: > >> Hi All. >> >> I am having a brain freeze and am turning to you for help. >> >> I have a list that looks like this: >> >> [ >> [39, 29.7600], >> [33, 51.4300], >> [37, 77.0400], >> [41, 106.5900], >> [45, 124.3200], >> [35, 142.0500], >> [43, 167.6600] >> ] >> >> For the sublists, the first point is simply an ID, the 2nd is the >> center >> point Y value for the element. >> >> Each of these elements represents an item on a vertical bar. >> >> Users can drag elements along the bar, but the labels (the 2nd >> element in >> each array item is the y position for the given element number (1st >> element) >> ). >> >> Items cannot exceed MAX_Y or go below MIN_Y (top and bottom >> locations of the bar). >> items need to be separated by MIN_DIST of distance. >> if an item overlaps with another then the item, and the item it >> overlaps with need to move a bit, just enough to give them MIN_DIST >> apart. >> Keep in mind that an item can't go above MAX_Y or below MIN_Y. >> >> I can get it to go for the first pass, but it falls down when there >> are a >> lot of them near each other. >> >> Beer at the next meeting for whomever helps unstick my head on this >> one. >> >> -jason scott gessner >> jason@multiply.org >> >> _______________________________________________ >> 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 Dooley.Michael at con-way.com Fri Feb 27 10:01:57 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] zipcode Message-ID: ok if you have a CSV file that has 12+ fields. on the 12th field you have a zipcode. if the Zip is 7 character put a space between the 4th and 5th character. I don't know why I am having this brain blockage but: 1) is there a better way to do the regex below? 2) how do I do the inline edit? what I have below works but I know there has to be a much better way to edit the zipcode. #!/usr/bin/perl -w use strict; while (<> ) { if (/(\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(\w*)(.*)/) { if (length($2) == 7) { my $zipstart=substr($2,0,4); my $zipend=substr($2,4,3); print "$1$zipstart $zipend$3\n"; next; } print "$1$2$3\n"; } } From jthomasoniii at yahoo.com Fri Feb 27 10:18:26 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] zipcode In-Reply-To: Message-ID: <20040227161826.69966.qmail@web60208.mail.yahoo.com> When working with long, delimited lists of data like that, I'm inclined to split it, twiddle it, then reassemble it. while (<>) { my @data = split /,/; #use substr to substitute in a space at the 4th character if our string is 7 characters long substr($data[11], 4, 1, " ") if length $data[11] == 7; print join(',', @data); #no need for a newline, we have one at the last position } if you want, you could use $, set to ',' and then just print @data at the end. Might be a little faster, but I prefer being explicit. That should work, but I didn't test it, so it may need a little twiddling. But you also caught my curiousity...what's with a 7 digit zipcode and what would the space do? I'm only familiar with 5 digit, 9 digit, and 11 digit (DPBC) codes (and none of those have spaces). I'm thinking canadian postal codes, but I'm not sure. -Jim...... --- "Dooley, Michael" wrote: > ok if you have a CSV file that has 12+ fields. > on the 12th field you have a zipcode. if the Zip is > 7 character put a space > between the 4th and 5th character. > > I don't know why I am having this brain blockage > but: > > 1) is there a better way to do the regex below? > 2) how do I do the inline edit? > > what I have below works but I know there has to be a > much better way to edit > the zipcode. > > #!/usr/bin/perl -w > > use strict; > > while (<> ) { > if > (/(\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(\w*)(.*)/) > { > if (length($2) == 7) { > my $zipstart=substr($2,0,4); > my $zipend=substr($2,4,3); > print "$1$zipstart $zipend$3\n"; > next; > } > > print "$1$2$3\n"; > } > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools From jthomasoniii at yahoo.com Fri Feb 27 10:20:19 2004 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] zipcode In-Reply-To: Message-ID: <20040227162019.6654.qmail@web60203.mail.yahoo.com> See? I told you it might need some twiddling. Naturally, it should be: substr($data[11], 4, 0, " ") instead of: substr($data[11], 4, 1, " ") (insert AndyRant(tm) about testing your code) -Jim..... --- "Dooley, Michael" wrote: > ok if you have a CSV file that has 12+ fields. > on the 12th field you have a zipcode. if the Zip is > 7 character put a space > between the 4th and 5th character. > > I don't know why I am having this brain blockage > but: > > 1) is there a better way to do the regex below? > 2) how do I do the inline edit? > > what I have below works but I know there has to be a > much better way to edit > the zipcode. > > #!/usr/bin/perl -w > > use strict; > > while (<> ) { > if > (/(\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(\w*)(.*)/) > { > if (length($2) == 7) { > my $zipstart=substr($2,0,4); > my $zipend=substr($2,4,3); > print "$1$zipstart $zipend$3\n"; > next; > } > > print "$1$2$3\n"; > } > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools From Dooley.Michael at con-way.com Fri Feb 27 10:21:21 2004 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] zipcode Message-ID: you know the first iteration of this script I used split. but I failed to use join. it didn't even dawn on me to use join. so many different ways to do 1 task sometimes they get away from you. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jim Thomason Sent: Friday, February 27, 2004 10:18 AM To: Chicago.pm chatter Subject: Re: [Chicago-talk] zipcode When working with long, delimited lists of data like that, I'm inclined to split it, twiddle it, then reassemble it. while (<>) { my @data = split /,/; #use substr to substitute in a space at the 4th character if our string is 7 characters long substr($data[11], 4, 1, " ") if length $data[11] == 7; print join(',', @data); #no need for a newline, we have one at the last position } if you want, you could use $, set to ',' and then just print @data at the end. Might be a little faster, but I prefer being explicit. That should work, but I didn't test it, so it may need a little twiddling. But you also caught my curiousity...what's with a 7 digit zipcode and what would the space do? I'm only familiar with 5 digit, 9 digit, and 11 digit (DPBC) codes (and none of those have spaces). I'm thinking canadian postal codes, but I'm not sure. -Jim...... --- "Dooley, Michael" wrote: > ok if you have a CSV file that has 12+ fields. > on the 12th field you have a zipcode. if the Zip is > 7 character put a space > between the 4th and 5th character. > > I don't know why I am having this brain blockage > but: > > 1) is there a better way to do the regex below? > 2) how do I do the inline edit? > > what I have below works but I know there has to be a > much better way to edit > the zipcode. > > #!/usr/bin/perl -w > > use strict; > > while (<> ) { > if > (/(\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(\w*)(.*)/) > { > if (length($2) == 7) { > my $zipstart=substr($2,0,4); > my $zipend=substr($2,4,3); > print "$1$zipstart $zipend$3\n"; > next; > } > > print "$1$2$3\n"; > } > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From pbaker at where2getit.com Fri Feb 27 10:33:45 2004 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:28:07 2004 Subject: [Chicago-talk] zipcode In-Reply-To: References: Message-ID: On Feb 27, 2004, at 10:01 AM, Dooley, Michael wrote: > ok if you have a CSV file that has 12+ fields. Have you thought about using one of the CSV modules from CPAN? These will properly handle if fields are wrapped in quotes for instance. Another thing to do would be to split the fields on comma into an array. Do your work on field 11. And then join them back together. -- 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 lembark at wrkhors.com Sun Feb 29 12:56:24 2004 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:28:08 2004 Subject: [Chicago-talk] zipcode In-Reply-To: References: Message-ID: <1524980000.1078080984@[192.168.200.4]> -- "Dooley, Michael" > ok if you have a CSV file that has 12+ fields. > on the 12th field you have a zipcode. if the Zip is 7 character put a > space between the 4th and 5th character. > > I don't know why I am having this brain blockage but: > > 1) is there a better way to do the regex below? > 2) how do I do the inline edit? > > what I have below works but I know there has to be a much better way to > edit the zipcode. > ># !/usr/bin/perl -w > > use strict; > > while (<> ) { > if (/(\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,\w*,)(\w*)(.*)/) { > if (length($2) == 7) { > my $zipstart=substr($2,0,4); > my $zipend=substr($2,4,3); > print "$1$zipstart $zipend$3\n"; > next; > } > > print "$1$2$3\n"; > } > } Don't use a regex to split up the data on commas for one: use split. Then take the 12th field and play with it. If you need to then rejoin the data: my $sepchar = ','; my $regex /$sepchar/o; ... local $\ = ''; local $, = $sepchar; for( @input ); { my @fieldz = split $regex; $fieldz[12] =~ s/^(.{4} /$1 / if length $fieldz[12] == 7; # never chopmed it, the newline should # still be at the end. print @fieldz; } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Sun Feb 29 22:09:19 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:08 2004 Subject: [Chicago-talk] Class::DBI presentation Message-ID: <000901c3ff43$140528c0$6405a8c0@a30> Just a reminder, this Tuesday (March 2, 2004) @ 7p, we (the Chicago perl mongers) will be talking about Class::DBI. If you aren't familiar with CDBI, it's a perl module that performs all the drudgery of converting objects to relational databases and visa a versa. If you work with perl (or even if you haven't) and want to talk to a relational DB (oracle, mysql, postgres, sybase, sqlserver...), this is a module you must check out. For directions and times see, http://chicago.pm.org/meetings/ All are welcome. Jay From me at heyjay.com Sun Feb 29 22:27:34 2004 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:28:08 2004 Subject: [Chicago-talk] DEBUG function Message-ID: <000f01c3ff45$8816d590$6405a8c0@a30> I'm looking at some code "POE::Filter::Line" @ http://search.cpan.org/src/RCAPUTO/POE-0.2802/lib/POE/Filter/Line.pm and at the top he has a: sub DEBUG () { 0 } then later he has a: DEBUG and do { .... }; obviously this is debugging stuff. My question is how would you ever get DEBUG to return "true", in order to enter the debugging code? I know you can always change the source to make: sub DEBUG () { 1 } But is there some way you are supposed to do this at runtime? Jay