From bmathis at directedge.com Thu Jun 3 23:13:24 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Producing Commented Source Code from Spreadsheets with XL2E Message-ID: <37575264.7E0672C9@directedge.com> Bod Rhode's paper on "Producing Commented Source Code from Spreadsheets with XL2E", on which he will be speaking at the next Rochester.PM meeting is now linked on the web site, http://rochester.pm.org. The page itself is at: http://rochester.pm.org/XL2E_YAPC_Talk.htm Brian Mathis Rochester.PM From bmathis at directedge.com Fri Jun 4 08:20:59 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Producing Commented Source Code from Spreadsheets with XL2E In-Reply-To: <37575264.7E0672C9@directedge.com> Message-ID: Sorry, BOB Rhode.. it was late, I was tired.. On Fri, 4 Jun 1999, Brian Mathis wrote: > Bod Rhode's paper on "Producing Commented Source Code from Spreadsheets > with XL2E", on which he will be speaking at the next Rochester.PM > meeting is now linked on the web site, http://rochester.pm.org. > > The page itself is at: > http://rochester.pm.org/XL2E_YAPC_Talk.htm > > Brian Mathis > Rochester.PM > From bmathis at directedge.com Sun Jun 13 18:49:38 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Meeting reminder Message-ID: <37644392.2BD44A79@directedge.com> Just a reminder, our next meeting is this Wednesday, 8pm, in an upstairs room at Boldo's Armory. Bob Rhode will be giving a talk on Extracting C Source from Excel files. Details and preliminary are available at the web site: http://rochester.pm.org. Hope to see you there! Brian Mathis Rochester.PM From havoc at eznet.net Wed Jun 16 13:01:32 1999 From: havoc at eznet.net (Pat) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Meeting reminder In-Reply-To: <37644392.2BD44A79@directedge.com>; from Brian Mathis on Sun, Jun 13, 1999 at 07:49:38PM -0400 References: <37644392.2BD44A79@directedge.com> Message-ID: <19990616140132.A26163@shell1.eznet.net> Hello, I regret that I will be unable to attend this meeting. A softball game is scheduled and we have had several injuries such that I can't skip the night (as I did last month). I hope everyone has a good time, and I'll see you all next month. --Patrick Ludwig On Sun, Jun 13, 1999 at 07:49:38PM -0400, Brian Mathis wrote: > Just a reminder, our next meeting is this Wednesday, 8pm, in an upstairs > room at Boldo's Armory. Bob Rhode will be giving a talk on Extracting C > Source from Excel files. Details and preliminary are available at the > web site: http://rochester.pm.org. > > Hope to see you there! > > Brian Mathis > Rochester.PM From webmaster at rochester.rr.com Thu Jun 17 09:14:15 1999 From: webmaster at rochester.rr.com (Justin C. Sherrill) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question Message-ID: <000001beb8cb$ae317020$d401a8c0@justin.rochester.rr.com> Here's something I never understood about flock(), and I haven't really had the chance to test it out. Could someone on this list hazard an answer for me? For instance, I have this chunk of code: open (DB_FH, ">&=$fd") or print "Cant open $fd : $!\n"; # I have no clue what +<&= does. It's in the Cookbook. flock (BD_FH, LOCK_EX); # do stuff to file here that I took out for space $db->sync; flock(DB_FH, LOCK_UN); close (DB_FH); What I'm not sure about is this: I can get an exclusive lock here, which is fine. However, this script is running as part of a CGI I wrote, and so multiple instances may run at the same time depending on traffic. Do I have to do some sort of check for an existing exclusive lock before obtaining one, or will a new lock coming from another process with this script automatically wait until the first process releases the lock? Justin C. Sherrill Rochester Road Runner Webmaster http://www.rochester.rr.com/ "Think slow, type fats" From bmathis at directedge.com Thu Jun 17 08:50:20 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question In-Reply-To: <000001beb8cb$ae317020$d401a8c0@justin.rochester.rr.com> Message-ID: Yes, if your file is flock()ed by another process, your current process will just wait until it's free. It will wait at the flock(). As a side note, you don't want to unlock the file, just close it. Unlocking then closing actually creates a race condition, because not all data is flushed to the file until the close. A close() automatically unlocks a file as well. Brian Mathis On Thu, 17 Jun 1999, Justin C. Sherrill wrote: > Here's something I never understood about flock(), and I haven't really had > the chance to test it out. Could someone on this list hazard an answer for > me? For instance, I have this chunk of code: > > open (DB_FH, ">&=$fd") or print "Cant open $fd : $!\n"; > # I have no clue what +<&= does. It's in the Cookbook. > flock (BD_FH, LOCK_EX); > # do stuff to file here that I took out for space > $db->sync; > flock(DB_FH, LOCK_UN); > close (DB_FH); > > What I'm not sure about is this: I can get an exclusive lock here, which is > fine. However, this script is running as part of a CGI I wrote, and so > multiple instances may run at the same time depending on traffic. Do I have > to do some sort of check for an existing exclusive lock before obtaining > one, or will a new lock coming from another process with this script > automatically wait until the first process releases the lock? > > Justin C. Sherrill > Rochester Road Runner Webmaster > http://www.rochester.rr.com/ > "Think slow, type fats" > From havoc at eznet.net Thu Jun 17 09:46:27 1999 From: havoc at eznet.net (Pat) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question In-Reply-To: <000001beb8cb$ae317020$d401a8c0@justin.rochester.rr.com>; from Justin C. Sherrill on Thu, Jun 17, 1999 at 10:14:15AM -0400 References: <000001beb8cb$ae317020$d401a8c0@justin.rochester.rr.com> Message-ID: <19990617104627.A18436@shell1.eznet.net> By default flock blocks(stops and waits for the lock to be released). If you wish to not wait, add the flag LOCK_NB and flock will return immediately. In my experience LOCK_NB is not needed for most implementations under CGI. But for heavy usage and/or a robust solution use LOCK_NB and implement a wait manually and kill threads that seem to have hung (or any solution that seems reasonable :-). Good Luck, --Patrick Ludwig Xerox Internet Document Services On Thu, Jun 17, 1999 at 10:14:15AM -0400, Justin C. Sherrill wrote: > Here's something I never understood about flock(), and I haven't really had > the chance to test it out. Could someone on this list hazard an answer for > me? For instance, I have this chunk of code: > > open (DB_FH, ">&=$fd") or print "Cant open $fd : $!\n"; > # I have no clue what +<&= does. It's in the Cookbook. > flock (BD_FH, LOCK_EX); > # do stuff to file here that I took out for space > $db->sync; > flock(DB_FH, LOCK_UN); > close (DB_FH); > > What I'm not sure about is this: I can get an exclusive lock here, which is > fine. However, this script is running as part of a CGI I wrote, and so > multiple instances may run at the same time depending on traffic. Do I have > to do some sort of check for an existing exclusive lock before obtaining > one, or will a new lock coming from another process with this script > automatically wait until the first process releases the lock? > > Justin C. Sherrill > Rochester Road Runner Webmaster > http://www.rochester.rr.com/ > "Think slow, type fats" > From havoc at eznet.net Thu Jun 17 09:48:42 1999 From: havoc at eznet.net (Pat) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question In-Reply-To: ; from Brian Mathis on Thu, Jun 17, 1999 at 09:50:20AM -0400 References: <000001beb8cb$ae317020$d401a8c0@justin.rochester.rr.com> Message-ID: <19990617104842.B18436@shell1.eznet.net> Can't believe I didn't spot that, Brian is absolutely correct, never unlock files, just close 'em. --pat On Thu, Jun 17, 1999 at 09:50:20AM -0400, Brian Mathis wrote: > Yes, if your file is flock()ed by another process, your current process > will just wait until it's free. It will wait at the flock(). > > As a side note, you don't want to unlock the file, just close it. > Unlocking then closing actually creates a race condition, because not all > data is flushed to the file until the close. A close() automatically > unlocks a file as well. > > Brian Mathis > > > On Thu, 17 Jun 1999, Justin C. Sherrill wrote: > > > Here's something I never understood about flock(), and I haven't really had > > the chance to test it out. Could someone on this list hazard an answer for > > me? For instance, I have this chunk of code: > > > > open (DB_FH, ">&=$fd") or print "Cant open $fd : $!\n"; > > # I have no clue what +<&= does. It's in the Cookbook. > > flock (BD_FH, LOCK_EX); > > # do stuff to file here that I took out for space > > $db->sync; > > flock(DB_FH, LOCK_UN); > > close (DB_FH); > > > > What I'm not sure about is this: I can get an exclusive lock here, which is > > fine. However, this script is running as part of a CGI I wrote, and so > > multiple instances may run at the same time depending on traffic. Do I have > > to do some sort of check for an existing exclusive lock before obtaining > > one, or will a new lock coming from another process with this script > > automatically wait until the first process releases the lock? > > > > Justin C. Sherrill > > Rochester Road Runner Webmaster > > http://www.rochester.rr.com/ > > "Think slow, type fats" > > > From webmaster at rochester.rr.com Thu Jun 17 10:37:59 1999 From: webmaster at rochester.rr.com (Justin C. Sherrill) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question In-Reply-To: Message-ID: <000a01beb8d7$60b7f2e0$d401a8c0@justin.rochester.rr.com> > Yes, if your file is flock()ed by another process, your current process > will just wait until it's free. It will wait at the flock(). > Thanks for the help! here's another one, then. "<&=" is described (in Programming Perl, page 193) as possibly causing trouble if multiple filehandles share the same file descriptor, so one filehandle getting closed may close the others. If I have multiple CGI instances running, could this cause a problem, or would the descriptor be different every time? (On Win32) Justin C. Sherrill Rochester Road Runner Webmaster http://www.rochester.rr.com/ "Think slow, type fats" From bmathis at directedge.com Thu Jun 17 11:02:43 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] flock question In-Reply-To: <000a01beb8d7$60b7f2e0$d401a8c0@justin.rochester.rr.com> Message-ID: Well, on UNIX, each individual Perl instance has it's own filehandles, etc. So they don't conflict from instance to instance. I would assume that the same goes for Win32. The only time you have to worry about stuff like that is if you're using threads, which is still in experimental stages for Perl. On Thu, 17 Jun 1999, Justin C. Sherrill wrote: > Thanks for the help! > > here's another one, then. "<&=" is described (in Programming Perl, page > 193) as possibly causing trouble if multiple filehandles share the same file > descriptor, so one filehandle getting closed may close the others. If I > have multiple CGI instances running, could this cause a problem, or would > the descriptor be different every time? (On Win32) > > Justin C. Sherrill > Rochester Road Runner Webmaster > http://www.rochester.rr.com/ > "Think slow, type fats" > From sporter at rit.net Tue Jun 29 13:32:04 1999 From: sporter at rit.net (Shawn Porter) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Tom Christiansen Message-ID: Tom Christansen, Perl guru posted some intruiging comments to /. the other day. You may agree, you may disagree... -> http://slashdot.org/comments.pl?sid=99/06/28/1311232&cid=113 He also has an interesting interview up on Amazon.com... -> http://www.amazon.com/exec/obidos/subst/categories/computer-programming/tom-christiansen-interview -- Shawn Porter http://www.rit.net/sporter sporter@rit.net From sporter at rit.net Tue Jun 29 13:41:04 1999 From: sporter at rit.net (Shawn Porter) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] Linux Message-ID: I can't remember if I've ever plugged this before, so here goes... The RIT Linux User Group is meeting tomorrow, Wednesday the 30th of June, for a presentation on GUI programming with GTK+. Our meetings are open to the public, so you don't have to be a member of the RIT community to attend. If you're interested, please check out our website for details. If not, get back to work. :) -> http://www.rit.net/lug/ -- Shawn Porter RIT Linux User Group President http://www.rit.net/sporter sporter@rit.net From bmathis at directedge.com Tue Jun 29 03:55:47 1999 From: bmathis at directedge.com (Brian Mathis) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] YAPC? Message-ID: Hey Bob, how was YAPC? --- Brian Mathis Direct Edge From robert_rhode at yahoo.com Tue Jun 29 20:16:07 1999 From: robert_rhode at yahoo.com (Robert Rhode) Date: Thu Aug 5 00:19:48 2004 Subject: [rochester-pm-list] YAPC Message-ID: <19990630011607.18703.rocketmail@web303.yahoomail.com> > Hey Bob, how was YAPC? YAPC was great. Well worth the trip. I got to have dinner with Larry Wall. :-) Sadly, my own talk was no competition for PERL solitaire playing programs. Next year I'll have to talk about something exciting. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com