From mkenley at yahoo.com Thu Nov 2 14:45:31 2006 From: mkenley at yahoo.com (martin) Date: Thu, 2 Nov 2006 14:45:31 -0800 (PST) Subject: [sf-perl] job opening Message-ID: <20061102224532.49065.qmail@web51508.mail.yahoo.com> Please send resume's to Michelle Freeburn: freeburn at netapp.com Company: Network Appliance Job Title: Senior Test Automation Engineer Job Location: Corporate Headquarters ? Sunnyvale, CA Provide overall technical leadership for a team of test engineers responsible for delivering robust test automation for NetApp?s leading edge filer technology. This senior level position involves design and development of core infrastructure as well as driving standards for development of tests across all of QA. This individual will work closely with development to coordinate unit testing, QA system-level testing efforts and to improve the overall testability of the product. Also helps drive the test automation agenda forward within the organization and across the company. Essential Functions Technical Leadership for automation across the product. Works with QA and Development groups to develop automation processes and plans. Works with development to drive quality delivery and testability. Creates and publishes detailed test plans for automation. Designs, develops and maintains infrastructure and automated testsDrives execution of the automated testsCommunicate progress and escalate issues to management in a timely manner Mentors junior engineers. Requirements 7+ years of QASignificant knowledge of test automation and programming3-4 years of experience with Perl Demonstrated skills in QA tools/techniquesTrack record of technical leadership/mentoring skills in QAGood understanding of file Systems desired, storage background a plusDemonstrated ability to multitask in a dynamic environmentAbility to understand technical aspects of our products in sufficient detail to analyze results and debug problems in conjunction with Development. Proven track record working on products from inception to delivery. Strong communication, presentation, leadership and follow-up skillsAbility to own and drive a task to its completionExcellent team player. Ability to interact with cross-functional teams. From matt at cloudfactory.org Thu Nov 2 14:48:00 2006 From: matt at cloudfactory.org (Matthew Lanier) Date: Thu, 2 Nov 2006 14:48:00 -0800 (PST) Subject: [sf-perl] job opening In-Reply-To: <20061102224532.49065.qmail@web51508.mail.yahoo.com> References: <20061102224532.49065.qmail@web51508.mail.yahoo.com> Message-ID: hi folks- list grandma here, for job postings, please start the subject line with '[job]'. that allows those that don't care to screen them out. also, please include the company in the subject. otherwise, i think job postings are a-ok. thanks- m@ On Thu, 2 Nov 2006, martin wrote: > > > Please send resume's to Michelle Freeburn: freeburn at netapp.com > > > > > Company: Network Appliance > > > > Job Title: Senior Test Automation Engineer > > > > > > Job Location: Corporate > Headquarters ? Sunnyvale, CA > > > Provide overall technical leadership for a team of test engineers > responsible for delivering robust test automation for NetApp?s leading edge > filer technology. This senior level position involves design and > development of core infrastructure as well as driving standards for development > of tests across all of QA. This individual will work closely with development > to coordinate unit testing, QA system-level testing efforts and to improve the > overall testability of the product. Also > helps drive the test automation agenda forward within the organization and > across the company. > > > > > > Essential Functions > > > Technical Leadership for automation across the > product. Works with QA and Development groups to develop > automation processes and plans. Works with development to drive quality > delivery and testability. Creates and publishes detailed test plans for > automation. Designs, develops and maintains infrastructure > and automated testsDrives execution of the automated testsCommunicate > progress and escalate issues to management in a timely manner Mentors junior engineers. > > > > > Requirements > > > 7+ > years of QASignificant knowledge of test automation and > programming3-4 years of experience with Perl Demonstrated skills in QA tools/techniquesTrack record of technical leadership/mentoring > skills in QAGood understanding of file Systems desired, storage background a plusDemonstrated ability to multitask in a > dynamic environmentAbility to understand technical aspects of our > products in sufficient detail to analyze results and debug problems in > conjunction with Development. Proven track record working on products from > inception to delivery. Strong > communication, presentation, leadership and follow-up skillsAbility > to own and drive a task to its completionExcellent > team player. Ability to interact with cross-functional teams. > > > > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -- Matthew D. P. K. Strelchun-Lanier matt at cloudfactory.org how are you enjoying WWIII so far? From qw at sf.pm.org Thu Nov 2 16:23:40 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Thu, 2 Nov 2006 16:23:40 -0800 Subject: [sf-perl] job opening In-Reply-To: References: <20061102224532.49065.qmail@web51508.mail.yahoo.com> Message-ID: <20061103002340.GC53649@fu.funkspiel.org> On Thu, Nov 02, 2006 at 02:48:00PM -0800, Matthew Lanier wrote: > > hi folks- > > list grandma here, for job postings, please start the subject line with > '[job]'. that allows those that don't care to screen them out. also, > please include the company in the subject. This applies equally for Perl people seeking jobs (which make for perfectly acceptable posts). For instance: Subject: [job] Quinn Weaver available for contracts or Subject: [job] Quinn Weaver seeking full-time job Thanks! PS: For both job seekers and companies, please don't re-post often. Once per two months is acceptable. So far we haven't had any problems with this. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From vlb at cfcl.com Mon Nov 6 15:16:15 2006 From: vlb at cfcl.com (Vicki Brown) Date: Mon, 6 Nov 2006 15:16:15 -0800 Subject: [sf-perl] Any MySQL wizards looking for work? Message-ID: The company which currently employs me (in Sunnyvale) is seeking MySQL wizards. If you are one or know one, please reply off list. Thanks! -- - Vicki ZZZ zzZ San Francisco Bay Area, CA z |\ _,,,---,,_ Books, Cats, Tech zz /,`.-'`' -. ;-;;,_ http://cfcl.com/vlb |,4- ) )-,_. ,\ ( `'-' http://cfcl.com/vlb/weblog '---''(_/--' `-'\_) http://heatercats.com From qw at sf.pm.org Mon Nov 6 15:34:49 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Mon, 6 Nov 2006 15:34:49 -0800 Subject: [sf-perl] Any MySQL wizards looking for work? In-Reply-To: References: Message-ID: <20061106233449.GA3047@fu.funkspiel.org> Reminder: Please use the [job] preface in your Subject header. Natter natter natter, -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From Peter.Loo at source.wolterskluwer.com Wed Nov 8 09:48:11 2006 From: Peter.Loo at source.wolterskluwer.com (Loo, Peter # PHX) Date: Wed, 8 Nov 2006 10:48:11 -0700 Subject: [sf-perl] Spawning external program within Perl Message-ID: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> Hi, I was wondering if there is a built-in Perl module that would allow me to spawn an external program and not wait for it to complete. What I am attempting to do is, I am checking within a database for a condition and when the condition is met, I want to call an external Perl program. However, I don't want to wait for the external program to complete before moving on to my next step within my program. Thanks in advance. Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061108/b0fdf784/attachment.html From david at fetter.org Wed Nov 8 09:55:12 2006 From: david at fetter.org (David Fetter) Date: Wed, 8 Nov 2006 09:55:12 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> Message-ID: <20061108175512.GF21260@fetter.org> On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > Hi, > > I was wondering if there is a built-in Perl module that would allow me to > spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete before > moving on to my next step within my program. About ten seconds of searching with perldoc -q led me to perldoc -f exec What did you try before asking here? Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! From Peter.Loo at source.wolterskluwer.com Wed Nov 8 09:59:43 2006 From: Peter.Loo at source.wolterskluwer.com (Loo, Peter # PHX) Date: Wed, 8 Nov 2006 10:59:43 -0700 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <20061108175512.GF21260@fetter.org> Message-ID: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Hi David, I did try exec() and system(). However, exec() stops my calling program while system() waits for the called program to finish. Peter -----Original Message----- From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or g] On Behalf Of David Fetter Sent: Wednesday, November 08, 2006 10:55 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > Hi, > > I was wondering if there is a built-in Perl module that would allow me to > spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete before > moving on to my next step within my program. About ten seconds of searching with perldoc -q led me to perldoc -f exec What did you try before asking here? Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. From dave at wrightpopcorn.com Wed Nov 8 10:03:13 2006 From: dave at wrightpopcorn.com (Dave Turner) Date: Wed, 08 Nov 2006 10:03:13 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: <45521BE1.7040000@wrightpopcorn.com> I'm no expert on this, but have you tried looking at threads? I know from reading on Perl Monks that threads aren't that great under Windows, but it might do what you're trying to do. Loo, Peter # PHX wrote: > Hi David, > > I did try exec() and system(). However, exec() stops my calling program > while system() waits for the called program to finish. > > Peter > > -----Original Message----- > From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org > [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or > g] On Behalf Of David Fetter > Sent: Wednesday, November 08, 2006 10:55 AM > To: San Francisco Perl Mongers User Group > Subject: Re: [sf-perl] Spawning external program within Perl > > On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > >> Hi, >> >> I was wondering if there is a built-in Perl module that would allow >> > me to > >> spawn an external program and not wait for it to complete. What I >> > am > >> attempting to do is, I am checking within a database for a >> > condition and > >> when the condition is met, I want to call an external Perl >> > program. > >> However, I don't want to wait for the external program to complete >> > before > >> moving on to my next step within my program. >> > > About ten seconds of searching with perldoc -q led me to > > perldoc -f exec > > What did you try before asking here? > > Cheers, > D > -- > David Fetter http://fetter.org/ > phone: +1 415 235 3778 AIM: dfetter666 > Skype: davidfetter > > Remember to vote! > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > This E-mail message is for the sole use of the intended recipient(s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not > the intended recipient, please contact the sender by reply E-mail, and > destroy all copies of the original message. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061108/2687c675/attachment.html From asheesh at asheesh.org Wed Nov 8 10:03:21 2006 From: asheesh at asheesh.org (Asheesh Laroia) Date: Wed, 8 Nov 2006 13:03:21 -0500 (EST) Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: On Wed, 8 Nov 2006, Loo, Peter # PHX wrote: > Hi David, > > I did try exec() and system(). However, exec() stops my calling program > while system() waits for the called program to finish. If you do system("progname &");, is that satisfactory? Note the "&" I added; that asks the shell to background the job. -- Asheesh. -- Perilous to all of us are the devices of an art deeper than we ourselves possess. -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"] From friedman at highwire.stanford.edu Wed Nov 8 10:07:24 2006 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Wed, 8 Nov 2006 10:07:24 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: <54059FBB-0FA7-4865-9AD5-2B3AEFAA21F4@highwire.stanford.edu> Yeah, exec() terminates the current program in the process. What I've done in the past is fork() and then exec(). Something like: my $pid = fork(); unless (defined $pid) { # we're the child process exec(); } # we're the parent process, keep going # you can poll $pid to see how the child is doing, if you like That way your main program keeps going but the child can convert itself into the exec'd program. There are issues around certain shared resources and fork(), just so you know, so if you're doing anything more than just exec() in the child you should go read up about it and test. -- Mike On Nov 8, 2006, at 9:59 AM, Loo, Peter # PHX wrote: > > Hi David, > > I did try exec() and system(). However, exec() stops my calling > program > while system() waits for the called program to finish. > > Peter > > -----Original Message----- > From: sanfrancisco-pm-bounces > +peter.loo=source.wolterskluwer.com at pm.org > [mailto:sanfrancisco-pm-bounces > +peter.loo=source.wolterskluwer.com at pm.or > g] On Behalf Of David Fetter > Sent: Wednesday, November 08, 2006 10:55 AM > To: San Francisco Perl Mongers User Group > Subject: Re: [sf-perl] Spawning external program within Perl > > On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: >> >> Hi, >> >> I was wondering if there is a built-in Perl module that would >> allow > me to >> spawn an external program and not wait for it to complete. >> What I > am >> attempting to do is, I am checking within a database for a > condition and >> when the condition is met, I want to call an external Perl > program. >> However, I don't want to wait for the external program to complete > before >> moving on to my next step within my program. > > About ten seconds of searching with perldoc -q led me to > > perldoc -f exec > > What did you try before asking here? > > Cheers, > D > -- > David Fetter http://fetter.org/ > phone: +1 415 235 3778 AIM: dfetter666 > Skype: davidfetter > > Remember to vote! > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > This E-mail message is for the sole use of the intended recipient > (s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not > the intended recipient, please contact the sender by reply E-mail, and > destroy all copies of the original message. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From duane.obrien at gmail.com Wed Nov 8 10:08:58 2006 From: duane.obrien at gmail.com (Duane Obrien) Date: Wed, 8 Nov 2006 10:08:58 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> References: <20061108175512.GF21260@fetter.org> <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: I pulled my HAIR out over this exact issue. I have a cron that launched a perl script that check for a daemon and if it wasn't running it was supposed to start it. And I could see it starting the daemon and the daemon bailing as soon as the perl script was done running. That turned out to be a coincidence. The daemon was using a module that was calling a binary that wasn't in PATH for the user running cron. This may not help you. But if any of this process involves running as another user, make sure you've crossed your i's and dotted yout t's. On 11/8/06, Loo, Peter # PHX wrote: > > Hi David, > > I did try exec() and system(). However, exec() stops my calling program > while system() waits for the called program to finish. > > Peter > > -----Original Message----- > From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org > [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or > g] On Behalf Of David Fetter > Sent: Wednesday, November 08, 2006 10:55 AM > To: San Francisco Perl Mongers User Group > Subject: Re: [sf-perl] Spawning external program within Perl > > On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > > > Hi, > > > > I was wondering if there is a built-in Perl module that would allow > me to > > spawn an external program and not wait for it to complete. What I > am > > attempting to do is, I am checking within a database for a > condition and > > when the condition is met, I want to call an external Perl > program. > > However, I don't want to wait for the external program to complete > before > > moving on to my next step within my program. > > About ten seconds of searching with perldoc -q led me to > > perldoc -f exec > > What did you try before asking here? > > Cheers, > D > -- > David Fetter http://fetter.org/ > phone: +1 415 235 3778 AIM: dfetter666 > Skype: davidfetter > > Remember to vote! > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > This E-mail message is for the sole use of the intended recipient(s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not > the intended recipient, please contact the sender by reply E-mail, and > destroy all copies of the original message. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Don't ever tell anybody anything. If you do, you start missing everybody. From qw at sf.pm.org Wed Nov 8 10:16:00 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Wed, 8 Nov 2006 10:16:00 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> Message-ID: <20061108181600.GA21950@fu.funkspiel.org> Hey, Peter, Have you checked out the Perl Cookbook from O'Reilly? It answers a lot of the Perl newbie questions you've been posting. Most "recipes" offer several solutions to a problem, but all are concise and to the point. Includes code samples. Good stuff. It's not just for newbies, either. I've been writing Perl for five years, and I still reach for the Cookbook from time to time (mostly when I thinking, "I wonder _which_ CPAN module to use for this task?") -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From john at nhoj.com Wed Nov 8 10:26:03 2006 From: john at nhoj.com (John Markos O'Neill) Date: Wed, 8 Nov 2006 10:26:03 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <20061108181600.GA21950@fu.funkspiel.org> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> <20061108181600.GA21950@fu.funkspiel.org> Message-ID: Also, take a look at page 715 in the Camel Book, 3rd edition (description of the "fork" function). This contains a nice code snippet showing how to fork a clean child process and check for errors. Anyway, I would use essentially this code snippet, fork off a child process, and then continue doing what I was doing in the parent. That's how I've done what you describe in the past. John -- John Markos O'Neill john at nhoj.com From Jeff.Thalhammer at barclaysglobal.com Wed Nov 8 11:56:39 2006 From: Jeff.Thalhammer at barclaysglobal.com (Thalhammer, Jeffrey BGI SF) Date: Wed, 8 Nov 2006 11:56:39 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: <3A2096A63456DC469D46178CA9F8309F01497C7B@calnte2k035.insidelive.net> I've had success lately with Proc::Background. It's more portable and less arcane than using '&' in system calls. http://search.cpan.org/~bzajac/Proc-Background-1.08/lib/Proc/Background. pm -Jeff -----Original Message----- From: sanfrancisco-pm-bounces+jeff.thalhammer=barclaysglobal.com at pm.org [mailto:sanfrancisco-pm-bounces+jeff.thalhammer=barclaysglobal.com at pm.or g] On Behalf Of Loo, Peter # PHX Sent: Wednesday, November 08, 2006 10:00 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl Hi David, I did try exec() and system(). However, exec() stops my calling program while system() waits for the called program to finish. Peter -----Original Message----- From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or g] On Behalf Of David Fetter Sent: Wednesday, November 08, 2006 10:55 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > Hi, > > I was wondering if there is a built-in Perl module that would allow me to > spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete before > moving on to my next step within my program. About ten seconds of searching with perldoc -q led me to perldoc -f exec What did you try before asking here? Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- This message and any attachments are confidential, proprietary, and may be privileged. If this message was misdirected, Barclays Global Investors (BGI) does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BGI, unless the author is authorized by BGI to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BGI. Although BGI operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed. From Peter.Loo at source.wolterskluwer.com Wed Nov 8 12:02:21 2006 From: Peter.Loo at source.wolterskluwer.com (Loo, Peter # PHX) Date: Wed, 8 Nov 2006 13:02:21 -0700 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <3A2096A63456DC469D46178CA9F8309F01497C7B@calnte2k035.insidelive.net> Message-ID: <8E3D502A002DA04FADBDED4CB4D94D3A02437634@phxmail02.phx.ndchealth.com> Thank you all for your comments and advises. I will look into each and everyone and chose the best solution to satisfy my requirement. You guys are the best. Peter -----Original Message----- From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or g] On Behalf Of Thalhammer, Jeffrey BGI SF Sent: Wednesday, November 08, 2006 12:57 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl I've had success lately with Proc::Background. It's more portable and less arcane than using '&' in system calls. http://search.cpan.org/~bzajac/Proc-Background-1.08/lib/Proc/Background. pm -Jeff -----Original Message----- From: sanfrancisco-pm-bounces+jeff.thalhammer=barclaysglobal.com at pm.org [mailto:sanfrancisco-pm-bounces+jeff.thalhammer=barclaysglobal.com at pm.or g] On Behalf Of Loo, Peter # PHX Sent: Wednesday, November 08, 2006 10:00 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl Hi David, I did try exec() and system(). However, exec() stops my calling program while system() waits for the called program to finish. Peter -----Original Message----- From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or g] On Behalf Of David Fetter Sent: Wednesday, November 08, 2006 10:55 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] Spawning external program within Perl On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > Hi, > > I was wondering if there is a built-in Perl module that would allow me to > spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete before > moving on to my next step within my program. About ten seconds of searching with perldoc -q led me to perldoc -f exec What did you try before asking here? Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- This message and any attachments are confidential, proprietary, and may be privileged. If this message was misdirected, Barclays Global Investors (BGI) does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of BGI, unless the author is authorized by BGI to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by BGI. Although BGI operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. From doom at kzsu.stanford.edu Wed Nov 8 12:35:51 2006 From: doom at kzsu.stanford.edu (Joseph Brenner) Date: Wed, 08 Nov 2006 12:35:51 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <20061108175512.GF21260@fetter.org> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> <20061108175512.GF21260@fetter.org> Message-ID: <200611082035.kA8KZp9u068320@mail0.rawbw.com> David Fetter wrote: > Loo, Peter wrote: > > I was wondering if there is a built-in Perl module that would allow me to > > spawn an external program and not wait for it to complete. What I am > > attempting to do is, I am checking within a database for a condition and > > when the condition is met, I want to call an external Perl program. > > However, I don't want to wait for the external program to complete before > > moving on to my next step within my program. > > About ten seconds of searching with perldoc -q led me to > > perldoc -f exec But exec isn't what he needs if he doesn't want to wait for completion. The popular suggestion here of doing a manual "fork" is a good way of doing it (Perl Cookbook, 2nd ed. recipie 16.10), but it might be simpler to just open to a pipe (Perl Cookbook, 2nd ed. recipie 16.4). $pid = open $external, "|-", "program", "arguments" or die "Couldn't fork: $!\n"; print $external "Send this info to external program's STDIN\n"; close $external; Knowing which M to RTFM is always the trick, eh? perldoc perlopentut perldoc -f open perldoc perlfaq8 Checking my memory of how this works, I see that it's important to have an ampersand on the end of the "program" string if you don't want it to block. Just as an example, here's a script that simultaneously pops open three terminal windows ('rxvt') showing three different websites: #!/usr/bin/perl #show3lynx my @sites = qw( http://alterslash.org http://news.google.com http://perlmonks.org ); foreach my $url (@sites) { my $cmd = "rxvt -e lynx '$url' &"; open my $ext, "|-", $cmd or die "Couldn't fork: $!\n"; } -- (Hmm... bye bye Rummie.) From garth.webb at gmail.com Wed Nov 8 17:47:16 2006 From: garth.webb at gmail.com (Garth Webb) Date: Wed, 8 Nov 2006 17:47:16 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> References: <20061108175512.GF21260@fetter.org> <8E3D502A002DA04FADBDED4CB4D94D3A02437509@phxmail02.phx.ndchealth.com> Message-ID: If you just want to fire off a process, system() works just like the shell. If you want to put your command in the background to get control back, add a '&' to the end of the command. Garth On 11/8/06, Loo, Peter # PHX wrote: > > > Hi David, > > I did try exec() and system(). However, exec() stops my calling program > while system() waits for the called program to finish. > > Peter > > -----Original Message----- > From: sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.org > [mailto:sanfrancisco-pm-bounces+peter.loo=source.wolterskluwer.com at pm.or > g] On Behalf Of David Fetter > Sent: Wednesday, November 08, 2006 10:55 AM > To: San Francisco Perl Mongers User Group > Subject: Re: [sf-perl] Spawning external program within Perl > > On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > > > > Hi, > > > > I was wondering if there is a built-in Perl module that would allow > me to > > spawn an external program and not wait for it to complete. What I > am > > attempting to do is, I am checking within a database for a > condition and > > when the condition is met, I want to call an external Perl > program. > > However, I don't want to wait for the external program to complete > before > > moving on to my next step within my program. > > About ten seconds of searching with perldoc -q led me to > > perldoc -f exec > > What did you try before asking here? > > Cheers, > D > -- > David Fetter http://fetter.org/ > phone: +1 415 235 3778 AIM: dfetter666 > Skype: davidfetter > > Remember to vote! > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > > This E-mail message is for the sole use of the intended recipient(s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not > the intended recipient, please contact the sender by reply E-mail, and > destroy all copies of the original message. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061108/e4954e26/attachment.html From moseley at hank.org Wed Nov 8 19:01:51 2006 From: moseley at hank.org (Bill Moseley) Date: Wed, 8 Nov 2006 19:01:51 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> Message-ID: <20061109030151.GB15358@hank.org> On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > Hi, > > I was wondering if there is a built-in Perl module that would allow me > to spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete > before moving on to my next step within my program. Sorry if I missed this in my speed-mutting, but: perldoc perlipc is a good read. -- Bill Moseley moseley at hank.org From moseley at hank.org Wed Nov 8 19:01:51 2006 From: moseley at hank.org (Bill Moseley) Date: Wed, 8 Nov 2006 19:01:51 -0800 Subject: [sf-perl] Spawning external program within Perl In-Reply-To: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> References: <8E3D502A002DA04FADBDED4CB4D94D3A024374DF@phxmail02.phx.ndchealth.com> Message-ID: <20061109030151.GB15358@hank.org> On Wed, Nov 08, 2006 at 10:48:11AM -0700, Loo, Peter # PHX wrote: > Hi, > > I was wondering if there is a built-in Perl module that would allow me > to spawn an external program and not wait for it to complete. What I am > attempting to do is, I am checking within a database for a condition and > when the condition is met, I want to call an external Perl program. > However, I don't want to wait for the external program to complete > before moving on to my next step within my program. Sorry if I missed this in my speed-mutting, but: perldoc perlipc is a good read. -- Bill Moseley moseley at hank.org From qw at sf.pm.org Fri Nov 10 11:24:56 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Fri, 10 Nov 2006 11:24:56 -0800 Subject: [sf-perl] November 28: Steve Fink on the Metreon Game Message-ID: <20061110192456.GC45828@fu.funkspiel.org> You know that thing in the Metreon? The video game that's projected onto the floor, where you can run around and "kick" objects, and they bounce around? http://westfield.com/metreon/ Turns out it's written in Perl. Our own Steve Fink will talk about how he used XS and OpenGL to accomplish the task. This will be a highly technical talk. If time allows, we will visit the Metreon afterwards; it's right near BART. If not, we'll make that a field trip for a future meeting. BGI will once again be sponsoring Little Star pizza. :D Merci beaucoups to Steve for appearing out of nowhere and offering to do this talk! It should be a fun one. Details Time: 8:00 p.m. We will try to start on time, in a break with tradition ;) RSVP: Jeff.Thalhammer at barclaysglobal.com Date: November 28 (two weeks from Tuesday) Place: BGI, 45 Fremont St.: http://tinyurl.com/pzq9f Transportation details at http://sf.pm.org/weblog/archives/00000039.html -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From qw at sf.pm.org Sat Nov 11 11:27:40 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Sat, 11 Nov 2006 11:27:40 -0800 Subject: [sf-perl] November 28: Steve Fink on the Metreon Game In-Reply-To: <20061110192456.GC45828@fu.funkspiel.org> References: <20061110192456.GC45828@fu.funkspiel.org> Message-ID: <20061111192740.GA55720@fu.funkspiel.org> On Fri, Nov 10, 2006 at 11:24:56AM -0800, Quinn Weaver wrote: > If time allows, we will visit the Metreon afterwards; it's right near > BART. If not, we'll make that a field trip for a future meeting. Looks like this won't be necessary. Steve says: > I'll be > bringing in a portable system that people can play with. (An advantage of > being the one to develop the laptop version...) It doesn't really feel quite > the same, but it's a lot better than describing it verbally. Excellent. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From rdm at cfcl.com Mon Nov 13 12:08:56 2006 From: rdm at cfcl.com (Rich Morin) Date: Mon, 13 Nov 2006 12:08:56 -0800 Subject: [sf-perl] rack management software? Message-ID: I've started developing some web-based (RoR) software to manage relay racks. The software should make it easy to inventory racked equipment, tally the power consumption for each rack, etc. I'm hoping that youall may have some suggestions on the specific functions that the software should perform. If you know of existing software that performs similar or strongly-related functions, please tell me about it! Also, if you have a (smallish) rack installation which I can document (ideally, as a public example), let me know. The initial tables include: buildings contain rooms devices abstract units racks contain units rooms contain racks units device instances Once I have this in hand, I hope to add tables for: cables connect units circuits graphs of cables and units plugs attachment points for cables sockets attachment points for units -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From extasia at extasia.org Fri Nov 17 18:40:32 2006 From: extasia at extasia.org (David Alban) Date: Fri, 17 Nov 2006 18:40:32 -0800 Subject: [sf-perl] Getting the timezone Message-ID: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> Greetings, Assume I want to derive a string representing the local host's timezone. The string is of the form sNNNN where s is a plus or minus sign, and the N's are digits. E.g.: -0800 +0000 +0100 Assume I want to do this in "pure perl". That is, I don't want to use any modules that aren't in the core perl distibution. Assume you're not allowed to ask why. Can anyone see any reason not to do the following? Thanks, David use Time::Local; use constant SECONDS => 1; use constant MINUTES => 60 * SECONDS; use constant HOURS => 60 * MINUTES; use constant SECONDS_FIELD => 1; use constant MINUTES_FIELD => 1; use constant HOURS_FIELD => 2; use constant DAY_FIELD => 3; use constant MONTH_FIELD => 4; use constant YEAR_FIELD => 5; sub time_zone { my $time = time; my ( $local_year, $local_month, $local_day, $local_hours, $local_minutes, $local_seconds, ) = ( localtime $time )[ YEAR_FIELD, MONTH_FIELD, DAY_FIELD, HOURS_FIELD, MINUTES_FIELD, SECONDS_FIELD, ]; my ( $gm_year, $gm_month, $gm_day, $gm_hours, $gm_minutes, $gm_seconds, ) = ( gmtime $time )[ YEAR_FIELD, MONTH_FIELD, DAY_FIELD, HOURS_FIELD, MINUTES_FIELD, SECONDS_FIELD, ]; my $seconds_local = timelocal( $local_seconds, $local_minutes, $local_hours, $local_day, $local_month, $local_year, ); my $seconds_gm = timelocal( $gm_seconds, $gm_minutes, $gm_hours, $gm_day, $gm_month, $gm_year, ); my $difference = $seconds_local - $seconds_gm; $difference > 24 * HOURS and return sprintf "+????"; my $sign = $difference < 0 ? "-" : "+"; $difference = abs $difference; my $hours_offset = int ( $difference / HOURS ); my $minutes_offset = int ( $difference % HOURS ); sprintf "%s%02d%02d", $sign, $hours_offset, $minutes_offset; } # time_zone -- Live in a world of your own, but always welcome visitors. From friedman at highwire.stanford.edu Fri Nov 17 21:39:28 2006 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Fri, 17 Nov 2006 21:39:28 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> Message-ID: <40EEFFF4-C7D6-411A-800D-FB6E1831F013@highwire.stanford.edu> Well, now that you've got us all curious as to why you can't use modules... You forgot to divide $difference by 60 to get minutes, but other than that this should be OK. Not the easiest way, I'm sure, but it should work. You realize that you are assuming that the server already knows what timezone it's in. If it didn't, it would (probably) give you the same value for gmtime as localtime. And if the server is at all unix-like, you can get that timezone as $ENV{TZ} formatted as readable text or system('date +%z'); which even formats it in RFC-2822 format like you want it. (The system call will definitely be slower, but also smaller and more readable.) -- Mike On Nov 17, 2006, at 6:40 PM, David Alban wrote: > Greetings, > > Assume I want to derive a string representing the local host's > timezone. The string is of the form sNNNN where s is a plus or minus > sign, and the N's are digits. E.g.: > > -0800 > +0000 > +0100 > > Assume I want to do this in "pure perl". That is, I don't want to use > any modules that aren't in the core perl distibution. Assume you're > not allowed to ask why. > > Can anyone see any reason not to do the following? > > Thanks, > David > > use Time::Local; > > use constant SECONDS => 1; > use constant MINUTES => 60 * SECONDS; > use constant HOURS => 60 * MINUTES; > > use constant SECONDS_FIELD => 1; > use constant MINUTES_FIELD => 1; > use constant HOURS_FIELD => 2; > use constant DAY_FIELD => 3; > use constant MONTH_FIELD => 4; > use constant YEAR_FIELD => 5; > > sub time_zone { > my $time = time; > > my ( $local_year, > $local_month, > $local_day, > $local_hours, > $local_minutes, > $local_seconds, > ) = ( localtime $time )[ YEAR_FIELD, > MONTH_FIELD, > DAY_FIELD, > HOURS_FIELD, > MINUTES_FIELD, > SECONDS_FIELD, > ]; > > my ( $gm_year, > $gm_month, > $gm_day, > $gm_hours, > $gm_minutes, > $gm_seconds, > ) = ( gmtime $time )[ YEAR_FIELD, > MONTH_FIELD, > DAY_FIELD, > HOURS_FIELD, > MINUTES_FIELD, > SECONDS_FIELD, > ]; > > my $seconds_local = timelocal( $local_seconds, > $local_minutes, > $local_hours, > $local_day, > $local_month, > $local_year, > ); > > my $seconds_gm = timelocal( $gm_seconds, > $gm_minutes, > $gm_hours, > $gm_day, > $gm_month, > $gm_year, > ); > > my $difference = $seconds_local - $seconds_gm; > > $difference > 24 * HOURS and return sprintf "+????"; > > my $sign = $difference < 0 ? "-" : "+"; > > $difference = abs $difference; > > my $hours_offset = int ( $difference / HOURS ); > my $minutes_offset = int ( $difference % HOURS ); > > sprintf "%s%02d%02d", $sign, $hours_offset, $minutes_offset; > } # time_zone > > > -- > Live in a world of your own, but always welcome visitors. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm --------------------------------------------------------------------- Michael Friedman HighWire Press Phone: 650-725-1974 Stanford University FAX: 270-721-8034 --------------------------------------------------------------------- From miyagawa at gmail.com Fri Nov 17 22:43:05 2006 From: miyagawa at gmail.com (Tatsuhiko Miyagawa) Date: Fri, 17 Nov 2006 22:43:05 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> Message-ID: <693254b90611172243h4ef98ed6x2514fee35c7d5b8d@mail.gmail.com> On 11/17/06, David Alban wrote: > use Time::Local; > > use constant SECONDS_FIELD => 1; > use constant MINUTES_FIELD => 1; > use constant HOURS_FIELD => 2; > use constant DAY_FIELD => 3; > use constant MONTH_FIELD => 4; > use constant YEAR_FIELD => 5; > > sub time_zone { > my $time = time; > > my ( $local_year, > $local_month, > $local_day, > $local_hours, > $local_minutes, > $local_seconds, > ) = ( localtime $time )[ YEAR_FIELD, > MONTH_FIELD, > DAY_FIELD, > HOURS_FIELD, > MINUTES_FIELD, > SECONDS_FIELD, > ]; > > my ( $gm_year, > $gm_month, > $gm_day, > $gm_hours, > $gm_minutes, > $gm_seconds, > ) = ( gmtime $time )[ YEAR_FIELD, > MONTH_FIELD, > DAY_FIELD, > HOURS_FIELD, > MINUTES_FIELD, > SECONDS_FIELD, > ]; > > my $seconds_local = timelocal( $local_seconds, > $local_minutes, > $local_hours, > $local_day, > $local_month, > $local_year, > ); > > my $seconds_gm = timelocal( $gm_seconds, > $gm_minutes, > $gm_hours, > $gm_day, > $gm_month, > $gm_year, > ); > > my $difference = $seconds_local - $seconds_gm; This could've been just as simplified as: my $time = time; my $difference = timelocal(localtime($time)) - timelocal(gmtime($time)); -- Tatsuhiko Miyagawa From sphink at gmail.com Sat Nov 18 15:12:12 2006 From: sphink at gmail.com (Steve Fink) Date: Sat, 18 Nov 2006 15:12:12 -0800 Subject: [sf-perl] November 28: Steve Fink on the Metreon Game In-Reply-To: <20061110192456.GC45828@fu.funkspiel.org> References: <20061110192456.GC45828@fu.funkspiel.org> Message-ID: <7d7f2e8c0611181512p6f0b87b4u2f744eee8c9c0053@mail.gmail.com> On 11/10/06, Quinn Weaver wrote: > > You know that thing in the Metreon? The video game that's projected > onto the floor, where you can run around and "kick" objects, and they > bounce around? http://westfield.com/metreon/ > > Turns out it's written in Perl. Our own Steve Fink will talk > about how he used XS and OpenGL to accomplish the task. This will be > a highly technical talk. To clarify: the system is not really "written in Perl". It is written in C++, but both extends and embeds Perl as a scripting language for advanced functionality (or, not uncommonly, working around bugs in the built-in functionality of the last release!) I did it in such a way that you *could* implement almost anything in Perl that you could in the C++ code, although in practice we limit our use of Perl to areas where scripting is just a much better fit (complex behavior, integration with external services, prototyping). Most of my talk will not be directly related to the Reactrix system, however. Instead, I'll be focusing on using Inline::CPP to extend Perl (though most of what I say will apply equally well to Inline::C, which is in general a safer bet.) I'll describe how to do it with a simple example in hopefully enough detail that you can use it for any wacky ideas you might have, then move on to talking about all the bumps I needed to smooth over when using this stuff in production (example: we have a couple of hundred systems installed across the country in places like malls and movie theaters, and for security and predictable maintainability, we'd really prefer for it to not be compiling C++ code at runtime! Minimizing the number of modules and devel libraries that need to be installed is also good.) If I had no sense of taste whatsoever, I might title the talk "Perl Extending and Embedding With a Production-Ready Inline Development Environment". But I am not quite sick enough -- "PEE With PRIDE" goes a little too far. At the end, I'll talk some about how this stuff is used specifically in the Reactrix system, and you can feel free to ask whatever questions you have. I felt like Inline::CPP and the Reactrix Effects Engine were really (at least) a complete talk each, so I didn't want to squish them together. The Reactrix stuff is sexier, but I thought Inline::CPP might be applicable to more people. If you guys aren't sick of the sound of my voice, I might do the Reactrix Effects Engine talk sometime later (basically, using Perl to implement real-time camera-driven reactive user experiences, or something like that). Or at least, that's the plan. I haven't done either talk before, nor completely finished planning this one out. If anyone has any opinions of what they'd like to see covered (all of Inline, Inline::CPP, XS, etc. are open, though I'm not exactly the expert on any of them), please let me know. Or if you don't care about Inline or XS, and just want to hear about pretty graphical things, let me know that too, before I bore the wits out of you. Links: Inline::CPP: http://search.cpan.org/~neilw/Inline-CPP-0.25/lib/Inline/CPP.pod Reactrix's (not so interesting) web site: http://www.reactrix.com In my opinion, the best YouTube video showing the system: http://www.youtube.com/watch?v=w6d48ksCpc8 (you can search for 'reactrix' for a few more) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061118/826d847b/attachment.html From extasia at extasia.org Mon Nov 20 07:37:25 2006 From: extasia at extasia.org (David Alban) Date: Mon, 20 Nov 2006 07:37:25 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <693254b90611172243h4ef98ed6x2514fee35c7d5b8d@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <693254b90611172243h4ef98ed6x2514fee35c7d5b8d@mail.gmail.com> Message-ID: <4c714a9c0611200737q22a7f4f4hff961d971d238e88@mail.gmail.com> Excellent. Thanks. On 11/17/06, Tatsuhiko Miyagawa wrote: > This could've been just as simplified as: > > my $time = time; > my $difference = timelocal(localtime($time)) - timelocal(gmtime($time)); -- Live in a world of your own, but always welcome visitors. From david at fetter.org Mon Nov 20 08:20:33 2006 From: david at fetter.org (David Fetter) Date: Mon, 20 Nov 2006 08:20:33 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <4c714a9c0611200737q22a7f4f4hff961d971d238e88@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <693254b90611172243h4ef98ed6x2514fee35c7d5b8d@mail.gmail.com> <4c714a9c0611200737q22a7f4f4hff961d971d238e88@mail.gmail.com> Message-ID: <20061120162033.GJ17706@fetter.org> On Mon, Nov 20, 2006 at 07:37:25AM -0800, David Alban wrote: > Excellent. Thanks. That'll get the offset from UTC, but it doesn't tell you much about the time zone. If the offset from UTC is all you need here, you're good. :) Cheers, D (who's been experiencing an unusual number of time zone changes lately) -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! From extasia at extasia.org Mon Nov 20 09:41:03 2006 From: extasia at extasia.org (David Alban) Date: Mon, 20 Nov 2006 09:41:03 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <20061120162033.GJ17706@fetter.org> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <693254b90611172243h4ef98ed6x2514fee35c7d5b8d@mail.gmail.com> <4c714a9c0611200737q22a7f4f4hff961d971d238e88@mail.gmail.com> <20061120162033.GJ17706@fetter.org> Message-ID: <4c714a9c0611200941l31d23488tc4ac40b38d9f4bcb@mail.gmail.com> Indeed. The offset is what I want. On 11/20/06, David Fetter wrote: > That'll get the offset from UTC, but it doesn't tell you much about > the time zone. If the offset from UTC is all you need here, you're > good. :) > D (who's been experiencing an unusual number of time zone changes > lately) -- Live in a world of your own, but always welcome visitors. From extasia at extasia.org Mon Nov 20 07:36:25 2006 From: extasia at extasia.org (David Alban) Date: Mon, 20 Nov 2006 07:36:25 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <40EEFFF4-C7D6-411A-800D-FB6E1831F013@highwire.stanford.edu> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <40EEFFF4-C7D6-411A-800D-FB6E1831F013@highwire.stanford.edu> Message-ID: <4c714a9c0611200736o1224f380r1b4dcaeca72afe16@mail.gmail.com> On 11/17/06, Michael Friedman wrote: > Well, now that you've got us all curious as to why you can't use > modules... I'm writing a module and, at this moment in time, I want it not to have dependencies other than core perl itself. ("Core perl" would have been a better phrase to have used than "pure perl".) I may need to deploy it at work on systems on which I don't have root, and I want using it to be as simple as: use lib "/path/approriate/to/my/module"; use my::module; where /path/appropriate/to/my/module can be a non-system location. > You forgot to divide $difference by 60 to get minutes, but other than > that this should be OK. Not the easiest way, I'm sure, but it should > work. Doh! Thanks. > You realize that you are assuming that the server already knows what > timezone it's in. If it didn't, it would (probably) give you the same > value for gmtime as localtime. My module will be noting the time at which events occur. It doesn't matter to me in which time zone the machine is, as long as the timestamps I'm using to record events indicate the correct time zone. If I get the same value for gmtime as localtime, no problem, the time zone of the timestamps will be +0000. I'm trying to get around the ambiguity of timestamps that don't include the time zone. Most of the time you might get away with assuming the time zone is your geographic area's time zone. But you can't depend on it. At one of my gigs, Central Time was the standard on our machines rather than Pacific Time. At the current gig, GMT is the standard. Why don't I just assume all times are GMT? Someone could forget to configure the machine to GMT. Someone could accidentally set it to some other random time zone. My module will call the time zone routine when it starts, and will cache the value. Subsequent calls to the routine will check for, and use any cached value in favor of computing the offset again. > And if the server is at all unix-like, > you can get that timezone as > $ENV{TZ} Setting this variable will indeed have the effect of setting the time zone. But you can't rely on it being set. On a fedora box and on an os x box, TZ is unset. Even if it was, I'd still need to convert from something like PST8PDT to -0800. I'd rather not try to generate a table for all symbolic representations of time zones. My module could explicitly set the timezone, but I want to generate timestamps in the timezone of the host, whatever it may be, rather than hard coding a time zone. And if I let the user choose a time zone, I want to have a default in case the user chooses not to choose. The time zone setting of the current host would be that time zone. > formatted as readable text or > system('date +%z'); > > which even formats it in RFC-2822 format like you want it. Yes, this is indeed the format I want. However, I don't want to spawn a shell and add an extra process. I generally don't like using system() or qx{} if I can avoid doing so. > (The system call will definitely be slower, but also smaller and more > readable.) I usually comment my code quite well. My bad for sending uncommented and only minimally tested code to the list. In my defense, it was a Friday evening and I wanted to go home. :-) Besides, Tatsuhiko's post shows how I can simplify some unnecessarily complicated code. -- Live in a world of your own, but always welcome visitors. From sphink at gmail.com Mon Nov 20 16:30:10 2006 From: sphink at gmail.com (Steve Fink) Date: Mon, 20 Nov 2006 16:30:10 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <4c714a9c0611200736o1224f380r1b4dcaeca72afe16@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <40EEFFF4-C7D6-411A-800D-FB6E1831F013@highwire.stanford.edu> <4c714a9c0611200736o1224f380r1b4dcaeca72afe16@mail.gmail.com> Message-ID: <7d7f2e8c0611201630g3d588871va193bc71a9b06814@mail.gmail.com> On 11/20/06, David Alban wrote: > > On 11/17/06, Michael Friedman wrote: > > formatted as readable text or > > system('date +%z'); > > > > which even formats it in RFC-2822 format like you want it. > > Yes, this is indeed the format I want. However, I don't want to spawn > a shell and add an extra process. I generally don't like using > system() or qx{} if I can avoid doing so. use POSIX qw(strftime); my $offset = strftime("%z", localtime); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061120/713bedc4/attachment.html From extasia at extasia.org Mon Nov 20 17:06:00 2006 From: extasia at extasia.org (David Alban) Date: Mon, 20 Nov 2006 17:06:00 -0800 Subject: [sf-perl] Getting the timezone In-Reply-To: <7d7f2e8c0611201630g3d588871va193bc71a9b06814@mail.gmail.com> References: <4c714a9c0611171840o6f3121b9ic96fca342e32e7fb@mail.gmail.com> <40EEFFF4-C7D6-411A-800D-FB6E1831F013@highwire.stanford.edu> <4c714a9c0611200736o1224f380r1b4dcaeca72afe16@mail.gmail.com> <7d7f2e8c0611201630g3d588871va193bc71a9b06814@mail.gmail.com> Message-ID: <4c714a9c0611201706t6460f47i5a7c1ca8187bb7b1@mail.gmail.com> Humbled and stoked at the same time. Thank you. This kicks ass. On 11/20/06, Steve Fink wrote: > use POSIX qw(strftime); > my $offset = strftime("%z", localtime); -- Live in a world of your own, but always welcome visitors. From extasia at extasia.org Tue Nov 21 13:51:43 2006 From: extasia at extasia.org (David Alban) Date: Tue, 21 Nov 2006 13:51:43 -0800 Subject: [sf-perl] Fwd: Review: Perl Hacks In-Reply-To: <45636AF2.8060706@dave.org.uk> References: <45636AF2.8060706@dave.org.uk> Message-ID: <4c714a9c0611211351o7f700af3t88b068a478af1f64@mail.gmail.com> ---------- Forwarded message ---------- From: Dave Cross Date: Nov 21, 2006 1:09 PM Subject: Review: Perl Hacks To: "London.pm Perl M[ou]ngers" (Feel free to publish on the web site) Perl Hacks Author(s): chromatic with Damian Conway and Curtis "Ovid" Poe Publisher: O'Reilly (2006) ISBN: 0596526741 Reviewer: Dave Cross To be completely honest, this isn't the book I thought it was going to be. Most O'Reilly Hacks books start off pretty simply and in a few chapters take you to the further reaches of their subject area. Whilst this is a great way to quickly get a good taste of a particular topic, it has the occasional disadvantage that for subjects that you know well, the first couple of chapters can seem a bit basic. As I know Perl pretty well, I thought I would be on familiar ground for at least half of the book. I was wrong. Oh, it started off easily enough. Making use of various browser and command line tools to get easy access to Perl documentation, creating some useful shell aliases to cut down typing for your most common tasks. "Oh yes", I thought smugly to myself, "I know all that". But by about Hack 5 I was reading about little tweaks that I didn't know about. I'd start a hack thinking that I knew everything that the authors were going to cover and end up frustrated that I was on the tube and couldn't immediately try out the new trick I had just learnt. It's really that kind of book. Pretty much everyone who reads it will pick up something that will it easier for them to get their job done (well, assuming that their job involves writing Perl code!) And, of course, looking at the list of authors, that's only to be expected. The three authors listed on the cover are three of the Perl communities most respected members. And the list of other contributers reads like a who's who of people who are doing interesting things with Perl - people whose use.perl journals are always interesting or whose posts on Perl Monks are worth reading before other people's. Luckily, it turns out that all these excellent programmers can also explain what they are doing (and why they are doing it) very clearly. Like all books in the Hacks series, it's a little bitty. The hacks are organised into nine broad chapters, but the connections between hacks in the same chapter can sometimes be a bit hard to see. But I enjoyed that. In places it made the book a bit of a rollercoaster ride. You're never quite sure what is coming next, but you know it's going to be fun. In fact, the more I think about it, the more apt the fairground analogy seems. When you ask Perl programmers what they like about Perl, you'll often hear "fun" mentioned near the top of the list. People use Perl because they enjoy it. And the authors' enjoyment of Perl really comes through in the book. It's obvious that they really wanted to show people the things that they thought were really cool. Although I did learn useful tips from the earlier part of the book, it was really the last three chapters that were the most useful for me. Chapter 7, Developer Tricks, had a lot of useful things to say about testing, Chapter 8, Know Thy Code, contains a lot of information on using Perl to examine your Perl code and Chapter 9, Expand Your Perl Foo was a grab-bag of obscure (but still useful) Perl tricks. So where does this book fit in to O'Reilly's Perl canon? I can't recommend it for beginners. But if you're a working Perl programmer with a couple of years' experience then I'd be very surprised if you didn't pick up something that will be useful to you. And don't worry about it overlapping with other books in your Perl library - offhand I can't think of anything in the book that has been covered in any previous Perl book. All in all, this would make a very useful addition to your Perl library. From qw at sf.pm.org Sun Nov 26 23:35:24 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Sun, 26 Nov 2006 23:35:24 -0800 Subject: [sf-perl] Reminder: Steve's video talk this Tuesday Message-ID: <20061127073524.GA5276@fu.funkspiel.org> Happy post-Thanksgiving, Reminder: we're meeting this Tuesday, November 28. Steve Fink will discuss the VR video game in the Metreon and how his company used Perl in writing it. He's bringing a demo system! He'll project it on the floor and we'll run around "kicking" stuff. Please don't get any pizza on it. ;) This should be a highly technical talk. Topics covered include XS, embedded Perl, and OpenGL. BGI will once again be sponsoring Little Star pizza. RSVP to be included: Jeff.Thalhammer at barclaysglobal.com. Location and transportation details are at http://sf.pm.org/weblog. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From rdm at cfcl.com Tue Nov 28 07:59:56 2006 From: rdm at cfcl.com (Rich Morin) Date: Tue, 28 Nov 2006 07:59:56 -0800 Subject: [sf-perl] port/protocol list for firewalls? Message-ID: Can someone supply a link to a definitive list of the ports and protocols that need to be forwarded for assorted services? I know about the Wikipedia page http://en.wikipedia.org/wiki/Port_number and the IANA list http://www.iana.org/assignments/port-numbers Unfortunately, they disagree in spots, so it's not clear to me which ports/protocols I need to forward in my router. For example, I currently have {20,21}/{tcp,udp} open for FTP, but I dunno if this is necessary... -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From extasia at extasia.org Tue Nov 28 09:16:03 2006 From: extasia at extasia.org (David Alban) Date: Tue, 28 Nov 2006 09:16:03 -0800 Subject: [sf-perl] port/protocol list for firewalls? In-Reply-To: References: Message-ID: <4c714a9c0611280916r2348d9e8u7b0a96b75e594e4e@mail.gmail.com> I deny everything inbound that's not ESTABLISHED or RELATED. And I started out by allowing only a tiny set of outbound ports. Over time, when I came across something I needed to work but didn't, I then temporarily expanded the set of open outbond ports. Permanently, if it was important or made sense to do so. But I don't know your context, so I don't know if this is useful information. P.S. You've checked out RFC 1700, right? On 11/28/06, Rich Morin wrote: > Can someone supply a link to a definitive list of the ports > and protocols that need to be forwarded for assorted services? > > I know about the Wikipedia page > > http://en.wikipedia.org/wiki/Port_number > > and the IANA list > > http://www.iana.org/assignments/port-numbers > > Unfortunately, they disagree in spots, so it's not clear to > me which ports/protocols I need to forward in my router. For > example, I currently have {20,21}/{tcp,udp} open for FTP, but > I dunno if this is necessary... -- Live in a world of your own, but always welcome visitors. From david.davis at gmail.com Tue Nov 28 13:41:41 2006 From: david.davis at gmail.com (David Davis) Date: Tue, 28 Nov 2006 13:41:41 -0800 Subject: [sf-perl] Reminder: Steve's video talk this Tuesday In-Reply-To: <20061127073524.GA5276@fu.funkspiel.org> References: <20061127073524.GA5276@fu.funkspiel.org> Message-ID: <89f5393a0611281341l3567565naec3075a161c9826@mail.gmail.com> Looks like the sf.pm.org site is down. Ping's ok though. David On 11/26/06, Quinn Weaver wrote: > > Happy post-Thanksgiving, > > Reminder: we're meeting this Tuesday, November 28. Steve Fink will > discuss the VR video game in the Metreon and how his company used Perl > in writing it. He's bringing a demo system! He'll project it on the > floor and we'll run around "kicking" stuff. Please don't get any > pizza on it. ;) > > This should be a highly technical talk. Topics covered include XS, > embedded Perl, and OpenGL. > > BGI will once again be sponsoring Little Star pizza. RSVP to be > included: Jeff.Thalhammer at barclaysglobal.com. > > Location and transportation details are at http://sf.pm.org/weblog. > > -- > qw (Quinn Weaver); #President, San Francisco Perl Mongers > =for information, visit http://sf.pm.org/weblog =cut > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20061128/881fda73/attachment.html From qw at sf.pm.org Tue Nov 28 17:06:18 2006 From: qw at sf.pm.org (Quinn Weaver) Date: Tue, 28 Nov 2006 17:06:18 -0800 Subject: [sf-perl] Reminder: Steve's video talk this Tuesday In-Reply-To: <89f5393a0611281341l3567565naec3075a161c9826@mail.gmail.com> References: <20061127073524.GA5276@fu.funkspiel.org> <89f5393a0611281341l3567565naec3075a161c9826@mail.gmail.com> Message-ID: <20061129010618.GA22642@fu.funkspiel.org> On Tue, Nov 28, 2006 at 01:41:41PM -0800, David Davis wrote: > Looks like the sf.pm.org site is down. Ping's ok though. > > David Thanks for the note! CFCL.com, our hosting donor, has been having some problems. We thought they were resolved. In the meantime, here are the time and place details: RSVP: Jeff.Thalhammer at barclaysglobal.com Time: 8:00 p.m. We will try to start on time, in a break with tradition ;) Date: November 28 (two weeks from Tuesday) Place: BGI, 45 Fremont St.: http://tinyurl.com/pzq9f From BART: Get off at the Embarcadero station. Take the Beale Street exit. Turn right on Fremont, which is in the same block as the BART station, and proceed one half-block to 45 Fremont. Parking: There are several outdoor pay lots nearby. The closest is on Fremont, just south of our location. You must approach it from the south, because Fremont is a one-way street (the lot is then on your left side). From Caltrain: I believe you can catch the N from the station at Fourth and King, then get off downtown. I'm not sure about this, though. Best to ask at the station. Don't forget to get back to the station in time for the last southbound train, which leaves annoyingly early. -- qw (Quinn Weaver); #President, San Francisco Perl Mongers =for information, visit http://sf.pm.org/weblog =cut From george at metaart.org Tue Nov 28 17:45:29 2006 From: george at metaart.org (George Woolley) Date: Tue, 28 Nov 2006 17:45:29 -0800 Subject: [sf-perl] Reminder: Steve's video talk this Tuesday > Site Down In-Reply-To: <89f5393a0611281341l3567565naec3075a161c9826@mail.gmail.com> References: <20061127073524.GA5276@fu.funkspiel.org> <89f5393a0611281341l3567565naec3075a161c9826@mail.gmail.com> Message-ID: <200611281745.29834.george@metaart.org> Well, it's a few hours later, and I can't access the site with my browser. traceroute fails too. ping works, to some extent, for me too, however, I notice two things: * There is often some (4-50%) packet loss. * The times vary a lot (i.e. from 169 ms to 699 ms). George On Tuesday 28 November 2006 13:41, David Davis wrote: > Looks like the sf.pm.org site is down. Ping's ok though. > > David ...