From timc+perl at divide.net Sat Oct 2 19:53:00 2004 From: timc+perl at divide.net (Tim Chambers) Date: Mon Oct 4 18:22:20 2004 Subject: [Pikes-peak-pm] Fw: Newsletter from O'Reilly UG Program, October 1 Message-ID: <016f01c4a8f8$78a595d0$0dedf044@CEPHAS> ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Exploring the JDS Linux Desktop -XML in a Nutshell, 3rd Edition -Adobe InDesign CS One-on-One -Adobe Encore DVD: In the Studio -Building the Perfect PC -Head First Servlets & JSP -Java Threads, 3rd Edition ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Peter Morville ("Information Architecture for the World Wide Web") Information Architecture & Findability Seminar, San Francisco, CA--October 25 -Dru Lavigne ("BSD Hacks"), EuroBSDCon, Karlsruhe, Germany-- October 27-November 2 ---------------------------------------------------------------- Conference News ---------------------------------------------------------------- -O'Reilly Mac OS X Conference, Santa Clara, CA--October 25-28 -Call for Participation: The MySQL Users Conference-- Proposals are due by November 1 ---------------------------------------------------------------- News ---------------------------------------------------------------- -O'Reilly Now Distributes SitePoint Web Development Books -Hacking PayPal -The New Bloglines Web Services -O'Reilly's New Magazine for Technology Projects--"Make" -Move Beyond Amateur Filmmaking -O'Reilly Digital Media Professionals Directory -Open Source Content Management with Plone -FreeBSD Bag of Tricks -Save 50% on Linux/Unix System Administration Online Courses -Introduction to Quartz 2D for QuickDraw Programmers -Top Ten Tips for Mac OS X Con 2004 -Troubleshooting Printer Problems -Master Pages in ASP.NET -Reporting Application Errors by Email -Groovy, Java's New Scripting Language ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly, No Starch, Paraglyph, Pragmatic Bookshelf, SitePoint, or Syngress book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone (800-998-9938). http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ---------------------------------------------------------------- New Releases ---------------------------------------------------------------- ***Exploring the JDS Linux Desktop Publisher: O'Reilly ISBN: 0596007523 "Exploring the JDS Linux Desktop" is the ideal guide to JDS: it's clear and direct, but loaded with insights from authors who have spent time working with, supporting, and enhancing the system. The book carefully covers such housekeeping chores as setting up networking, updates, and backups. It enters into great depth concerning the key productivity tools every user needs: email, web browsing, instant messaging, word processing, spreadsheets, and slide presentations. And it includes chapters and appendices on useful tools and system add-ons. http://www.oreilly.com/catalog/jds/ Chapter 4, "JDS Networking," is available online: http://www.oreilly.com/catalog/jds/chapter/index.html ***XML in a Nutshell, 3rd Edition Publisher: O'Reilly ISBN: 0596007647 There's a lot to know about XML, and it's constantly evolving. But you don't need to commit every syntax, API, or XSLT transformation to memory; you only need to know where to find it. This powerful new edition is the comprehensive XML reference. Serious users of XML will find coverage on just about everything they need, from fundamental syntax rules, to details of DTD and XML Schema creation, to XSLT transformations, to APIs used for processing XML documents. http://www.oreilly.com/catalog/xmlnut3/ Chapter 9, "XPath," is available online: http://www.oreilly.com/catalog/xmlnut3/chapter/index.html ***Adobe InDesign CS One-on-One Publisher: O'Reilly ISBN: 0596007361 Adobe InDesign is widely regarded as the page layout/publishing program for the new millennium. In this book, Adobe-certified expert Deke McClelland guides you, at your own pace, through twelve step-by-step lessons that are packed with entertaining and informative real-world projects. There are more than 500 full-color photos, diagrams, and screen shots, as well as tips and tricks for tapping into InDesign's most powerful capabilities. Also included are two hours of video instruction on CD that will help you master fundamental and advanced concepts, best practices, and techniques. http://www.oreilly.com/catalog/adobeindesign/ ***Adobe Encore DVD: In the Studio Publisher: O'Reilly ISBN: 0596006004 If you're looking for a stimulating way to master Adobe Encore DVD and fine-tune your moviemaking skills, here it is. This full-color tutorial will help you push the limits of Adobe Encore DVD by helping you create highly imaginative designs and projects. Designed for Adobe Creative Suite developers and filmmakers, this book combines practical learning materials and project-based lessons. With this comprehensive tutorial, you'll be able to quickly develop professional-looking DVDs studded with special effects worthy of a Hollywood studio. http://www.oreilly.com/catalog/adobedvd/ Chapter 2, "Deconstructing DVDs," is available online: http://www.oreilly.com/catalog/adobedvd/chapter/ch02.pdf ***Building the Perfect PC Publisher: O'Reilly ISBN: 0596006632 For many computer users, a ready-made system is about as satisfying as a frozen microwave dinner: sure, it works, but it's not exactly what you need or want. Don't accept the assortment of components bundled for your price point; build your own PC. With straightforward language, clear end-to-end instructions, and extensive illustrations, this book covers a variety of complete systems and their components. Regardless of your experience, you can take control and create your ideal machine. http://www.oreilly.com/catalog/buildpc/ Chapter 1, "Fundamentals," is available online: http://www.oreilly.com/catalog/buildpc/chapter/index.html ***Head First Servlets & JSP Publisher: O'Reilly ISBN: 0596005407 "Head First Servlets & JSP" will help you truly understand the latest version, J2EE 1.4, of Servlets and JSP. You'll learn how to write Servlets and JSPs, what makes the Container tick, how to use the new JSP Expression Language (EL), and even some server-side design patterns. Written by the creators of the Sun Certified Web Component Developer (SCWCD) 1.4 exam, this book will help you pass the exam, talk about Struts at dinner parties, and put Servlets and JSP to work right away. http://www.oreilly.com/catalog/headservletsjsp/ ***Java Threads, 3rd Edition Publisher: O'Reilly ISBN: 0596007825 The new edition of this classic book shows you how to take full advantage of Java's threading facilities, and it brings you up to date with the significant changes in Java 2 Standard Edition version 5.0 (J2SE 5.0). The book incorporates the concurrency utilities from java.util.concurrent, and new chapters cover thread performance, using threads with Swing, threads and Collection classes, thread pools, and threads and I/O. Get a thorough, step-by-step approach to threads programming. http://www.oreilly.com/catalog/jthreads3/ Chapter 5, "Minimal Synchronization Techniques," is available online: http://www.oreilly.com/catalog/jthreads3/chapter/index.html ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Peter Morville ("Information Architecture for the World Wide Web"), Information Architecture & Findability Seminar, San Francisco, CA--October 25 Peter leads a new full-day seminar on information architecture from top to bottom, explaining how search and navigation systems can be designed to support and shape user behavior. http://semanticstudios.com/presentations/iaf/ ***Dru Lavigne ("BSD Hacks"), EuroBSDCon, Karlsruhe, Germany-- October 27-November 2 Dru discusses "But I'm not a developer...how can I contribute to open source?" http://2004.eurobsdcon.org/ ================================================ Conference News ================================================ ***O'Reilly Mac OS X Conference, Santa Clara, CA--October 25-28 This conference brings together what you need to know and what you want to experience. You'll learn how to solve the day to day problems of connected computing, leverage the power of scripting, improve the performance of your network, and protect your systems from intrusion. You'll also get up to speed on grid computing, home automation, streaming media, how to build your own TV studio, and much more. Use code DSUG when you register and receive 20% off conference pricing. To register, go to: http://conferences.oreillynet.com/cs/macosx2004/create/ord_mac04 O'Reilly Mac OS X Conference October 25-28, 2004 Westin Santa Clara, Santa Clara, CA http://conferences.oreilly.com/macosxcon/ ***Call for Participation: The MySQL Users Conference-- Proposals are due by November 1 >From embedded solutions to web-commerce and critical business applications, MySQL is everywhere--with more than five million active installations worldwide. To introduce new users to MySQL and help developers and IT professionals keep pace with the latest advancements, MySQL AB has teamed up with O'Reilly Media, Inc. to co-present the third annual MySQL Users Conference, scheduled for April 18-21, 2005, in Santa Clara, CA. For complete conference details visit: http://www.mysqluc.com Visit the submissions page for all the details on tracks and proposal guidelines--this year's theme is "MySQL Everywhere." Proposals are due no later than November 1, 2004. http://conferences.oreillynet.com/cs/mysqluc2005/create/e_sess ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***O'Reilly Now Distributes SitePoint Web Development Books We're now the exclusive distributor of SitePoint Pty. Ltd.'s books in North America, launching SitePoint books into the retail channel, providing direct sales, warehousing and shipping, plus direct marketing and PR support. Founded by Matt Mickiewicz and Mark Harbottle, SitePoint has enjoyed great success as one of the first online resources for web developers and designers. Today, 1.8 million visitors a month peruse their forums, articles, and blogs. The company launched their book publishing program in September 2001, has six popular titles in print, and is planning to double the number of in-print titles in the coming year. SitePoint books will be available in North American bookstores as early as October 2004. For a list of current and upcoming books, see: http://sitepoint.oreilly.com/ SitePoint's "Around the World" competition asked SitePoint book customers to submit photos of themselves with their favourite SitePoint book in exotic locales, with famous people or local landmarks. The top of Mt. Fuji, Acropolis, Equator, set of NBC News, and the Austrian Alps are just a few of the locations that SitePoint customers took pictures of with their books in order for a chance to win an Apple iPod. To view entries and winners, go to: http://www.sitepoint.com/competition/ipod_competition/ipod_win_21-09-04.php ***Hacking PayPal Here are two hacks designed to make PayPal more customer-friendly, profitable, and accountable, plus an additional hack to catch Instant Payment Notification (IPN) system errors. Get all the tools and details you need to make PayPal more profitable, more flexible, and more convenient from "PayPal Hacks." http://www.oreillynet.com/pub/a/javascript/excerpt/paypalhacks_chap1/index.html ***The New Bloglines Web Services Marc Hedlund takes a look at the new Bloglines Web Services APIs and their effect on the RSS/Atom landscape, and presents a complete, three-pane desktop RSS/Atom reader written in just 150 lines of code with the Groovy programming language. http://www.oreillynet.com/pub/a/network/2004/09/28/bloglines.html ***O'Reilly's New Magazine for Technology Projects--"Make" "Make" is due out in January 2005, is loaded with exciting projects that help you make the most of your technology at home and away from home. http://make.oreilly.com We've received many suggestions about how we can turn "Make" into a great magazine. But there's still time for you to give us your input. Here are some ways you can join us in the creation of this magazine: 1. The "Make" Workshop--Imagine somebody took all your tools away and handed you a $100 gift certificate that you could spend on hardware at your local big box hardware store. What are the essential things you'd buy? Now, up the price to $300--what would you outfit your workshop with? How about $750? 2. What Are You Using These Days?--In each issue we'll run reviews of stuff. We're interested in hearing about the things you already use and love. Tell us about your favorite new (or old!) tool, magazine, book, instructional video, gadget, web site, etc. in a 300-word email. If we decide to run it, we'll pay you. 3. Projects--Do you have an idea for a technology-related project? It doesn't matter if it's large or small. Tell us about it. If we like it, we'll ask you to write it. You can send email suggestions to marsee@oreilly.com and please include "Make Magazine" in the subject line field. --------------------- Digital Media --------------------- ***Move Beyond Amateur Filmmaking The jump from casual video recording to professional filmmaking requires more steps than many artists realize. Sonoma County filmmaker Susan Boyer walks you through the paces in this illuminating article. http://digitalmedia.oreilly.com/2004/09/29/filmmaking.html ***O'Reilly Digital Media Professionals Directory Check out our new nationwide directory of photographers, musicians, and filmmakers. Here's where you can browse our directory, find and rate professionals, and enter your own listings. You must be logged in with your O'Reilly account to create or rate listings. http://digitalmedia.oreilly.com/dir/index.csp --------------------- Open Source --------------------- ***Open Source Content Management with Plone Publishing web sites is easy for geeks. When you're tired of your users asking you to make tiny changes that they could easily handle themselves, it's time to consider a content management system (CMS). If you're a Python or Zope fan, you may have heard of Plone, a powerful and easy-to-use CMS. If not, let Brad Bollenbach convince you to give it a try. http://www.onlamp.com/pub/a/python/2004/09/23/plone_features.html ***FreeBSD Bag of Tricks Software junkies like Dru Lavigne always file away interesting new programs for their bag of tricks. In this installment of FreeBSD Basics, Dru demonstrates how to use usermin for easy webmail and reveals the convenience and glory of TheOpenCD. http://www.onlamp.com/pub/a/bsd/2004/09/24/FreeBSD_Basics.html ***Save 50% on Linux/Unix System Administration Online Courses O'Reilly is offering a 50% discount on the Linux/Unix Certification Series from their O'Reilly Learning Lab. Save nearly $1000 on these online courses--and earn a University of Illinois System Administration Certificate. Every class includes compelling, hands-on content, root access to a Linux server, an online coach, and a free O'Reilly book. Use the code ORALL1 to get your 50% discount. To enroll for the Learning Lab Linux/Unix Certification Series go to: http://oreilly.useractive.com/linuxa/ --------------------- Mac --------------------- ***Introduction to Quartz 2D for QuickDraw Programmers Apple is moving from QuickDraw to Quartz for the handling of 2D graphics in Mac OS X. Scott Thompson introduces you to the concepts behind Quartz 2D, and explains how to make the transition from QuickDraw. http://www.macdevcenter.com/pub/a/mac/2004/09/28/quartz.html ***Top Ten Tips for Mac OS X Con 2004 The upcoming O'Reilly Mac conference will be different than your typical tech gathering--requiring that you prepare differently, too. Program chair Derrick Story shares his top ten "getting ready" tips for this innovative event. http://www.macdevcenter.com/pub/a/mac/2004/09/24/conference_tips.html --------------------- Windows/.NET --------------------- ***Troubleshooting Printer Problems Not being able to print is rather annoying, for both users and the administrators who come to their aid. Mitch Tulloch shows you how to quickly troubleshoot and solve printing problems. http://www.windowsdevcenter.com/pub/a/windows/2004/09/28/printer_problems.html ***Master Pages in ASP.NET On many web sites, it is important to achieve a consistent "look and feel" as the user moves from page to page. While this was possible with .NET 1.1, it was difficult and required both programmer and designer discipline. ASP.NET 2.0 makes this far easier with the creation of master pages. Jesse Liberty shows you how master pages work in ASP.NET 2.0. http://www.ondotnet.com/pub/a/dotnet/2004/09/27/libertyonwhidbey.html --------------------- Java --------------------- ***Reporting Application Errors by Email Even if your application logs an error to a local file, the developer doesn't know there's a problem until a user notices it and sends the log file back. It can be more useful for apps to email their own error messages back. And as Sean C. Sullivan explains, it's not hard to do with either log4j or java.util.logging. http://www.onjava.com/pub/a/onjava/2004/09/29/smtp-logging.html ***Groovy, Java's New Scripting Language When experienced Java developers hear about Groovy, their first reaction is often, "Oh, no, not another scripting language for Java." Ian Darwin had the same reaction, until he took a good look at Groovy. Ian is the author of "Java Cookbook, 2nd Edition." http://www.onjava.com/pub/a/onjava/2004/09/29/groovy.html ================================================ O'Reilly User Group Wiki ================================================ Don't forget to check out the O'Reilly UG wiki to see what user groups across the globe are up to: http://wiki.oreillynet.com/usergroups/index.cgi Until next time-- Marsee From jtevans at kilnar.com Thu Oct 7 06:25:52 2004 From: jtevans at kilnar.com (John Evans) Date: Thu Oct 7 15:53:39 2004 Subject: [Pikes-peak-pm] Firing Off Child Processes Message-ID: Greetings, Things have been dead here for a while. Maybe I can liven stuff up with a problem that I'm puzzling over. I have several datafiles in a directory. I need to process each one, but the processing can take anywhere from a few seconds to fifteen minutes. I don't want the entire process waiting on a long one while shorter ones are in line to be done. I assume that I need to fire off a child process to handle the actual processing, but I'm not sure how to go about doing this. I thought fork() was the answer, but it appears (I may be missing something here, though) that fork() will only make a new copy of the current program. That's not what I'm looking for, but if fork() is the only option that I have, then I can make it work. Are there other ways of doing mutliple processes from a master process? -- John Evans http://jtevans.kilnar.com/ -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s++:- a- C+++>++++ ULSB++++$ P+++$ L++++$ E--- W++ N+ o? K? w O- M V PS+ !PE Y+ PGP t(--) 5-- X++(+++) R+++ tv+ b+++(++++) DI+++ D++>+++ G+ e h--- r+++ y+++ ------END GEEK CODE BLOCK------ From tph at acm.org Thu Oct 7 16:13:54 2004 From: tph at acm.org (Thomas Harrington) Date: Thu Oct 7 17:27:32 2004 Subject: [Pikes-peak-pm] Firing Off Child Processes In-Reply-To: References: Message-ID: On Oct 7, 2004, at 5:25 AM, John Evans wrote: > I have several datafiles in a directory. I need to process each one, > but > the processing can take anywhere from a few seconds to fifteen > minutes. I > don't want the entire process waiting on a long one while shorter ones > are > in line to be done. > > I assume that I need to fire off a child process to handle the actual > processing, but I'm not sure how to go about doing this. I thought > fork() > was the answer, but it appears (I may be missing something here, > though) > that fork() will only make a new copy of the current program. That's > not > what I'm looking for, but if fork() is the only option that I have, > then I > can make it work. I had to do something like this a couple of jobs ago-- where processing time could range from seconds to hours depending on the specific input. I found the quickest approach to be "make". The individual processes I needed to run all took an input file and generated an output file. So I wrote a Makefile to reflect how this was done. Then "make -j N" kept multiple copies of the script running in parallel until everything was done. No sense worrying about fork() or system() or a custom solution or whatever when make was already prepared to do the job for me. That's with GNU make, of course, I'm not certain if non-GNU makes have this feature. -- Tom Harrington tph@acm.org From timc+perl at divide.net Thu Oct 7 18:07:35 2004 From: timc+perl at divide.net (Tim Chambers) Date: Thu Oct 7 18:08:14 2004 Subject: [Pikes-peak-pm] Firing Off Child Processes Message-ID: <025501c4acc2$70ea1b40$0dedf044@CEPHAS> John Evans wrote: > ...if fork() is the only option that I have, then I can make it work. Yes, that's the only option for creating child processes. It's weird, but not so bad when you get used to it. I've used it a lot. There's plenty of documentation out there on how to do it. The key to remember is that fork returns the child pid to the parent and 0 to the child. That's how your program will know whether it's the parent copy or the child copy. The parent usually waits for the child to finish. The child does the work, often exec'ing a program. The parent can fork multiple children. Practice with smaller examples before tackling bigger, more complex ones to get used to what's going on. Write debug statements in the examples to convince yourself you understand the difference between the parent and the child. Here's a little example I whipped up. print "simple fork example\n"; our $pid; unless ($pid = fork) { # this block of code is the child print "child: sleeping 3 and printing again...\n"; sleep 3; print "child: now exiting\n"; exit 0; # always exit at the end of the child code block } print "parent: child PID=[$pid]; waiting\n"; our $ret = waitpid $pid, 0; print "parent: waitpid returned [$ret]\n"; Tom Harrington wrote: > Then "make -j N" kept multiple copies of the script running in parallel > until everything was done. No sense worrying about fork() ... Right. TMTOWTDI. Even if you don't have to use Perl to do it. :) <>< Tim From nagler at bivio.biz Fri Oct 8 09:35:54 2004 From: nagler at bivio.biz (Rob Nagler) Date: Fri Oct 8 14:57:38 2004 Subject: [Pikes-peak-pm] Firing Off Child Processes In-Reply-To: <025501c4acc2$70ea1b40$0dedf044@CEPHAS> References: <025501c4acc2$70ea1b40$0dedf044@CEPHAS> Message-ID: <16742.42442.815960.454406@gargle.gargle.HOWL> Tim Chambers writes: > Yes, that's the only option for creating child processes. You can also open(PROC, 'prog1 |'); which is an asynchronous, and you can use select to reap them. The value returned from open is the pid, btw. If you are doing a lot of process management (not something I recommend :-), you may want to check out POE. There are other packages for managing processes Perl, but this is the most complete, I think. I think "make" is a pretty good tool for batch-oriented process management, however. We've rolled our own, because we need to do things like manage load and monitor long running jobs. > Right. TMTOWTDI. Indeed. > Even if you don't have to use Perl to do it. :) Heresy! :) Rob