From scratchcomputing at gmail.com Mon Oct 2 19:22:18 2006 From: scratchcomputing at gmail.com (The Dread Parrot) Date: Mon, 2 Oct 2006 19:22:18 -0700 Subject: [Pdx-pm] Fwd: [pm_groups] Registrations are open for OSDC 2006 Message-ID: <200610021922.18608.ewilhelm@cpan.org> I usually say something funny when I forward e-mails, but I'm currently at a loss for pancakes. ---------- Forwarded Message: ---------- Subject: [pm_groups] Registrations are open for OSDC 2006 Date: Monday 02 October 2006 06:59 pm From: Scott Penrose To: Perl Monger Group Leaders Hey PM Dudes, Could you pass this on to your groups please. Thanks Scott Registrations are open for the Open Source Developers' Conference 2006: http://www.osdc.com.au/registration/index.html Book before 31st October to save $50 and get a free conference t-shirt! The Open Source Developers' Conference is an Australian conference covering talks about software development for open source languages and projects; regardless of operating system. The technical program is running from 6th - 8th December 2006 and will be held in Melbourne, Victoria (at Monash University's Caulfield Campus). We are planning to have 3 streams of talks over the three days with combined keynotes at the start and end of each day. Morning and afternoon teas, and lunch will be provided. A conference dinner will be held on the night of the 6th. Talks this year include: - "Mono - Migrating from Windows to Linux" by Dr. Trent Mifsud, Lecturer for the Faculty of Information Technology, Monash University - "Data Warehousing HOWTO" by Evan Leybourn, Director of Looking Glass Solutions - "J2EE and Open Source Innovation: The Relationship between Open Source and Standards" by Keith Pitty, Senior Consultant at Cirrus Technologies Pty Ltd - "Enterprise PHP" by Thorsten Rinne, Software Developer at Mayflower GmbH / ThinkPHP - "Obfuscation, Golfing and Secret Operators in Perl" by Jos? Castro, Team Leader at log - "A Rails/Django Comparison" by Alan Green, Cirrus Technologies and Ben Askins, Sterland Computing For a full list please visit: http://osdc2006.cgpublisher.com/session_descriptions.html Conference keynote presentors include Damian Conway, Randal L. Schwartz, Richard Farnsworth and others. On the 5th of December we are running a number of short tutorials. These cover Cascading Style Sheets, Open Source Python GIS Hacks, Testing Web Applications with Perl, a Drupal Tutorial, an Introduction to Perl Template Toolkit and Building Large Scale Web Apps. For more information please visit: http://www.osdc.com.au/papers/tutorials.html We look forward to sharing this great conference with you. Scott -- * - * http://www.osdc.com.au - Open Source Developers Conference * - * Scott Penrose VP in charge of Pancakes http://linux.dd.com.au/ scottp at dd.com.au Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands. Please do not send me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Microsoft is not the answer. It's the question. And the answer is no. -- Request pm.org Technical Support via support at pm.org pm_groups mailing list pm_groups at pm.org http://mail.pm.org/mailman/listinfo/pm_groups ------------------------------------------------------- -- http://pdx.pm.org From krisb at ring.org Thu Oct 5 08:25:33 2006 From: krisb at ring.org (Kris Bosland) Date: Thu, 5 Oct 2006 08:25:33 -0700 (PDT) Subject: [Pdx-pm] JavaScript Kwalitee Message-ID: I have written some JavaScript functions for a program I am working on and now I would like to test them. What JavaScript test systems have people used? Do they work on Win32? Are they Perl/TAP friendly? Happy or Sad stories? I guess once JavaScript is running properly in Parrot this will be a lot easier. Thanks. -Kris From jerry.gay at gmail.com Thu Oct 5 08:47:37 2006 From: jerry.gay at gmail.com (jerry gay) Date: Thu, 5 Oct 2006 08:47:37 -0700 Subject: [Pdx-pm] JavaScript Kwalitee In-Reply-To: References: Message-ID: <1d9a3f400610050847t3e528f91gc02f34c0f5abd375@mail.gmail.com> On 10/5/06, Kris Bosland wrote: > I have written some JavaScript functions for a program I am > working on and now I would like to test them. What JavaScript test > systems have people used? Do they work on Win32? Are they Perl/TAP > friendly? Happy or Sad stories? > have a look at openjsan.org (the javascript equivalent of cpan,) and in particular at http://openjsan.org/doc/t/th/theory/Test/Simple/0.21/index.html > I guess once JavaScript is running properly in Parrot this will be > a lot easier. > probably, when there's a good parrot testing library that makes it easy to write language-specific front ends to. some of us are already working on it. i've been trying to keep my parrot TAP parser grammar in sync with ovid's TAPx::Parser, for example. ~jerry From jeff at vpservices.com Thu Oct 5 09:00:56 2006 From: jeff at vpservices.com (Jeff Zucker) Date: Thu, 05 Oct 2006 09:00:56 -0700 Subject: [Pdx-pm] JavaScript Kwalitee In-Reply-To: References: Message-ID: <45252C38.7090705@vpservices.com> Not quite testing, but I just have to mention my favorite JavaScript debugging tool: the FireBug Firefox extension which handles both JavaScript and CSS. -- Jeff Kris Bosland wrote: > I have written some JavaScript functions for a program I am > working on and now I would like to test them. What JavaScript test > systems have people used? Do they work on Win32? Are they Perl/TAP > friendly? Happy or Sad stories? > > I guess once JavaScript is running properly in Parrot this will be > a lot easier. > > Thanks. > > -Kris > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > > > From david at kineticode.com Thu Oct 5 09:06:40 2006 From: david at kineticode.com (David E. Wheeler) Date: Thu, 5 Oct 2006 09:06:40 -0700 Subject: [Pdx-pm] JavaScript Kwalitee In-Reply-To: <1d9a3f400610050847t3e528f91gc02f34c0f5abd375@mail.gmail.com> References: <1d9a3f400610050847t3e528f91gc02f34c0f5abd375@mail.gmail.com> Message-ID: On Oct 5, 2006, at 08:47, jerry gay wrote: > have a look at openjsan.org (the javascript equivalent of cpan,) and > in particular at > http://openjsan.org/doc/t/th/theory/Test/Simple/0.21/index.html And let me know if you have any questions about Test.Simple. Download it here: http://openjsan.org/dist/t/th/theory/Test.Simple-0.21.tar.gz And to see how it works, check out its own harness here: http://openjsan.org/src/t/th/theory/Test.Simple-0.21/tests/index.html Best, David From scratchcomputing at gmail.com Thu Oct 5 12:01:19 2006 From: scratchcomputing at gmail.com (Seven till Seven) Date: Thu, 5 Oct 2006 12:01:19 -0700 Subject: [Pdx-pm] Next Wed. WxPerl for Fun and Profit Message-ID: <200610051201.19771.ewilhelm@cpan.org> Hi all, Here's the plan for next week's meeting. If anyone would like to contribute a mini presentation on the Alien suite, please contact me off-list. ------------ October Meeting Wednesday Oct 11th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. wxPerl for Fun and Profit Eric Wilhelm will talk about how to get started with the Perl bindings to the wxwidgets GUI toolkit. Eric has spent the last several months designing and building a large (7.5kLOC and growing in 62 modules) system complete with a comprehensive test suite, pluggable, reskinnable architecture, network-transparent connectivity, blah, blah, blah (ok, the blah part is done, but I'm still working on some of the other bits.) The presentation will cover: o Web3.0 -- 1000x more responsive than Web2.0 o WxWidgets/WxPerl overview o how cross platform is it? o finding documentation o installation on Windows, Mac, and Linux o code generation with wxglade (or not) o creating a sane object-oriented architecture while using an event-driven toolkit o events, hotkeys, and callbacks with closures, methods, and accessors o testing --Eric -- http://pdx.pm.org From chromatic at wgz.org Fri Oct 6 00:52:32 2006 From: chromatic at wgz.org (chromatic) Date: Fri, 6 Oct 2006 00:52:32 -0700 Subject: [Pdx-pm] Fwd: Portland questions Message-ID: <200610060052.33010.chromatic@wgz.org> Hi all, You're all clever and highly socialized Portlandites, where I let myself out of O'Reilly Hillsboro once a week or so to admire the daystar before it burns my fair skin. Does anyone have far better answers to John's questions than I do? (If you want to forward this to a similarly geeky Stumptown-area list, please do.) Please respond to John directly, unless you have a burning answer that we ought to know. -- c ---------- Forwarded Message ---------- Subject: Portland questions From: John Littler Portland, Oregon has long been one of the places you might stop off at if you were doing the West Coast drive thing; say traveling from LA up to the border. Along the way there is a craggy coast, giant redwood trees and interesting small communities. Portland itself is on a river about 80 miles from the coast and with a nice backdrop of Mt. Shasta. It has about half a million people in the town proper and about two million in the whole surrounding area. It's a nice size for getting around and the sort of size where people haven't withdrawn into themselves for protection against the cram-packed hordes. Portland has also become a Liberal and alternative enclave with all kinds of music and other activities and has the USA's largest bookstore which takes up a city block. Another plus is that the place is nowhere near as rainy as somewhere like Seattle, Washington, which is a bit further North. Here we enlist the help of Portland resident, O'Reilly's technical editor chromatic ... Maybe first we can deal with where to stay: Let's say we have two people and one is blessed with a big budget and the other with a small one. Both like alternative and interesting places. Where would you recommend they stay? After they've checked in they'll look at the waterfront and the distant mountains and wonder what to do next. Where would you point them as far as general sightseeing is concerned? After that they got a bit hungry and it's time for lunch anyway. Being forward planners they're even thinking ahead to where dinner might be had. What would you recommend? Portland is well-known for its music and bands and for the fact that the Dandy Warhols developed an area into a place for theatre and music. Could you tell us a bit more about that? What are the main venues in town? What sort of music is generally played in them (I know this sort of info has a short usability span generally)? Portland is said to have more than its fair share of computer geeks. What sort of geek-friendly activities are there? Are there a lot of tech employers in the area? Summing up the ethos of a place can be difficult, especially in larger cities where ghettoization and/or cultural diversity lead to many different places. People say that Portland has very much an anti-authoritarian, questioning, alternative culture sort of ethos. Is this just for three blocks in town or is it generally true? Cheers! John Please add any you feel are cool... some links: http://www.pova.org http://www.oreillynet.com/pub/au/176 ------------------------------------------------------- From patricks at infogroupnw.com Fri Oct 6 15:40:30 2006 From: patricks at infogroupnw.com (Patrick Schmeckpeper) Date: 6 Oct 2006 18:40:30 -0400 Subject: [Pdx-pm] FW: Perl Programmer opportunity- 18 month contract! Message-ID: <13455272.1160174429804.JavaMail.cfservice@WEBSERVER22> Greetings! We are looking for a proficient Perl programmer to work in a small team responsible for supporting/extending existing Perl-based enterprise level web site. Prior experience with test-driven development and the ability to work with existing code base is a must. Candidate needs to be able to work both independently and in team setting leveraging development best practices. Requirements: 5+ years of programming experience 2-3+ years of Object Oriented Perl development experience 1+ years of Apache mod_perl development Thorough knowledge of UNIX/Linux operating system This is a 18 month contract opportunity!! Please send a resume to; patrics at infogroupnw.com *We pay 100% of monthly medical premiums!! check us out at www.infogroupnw.com Thanks!! Patrick Schmeckpeper Senior Recruiter INFOGROUP NORTHWEST PHONE: 503.841.9582 |EMAIL: patricks at infogroupnw.com Join our Referral Network -- Receive a $1000. For details, please visit: http://www.infogroupnw.com/referrals.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061006/a834de66/attachment.html From scratchcomputing at gmail.com Mon Oct 9 17:58:06 2006 From: scratchcomputing at gmail.com (The Dread Parrot) Date: Mon, 9 Oct 2006 17:58:06 -0700 Subject: [Pdx-pm] Fwd: Newsletter from O'Reilly UG Program, October 9 Message-ID: <200610091758.06570.ewilhelm@cpan.org> ---------- Forwarded Message: ---------- Subject: Newsletter from O'Reilly UG Program, October 9 Date: Monday 09 October 2006 04:58 pm From: "Marsee Henon" To: ewilhelm at cpan.org Hello, Just a note to let you know that we have 33 new releases (wow!) in this issue. In order to make this newsletter somewhat readable, I have left out the book descriptions, please click on the URL for more information on each title. Thanks for looking, Marsee ================================================================ O'Reilly UG Program News--Just for User Group Leaders October 9, 2006 ================================================================ -Looking for Slashdot and Amazon Reviewers for the "Rails Cookbook" -Get a Head Start on Your Holiday Events -Put Up a MAKE or CRAFT Banner, Get a Free Book -USdig Looking to Start New Chapters in the US -Need an Expo Pass for Photoplus Expo 2006 in New York? ---------------------------------------------------------------- Book Info ---------------------------------------------------------------- ***Review Books are Available Copies of our books are available for your members to review--just send me an email to request books and and please include the book's ISBN number (click on the "More Details" link to find the ISBN.) Let me know if you need your book by a certain date. Allow at least four weeks for shipping. ***Please Send Copies of Your Book Reviews Email me a copy of your newsletter or book review. For tips and suggestions on writing book reviews, go to: ***Group Purchase Discounts are Available Please let me know if you are interested and I can put you in touch with our sales department. ---------------------------------------------------------------- General News or Inquiries ---------------------------------------------------------------- ***Looking for Slashdot and Amazon Reviewers for the "Rails Cookbook," now available as a "Rough Cut" If you or one of your group members can write a review, let me know. I'll send you a Rough Cuts coupon ASAP. ***Get a Head Start on Your Holiday Events Does your group have a holiday bash that needs some raffle prizes? Plan ahead by giving me your list of books (title and ISBN) now. I can pre-order the titles that aren't quite out yet and then there's one less thing to worry about this busy holiday season. ***USdig Looking to Start New Chapters in the US Are you or someone you know interested in starting a digital imaging group chapter? USdig (http://www.usdig.org/) is looking for leaders in New York, Boston, Chicago, Atlanta, Seattle, Dallas/Fort Worth, and more. Currently there are chapters in San Francisco and Los Angeles. For more information, send me an email and I'll forward it along. ***Put Up an MAKE or CRAFT Banner, Get a Free Book We're looking for user groups to display our magazine banners on their web sites. If you send me the link to your group's site with one or both more banners, I'll send you the O'Reilly book(s) of your choice. MAKE Banners: CRAFT Banners (Craft debuts out in October 2006): ' ***Need an Expo Pass for Photoplus Expo 2006 in New York? Let me know and I'll send you one. Show dates are November 2-4. ================================================================ O'Reilly News for User Group Members October 9, 2006 ================================================================ ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- -ActionScript 3.0 Cookbook -The Book of JavaScript, Second Edition -Build Your Own ASP.NET Website Using C# & VB.NET, Second Edition -Color Management in Digital Photography -Cryptography for Developers -CSS Cookbook, Second Edition -Developers Guide to Web Application Security -Digital Photography Expert Techniques, Second Edition -Dynamic Apache with Ajax and JSON (PDF) -Essential Electronics for Software Folk -Fedora Linux -Fine Art Printing for Photographers -From Darkroom to Lightroom, Second Edition (PDF) -GIMP 2 for Photographers -Hack the Stack -HTML & XHTML: The Definitive Guide, Sixth Edition -Java Generics and Collections -Learning JavaScript -Mapping and Modding Half-Life 2 Complete -MCSE Core Elective Exams in a Nutshell -Practical Color Management: Eddie Tapp on Digital Photography -Process Improvement Essentials -Programming Atlas -Programming Embedded Systems, Second Edition -Scripting for Testers -Snort Intrusion Detection and Prevention Toolkit -Syngress Force Emerging Threat Analysis -Using Microformats (PDF) -Visual Basic 2005 Cookbook -WarDriving and Wireless Penetration Testing -Web Scripting Little Black Book -Windows PowerShell Quick Reference (PDF) -Wireshark & Ethereal Network Protocol Analyzer Toolkit -MAKE & CRAFT Magazine Subscriptions ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Derrick Story ("Digital Photography Pocket Guide" and "iPhoto 6: The Missing Manual") at the Silicon Valley Mac User Group, Cupertino, CA--October 16 -David McFarland ("CSS: The Missing Manual") at DevGroup NW, Portland, OR--October 19 -Peter Krogh ("The DAM Book") at PhotoPlus Expo, New York, NY--Nov?2-4, 2006 -Julieanne Kost ("Window Seat") Project: Photoshop Lightroom School Tour -Peter Krogh ("The DAM Book") ASMP/It's Your Business Event Series -Eddie Tapp ("Photoshop Workflow Setups") Pro Tips Tour ---------------------------------------------------------------- Conference News ---------------------------------------------------------------- -Submit Your Proposals for the 2007 MySQL Conference & Expo ---------------------------------------------------------------- News ---------------------------------------------------------------- -2.6 Million Lines of Code -Smalltalk for Everyone Else -User Group Members Receive a Special 30% Discount on O'Reilly Learning Courses -Sharing Internet Connections -Scaling Dynamic Websites with Apache Modules -Two Slick QuickTime Tricks -Web Domination Using Photoshop -Your New iTunes Movies to DVD (and Protect Your Other iTunes Purchases) -Better Registry Searching -Windows Mobile Weekly Roundup -What is Java Content Repository -Managing a Honeypot -Survey Exposes The Four Web Dev Stereotypes--Which are You? -Enter the MAKE & CRAFT Halloween Contests -The Way of a Digital Photography Pioneer (Podcast) -Listen to DerEngel(No Starch's "Hacking The Cable Modem") on NYC's WBAI-FM -TechTalkRadio Interviews David Pogue -Creating Beautiful Digital Photos the Eddie Tapp Way (Podcast) -Scaling Dynamic Websites with Apache Modules --------------------------------------------------------------- New Releases--Books, PDFs, and Rough Cuts ---------------------------------------------------------------- Get 30% off a single book or 35% off two or more books from O'Reilly, No Starch, Paraglyph, PC Publishing, Pragmatic Bookshelf, SitePoint, or Syngress books you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. Free ground shipping on orders of $29.95 or more. For more details, go to: 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: ***ActionScript 3.0 Cookbook Publisher: O'Reilly ISBN: 0596526954 ***The Book of JavaScript, Second Edition Publisher: No Starch Press ISBN: 1593271069 ***Build Your Own ASP.NET Website Using C# & VB.NET, Second Edition Publisher: SitePoint ISBN: 0975240285 ***Color Management in Digital Photography Publisher: Rocky Nook ISBN: 1933952024 ***Cryptography for Developers Publisher: Syngress ISBN: 1597491047 ***CSS Cookbook, Second Edition Publisher: O'Reilly ISBN: 0596527411 ***Developers Guide to Web Application Security Publisher: Syngress ISBN: 159749061X ***Digital Photography Expert Techniques, Second Edition Publisher: O'Reilly ISBN: 0596526903 ***Dynamic Apache with Ajax and JSON (PDF) Publisher: O'Reilly ISBN: 0596528396 ***Essential Electronics for Software Folk Publisher: Pragmatic Bookshelf ISBN: 0977616681 ***Fedora Linux Publisher: O'Reilly ISBN: 0596526822 ***Fine Art Printing for Photographers Publisher: Rocky Nook ISBN: 1933952008 ***From Darkroom to Lightroom, Second Edition (PDF) Publisher: O'Reilly ISBN: 0596529775 ***GIMP 2 for Photographers Publisher: Rocky Nook ISBN: 1933952032 ***Hack the Stack Publisher: Syngress ISBN: 1597491098 ***HTML & XHTML: The Definitive Guide, Sixth Edition Publisher: O'Reilly ISBN: 0596527322 ***Java Generics and Collections Publisher: O'Reilly ISBN: 0596527756 ***Learning JavaScript Publisher: O'Reilly ISBN: 0596527462 ***Mapping and Modding Half-Life 2 Complete Publisher: Paraglyph Press ISBN: 1933097132 ***MCSE Core Elective Exams in a Nutshell Publisher: O'Reilly ISBN: 0596102291 http://www.oreilly.com/catalog/mcseceeian/ ***Practical Color Management: Eddie Tapp on Digital Photography Publisher: O'Reilly ISBN: 0596527683 ***Process Improvement Essentials Publisher: O'Reilly ISBN: 0596102178 ***Programming Atlas Publisher: O'Reilly ISBN: 0596526725 ***Programming Embedded Systems, Second Edition Publisher: O'Reilly ISBN: 0596009836 ***Scripting for Testers Publisher: Pragmatic Bookshelf ISBN: 0977616614 ***Snort Intrusion Detection and Prevention Toolkit Publisher: Syngress ISBN: 1597490997 ***Syngress Force Emerging Threat Analysis Publisher: Syngress ISBN: 1597490563 ***Using Microformats (PDF) Publisher: O'Reilly ISBN: 05965282-3 ***Visual Basic 2005 Cookbook Publisher: O'Reilly ISBN: 0596101775 ***WarDriving and Wireless Penetration Testing Publisher: Syngress ISBN: 159749111X ***Web Scripting Little Black Book Publisher: Paraglyph Press ISBN: 1933097191 ***Windows PowerShell Quick Reference (PDF) Publisher: O'Reilly ISBN: 0596528132 ***Wireshark & Ethereal Network Protocol Analyzer Toolkit Publisher: Syngress ISBN: 1597490733 http://www.oreilly.com/catalog/1597490733 ***MAKE Magazine Subscriptions MAKE Magazine Subscriptions The annual subscription price for four issues is $34.95. When you subscribe with this link, you'll get a free issue--one plus?four? more for $34.95. So subscribe for yourself or friends with this great offer for UG Members: five volumes for the cost of four. Subscribe at: ***Craft Magazine Subscriptions The annual subscription price for four issues is $34.95. When you subscribe with this link, you'll get a free issue--the first one plus four more for $34.95. So subscribe for yourself or friends with this great offer for charter subscribers: five volumes for the cost of four. Subscribe at: ================================================ Upcoming Events ================================================ ***For more events, please see: ***Derrick Story ("Digital Photography Pocket Guide" and "iPhoto 6: The Missing Manual") at the Silicon Valley Mac User Group, Cupertino, CA--October 16 Author Derrick Story will talk about digital photography at the Apple Campus in Cupertino. ***David McFarland ("CSS: The Missing Manual") at DevGroup NW, Portland, OR--October 19 Author David McFarland's talk, "Troubleshooting CSS Layouts," explores the most common pitfalls web designers face when using Cascading Style Sheets. Learn how to avoid common CSS gotchas as well as tricks for making your web pages behave in Internet Explorer. ***Peter Krogh ("The DAM Book") at PhotoPlus Expo, New York, NY--November?2-4 Author Peter Krogh will be attending PhotoPlus Expo and speaking in the iView Multimedia booth and ASMP sessions. ***Julieanne Kost ("Window Seat") Project: Photoshop Lightroom School Tour Author Julieanne Kost will provide students with an in-depth seminar on using Adobe Photoshop CS2 and Adobe Lightroom beta, highlighting their combined support for a digital workflow. For a complete list of cities and dates, go to: ***Peter Krogh ("The DAM Book"), ASMP/It's Your Business Event Series ? Author Peter Krogh will be teaching the "Get Your DAM Stuff Together" track for ASMP's "It's Your Business" Series. For a complete list of cities and dates, go to: ***Eddie Tapp ("Photoshop Workflow Setups") Pro Tips Tour Author Eddie Tapp will teach you the complete digital workflow from capture to final output. During this seminar, Monte Zucker and Eddie Tapp cover concept to completion--posing, pixels, Photoshop, and printing--everything needed to create beautiful digital photographic portraits. For a complete list of cities and dates, go to: ================================================ Conference News ================================================ ***Submit Your Proposals for the 2007 MySQL Conference & Expo The Call for Participation for the 2007 MySQL Conference & Expo has just opened: an invitation for database experts and enthusiasts to share their knowledge of MySQL with the global open source community. The theme for the 2007 conference is "Scale to New Heights with MySQL." This annual event brings nearly 2,000 MySQL developers, DBAs, users, and partners together in Santa Clara, California. The Call for Participation ends November 7, 2006; the conference takes place April 23-26, 2007. ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***2.6 Million Lines of Code Announcing O'Reilly Code Search, where you can enter search terms to find relevant sample code from nearly 700 O'Reilly books. The database currently contains over 123,000 individual examples, comprises 2.6 million lines of code, all edited and ready to use. ***Smalltalk for Everyone Else The Pragmatic Programmers advise learning a new language every year. Instead of yet another Algol derivative, why not master object orientation with perhaps the purest OO language ever devised? Smalltalk and the Squeak environment offer a powerful and usable learning experience; Keith Fieldhouse provides an introduction. ***User Group Members Receive a Special 30% Discount on O'Reilly Learning Courses As an O'Reilly User Group member, you save on all the courses in the following University of Illinois Certificate Series: -Linux/Unix System Administration -Web Programming -Open Source Programming -.NET Programming To redeem, use Promotion Code "ORALL1," good for a 30% discount, in Step #3 of the enrollment process. Each course comes with a free O'Reilly book and a 7-day money-back guarantee. Register online: --------------------- Open Source --------------------- ***Sharing Internet Connections Protecting your computer when you're online is good. If you have multiple computers in your home or small business, protecting all of them is also good--especially if you can share your internet connection. Dru Lavigne demonstrates how to allow other computers to use the network safely with a FreeBSD or similar Unix system and fwbuilder. ***Scaling Dynamic Websites with Apache Modules Yogesh Makwana and Syvum Technologies had a problem: their application, hosted on a shared server, used too much CPU time and had grown unresponsive. Moving to a virtual private server and using the appropriate Apache modules and architecture brought their costs and response times and load averages under control. This case study explores their technique. --------------------- Digital Media --------------------- ***Two Slick QuickTime Tricks Turn your video on its ear! Our hands-on tutorial shows you how to work with vertical movies and then embed them in a web page with a friendly new kind of trigger. ***Web Domination Using Photoshop The time has come for designers to execute their plans to dominate the World Wide Web with stunning graphics! Here, Corrie provides a full arsenal of fundamental techniques, before launching you on a stellar trajectory that takes in buttons in all their forms. With her step-by-step instructions, handy hints, and secret tricks, you'll have everything you need to bring the Web to its knees...in awe! --------------------- Mac --------------------- ***Your New iTunes Movies to DVD (and Protect Your Other iTunes Purchases) How much money have you spent at the iTunes store? And what do you have to show for it? An iPod full of music? TV shows? Those new games and movies? Too many people forget how much cash they've put into their digital media. And when bad things happen--house fires, computer theft, iPod loss--they're not always prepared to be able to recover those digital assets. Erica Sadun shows you archiving techniques to preserve your (hefty) iTunes investment. --------------------- Windows/.NET --------------------- ***Better Registry Searching Finding what you need in the registry is harder than trying to find a needle in a haystack. Mitch Tulloch shows you how to find what you need--fast! ***Windows Mobile Weekly Roundup Here's the weekly summary of a mix of Windows Mobile and general mobile tech related items from Todd Ogasawara's blog. --------------------- Java --------------------- ***What is Java Content Repository You might have heard of JSR-170, but what is a content repository, and what can you do with it? Well, do you want to manage documents with versioning, search, access control, and more? Content repositories offer these features, and JSR-170 codifies them into a single API. Sunil Patil shows how to use the reference implementation--Apache Jackrabbit--to create a blogging application. --------------------- Sys Admin/Web --------------------- ***Managing a Honeypot If intruders are always scanning the Internet for potential victims--and they are--can you find the intruders and their exploits by putting up fake networks that only a deliberate scan could find? That's the theory behind honeypots. Peter Mikhalenko discusses the implementation, theory, and legality of using a honeypot to protect your network. ***Survey Exposes The Four Web Dev Stereotypes--Which are You? In what may be the largest survey of web developers ever, The State of Web Development 2006/2007 exposes four key web professional stereotypes. In this review, Nick explains how the stats were collated, and what they revealed about the industry and those who work in it. --------------------- MAKE --------------------- ***Enter the MAKE & CRAFT Halloween Contests Makers and Crafters, it's time to enter our ghoulishly fun Halloween contests! Anyone, anywhere can enter. Depending on what type of maker or crafter you are, enter one or all of the following contests: Hack-o-Lantern, Costume, Decorations, Gadgets and More, and Treat-or-Treat. Have your entries in before Saturday, Nov. 4, 2006, at 1:59 pm EST. We're giving you a little time to take photos and get them up post-Halloween, but you can enter any time starting now. Contest is open to anyone on planet Earth or the surrounding orbit. Remember you can enter any time just by tagging your photos on Flickr (flickr.com) with "MAKECRAFTHALLOWEEN" and adding them to the MAKE and/or CRAFT photo pools. To enter Trick-or-Treat just post about MAKE/CRAFT or the contest on your blog. For complete contest information, rules, and prizes, go to: For More MAKE Projects and info, go to: --------------------- Podcasts --------------------- ***The Way of a Digital Photography Pioneer In "Stephen Johnson on Digital Photography," the renowned photographer writes about his journey on the "bleeding edge of digital photography's evolution." In this podcast, Johnson talks to Sara Peyton about his career, photo techniques, photo ethics in a digital age, and why, for him, taking landscape photos became synonymous with caring about the wild places he wandered in. (20 minutes 27 seconds), Stephen Johnson, a digital photography pioneer and author of Stephen Johnson on Digital Photography, discusses photo techniques, photo ethics in a digital age, and why, for him, taking landscape photos became synonymous with caring about the wild places he wandered in. ***Listen to DerEngel(No Starch's "Hacking The Cable Modem") on NYC's WBAI-FM DerEngel talks about how he collected the information for the book, his background as a hardware hacker, the EFF's participation in reviewing the book from a legal standpoint, and the importance of supporting free speech in a corporate world. The cable companies may not be happy with this book, but DerEngel and the WBAI host agree that "Hacking The Cable Modem" contains useful info for understanding how Internet broadbandworks and that there are curious tinkerers who just like to learn new stuff, not commit malicious acts. ***TechTalkRadio Interviews David Pogue Find out what to expect with the subject of one of David's upcoming titles on the anticipated Microsoft Windows Vista and some other ways to get info on tech from David Pogue. We'll also find out why David loves the latest Tivo! **Creating Beautiful Digital Photos the Eddie Tapp Way Eddie Tapp, 2006 Photoshop Hall of Famer, award-winning photographer, and much sought after educator, discusses his new book from O'Reilly, "Photoshop Workflow Setups." In this interview by new O'Reilly staffer Sara Peyton, Eddie talks about his photography roots, the art of taking pictures, his new book...and why he lives by the rule of 300. (15 minutes 33 seconds) --------------------- Web --------------------- ***Scaling Dynamic Websites with Apache Modules Yogesh Makwana and Syvum Technologies had a problem: their application, hosted on a shared server, used too much CPU time and had grown unresponsive. Moving to a virtual private server and using the appropriate Apache modules and architecture brought their costs and response times and load averages under control. This case study explores their technique. Until next time-- Marsee Henon ================================================================ O'Reilly 1005 Gravenstein Highway North Sebastopol, CA 95472 http://ug.oreilly.com/ http://ug.oreilly.com/creativemedia/ ================================================================ ------------------------------------------------------- -- "Ignorance more frequently begets confidence than does knowledge." -- Charles Darwin --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- -- http://pdx.pm.org From selena at chrisking.com Tue Oct 10 10:08:56 2006 From: selena at chrisking.com (Selena Deckelmann) Date: Tue, 10 Oct 2006 10:08:56 -0700 Subject: [Pdx-pm] MEETING: 10/17/06, PostgreSQL 8.2 and MySQL caveats Message-ID: Hello! Topic: PostgreSQL 8.2 & MySQL caveats Who: David Wheeler, Kineticode When: 10/17/06, 7pm Where: FreeGeek, 1731 SE 10th Ave David will talk about what's new and great about PostgreSQL 8.2. For some hints as to what he might talk about: http://developer.postgresql.org/pgdocs/postgres/release-8-2.html Also, David has run into some fun issues with MySQL that he'd like to share. We're all looking forward to it. Beer at Lucky Lab afterward! For newbies out there, I have two copes of the huge PostgreSQL book to give away. Come to the meeting! -selena From kevin at scaldeferri.com Tue Oct 10 11:23:02 2006 From: kevin at scaldeferri.com (Kevin Scaldeferri) Date: Tue, 10 Oct 2006 11:23:02 -0700 Subject: [Pdx-pm] OT: need big vehicle or help renting one Message-ID: <2589BAB8-EBE2-4BEA-9DD6-05C19D3738B4@scaldeferri.com> Hello, I met a few of you at the August meeting, while I was in town house- hunting, and now I'm here and in a bit of a pickle. I've been looking at used furniture, and made plans to pick up a bunch of stuff today - thinking I would rent a big truck or van. Unfortunately, I just realized that I let my driver's license expire a couple weeks ago, so I can't rent a vehicle myself. So, my question is, is there anyone on the list who either has a suitable vehicle or would be willing to help rent one (I would pay for it, of course), and can help me out for a couple hours this afternoon. Please give me a call at 626-487-1763. Many thanks, -kevin From scratchcomputing at gmail.com Tue Oct 10 17:35:33 2006 From: scratchcomputing at gmail.com (Seven till Seven) Date: Tue, 10 Oct 2006 17:35:33 -0700 Subject: [Pdx-pm] Wed. MEETING: WxPerl: What I Learned the Hard Way Message-ID: <200610101735.33651.ewilhelm@cpan.org> Meeting *tonight* (well, tomorrow if you're not reading mail at work) Update: change of title and supposedly content *special* Octoberfest promo for members only: Bring a friend and I'll buy you both a beer (or lesser libation.) ** special special ** give a 5-min overview of Alien.pm and/or camelpack and get a free beer! First person to e-mail me before noon wins it. ------------ October Meeting Wednesday Oct 11th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. Presenter: Eric Wilhelm Topic: WxPerl: What I Learned the Hard Way OR: How to have a decent and perlish architecture in spite of being subjected to obscenely verbose reams of C++ documentation, overly academic examples, slow wikis, and infection misconceptions. o wxWidgets -- what it is and what it can do for you o interlude: mac users heckling loudly o Wx (aka wxPerl) -- crazy, but true! o dotReader: an open-source e-book reader written in Perl o getting started / documentation o cross platform development (aka fun with vnc) o installation (aka fun with make/nmake/bake/shake/quake) o getting past getting started o code generation and why it is a good idea o event driven OOP -- how to have your cake without eating your hair o callbacks with closures, methods, and accessors o testing o building o testing o packaging and deployment on windows, mac, and linux o no really, testing o moose, Traits, and whatever else time allows All this in a fun-filled and action-packed multimedia presentation followed by Beer! I know I'll be there! --Eric -- http://pdx.pm.org From xrdawson at gmail.com Wed Oct 11 16:40:09 2006 From: xrdawson at gmail.com (Chris Dawson) Date: Wed, 11 Oct 2006 16:40:09 -0700 Subject: [Pdx-pm] microphone for podcasting Message-ID: <659b9ea30610111640jcd55b90qfc1b6a0761f493ad@mail.gmail.com> Again, thanks to all that assisted with paying for the new microphone for the podcasting. Unfortunately, the brand new microphone is no longer at FreeGeek, as far as I can tell. Does anyone recall using it and putting it back in the last few weeks? Perhaps someone stashed it somewhere interesting? Or, did someone accidentally take it home and is now wondering what to do with it? I am planning to be at FreeGeek tonight for Eric's talk. I can bring another microphone for tonight, but I would love to recover the new one I just got a few weeks back. If not, I think there is enough money to buy another one. FreeGeek is such a great science experiment, an alternative black hole sometimes, eh? Chris From xrdawson at gmail.com Wed Oct 11 16:48:27 2006 From: xrdawson at gmail.com (Chris Dawson) Date: Wed, 11 Oct 2006 16:48:27 -0700 Subject: [Pdx-pm] microphone for podcasting: FALSE ALARM Message-ID: <659b9ea30610111648g4f546cew1f9b155754499a4d@mail.gmail.com> Matrin from FreeGeek just informed me that the mic has been found! You can stop searching your underwear drawers, and stop worrying that your additional split personality went on another kleptomaniac rampage. Chris From xrdawson at gmail.com Wed Oct 11 22:58:35 2006 From: xrdawson at gmail.com (Chris Dawson) Date: Wed, 11 Oct 2006 22:58:35 -0700 Subject: [Pdx-pm] Wed. MEETING: WxPerl: What I Learned the Hard Way In-Reply-To: <200610101735.33651.ewilhelm@cpan.org> References: <200610101735.33651.ewilhelm@cpan.org> Message-ID: <659b9ea30610112258k2f3c51b8q127c6f5f3bade056@mail.gmail.com> Podcast is up of Eric's discussion is up: http://pdxpm.podasp.com Thanks Eric! Chris On 10/10/06, Seven till Seven wrote: > Meeting *tonight* (well, tomorrow if you're not reading mail at work) > > Update: change of title and supposedly content > > *special* Octoberfest promo for members only: Bring a friend and I'll > buy you both a beer (or lesser libation.) > > ** special special ** give a 5-min overview of Alien.pm and/or camelpack > and get a free beer! First person to e-mail me before noon wins it. > > ------------ > October Meeting > Wednesday Oct 11th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. > > Presenter: > > Eric Wilhelm > > Topic: > > WxPerl: What I Learned the Hard Way > > OR: How to have a decent and perlish architecture in spite of being > subjected to obscenely verbose reams of C++ documentation, overly > academic examples, slow wikis, and infection misconceptions. > > o wxWidgets -- what it is and what it can do for you > o interlude: mac users heckling loudly > o Wx (aka wxPerl) -- crazy, but true! > o dotReader: an open-source e-book reader written in Perl > o getting started / documentation > o cross platform development (aka fun with vnc) > o installation (aka fun with make/nmake/bake/shake/quake) > o getting past getting started > o code generation and why it is a good idea > o event driven OOP -- how to have your cake without eating your hair > o callbacks with closures, methods, and accessors > o testing > o building > o testing > o packaging and deployment on windows, mac, and linux > o no really, testing > o moose, Traits, and whatever else time allows > > All this in a fun-filled and action-packed multimedia presentation > followed by Beer! I know I'll be there! > > --Eric > -- > > http://pdx.pm.org > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From scratchcomputing at gmail.com Thu Oct 12 15:13:10 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Thu, 12 Oct 2006 15:13:10 -0700 Subject: [Pdx-pm] POE::Loop::Wx - a bridge that supports wxPerl's event loop from POE - search.cpan.org Message-ID: <200610121513.10370.ewilhelm@cpan.org> Randal asked about this after last night's meeting. I haven't played with it yet, but will be before the week is out. http://search.cpan.org/~mike/POE-Loop-Wx-0.03/lib/POE/Loop/Wx.pm Note that `perl -MWx -e ""` will segfault if you have no display, so if you're running CPAN as root on Linux, you'll need to ssh -X, kdesudo, or whatever. --Eric -- Moving pianos is dangerous. Moving pianos are dangerous. Buffalo buffalo buffalo buffalo buffalo buffalo buffalo. --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From Edward.Hille at xerox.com Mon Oct 16 10:13:57 2006 From: Edward.Hille at xerox.com (Hille, Edward A) Date: Mon, 16 Oct 2006 10:13:57 -0700 Subject: [Pdx-pm] Contract-to-hire opportunity at Xerox Message-ID: I work for Xerox supporting a custom web application that runs http://www.office.xerox.com/. The scope of the team's responsibility has recently expanded and we are looking to bring on another Perl programmer. Of course, we are not allowed to directly hire anyone and instead have to go through a contract agency, but the idea is to convert the right person before their contract expires. Since we have to go through this initial "contractor" phase, any resumes should be sent to carol.heard at adeccona.com. The job has been posted here: http://jobs.perl.org/job/4763. If you have any questions about the position or working at Xerox, you can drop me a line. Ted Hille Internet Application Developer http://www.office.xerox.com/ "In theory, there is no difference between theory and practice; In practice, there is." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061016/a709694b/attachment.html From raanders at acm.org Tue Oct 17 13:32:37 2006 From: raanders at acm.org (Roderick A. Anderson) Date: Tue, 17 Oct 2006 13:32:37 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) Message-ID: <45353DE5.9070406@acm.org> I'm working on a module [0] that needs to do something I have not seen in any other module or documentation. It may be my ignorance that is making this complicated. I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 records ) one record at a time. The method will return the key it is used to the caller so it can be used to key the rest of the data not passed in to the method. Here is the sub. sub add_addr { my $self = shift; my @stuff = @_; my $recid = $self->inc_recid(); my $addr = join( $FldDelim, $recid, @stuff ); $addr .= $RcdDelim; $self->{addr_data}->{$recid} = $addr; return $recid; } Is there a better way to do this? [0] actually re-working a script into a module. Thanks for any insights or ideas, Rod -- From krisb at ring.org Tue Oct 17 13:49:41 2006 From: krisb at ring.org (Kris Bosland) Date: Tue, 17 Oct 2006 13:49:41 -0700 (PDT) Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> Message-ID: Any reason not to use an SQL database? You may get better performance. SQLite is quite lightweight and easy. -Kris On Tue, 17 Oct 2006, Roderick A. Anderson wrote: > I'm working on a module [0] that needs to do something I have not seen > in any other module or documentation. It may be my ignorance that is > making this complicated. > > I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 > records ) one record at a time. The method will return the key it is > used to the caller so it can be used to key the rest of the data not > passed in to the method. > > Here is the sub. > > sub add_addr { > > my $self = shift; > my @stuff = @_; > > my $recid = $self->inc_recid(); > my $addr = join( $FldDelim, $recid, @stuff ); > $addr .= $RcdDelim; > > $self->{addr_data}->{$recid} = $addr; > > return $recid; > } > > Is there a better way to do this? > > [0] actually re-working a script into a module. > > > Thanks for any insights or ideas, > Rod > -- > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > > > !DSPAM:45353b56259991061372519! > > From jkeroes at eli.net Tue Oct 17 14:34:21 2006 From: jkeroes at eli.net (Joshua Keroes) Date: Tue, 17 Oct 2006 14:34:21 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> Message-ID: On 10/17/06 1:32 PM, "Roderick A. Anderson" wrote: > I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 > records ) one record at a time. The method will return the key it is > used to the caller so it can be used to key the rest of the data not > passed in to the method. > > sub add_addr { > > my $self = shift; > my @stuff = @_; > > my $recid = $self->inc_recid(); > my $addr = join( $FldDelim, $recid, @stuff ); Not sure why you're putting the recid in both the key and the value - that's just one more thing that might break. Oh, and it takes up additional storage space. > $addr .= $RcdDelim; > > $self->{addr_data}->{$recid} = $addr; > > return $recid; > } > > Is there a better way to do this? A few questions first: Q: Instead of serializing @stuff, why not create a HoA? Q: Depending on what you're using as a recid, you might be able to use an AoA instead for some space savings. Q: Why not use a DB instead? That said, here's some code that implements this in a way that makes sense to me; that is, storing an HoA and stringifying the output of each addr on demand. __BEGIN__ package Hash::Super; # Using Spiffy for class/method generation because it makes for # nice, short classes use Spiffy qw/-base/; # writes new() field fld_delim => ":"; # creates get/set method w/ a default value field rcd_delim => "\n"; # creates get/set method w/ a default value # addr() - get/set method # # Usage: # # $obj->addr( [qw/a b c/] ); # set next index to aref # $obj->addr( 5 => [qw/a b c/] ); # set any index to aref # $obj->addr( 5 ); # get addr at index 5 # $obj->addr; # get last addr sub addr { my $self = shift; if ( ref $_[0] eq "ARRAY" ) { # User wants us to get next recid my $recid = $self->inc_recid or croak "Couldn't get new recid"; my $aref = shift; return $self->{addr_data}{$recid} = $aref; } elsif ( ref $_[1] eq "ARRAY" ) { # User passed a recid and aref my $recid = shift; my $aref = shift; return $self->{addr_data}{$recid} = $aref; } else { # No args. Return last addr return $self->{addr_data}{$self->recid}; } croak "Flow should never reach this point"; } # Usage: # # my $str = $obj->to_str( ['a', 'b', 'c'] ) sub to_str { my $self = shift; my $aref = shift; croak "to_str needs an array ref arg" unless ref $aref eq "ARRAY" return join ($self->fld_delim, @{ $self->{addr_data}->{$recid} }) . $self->rcd_delim; } { # Closure my $singleton_recid = 0; sub inc_recid { $singleton_recid++ } # get only sub recid { $singleton_recid } # get only } 1; __END__ # Example code: use Hash::Super; my $superhash = Hash::Super->new; $superhash->addr( [qw/a b whoops/] ); # Store incorrect first addr $superhash->addr( 0 => [qw/a b c/] ); # Correct first addr $superhash->addr( [qw/d e f/] ); # Store second addr # $superhash = { # fld_delim => ":", # rcd_delim => "\n", # addr_data => { # 0 => ['a', 'b', 'c'], # 1 => ['d', 'e', 'f'], # }, # } my $str = $superhash->to_str( $superhash->addr( 1 ) ); # $str = "d:e:f\n" __END__ -Joshua From russj at dimstar.net Tue Oct 17 16:44:52 2006 From: russj at dimstar.net (Russ Johnson) Date: Tue, 17 Oct 2006 16:44:52 -0700 Subject: [Pdx-pm] Hash reference depricated.. Message-ID: <45356AF4.3030709@dimstar.net> From what I can see, the two routines here produce the same result. for my $key ( keys %$DATA ) { my $value = %$DATA->{$key}; print OUTFILE "$key => $value\n"; } while ( my ($key, $value) = each(%$DATA) ) { print OUTFILE "$key => $value\n"; } Except, the first one results in "Using a hash as a reference is deprecated at ./script.pl line 85." The second runs without errors. Anyone see why? -- Russ Johnson Dimension 7/Stargate Online http://www.dimstar.net Top post? http://www.caliburn.nl/topposting.html Random thought #14 (Collect all 25) "There is a point beyond which even justice becomes unjust." - Sophocles From chromatic at wgz.org Tue Oct 17 16:53:46 2006 From: chromatic at wgz.org (chromatic) Date: Tue, 17 Oct 2006 16:53:46 -0700 Subject: [Pdx-pm] Hash reference depricated.. In-Reply-To: <45356AF4.3030709@dimstar.net> References: <45356AF4.3030709@dimstar.net> Message-ID: <200610171653.47133.chromatic@wgz.org> On Tuesday 17 October 2006 16:44, Russ Johnson wrote: > From what I can see, the two routines here produce the same result. > > for my $key ( keys %$DATA ) { > my $value = %$DATA->{$key}; > print OUTFILE "$key => $value\n"; > } > > while ( my ($key, $value) = each(%$DATA) ) { > print OUTFILE "$key => $value\n"; > } > > Except, the first one results in "Using a hash as a reference is > deprecated at ./script.pl line 85." The second runs without errors. > > Anyone see why? %$DATA->{$key} is more or less equivalent to %somehash->{$key}, which is one level of dereferencing too many. -- c From tex at off.org Tue Oct 17 17:08:01 2006 From: tex at off.org (Austin Schutz) Date: Tue, 17 Oct 2006 17:08:01 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> References: <45353DE5.9070406@acm.org> Message-ID: <20061018000801.GB2891@gblx.net> On Tue, Oct 17, 2006 at 01:32:37PM -0700, Roderick A. Anderson wrote: > I'm working on a module [0] that needs to do something I have not seen > in any other module or documentation. It may be my ignorance that is > making this complicated. > > I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 > records ) one record at a time. The method will return the key it is > used to the caller so it can be used to key the rest of the data not > passed in to the method. > > Here is the sub. > > sub add_addr { > > my $self = shift; > my @stuff = @_; > > my $recid = $self->inc_recid(); > my $addr = join( $FldDelim, $recid, @stuff ); > $addr .= $RcdDelim; > > $self->{addr_data}->{$recid} = $addr; > > return $recid; > } > > Is there a better way to do this? > There are innumerable "other" ways to do this (as other posts have demonstrated). Better is somewhat subjective and also depends on your goal. Does it work? Is it maintainable? Is it fast enough? Are you embarking on complex code which solves an already solved problem (i.e. is there an easier way to do it on CPAN)? "maintainable" is usually critical. Having comments helps, following convention helps. Having tests is very helpful (some would say critical, especially when creating reusable code). Keeping your same logic (if it makes sense to you and works don't fool with it) here is (more or less) how I would accomplish this, assuming no other constraints like maximal performance: package MyModule; .. skipping init lines and other module docs # Note the documentation states what it takes, what it does, what it returns, # and error/exception usage. Note the documentation does _not_ use # abbreviations. =head2 $self->add_addr(@stuff) Given @stuff representing an address, format and save in a record. Returns a record ID. No error conditions are possible. =cut sub add_addr { my($self, @stuff) = @_; # Get a new record id my $recid = $self->inc_recid(); # Format into an addr. my $addr = join( $FldDelim, $recid, @stuff ); $addr .= $RcdDelim; # Save the addr in a hash keyed by recid. $self->{addr_data}->{$recid} = $addr; return $recid; } 1; Here's a test: t/add_addr.t use MyModule; use Test::More qw(no_plan); MyModule->init(); @stuff=(1,2,3); my($addr_holder) = MyModule->new(); # (Usually better would be to pass \@stuff, btw). $recid = $addr_holder->add_addr(@stuff); ok( $recid ); ok( $self->get_data($recid) = 'some text' ); ... hth. Austin From pdxpm at punch.net Tue Oct 17 17:14:01 2006 From: pdxpm at punch.net (Tom Heady) Date: Tue, 17 Oct 2006 17:14:01 -0700 Subject: [Pdx-pm] Hash reference depricated.. In-Reply-To: <45356AF4.3030709@dimstar.net> References: <45356AF4.3030709@dimstar.net> Message-ID: <453571C9.30309@punch.net> Russ Johnson wrote: > From what I can see, the two routines here produce the same result. > > for my $key ( keys %$DATA ) { > my $value = %$DATA->{$key}; You probably want: my $value = $DATA->{$key}; > print OUTFILE "$key => $value\n"; > } > > while ( my ($key, $value) = each(%$DATA) ) { > print OUTFILE "$key => $value\n"; > } > > Except, the first one results in "Using a hash as a reference is > deprecated at ./script.pl line 85." The second runs without errors. > > Anyone see why? > From schwern at gmail.com Tue Oct 17 22:16:06 2006 From: schwern at gmail.com (Michael G Schwern) Date: Tue, 17 Oct 2006 22:16:06 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> References: <45353DE5.9070406@acm.org> Message-ID: <4535B896.7010202@gmail.com> Roderick A. Anderson wrote: > I'm working on a module [0] that needs to do something I have not seen > in any other module or documentation. It may be my ignorance that is > making this complicated. > > I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 > records ) one record at a time. The method will return the key it is > used to the caller so it can be used to key the rest of the data not > passed in to the method. If memory consumption starts to become a problem you might want to consider using a DBM file (see AnyDBM_File). > Here is the sub. > > sub add_addr { > > my $self = shift; > my @stuff = @_; > > my $recid = $self->inc_recid(); > my $addr = join( $FldDelim, $recid, @stuff ); > $addr .= $RcdDelim; > > $self->{addr_data}->{$recid} = $addr; > > return $recid; > } > > Is there a better way to do this? Hard to say without context as to how its being used, but I can make some observations. Its kind of weird that you're flattening the $recid and @stuff into a delimited string. It reduces the flexibility of your data, its easier to work with a list than an encoded string. As a rule of thumb, separate formatting from functionality to increase flexibility. And as Joshua pointed out, storing the key in the value is odd, though there are sometimes when its useful. Oh, and lose the vowelless variable names because thy cn b hrd 2 rd. So I would do this: # Functionality. sub add_address { my $self = shift; my @address = @_; my $id = $self->next_record_id(); $self->{address_data}{$id} = \@address; return $id; } and then flatten as necessary: # Formatting sub flatten_record { my($self, $id) = @_; my $address = $self->{address_data}{$id}; return unless $address; return join( $Field_Delim, $id, @$address ) . $Record_Delim; } From schwern at gmail.com Tue Oct 17 23:37:55 2006 From: schwern at gmail.com (Michael G Schwern) Date: Tue, 17 Oct 2006 23:37:55 -0700 Subject: [Pdx-pm] Personal perldoc server Message-ID: <4535CBC3.3000606@gmail.com> I need new glasses so I've been preferring to read module documentation in a web browser with color and formatting and large text. search.cpan.org is nice but its also nice to read the documentation that's actually installed on your machine, its the right version and has any local hacks. Using Pod::Find, Pod::Simple::HTML and HTTP::Server::Simple I hacked together a simple local perldoc server. Simply run it and then use the supplied URL. Pass in the name of your module as a path. http://localhost:8123/perlrun http://localhost:8123/HTTP::Server::Simple The port and CSS are configurable. By default it uses port 8123 and the search.cpan.org CSS. http://www.schwern.org/~schwern/src/perldoc_server If folks like it I might package it up for CPAN. From scratchcomputing at gmail.com Wed Oct 18 01:17:55 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Wed, 18 Oct 2006 01:17:55 -0700 Subject: [Pdx-pm] Personal perldoc server In-Reply-To: <4535CBC3.3000606@gmail.com> References: <4535CBC3.3000606@gmail.com> Message-ID: <200610180117.55859.ewilhelm@cpan.org> # from Michael G Schwern # on Tuesday 17 October 2006 11:37 pm: >The port and CSS are configurable. ?By default it uses port 8123 and > the search.cpan.org CSS. >http://www.schwern.org/~schwern/src/perldoc_server Hey, I did something similar a while back, but maybe got a little silly with the html and still haven't figured out what the secret utf8 flag is for POD (anyone know where that is documented?) and then Allison mentioned Pod::Webserver. I was going for "just this project's lib dir" rather than all of @INC. http://scratchcomputing.com/svn/podserver/trunk/ http://search.cpan.org/search?module=Pod%3A%3AWebserver Sounds like a great little project for the hackfest (Nov 10-12.) Maybe we can even get better CPAN search builtin (I know I searched, but maybe I just don't know how to correctly operate search.cpan.org.) --Eric -- perl -e 'srand; print join(" ",sort({rand() < 0.5} qw(sometimes it is important to be consistent)));' --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From scratchcomputing at gmail.com Wed Oct 18 01:51:47 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Wed, 18 Oct 2006 01:51:47 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> References: <45353DE5.9070406@acm.org> Message-ID: <200610180151.47462.ewilhelm@cpan.org> # from Roderick A. Anderson # on Tuesday 17 October 2006 01:32 pm: >I need to build a, sometimes, quite large hash table ( 40,000 - > 470,000 records ) one record at a time. ? Is the question about a speed/memory problem or code style? I would expect to see another comma before it became an issue (if that's really the top of the expected scope (unless you're trying to do build it up from zero for every hit on a webserver (don't do that.))) $ time perl -e 'my %h; $h{$_} = [$_, $_, $_] for(0..500_000);' real 0m3.456s user 0m3.261s sys 0m0.188s > The method will return the > key it is used to the caller so it can be used to key the rest of the > data not passed in to the method. Sounds like a possible encapsulation problem. I'll also second the comments about the join -- save that for output. And I'll throw in a cringe regarding the global (hopefully just package) variables $FldDelim and $RcdDelim (make that 4 cringes: one for camel casing plus the global per each.) But we're just guessing at the real problem, which is why you need to build this hash table and how often you have to build it. If this is anything besides some one-off code, you should really ponder if there is a way to avoid it because there's no way to do big cheaply, especially often. --Eric -- Speak softly and carry a big carrot. --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From raanders at acm.org Wed Oct 18 04:56:46 2006 From: raanders at acm.org (Roderick A. Anderson) Date: Wed, 18 Oct 2006 04:56:46 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <45353DE5.9070406@acm.org> References: <45353DE5.9070406@acm.org> Message-ID: <4536167E.4030303@acm.org> I'm sorry I was so vague. This method will used to do three things. One get the calling script's data, two do the first level of formatting of the data for the next step in the processing and three make it slightly easier to determine how many records there are. This is for s-mail address processing for bulk mail. FWIW - Mailroom Toolkit (MRTK) by Satori Software. I work for a custom mail-piece publishing company. (http://www.bydesignpublishing.com/) So here is the rest-of-the-story. The data comes from an output file generate by another process from our database. There will be other information, besides the address stuff, that is needed to build the mail piece. So a sample line of data and a label/header line might look like this: fnamelnameaddress_1address_2citystatezip\ image_1greeting GeorgeBush1600 Pennsylvania Ave.WashingtonDC2050012345.jpgDear George, The calling script reads in the file, splits out the address fields, passes those to the add_addr method, gets the $recid back. The other fields ( fname,lname,image_1,greeting) are stored in %therest using $recid as the key. After all the data is passed in, method(s) will do some MRTK setup, pass the, _preformated_, values to the MRTK, which will certify and Postalsort the addresses. The _ordered_ returned data, with the included $recid, will be used to build a new file from itself and %therest. This file is then used to build the press files. I now see that $self->{addr_data} doesn't have to be a hash. An array will work since, as observed, I already have the $recid in the string. Shorted story is ... Thanks. All your comments and suggestions helped me clarify what I need to do. Rod -- Roderick A. Anderson wrote: > I'm working on a module [0] that needs to do something I have not seen > in any other module or documentation. It may be my ignorance that is > making this complicated. > > I need to build a, sometimes, quite large hash table ( 40,000 - 470,000 > records ) one record at a time. The method will return the key it is > used to the caller so it can be used to key the rest of the data not > passed in to the method. > > Here is the sub. > > sub add_addr { > > my $self = shift; > my @stuff = @_; > > my $recid = $self->inc_recid(); > my $addr = join( $FldDelim, $recid, @stuff ); > $addr .= $RcdDelim; > > $self->{addr_data}->{$recid} = $addr; > > return $recid; > } > > Is there a better way to do this? > > [0] actually re-working a script into a module. > > > Thanks for any insights or ideas, > Rod From david at kineticode.com Wed Oct 18 10:39:38 2006 From: david at kineticode.com (David E. Wheeler) Date: Wed, 18 Oct 2006 10:39:38 -0700 Subject: [Pdx-pm] Personal perldoc server In-Reply-To: <200610180117.55859.ewilhelm@cpan.org> References: <4535CBC3.3000606@gmail.com> <200610180117.55859.ewilhelm@cpan.org> Message-ID: <9937E385-1DAE-4E86-A180-A54C2A4EB881@kineticode.com> On Oct 18, 2006, at 01:17, Eric Wilhelm wrote: > Hey, I did something similar a while back, but maybe got a little > silly > with the html and still haven't figured out what the secret utf8 flag > is for POD (anyone know where that is documented?) It's =encoding utf8 Documented in perlpod: "=encoding encodingname" This command is used for declaring the encoding of a document. Most users won't need this; but if your encoding isn't US- ASCII or Latin-1, then put a "=encoding encodingname" command early in the document so that pod formatters will know how to decode the docu- ment. For encodingname, use a name recognized by the Encode::Sup- ported module. Examples: =encoding utf8 =encoding koi8-r =encoding ShiftJIS =encoding big5 Best, David From scratchcomputing at gmail.com Wed Oct 18 12:15:37 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Wed, 18 Oct 2006 12:15:37 -0700 Subject: [Pdx-pm] Personal perldoc server In-Reply-To: <9937E385-1DAE-4E86-A180-A54C2A4EB881@kineticode.com> References: <4535CBC3.3000606@gmail.com> <200610180117.55859.ewilhelm@cpan.org> <9937E385-1DAE-4E86-A180-A54C2A4EB881@kineticode.com> Message-ID: <200610181215.37910.ewilhelm@cpan.org> # from David E. Wheeler # on Wednesday 18 October 2006 10:39 am: >=encoding utf8 > >Documented in perlpod: Ah! But, new somewhere after 5.8.4 and/or my perldoc package needs an update. Well, let's add "check for updates" to the podserver and have it look on CPAN :-) --Eric -- The more you learn about Linux, the more you hate Windows. --Gary Varnell --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From wcooley at nakedape.cc Wed Oct 18 16:01:52 2006 From: wcooley at nakedape.cc (Wil Cooley) Date: Wed, 18 Oct 2006 16:01:52 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <200610180151.47462.ewilhelm@cpan.org> References: <45353DE5.9070406@acm.org> <200610180151.47462.ewilhelm@cpan.org> Message-ID: <1161212513.7043.14.camel@willow.odshp.com> On Wed, 2006-10-18 at 01:51 -0700, Eric Wilhelm wrote: > I'll also second the comments about the join -- save that for output. > And I'll throw in a cringe regarding the global (hopefully just > package) variables $FldDelim and $RcdDelim (make that 4 cringes: one > for camel casing plus the global per each.) How about two more cringes for the compressed 8-character variable naming, instead of something legible like $record_delimiter and $field_delimiter? Time to replace that 300 baud modem with cable or DSL! Wil -- Wil Cooley http://nakedape.cc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061018/c51de3e9/attachment.bin From raanders at acm.org Wed Oct 18 16:32:39 2006 From: raanders at acm.org (Roderick A. Anderson) Date: Wed, 18 Oct 2006 16:32:39 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <1161212513.7043.14.camel@willow.odshp.com> References: <45353DE5.9070406@acm.org> <200610180151.47462.ewilhelm@cpan.org> <1161212513.7043.14.camel@willow.odshp.com> Message-ID: <4536B997.4090400@acm.org> Wil Cooley wrote: > On Wed, 2006-10-18 at 01:51 -0700, Eric Wilhelm wrote: > >> I'll also second the comments about the join -- save that for output. >> And I'll throw in a cringe regarding the global (hopefully just >> package) variables $FldDelim and $RcdDelim (make that 4 cringes: one >> for camel casing plus the global per each.) > > How about two more cringes for the compressed 8-character variable > naming, instead of something legible like $record_delimiter and > $field_delimiter? Hey. It looks cooler! Who knows? When I started the script version several months I tried to use the same names as the MRTK used. In these two cases that was DELIMITER_FIELD and DELIMITER_RECORD. To COBOL-ish so I picked RcdDelim and FldDelim as they allow visual alignment. Again who knows. As I re-write/transmogrify it I'll probably make them _all_ more human. > Time to replace that 300 baud modem with cable or > DSL! Losing the DSL the end of the month and Adelphia has been bought by Time Warner Telecomm so it is interesting trying to get a price or place order online. That 300 baud modem is looking more likely daily -- well actually a 56k is what I'll have to use if. Rod -- > > Wil > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list From kellert at ohsu.edu Wed Oct 18 18:17:00 2006 From: kellert at ohsu.edu (Thomas J Keller) Date: Wed, 18 Oct 2006 18:17:00 -0700 Subject: [Pdx-pm] [pdxpug] duplicate records In-Reply-To: <4536AF4C.8080506@cs.pdx.edu> References: <6A006225-5093-4F26-980C-571CD619DEF0@ohsu.edu> <47ed9e2ed59c142a86246f08842edc97@chrisking.com> <93479223-79AF-4ED3-A824-D1DBB646D5D5@ohsu.edu> <4536A981.9080601@cs.pdx.edu> <4536AF4C.8080506@cs.pdx.edu> Message-ID: <9A7B1FCA-B215-40EB-8AC7-97A3D6E33E16@ohsu.edu> The problem is that the primary keys are unique. So SELECT DISTINCT * FROM original_table; finds all the records, including the ones that are identical except for the id. So the problem remains. I actually have 194 unique records and 12 that are the same except for their id's. Here's the new table: passwords=# SELECT * FROM foobar; password_id | username | password | object | url_address | description | status -------------+----------+----------+--------+------------- +-------------+-------- (0 rows) passwords=# INSERT INTO foobar (SELECT DISTINCT username, password,object,url_address,description,status FROM password); ERROR: column "password_id" is of type integer but expression is of type character varying HINT: You will need to rewrite or cast the expression. passwords=# INSERT INTO foobar (SELECT * FROM password); INSERT 0 206 passwords=# DELETE FROM foobar WHERE password_id >0; DELETE 206 passwords=# INSERT INTO foobar (SELECT DISTINCT * FROM password); INSERT 0 206 [The syntax in postgresQL is apparently a little different from your suggestion. ] I think this is why I've stuck with FilemakerPro for so long. Please note: I can clean the FMP data before I export it. But this seems like a fairly common problem that should have a straightforward solution. sigh. Thanks for your help. Tom K PS. the original table looks like this: passwords=# \d password Table "public.password" Column | Type | Modifiers -------------+------------------------ +---------------------------------------------------------------- password_id | integer | not null default nextval ('password_password_id_seq'::regclass) username | character varying(32) | not null password | character varying(12) | not null object | character(32) | not null url_address | character varying(64) | description | character varying(128) | status | character(8) | Indexes: "password_pk" PRIMARY KEY, btree (password_id) On Oct 18, 2006, at 3:48 PM, Vassilis Papadimos wrote: > Vassilis Papadimos wrote: >> Thomas J Keller wrote: >>> Excellent. >>> So the first step is to create an empty table: >>> >>> passwords=# CREATE TABLE foo_bar LIKE original_table; >>> ERROR: syntax error at or near "LIKE" at character 22 >>> LINE 1: CREATE TABLE foo_bar LIKE original_table; >> SQL doesn't have this "do what I mean" feature yet :-) > > Ahem... Apparently SQL *does* have this "do what I mean" feature > (or at least PostgreSQL does!) I've never heard of it before. > > But you have to write it like this: > > CREATE TABLE foo_bar (like original_table); > > (Including the parentheses.) > > I still like the > > SELECT DISTINCT * FROM original_table INTO foo_bar; > > solution though, two birds with one stone... > > Vassilis. > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > From tex at off.org Wed Oct 18 21:07:23 2006 From: tex at off.org (Austin Schutz) Date: Wed, 18 Oct 2006 21:07:23 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <4536B997.4090400@acm.org> References: <45353DE5.9070406@acm.org> <200610180151.47462.ewilhelm@cpan.org> <1161212513.7043.14.camel@willow.odshp.com> <4536B997.4090400@acm.org> Message-ID: <20061019040723.GJ2891@gblx.net> On Wed, Oct 18, 2006 at 04:32:39PM -0700, Roderick A. Anderson wrote: > Wil Cooley wrote: > > On Wed, 2006-10-18 at 01:51 -0700, Eric Wilhelm wrote: > > > >> I'll also second the comments about the join -- save that for output. > >> And I'll throw in a cringe regarding the global (hopefully just > >> package) variables $FldDelim and $RcdDelim (make that 4 cringes: one > >> for camel casing plus the global per each.) > > Since you were intending to create a module, $FldDelim and $RcdDelim would be package variables. I don't see any cringeworthiness here beyond the name compression. Camel casing is acceptable for a package variable, according to the style guide - though it suggests the additional use of underscores which to my mind are probably optional since the caps change works as a word delimiter. ALL CAPS is for globals, but you shouldn't need those because globals _are_ cringe worthy, as a general rule. > > How about two more cringes for the compressed 8-character variable > > naming, instead of something legible like $record_delimiter and > > $field_delimiter? > > Hey. It looks cooler! > > Who knows? Therein is the real question. If everyone knows, which we all seem to, it's probably fine though less readable. If your code has enough comments easier names are probably not necessary. However, the converse is that if your variables are easier to discern you don't need as many comments. There are lots of places where the perl internals look like idx = st->dest.u.op.pc[i] (no comments) and module code that looks like $arg=~/^\s*\[\s*$gre\s*(?:,\s*$gre\s*)?\]\s*$/ (no comments) so if your code isn't perfect(ly readable) remember that ours often isn't either so don't beat yourself up about it. In this case there is try as well as do (sorry Yoda). *shrug* Austin From tex at off.org Wed Oct 18 21:30:05 2006 From: tex at off.org (Austin Schutz) Date: Wed, 18 Oct 2006 21:30:05 -0700 Subject: [Pdx-pm] [pdxpug] duplicate records In-Reply-To: <9A7B1FCA-B215-40EB-8AC7-97A3D6E33E16@ohsu.edu> References: <6A006225-5093-4F26-980C-571CD619DEF0@ohsu.edu> <47ed9e2ed59c142a86246f08842edc97@chrisking.com> <93479223-79AF-4ED3-A824-D1DBB646D5D5@ohsu.edu> <4536A981.9080601@cs.pdx.edu> <4536AF4C.8080506@cs.pdx.edu> <9A7B1FCA-B215-40EB-8AC7-97A3D6E33E16@ohsu.edu> Message-ID: <20061019043005.GK2891@gblx.net> On Wed, Oct 18, 2006 at 06:17:00PM -0700, Thomas J Keller wrote: > The problem is that the primary keys are unique. > So SELECT DISTINCT * FROM original_table; > finds all the records, including the ones that are identical except > for the id. > > So the problem remains. I actually have 194 unique records and 12 > that are the same except for their id's. > > Here's the new table: > passwords=# SELECT * FROM foobar; > password_id | username | password | object | url_address | > description | status > -------------+----------+----------+--------+------------- > +-------------+-------- Ok, so let's look for those and delete them. Let's start with the select: SELECT max(b.id) as b_id, COUNT(a.id) as a_count from foobar a, foobar b where a.username = b.username, a.password = b.password, etc. etc. GROUP BY a.id That should return the higher id of the different ids and how many of them there are in the table which have identical data with differing ids. Now stick in in a subselect: SELECT DISTINCT(b_id) FROM ( SELECT max(b.id) as b_id, COUNT(a.id) as a_count from foobar a, foobar b where a.username = b.username, a.password = b.password, etc. etc. GROUP BY a.id ) my_subselect WHERE a_count = 2; Now you have the ids where there is identical junk. The distinct part (not strictly necessary) is because you will have the id show up twice for each dupe row. DELETE FROM foobar WHERE id in ( ... all that crap above. ) Well, works in oracle. Should work here too I would imagine. Austin From chromatic at wgz.org Wed Oct 18 21:50:40 2006 From: chromatic at wgz.org (chromatic) Date: Wed, 18 Oct 2006 21:50:40 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <20061019040723.GJ2891@gblx.net> References: <45353DE5.9070406@acm.org> <4536B997.4090400@acm.org> <20061019040723.GJ2891@gblx.net> Message-ID: <200610182150.41124.chromatic@wgz.org> On Wednesday 18 October 2006 21:07, Austin Schutz wrote: > If your code has enough comments > easier names are probably not necessary. However, the converse is that if > your variables are easier to discern you don't need as many comments. I'm not sure that's a converse, in the same way that "On the other hand, not eating razor blades *is* good for your health" isn't. -- c From tex at off.org Wed Oct 18 22:49:16 2006 From: tex at off.org (Austin Schutz) Date: Wed, 18 Oct 2006 22:49:16 -0700 Subject: [Pdx-pm] Instance hash ( keyed array ) In-Reply-To: <200610182150.41124.chromatic@wgz.org> References: <45353DE5.9070406@acm.org> <4536B997.4090400@acm.org> <20061019040723.GJ2891@gblx.net> <200610182150.41124.chromatic@wgz.org> Message-ID: <20061019054916.GL2891@gblx.net> On Wed, Oct 18, 2006 at 09:50:40PM -0700, chromatic wrote: > On Wednesday 18 October 2006 21:07, Austin Schutz wrote: > > > If your code has enough comments > > easier names are probably not necessary. However, the converse is that if > > your variables are easier to discern you don't need as many comments. > > I'm not sure that's a converse, in the same way that "On the other hand, not > eating razor blades *is* good for your health" isn't. > Good variable naming and commenting are both important. If short variable names are razor blades then lack of comments is broken glass. So.. I agree with your statement, but laziness occurs, as a great deal of the code in the perl core demonstrates. Something is better than nothing, and if you are too lazy to write comments _and_ use reasonable variable names (and most people seem to be), doing one is better than doing neither. The code I've inherited has a lot of eval $string; stuff with no checks for $@. Maybe that would be eating lit firecrackers. Sure seems like it sometimes. Austin From schwern at gmail.com Wed Oct 18 23:33:02 2006 From: schwern at gmail.com (Michael G Schwern) Date: Wed, 18 Oct 2006 23:33:02 -0700 Subject: [Pdx-pm] FIOS (was Re: Instance hash ( keyed array )) In-Reply-To: <4536B997.4090400@acm.org> References: <45353DE5.9070406@acm.org> <200610180151.47462.ewilhelm@cpan.org> <1161212513.7043.14.camel@willow.odshp.com> <4536B997.4090400@acm.org> Message-ID: <45371C1E.20508@gmail.com> Roderick A. Anderson wrote: >> Time to replace that 300 baud modem with cable or >> DSL! > > Losing the DSL the end of the month and Adelphia has been bought by Time > Warner Telecomm so it is interesting trying to get a price or place > order online. That 300 baud modem is looking more likely daily -- well > actually a 56k is what I'll have to use if. Maybe you're one of those lucky bastards who can get FIOS. http://www.verizon.net/vonads/fios/default.asp Gotta be something good about living out in Beaverton. From raanders at acm.org Thu Oct 19 08:43:35 2006 From: raanders at acm.org (Roderick A. Anderson) Date: Thu, 19 Oct 2006 08:43:35 -0700 Subject: [Pdx-pm] FIOS (was Re: Instance hash ( keyed array )) In-Reply-To: <45371C1E.20508@gmail.com> References: <45353DE5.9070406@acm.org> <200610180151.47462.ewilhelm@cpan.org> <1161212513.7043.14.camel@willow.odshp.com> <4536B997.4090400@acm.org> <45371C1E.20508@gmail.com> Message-ID: <45379D27.5060008@acm.org> Michael G Schwern wrote: > Roderick A. Anderson wrote: >>> Time to replace that 300 baud modem with cable or >>> DSL! >> Losing the DSL the end of the month and Adelphia has been bought by Time >> Warner Telecomm so it is interesting trying to get a price or place >> order online. That 300 baud modem is looking more likely daily -- well >> actually a 56k is what I'll have to use if. > > Maybe you're one of those lucky bastards who can get FIOS. > http://www.verizon.net/vonads/fios/default.asp No such luck. I live in the 'wilds' of North Idaho -- well not too wild Hayden ( Coeur d'Alene ) still Verizon/GTE has had this area up for sale for years. But my up side is the wireless will ready near the end of the month. Rod -- > Gotta be something good about living out in Beaverton. From btp at cpan.org Thu Oct 19 22:15:37 2006 From: btp at cpan.org (Ben Prew) Date: Thu, 19 Oct 2006 22:15:37 -0700 Subject: [Pdx-pm] [pdxpug] duplicate records In-Reply-To: <9A7B1FCA-B215-40EB-8AC7-97A3D6E33E16@ohsu.edu> References: <6A006225-5093-4F26-980C-571CD619DEF0@ohsu.edu> <47ed9e2ed59c142a86246f08842edc97@chrisking.com> <93479223-79AF-4ED3-A824-D1DBB646D5D5@ohsu.edu> <4536A981.9080601@cs.pdx.edu> <4536AF4C.8080506@cs.pdx.edu> <9A7B1FCA-B215-40EB-8AC7-97A3D6E33E16@ohsu.edu> Message-ID: <24f4b2e80610192215y2e2b4eccmfa42e03c70cf1850@mail.gmail.com> If you've got a table with exact duplicate data except for the id, you'll probably want to create a new table with all the values in it that are unique. Also, in the future, if you want to maintain uniqueness, I would probably create a unique index on the table that would prevent that in the future. So, if your table has the same schema as below you'll want to do something like this; create table foo as select max(password_id), username, password, object, url_address, description, status from original_table group by username, password, object, url_address, description, status / And then just delete the original table, and rename the new one to the old name. Also, a unique index would look something like: create uniqe index on original_table ( username, password, object, url_address, description, status ) And that will prevent this from happening in the future... On 10/18/06, Thomas J Keller wrote: > The problem is that the primary keys are unique. > So SELECT DISTINCT * FROM original_table; > finds all the records, including the ones that are identical except > for the id. > > So the problem remains. I actually have 194 unique records and 12 > that are the same except for their id's. > > Here's the new table: > passwords=# SELECT * FROM foobar; > password_id | username | password | object | url_address | > description | status > -------------+----------+----------+--------+------------- > +-------------+-------- > (0 rows) > > passwords=# INSERT INTO foobar (SELECT DISTINCT username, > password,object,url_address,description,status FROM password); > ERROR: column "password_id" is of type integer but expression is of > type character varying > HINT: You will need to rewrite or cast the expression. > passwords=# INSERT INTO foobar (SELECT * FROM password); > INSERT 0 206 > passwords=# DELETE FROM foobar WHERE password_id >0; > DELETE 206 > passwords=# INSERT INTO foobar (SELECT DISTINCT * FROM password); > INSERT 0 206 > > [The syntax in postgresQL is apparently a little different from your > suggestion. ] > > I think this is why I've stuck with FilemakerPro for so long. Please > note: I can clean the FMP data before I export it. But this seems > like a fairly common problem that should have a straightforward > solution. sigh. > > Thanks for your help. > > Tom K > > PS. the original table looks like this: > passwords=# \d password > Table "public.password" > Column | Type | > Modifiers > -------------+------------------------ > +---------------------------------------------------------------- > password_id | integer | not null default nextval > ('password_password_id_seq'::regclass) > username | character varying(32) | not null > password | character varying(12) | not null > object | character(32) | not null > url_address | character varying(64) | > description | character varying(128) | > status | character(8) | > Indexes: > "password_pk" PRIMARY KEY, btree (password_id) > > > On Oct 18, 2006, at 3:48 PM, Vassilis Papadimos wrote: > > > Vassilis Papadimos wrote: > >> Thomas J Keller wrote: > >>> Excellent. > >>> So the first step is to create an empty table: > >>> > >>> passwords=# CREATE TABLE foo_bar LIKE original_table; > >>> ERROR: syntax error at or near "LIKE" at character 22 > >>> LINE 1: CREATE TABLE foo_bar LIKE original_table; > >> SQL doesn't have this "do what I mean" feature yet :-) > > > > Ahem... Apparently SQL *does* have this "do what I mean" feature > > (or at least PostgreSQL does!) I've never heard of it before. > > > > But you have to write it like this: > > > > CREATE TABLE foo_bar (like original_table); > > > > (Including the parentheses.) > > > > I still like the > > > > SELECT DISTINCT * FROM original_table INTO foo_bar; > > > > solution though, two birds with one stone... > > > > Vassilis. > > > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 2: Don't 'kill -9' the postmaster > > > > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > -- --Ben From cfrjlr at gmail.com Fri Oct 20 05:35:04 2006 From: cfrjlr at gmail.com (Charles Radley) Date: Fri, 20 Oct 2006 05:35:04 -0700 Subject: [Pdx-pm] FIOS (was Re: Instance hash ( keyed array )) In-Reply-To: Message-ID: FIOS recently became available on my street (on Bull Mountain). But I have had comcast cable broadband for 4 years which is plenty for my needs. If I switch to FIOS I would lose my comcast email address and free web space. And FIOS is slightly more expensive than cable. I cannot think of any reason for me to switch right now. I am not sure why anyone would need that much bandwidth, unless they were running a server farm. If FIOS begins to offer video on demand and cable channel content, then I could justify the switch, but right now I get all of that on cable. It is puzzling why Verizon chose to put FIOS into a market which is already saturated with Comcast cable. Perhaps they are targeting DSL users, but DSL was so slow coming to this area that Comcast cable got in ahead of it. Charles F. Radley My Yahoo Inst Msgr ID = CFRJLR My AOL Inst Msgr ID = CFRJLR My Skype ID = CFRJLR My phone/fax = USA: +1-503-579-4686 > -----Original Message----- > From: pdx-pm-list-bounces+cfrjlr=gmail.com at pm.org > [mailto:pdx-pm-list-bounces+cfrjlr=gmail.com at pm.org] On > Behalf Of pdx-pm-list-request at pm.org > Sent: Thursday, October 19, 2006 12:01 PM > To: pdx-pm-list at pm.org > Subject: Pdx-pm-list Digest, Vol 40, Issue 14 > > Send Pdx-pm-list mailing list submissions to > pdx-pm-list at pm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.pm.org/mailman/listinfo/pdx-pm-list > or, via email, send a message with subject or body 'help' to > pdx-pm-list-request at pm.org > > You can reach the person managing the list at > pdx-pm-list-owner at pm.org > > When replying, please edit your Subject line so it is more > specific than "Re: Contents of Pdx-pm-list digest..." > > > Today's Topics: > > 1. Re: FIOS (was Re: Instance hash ( keyed array )) > (Roderick A. Anderson) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Oct 2006 08:43:35 -0700 > From: "Roderick A. Anderson" > Subject: Re: [Pdx-pm] FIOS (was Re: Instance hash ( keyed array )) > To: schwern at pobox.com > Cc: pdx-pm-list at pm.org > Message-ID: <45379D27.5060008 at acm.org> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Michael G Schwern wrote: > > Roderick A. Anderson wrote: > >>> Time to replace that 300 baud modem with cable or DSL! > >> Losing the DSL the end of the month and Adelphia has been > bought by > >> Time Warner Telecomm so it is interesting trying to get a price or > >> place order online. That 300 baud modem is looking more > likely daily -- well > >> actually a 56k is what I'll have to use if. > > > > Maybe you're one of those lucky bastards who can get FIOS. > > http://www.verizon.net/vonads/fios/default.asp > > No such luck. I live in the 'wilds' of North Idaho -- well > not too wild Hayden ( Coeur d'Alene ) still Verizon/GTE has > had this area up for sale for years. > > But my up side is the wireless will ready near the end of the month. > > Rod > -- > > Gotta be something good about living out in Beaverton. > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.7/488 - Release Date: 10/19/2006 -------------- next part -------------- A non-text attachment was scrubbed... Name: Charles F. Radley (cfrjlr at gmail.com).vcf Type: text/x-vcard Size: 732 bytes Desc: not available Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061020/f671e20a/attachment.vcf From scratchcomputing at gmail.com Fri Oct 20 14:13:47 2006 From: scratchcomputing at gmail.com (The Dread Parrot) Date: Fri, 20 Oct 2006 14:13:47 -0700 Subject: [Pdx-pm] Fwd: Apress User Group Newsletter--Early Fall Edition Message-ID: <200610201413.48192.ewilhelm@cpan.org> Nothing about Perl this month? ---------- Forwarded Message: ---------- Subject: Apress User Group Newsletter--Early Fall Edition Date: Friday 20 October 2006 10:11 am From: Janet Crosbie To: scratchcomputing at gmail.com +++++++++++++++++++++++++++++++++++++++ Apress User Group Newsletter Issue 7; Fall, 2006 ****PLEASE FORWARD OR POST THIS NEWSLETTER FOR ALL GROUP MEMBERS**** ****FEEL FREE TO EDIT THIS LETTER SO THAT IT FITS IN WITH YOUR USER GROUP FOCUS**** +++++++++++++++++++++++++++++++++++++++ Sections: 1. Let's Catch Up 2. Apress "firstPress" 3. The friends of ED Flash Video Contest-"Video:FLV'ED" 4. The User Group Page Has Got What You Need 5. Don't Forget the Apress SuperIndex 6. The Latest betaBooks 7. Recent Apress and friends of ED Books--Hot Off the Press 8. Forthcoming Books--Early Winter Releases 9. Upcoming Tradeshows 10. It's Not Too Late to Join the Apress Affiliate Program *************************************** 1. Let's Catch Up A. ASP Today Freeweb ASP Today, Apress's sister site, focuses on publishing professional-level articles that are available to subscribers. ASP Today has launched "Freeweb," and from now through December 2006, ASP Today will feature the two newest articles for free, so that each article will be free to view from time of publication until a newer free article publishes and converts the previous-but-one to subscriber-only viewing. Check it out today: http://asptoday.com/. B. Updating User Group Information Attention group leaders and office holders, just a quick reminder that if there have been any significant changes to group information, please take a moment to send me updates. This might include a change in group leader or president, a new e-mail or shipping address, or a change in book review policy. Please help me keep my records up to date. E-mail me at janet at apress.com. *************************************** 2. Apress "firstPress" Apress welcomes its new firstPress series-technical briefs in PDF format about underexplored or emerging technologies that could prove critical in tomorrow's industry. firstPress documents are meant to help shape your direction as a developer and get you ahead of the game by giving you key information to budding topics as early as possible. At around 50-150 pages, firstPress documents fall somewhere between the size of an article and a traditional Apress book. And these firstPress briefings are complete works--polished and ready for perusal as soon as you download them. Please continue to visit this page, as additional firstPress briefings emerge: http://www.apress.com/ecommerce/firstpress.html. The inaugural firstPress document is "LINQ for Visual C# 2005" By Fabio Claudio Ferracchiati November 2006 | ISBN: 1-59059-826-1 | 150 pages | $19.99 http://www.apress.com/book/bookDisplay.html?bID=10255 *************************************** 3. The friends of ED Flash Video Contest-"Video:FLV'ED" friends of ED (an Apress company) has been your Flash book resource since 2000. In celebration of the latest Flash title, "Foundation Flash 8 Video" (June 2006), friends of ED is hosting a contest to see what you can create by bringing video and Flash together. Your task is to simultaneously promote friends of ED and/or its books and demonstrate what the Flash platform is capable of. The grand prize is an Apple MacBook! You have until December 31, 2006, to submit your project. Please go here for more essential information about the contest: http://www.friendsofed.com/flved/. *************************************** 4. The User Group Page Has Got What You Need I receive a lot of good questions from user group leaders and members. Some of these questions already have built-in answers available on our web site, and here are some of the most common: Q: How do I and group members take advantage of the user group book discount? A: All group members** of a registered Apress user group may receive a 25% discount to any Apress or friends of ED title when the book is purchased through our distributor, Springer. (Place your order with our distributor, Springer, by calling 1-800-SPRINGER. Once you connect with a customer service representative, please mention the discount code, "APRESSUG" along with the name of your user group.) ** We apologize, but at this time, we are unable to honor this discount to user group members located outside of North and South America, Mexico, and the Caribbean. Q: May I have an Apress logo to post on our group web site? A: You may download a logo, size of your choice, here: http://www.apress.com/userGroups/logos.html. Q: Where would you like us to post online reviews of your books? A: Please read the Suggestions for Writing Apress (and friends of ED) Book Reviews page at http://www.apress.com/userGroups/writeareview.html. If you still have questions not answered on the user group page, please contact me at janet at apress.com. Thanks! *************************************** 5. Don't Forget the Apress SuperIndex If you've ever kicked yourself for not bookmarking that PDF or turning down the corner of the book with the awesome code, suffer no longer. The Apress SuperIndex is a search function that locates the keyword or code snippet you need to make your life easier. With the SuperIndex, you can quickly search for specific sentences or lines of code within a book you already own or are interested in purchasing. Usage is limited by IP. Search now at http://superindex.apress.com. *************************************** 6. The Latest betaBooks Apress betaBooks give you access to the newest programming topics straight from the author, by way of weekly PDF chapters and updates, all before the final printed versions roll off the press. Eight weeks before final publication, the first several chapters of an Apress betaBook become available. After that, available updates or new chapters are delivered weekly to your inbox. You may purchase betaBooks where you purchase other eBooks, in the Apress eBookshop. These betaBooks are a bargain because the price includes a copy of the entire finished eBook. Apress is offering these betaBooks right now: "Pro CSS Techniques" By Jeff Croft et al. November 2006 | ISBN: 1-59059-732-X | 450 pages | $20.00 ($39.99 hard copy price) http://www.apress.com/book/bookDisplay.html?bID=10187 "Pro JavaScript Techniques" By John Resig December 2006 | ISBN: 1-59059-727-3 | 550 pages | $22.50 ($44.99 hard copy price) http://www.apress.com/book/bookDisplay.html?bID=10163 "The Definitive Guide to SUSE Linux Enterprise Server" By Sander van Vugt December 2006 | ISBN: 1-59059-708-7 | 725 pages | $30.00 ($59.99 hard copy price) http://www.apress.com/book/bookDisplay.html?bID=10199 Learn more and purchase your betaBooks here: http://www.apress.com/betabook.html. *************************************** 7. Recent Apress and friends of ED Books-Hot Off the Press I only have a little room to feature just a sampling of our latest titles. But you can view lots more new releases here: http://www.apress.com/book/newRelease.html. "In Search of Stupidity: Over Twenty Years of High Tech Marketing Disasters, Second Edition" By Merrill R. (Rick) Chapman September 2006 | ISBN: 1-59059-721-4 | 408 pages | $24.99 http://www.apress.com/book/bookDisplay.html?bID=10174 "Beginning Visual Basic 2005 Express Edition: From Novice to Professional" By Peter Wright September 2006 | ISBN: 1-59059-622-6 | 544 pages | $29.99 http://www.apress.com/book/bookDisplay.html?bID=10076 "AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Second Edition" By Hanaan Rosenthal September 2006 | ISBN: 1-59059-653-6 | 808 pages | $59.99 http://www.apress.com/book/bookDisplay.html?bID=10107 "BizTalk 2006 Recipes: A Problem-Solution Approach" By Mark Beckner et al. September 2006 | ISBN: 1-59059-711-7 | 560 pages | $59.99 http://www.apress.com/book/bookDisplay.html?bID=10137 "Beginning Ajax with PHP: From Novice to Professional" By Lee Babin October 2006 | ISBN: 1-59059-667-6 | 272 pages | $34.99 http://www.apress.com/book/bookDisplay.html?bID=10117 "Foundations of Jini 2 Programming" By Jan Newmarch October 2006 | ISBN: 1-59059-716-8 | 512 pages | $44.99 http://www.apress.com/book/bookDisplay.html?bID=10171 *************************************** 8. Forthcoming Books-Early Winter Releases Here are a handful of titles to look forward to. Preview even more upcoming titles here: http://www.apress.com/book/forthcoming.html. "Pro BizTalk 2006" By George Dunphy and Ahmed Metwally To publish October 2006 | ISBN: 1-59059-699-4 | 528 pages | $49.99 http://www.apress.com/book/bookDisplay.html?bID=10168 "How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively" By Christian Gross To publish October 2006 | ISBN: 1-59059-744-3 | 232 pages | $24.99 http://www.apress.com/book/bookDisplay.html?bID=10184 "Pro Apache Struts with Ajax" By John Carnell et al. To publish October 2006 | ISBN: 1-59059-738-9 | 528 pages | $44.99 http://www.apress.com/book/bookDisplay.html?bID=10180 "PHP Solutions: Dynamic Web Design Made Easy" By David Powers To publish November 2006 | ISBN: 1-59059-731-1 | 435 pages | $34.99 http://friendsofed.com/book.html?isbn=1590597311 "Beginning Ruby on Rails E-Commerce: From Novice to Professional" By Christian Hellsten and Jarkko Laine To publish November 2006 | ISBN: 1-59059-736-2 | 430 pages | $39.99 http://www.apress.com/book/bookDisplay.html?bID=10178 "Date on Database: Writings 2000-2006" By C. J. Date To publish November 2006 | ISBN: 1-59059-746-X | 700 pages | $99.99 http://www.apress.com/book/bookDisplay.html?bID=10201 "Beginning SUSE Linux: From Novice to Professional, Second Edition" By Keir Thomas To publish November 2006 | ISBN: 1-59059-674-9 | 700 pages | $39.99 http://www.apress.com/book/bookDisplay.html?bID=10132 *************************************** 9. Upcoming Tradeshows Apress will be exhibiting at the following shows this fall. If you are there, please stop by and say hello! Oracle Open World San Francisco, CA October 22 - 26, 2006 http://www.oracle.com/openworld/index.html LinuxWorld London London, UK October 25 - 26, 2006 http://www.linuxworldexpo.co.uk/ Zend/PHP Conference and Expo San Jose, CA October 30 - November 2, 2006 http://zendcon06.kbconferences.com/index.php PASS Seattle, WA November 14 - 17, 2006 http://www.sqlpass.org/events/summit06/index.cfm Flash on the Beach Brighton, UK December 4 - 6, 2006 http://www.flashonthebeach.com/ *************************************** 10. It's Not Too Late to Join the Apress Affiliate Program The invitation is still open to join the Apress Affiliate Program. The program benefits web site owners and bloggers (which includes a lot of you folks) who publicly recognize Apress books and help generate sales. The program credits affiliates who link to Apress eBooks a *10% COMMISSION* on eBook sales when their visitors click through and purchase Apress eBooks. Lots of people have signed up as Apress Affiliates, and they've begun to accumulate commissions. Wouldn't you like to possibly earn some extra cash, just for promoting books you know and love? Try it out. Setup is free and an account is easy to maintain. We'll supply you with images or text links to place on your sites, if you need. Then at the beginning of every month, we'll send a check to each affiliate for the previous month's commissions. For more details and to set up an affiliate account, visit http://www.apress.com/affiliate/. *************************************** We do not send unsolicited newsletters. You received this because you or a previous contact registered a user group on http://www.apress.com. To be removed from the Apress user group newsletter mailing list, please click here: http://www.apress.com/misc/optout2.html?e=scratchcomputing%40gmail.com &h=e42e56be8bc04a8bbd9ba438cb5db9a3&l=21 Please do not reply to this e-mail. Instead, e-mail info at apress.com and we'll reply to your query. Apress - The Expert's Voice(TM) 2560 Ninth St, Suite 219 Berkeley, CA 94710 510-549-5930 ------------------------------------------------------- -- http://pdx.pm.org From schwern at gmail.com Fri Oct 20 22:45:27 2006 From: schwern at gmail.com (Michael G Schwern) Date: Fri, 20 Oct 2006 22:45:27 -0700 Subject: [Pdx-pm] FIOS (was Re: Instance hash ( keyed array )) In-Reply-To: References: Message-ID: <4539B3F7.7040806@gmail.com> Charles Radley wrote: > FIOS recently became available on my street (on Bull Mountain). But I have > had comcast cable broadband for 4 years which is plenty for my needs. If I > switch to FIOS I would lose my comcast email address and free web space. > And FIOS is slightly more expensive than cable. > > I cannot think of any reason for me to switch right now. > > I am not sure why anyone would need that much bandwidth, unless they were > running a server farm. Years and years ago I had arguments on BBS' about how 2400 baud was plenty for anyone and you didn't need a 9600 baud modem because it was faster than you could read. ;) Give me bandwidth and I'll expand my usage to fill it. > If FIOS begins to offer video on demand and cable channel content, then I > could justify the switch, but right now I get all of that on cable. They do. They also do VOIP. The only real downside is that since FIOS requires power if you lose power you lose your phone. There's a 4-8 hour backup battery. > It is puzzling why Verizon chose to put FIOS into a market which is already > saturated with Comcast cable. Perhaps they are targeting DSL users, but DSL > was so slow coming to this area that Comcast cable got in ahead of it. The investment is huge (I've seen numbers around $500-$1000 per house) but copper is reaching its limit. Fiber is just getting started. If they pull it off they'll have a huge head start on everyone else. So its a long term infrastructure investment. It also means they can offer Internet, TV and phone and compete with the cable companies which are offering the same thing. From ben.hengst at gmail.com Mon Oct 23 21:59:55 2006 From: ben.hengst at gmail.com (benh) Date: Mon, 23 Oct 2006 21:59:55 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. Message-ID: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> So I'm building a small site for a client. Durring the process I started playing with the idea that every page is a module, there are some that just needed to be text, others that needed to do things. Though, things didn't go as easily as I would have liked, and I ended up going about things the longer way to make it all go. But I was wondering if there was a cleaner/better way of doing this. The crux of things is that I am attempting to use a var to call these module/pages. So I was hopeing for something along the lines of: my $action=CGI::param('action'); $data->{'body'}=local::$action::generate_page_data(); problem is that I get a 'bad name after local::' error. So my second go was to use require, and then just call generate_page_data(). But it looks like require doesn't append to name space the way use does so I keep getting undefined subroutine &main::generate_page_data(); so in the end I just ditched things and built subs in page and called them... it works but its not as elegant as I would like it to be.... so I'm tossing this out to the group. How would you have solved this kinda problem? Is my thinking off? I think that it's an idea that I want to take another stab at but just looking for some input. thanks -- benh~ From naterajj at gmail.com Mon Oct 23 22:36:04 2006 From: naterajj at gmail.com (Juan Jose Natera) Date: Mon, 23 Oct 2006 22:36:04 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> Message-ID: <349627440610232236p3e8ed324ib2a534eabda5dc79@mail.gmail.com> Hi, One way of doing this is: my $action = CGI::param('action'); eval 'require $action;' && $data->{body} = $action->generate_page(); given that $action contains the name of your module, say 'PageA'. package PageA; use strict; use warnings; sub generate_page { my $class = shift; # generate the page here } 1; This has a few holes though, what if the user forces $action to be something undersirable? what if you forgot to create generate_page? or if you misspelled it? etc. You'll be better off by using an existing web framework, like CGI::Prototype or CGI::Application. Regards, JJ On 10/23/06, benh wrote: > So I'm building a small site for a client. Durring the process I > started playing with the idea that every page is a module, there are > some that just needed to be text, others that needed to do things. > Though, things didn't go as easily as I would have liked, and I ended > up going about things the longer way to make it all go. But I was > wondering if there was a cleaner/better way of doing this. > > The crux of things is that I am attempting to use a var to call these > module/pages. So I was hopeing for something along the lines of: > > my $action=CGI::param('action'); > $data->{'body'}=local::$action::generate_page_data(); > > problem is that I get a 'bad name after local::' error. > > So my second go was to use require, and then just call > generate_page_data(). But it looks like require doesn't append to name > space the way use does so I keep getting undefined subroutine > &main::generate_page_data(); > > so in the end I just ditched things and built subs in page and called > them... it works but its not as elegant as I would like it to be.... > so I'm tossing this out to the group. How would you have solved this > kinda problem? Is my thinking off? I think that it's an idea that I > want to take another stab at but just looking for some input. > > thanks > -- > benh~ > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list at pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From naterajj at gmail.com Mon Oct 23 22:38:43 2006 From: naterajj at gmail.com (Juan Jose Natera) Date: Mon, 23 Oct 2006 22:38:43 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <349627440610232236p3e8ed324ib2a534eabda5dc79@mail.gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> <349627440610232236p3e8ed324ib2a534eabda5dc79@mail.gmail.com> Message-ID: <349627440610232238r6bac91aid949450c3d8dee9d@mail.gmail.com> make that: eval "require $action" && $data->{body} = $action->generate_page(); On 10/23/06, Juan Jose Natera wrote: > Hi, > > One way of doing this is: > > my $action = CGI::param('action'); > eval 'require $action;' && $data->{body} = $action->generate_page(); > > given that $action contains the name of your module, say 'PageA'. > > package PageA; > use strict; > use warnings; > > sub generate_page { > my $class = shift; > # generate the page here > } > > 1; > > This has a few holes though, what if the user forces $action to be > something undersirable? what if you forgot to create generate_page? or > if you misspelled it? etc. > > You'll be better off by using an existing web framework, like > CGI::Prototype or CGI::Application. > > Regards, > > JJ > > On 10/23/06, benh wrote: > > So I'm building a small site for a client. Durring the process I > > started playing with the idea that every page is a module, there are > > some that just needed to be text, others that needed to do things. > > Though, things didn't go as easily as I would have liked, and I ended > > up going about things the longer way to make it all go. But I was > > wondering if there was a cleaner/better way of doing this. > > > > The crux of things is that I am attempting to use a var to call these > > module/pages. So I was hopeing for something along the lines of: > > > > my $action=CGI::param('action'); > > $data->{'body'}=local::$action::generate_page_data(); > > > > problem is that I get a 'bad name after local::' error. > > > > So my second go was to use require, and then just call > > generate_page_data(). But it looks like require doesn't append to name > > space the way use does so I keep getting undefined subroutine > > &main::generate_page_data(); > > > > so in the end I just ditched things and built subs in page and called > > them... it works but its not as elegant as I would like it to be.... > > so I'm tossing this out to the group. How would you have solved this > > kinda problem? Is my thinking off? I think that it's an idea that I > > want to take another stab at but just looking for some input. > > > > thanks > > -- > > benh~ > > _______________________________________________ > > Pdx-pm-list mailing list > > Pdx-pm-list at pm.org > > http://mail.pm.org/mailman/listinfo/pdx-pm-list > > > From scratchcomputing at gmail.com Mon Oct 23 23:05:10 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Mon, 23 Oct 2006 23:05:10 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> Message-ID: <200610232305.10675.ewilhelm@cpan.org> # from benh # on Monday 23 October 2006 09:59 pm: >local::$action::generate_page_data(); To get what you were trying to get here, that would have to be my $subref = eval('\&local::' . $action . '::generate_page_data'); $subref->(); Juan's is a bit cleaner, but you'll need to build your subs as methods. Either way, you're using a string eval though, so I hope $action has been detainted. Given that there was no require() in your original code, maybe this stuff has already been loaded. Thus, you could skip the string eval if you just use it as a class name. my $class = 'local::' . $action; eval { $class->can('generate_page_data') } or croak("invalid action '$action'"); $data->{'body'} = $class->generate_page_data; I prefer that. You'll still need to add "my $class = shift;" to the front of the generate_page_data() definition. --Eric -- Turns out the optimal technique is to put it in reverse and gun it. --Steven Squyres (on challenges in interplanetary robot navigation) --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From merlyn at stonehenge.com Tue Oct 24 03:28:17 2006 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 24 Oct 2006 03:28:17 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <349627440610232236p3e8ed324ib2a534eabda5dc79@mail.gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> <349627440610232236p3e8ed324ib2a534eabda5dc79@mail.gmail.com> Message-ID: <86hcxu2eke.fsf@blue.stonehenge.com> >>>>> "Juan" == Juan Jose Natera writes: Juan> Hi, Juan> One way of doing this is: Juan> my $action = CGI::param('action'); Juan> eval 'require $action;' && $data->{body} = $action->generate_page(); Luckily, you put single quotes there not double quotes. Had you actually tried to get this to work, you'd quickly discover your box has become "owned" by bad guys. NEVER pass unchecked form data to "eval". Eeek! -- 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 kellert at ohsu.edu Tue Oct 24 14:04:13 2006 From: kellert at ohsu.edu (Thomas J Keller) Date: Tue, 24 Oct 2006 14:04:13 -0700 Subject: [Pdx-pm] off topic: internet service providers Message-ID: <18D45893-6616-4EB5-9412-A07922C16E7F@ohsu.edu> Greetings, Sorry for the non-Perl inquiry. I've always had access to the OHSU server and didn't have to worry about an ISP. But I'm planning a website for my daughter. She's a professional singer (mezzo-soprano). Anyway, I'm wondering if people could suggest an ISP, preferably based here in Oregon. I'll need permission to upload CGI scripts and a PostgresQL database. Please answer off list. Thanks, Tom K kellert at ohsu.edu 4-2442 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061024/a025533d/attachment.html From dks at mediaweb.com Tue Oct 24 15:45:31 2006 From: dks at mediaweb.com (DK Smith) Date: Tue, 24 Oct 2006 15:45:31 -0700 Subject: [Pdx-pm] Off-Topic: anyone purchased a well-designed SATA enclosure from Oregon retailer? Message-ID: <1161729931.8133.62.camel@matrix> Hi, I'm in the region and wondering if there is there a local Oregon retailer worthy of recommendation and praise for having superb computer peripheral products? And perhaps they also stock a well-designed SATA enclosure, too? In any event I am searching low and high for a QUALITY enclosure (one with a fan for heat exhaust, interfaces for firewire and multiple firewire devices, at that, eSATA would be useful. Not having much luck. Typically finding junk products or retailers that discourage phone usage. I'm also not to keen on dealing with these Internet retailers, like satagear.com, who appear to possess multiple web site identities when there is actually one business in Florida. Nothing against FL. :) So I thought perhaps I could find a recommendation by one of the good people on this regional list? Cheers, DK PS; apologies if I broke canonical rules but this is a great community with valuable experience to share, right. :) From tex at off.org Tue Oct 24 16:09:49 2006 From: tex at off.org (Austin Schutz) Date: Tue, 24 Oct 2006 16:09:49 -0700 Subject: [Pdx-pm] Off-Topic: anyone purchased a well-designed SATA enclosure from Oregon retailer? In-Reply-To: <1161729931.8133.62.camel@matrix> References: <1161729931.8133.62.camel@matrix> Message-ID: <20061024230949.GX2891@gblx.net> On Tue, Oct 24, 2006 at 03:45:31PM -0700, DK Smith wrote: > Hi, > > I'm in the region and wondering if there is there a local Oregon > retailer worthy of recommendation and praise for having superb computer > peripheral products? And perhaps they also stock a well-designed SATA > enclosure, too? > > In any event I am searching low and high for a QUALITY enclosure (one > with a fan for heat exhaust, interfaces for firewire and multiple > firewire devices, at that, eSATA would be useful. Not having much luck. > Typically finding junk products or retailers that discourage phone > usage. I'm also not to keen on dealing with these Internet retailers, > like satagear.com, who appear to possess multiple web site identities > when there is actually one business in Florida. Nothing against FL. :) > > So I thought perhaps I could find a recommendation by one of the good > people on this regional list? > I have had good luck buying from Pacific Solutions on SE Powell at 52nd. Buying from a local company who builds their own systems works fairly well because they are generally fairly aware about which parts are the most reliable (if they do a decent volume of business), and they depend on positive word of mouth. That said, they may not have the particular piece of hardware you are looking for. Austin From schwern at gmail.com Wed Oct 25 20:19:24 2006 From: schwern at gmail.com (Michael G Schwern) Date: Wed, 25 Oct 2006 20:19:24 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> Message-ID: <4540293C.7070606@gmail.com> benh wrote: > So I'm building a small site for a client. Durring the process I > started playing with the idea that every page is a module, there are > some that just needed to be text, others that needed to do things. > Though, things didn't go as easily as I would have liked, and I ended > up going about things the longer way to make it all go. But I was > wondering if there was a cleaner/better way of doing this. > > The crux of things is that I am attempting to use a var to call these > module/pages. So I was hopeing for something along the lines of: > > my $action=CGI::param('action'); > $data->{'body'}=local::$action::generate_page_data(); > > problem is that I get a 'bad name after local::' error. no strict 'refs'; $data->{body} = &{"local::$action::generate_page_data"}; > so in the end I just ditched things and built subs in page and called > them... it works but its not as elegant as I would like it to be.... > so I'm tossing this out to the group. How would you have solved this > kinda problem? Is my thinking off? I think that it's an idea that I > want to take another stab at but just looking for some input. You are much better off either A) using one of the many, many modules on CPAN for this. CGI::Application for example or B) something like... %action2page = ( blarg => sub { return "I AM BLARG!" }, welcome => sub { return "Welcome to BLARGH!!!
" }, thingy => \&generate_thingy ); my $action = CGI->param('action'); $data->{body} = $action2page{$action}->(); No namespace munging. No possibility of arbitrary code execution. Error handling is left as an exercise for the reader. From tex at off.org Wed Oct 25 20:24:27 2006 From: tex at off.org (Austin Schutz) Date: Wed, 25 Oct 2006 20:24:27 -0700 Subject: [Pdx-pm] I think that I'm trying to make things too hard. In-Reply-To: <4540293C.7070606@gmail.com> References: <85ddf48b0610232159i2b70d002le9e010ae5623218b@mail.gmail.com> <4540293C.7070606@gmail.com> Message-ID: <20061026032427.GG2891@gblx.net> On Wed, Oct 25, 2006 at 08:19:24PM -0700, Michael G Schwern wrote: > benh wrote: > > So I'm building a small site for a client. Durring the process I > > started playing with the idea that every page is a module, there are > > some that just needed to be text, others that needed to do things. > > Though, things didn't go as easily as I would have liked, and I ended > > up going about things the longer way to make it all go. But I was > > wondering if there was a cleaner/better way of doing this. > > > > The crux of things is that I am attempting to use a var to call these > > module/pages. So I was hopeing for something along the lines of: > > > > my $action=CGI::param('action'); > > $data->{'body'}=local::$action::generate_page_data(); > > > > problem is that I get a 'bad name after local::' error. > > no strict 'refs'; > $data->{body} = &{"local::$action::generate_page_data"}; While this works, I tend to use {}s around variable names to disambiguate them inside double quotes: $data->{body} = &{"local::${action}::generate_page_data"}; or $data->{body} = &{ 'local::' . $action . '::generate_page_data' }; that way you don't have to remember the precedence rules when/if $action::generate_page_data is defined. But, ah, you're right about it being something to generally avoid in the first place. Austin From scratchcomputing at gmail.com Thu Oct 26 14:55:12 2006 From: scratchcomputing at gmail.com (Seven till Seven) Date: Thu, 26 Oct 2006 14:55:12 -0700 Subject: [Pdx-pm] November Meeting -- Crucible Message-ID: <200610261455.13138.ewilhelm@cpan.org> Wednesday Nov 8th, 6:53pm at FreeGeek -- 1731 SE 10th Ave. Only two weeks from (as usual) yesterday! Crucible Crucible Crucible Crucible Crucible "An Automatic Slicing, Dicing, and Rebooting Test Harness" with Bryce Harrington Crucible is a test harness in use at OSDL which utilizes several Perl modules, along with a mess of bash scripts, to provide a generalized automated testing system. They use Crucible for testing NFSv4, Linux CPU and Memory hotplug, Inkscape, Cairo, and GeGL. It coordinates tests across a collection of different machines of different architectures; it handles automated power cycling to test-boot new kernels; it can reimage, capture console logs, etc.; it can coordinate multi-client/server configurations; it slices; it dices; it'll even CUT THROUGH A TIN CAN!1!! Most of the Perl components have been uploaded to CPAN, including one set of modules for editing/updating different kinds of bootloader config files, called Linux::Bootloader, another module WWW::PkgFind for downloading software packages from web or ftp sites, or from cvs/git/svn, and another set of modules for parsing test output from different kinds of test programs, called Test::Parser. We've also recently added a module, Test::Presenter, that employs an XML database to recombobulate parsed test data into forms that Chart::Graph::Gnuplot and similar modules can use for making pretty SVG graphs. more info: http://crucible.sourceforge.net/ As always, the meeting will be followed by beer at the Lucky Lab. If it's your second meeting, I buy you a beer. December's special is "I buy you a beer if your mother's maiden name starts with a Q", so don't skip. Also, I just got a new load of bling in the mail, which means we have to have a contest to see who takes home the special secret prize. --Eric -- http://pdx.pm.org From chromatic at wgz.org Thu Oct 26 23:46:09 2006 From: chromatic at wgz.org (chromatic) Date: Thu, 26 Oct 2006 23:46:09 -0700 Subject: [Pdx-pm] November Meeting -- Crucible In-Reply-To: <200610261455.13138.ewilhelm@cpan.org> References: <200610261455.13138.ewilhelm@cpan.org> Message-ID: <200610262346.09406.chromatic@wgz.org> On Thursday 26 October 2006 14:55, Seven till Seven wrote: > Crucible is a test harness in use at OSDL which utilizes several Perl > modules, along with a mess of bash scripts, to provide a generalized > automated testing system. ?They use Crucible for testing NFSv4, Linux > CPU and Memory hotplug, Inkscape, Cairo, and GeGL. One fun fact is that Inkscape, Cairo, and GeGL all do... GRAPHICS. Hm, testing graphics. Interesting. -- c From kellert at ohsu.edu Fri Oct 27 12:48:55 2006 From: kellert at ohsu.edu (Thomas J Keller) Date: Fri, 27 Oct 2006 12:48:55 -0700 Subject: [Pdx-pm] dependencies problem Message-ID: Greetings, I'm trying to update the BioPerl bundle on my MacBook (intel core duo), OSX 10.4.8. One of the dependencies is the libpng lib files. I'm using the darwin optimized makefile but get this: littlecatb:~/Desktop/libpng-1.2.12 kellert$ make test gcc -s -L/usr/local/lib -o pngtest pngtest.o libpng.a -lz -lm /usr/bin/ld: Undefined symbols: _png_mmx_support _png_combine_row _png_do_read_interlace _png_read_filter_row collect2: ld returned 1 exit status make: *** [pngtest] Error 1 Could someone suggest a solution or workaround for this? Thanks, Tom K Thomas J. Keller, Ph.D. Director, MMI Core Facility Oregon Health & Science University 3181 SW Sam Jackson Park Rd. Portland, OR, USA, 97239 http://www.ohsu.edu/research/core -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20061027/b1ce48d6/attachment.html From schwern at gmail.com Fri Oct 27 16:46:01 2006 From: schwern at gmail.com (Michael G Schwern) Date: Fri, 27 Oct 2006 16:46:01 -0700 Subject: [Pdx-pm] dependencies problem In-Reply-To: References: Message-ID: <45429A39.7060403@gmail.com> Thomas J Keller wrote: > Greetings, > I'm trying to update the BioPerl bundle on my MacBook (intel core duo), > OSX 10.4.8. One of the dependencies is the libpng lib files. I'm using > the darwin optimized makefile but get this: > littlecatb:~/Desktop/libpng-1.2.12 kellert$ make test > gcc -s -L/usr/local/lib -o pngtest pngtest.o libpng.a -lz -lm > /usr/bin/ld: Undefined symbols: > _png_mmx_support > _png_combine_row > _png_do_read_interlace > _png_read_filter_row > collect2: ld returned 1 exit status > make: *** [pngtest] Error 1 > > > Could someone suggest a solution or workaround for this? Rather than compiling things yourself, try using the libpng provided by a package manager like fink (fink.sf.net) or Macports (macports.org). They'll have already done whatever patching is necessary to make it work on OS X.