From richard at rushlogistics.com Fri Jul 1 12:24:30 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 1 Jul 2005 12:24:30 -0700 (PDT) Subject: [Chicago-talk] Date operator question. Message-ID: <20050701192431.63664.qmail@web304.biz.mail.mud.yahoo.com> Anyone know of a n easy way to get the last day of a given month? A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From thomasoniii at gmail.com Fri Jul 1 12:38:54 2005 From: thomasoniii at gmail.com (Jim Thomason) Date: Fri, 1 Jul 2005 14:38:54 -0500 Subject: [Chicago-talk] Date operator question. In-Reply-To: <20050701192431.63664.qmail@web304.biz.mail.mud.yahoo.com> References: <20050701192431.63664.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: <5cfdfaf7050701123831df4fb3@mail.gmail.com> sure, use Date::Calc...Days_in_Month($month) Realistically, though, it's a fairly small set of data points. You could just keep an array for yourself. @days_in_month = qw(0 31 28 31 30 31 30 31 31 30 31 30 31); my $last_day = $days_in_month[$month]; You'd need to handle leapyear yourself, though. If you actually wanted to know the weekday upon which the last date of the month fell, then Date::Calc has functions for that, too. -Jim..... On 7/1/05, Richard Reina wrote: > Anyone know of a n easy way to get the last day of a > given month? > > A people that values its privileges above its principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From richard at rushlogistics.com Fri Jul 1 13:37:57 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 1 Jul 2005 13:37:57 -0700 (PDT) Subject: [Chicago-talk] Date operator question. In-Reply-To: <5cfdfaf7050701123831df4fb3@mail.gmail.com> Message-ID: <20050701203758.77016.qmail@web304.biz.mail.mud.yahoo.com> > @days_in_month = qw(0 31 28 31 30 31 30 31 31 30 31 > 30 31); This seems like a good idea. However, what is the 0 at beginning of the area for? A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From me at heyjay.com Fri Jul 1 13:51:16 2005 From: me at heyjay.com (Jay Strauss) Date: Fri, 01 Jul 2005 15:51:16 -0500 Subject: [Chicago-talk] Date operator question. In-Reply-To: <20050701203758.77016.qmail@web304.biz.mail.mud.yahoo.com> References: <20050701203758.77016.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: <42C5ACC4.4070904@heyjay.com> Probably so you can say january is offset 1 my $jan = @days_in_month[1]; Richard Reina wrote: >>@days_in_month = qw(0 31 28 31 30 31 30 31 31 30 31 >>30 31); > > > This seems like a good idea. However, what is the 0 > at beginning of the area for? > > A people that values its privileges above its principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > From richard at rushlogistics.com Fri Jul 1 13:56:52 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 1 Jul 2005 13:56:52 -0700 (PDT) Subject: [Chicago-talk] Date operator question. In-Reply-To: <42C5ACC4.4070904@heyjay.com> Message-ID: <20050701205653.22962.qmail@web303.biz.mail.mud.yahoo.com> Thanks Jay, You are right. I realized the siliness of my question when I went to implement the solution. Richard --- Jay Strauss wrote: > Probably so you can say january is offset 1 > > my $jan = @days_in_month[1]; > > Richard Reina wrote: > >>@days_in_month = qw(0 31 28 31 30 31 30 31 31 30 > 31 > >>30 31); > > > > > > This seems like a good idea. However, what is the > 0 > > at beginning of the area for? > > > > A people that values its privileges above its > principles soon loses both. > > -Dwight D. Eisenhower. > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk at pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From Andy_Bach at wiwb.uscourts.gov Tue Jul 5 08:41:39 2005 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Tue, 5 Jul 2005 10:41:39 -0500 Subject: [Chicago-talk] Fw: DBI v2 - The Plan and How You Can Help Message-ID: Andy Bach, Sys. Mangler Internet: andy_bach at wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5932 M: Argument is an intellectual process. Contradiction is just the automatic gainsaying of any statement the other person makes. (short pause) A: No it isn't. ----- Forwarded by Andy Bach/WIWB/07/USCOURTS on 07/05/2005 10:37 AM ----- Tim Bunce 07/01/2005 07:06 PM Please respond to dbi-users at perl.org To perl6-language at perl.org, dbi-users at perl.org cc Subject DBI v2 - The Plan and How You Can Help Once upon a time I said: http://groups-beta.google.com/group/perl.dbi.users/msg/caf189d7b404a003?dmode=source&hl=en and wrote http://search.cpan.org/~timb/DBI/Roadmap.pod which yielded: https://donate.perlfoundation.org/index.pl?node=Fund+Drive+Details&selfund=102 (A little over $500 of that I effectively put in myself.) My *sincere* thanks to all those who donated to the fund, especially individuals. I had hoped for more corporate response with less from individuals and I'm touched by the personal generosity shown. I've not drawn any money from it yet and doubt that I will myself. (I'm considering suggesting that the Perl Foundation make payments from the fund to people making specific contributions to the DBI. I'm thinking especially of work on a comprehensive test harness. But I'll see how the developments below pan out before making specific arrangements.) So, that lead to: http://groups-beta.google.com/group/perl.dbi.dev/browse_frm/thread/ef14a9fc0a37441f/fb8fe20a86723da0#fb8fe20a86723da0 Which sums up fairly well where I'm at: DBI v1 will rumble on for Perl 5 and DBI v2 will be implemented for Perl 6. --- digression --- At this point I'd like to make a slight digression to highlight the amazing work going on in the Perl 6 community at the moment. Especially Autrijus' Pugs project which has brought Perl 6 to life. Literally. Take a look at: http://pugscode.org/talks/yapc/slide1.html http://use.perl.org/~autrijus/journal and especially: http://use.perl.org/~autrijus/journal/24898 Yes, that really is Perl 6 code using the DBI being executed by Pugs. That's great, and I was truly delighted to see it because it takes the pressure off the need to get a DBI working for Perl 6 - because it already is working for Perl 6. At least for Pugs. (The Ponie project is also likely to provide access to Perl 5 DBI from Perl 6 by enabling future versions of Perl 5 to run on Parrot.) --- digression --- I have recently come to an arrangement that will enable me to put some worthwhile development time into DBI (still very much part-time, but enough to give it focus and move forward). My initial goals are: 1. to work on a more detailed specification for the DBI v2 API that takes advantage of appropriate features of Perl 6. 2. to work on a more detailed specification for the DBDI API http://groups-beta.google.com/group/perl.perl6.internals/msg/cfcbd9ca7ee6ab4 3. to work on tools to automate building Parrot NCI interfaces to libraries (such as database client libraries, obviously :) But I'm hoping you'll join in and help out. I've kept an eye on Perl 6 and Parrot developments but I'm no expert in either. What I'd like *you* to do is make proposals (ideally fairly detailed proposals, but vague ideas are okay) for what a Perl 6 DBI API should look like. Keep in mind that the role of the DBI is to provide a consistent interface to databases at a fairly low level. To provide a *foundation* upon which higher level interfaces (such as Class::DBI, Tangram, Alzabo etc. in Perl 5) can be built. So, if you have an interest in the DBI and Perl 6, put your thinking cap on, kick back and dream a little dream of how the DBI could be. How to make best use of the new features in Perl 6 to make life easier. Then jot down the details and email them to me (or to dbi-users at perl.org if you want to kick them around in public for a while first). I'm about to fly off for two weeks vacation (in a few hours), blissfully absent of any hi-tech gear beyond a mobile phone. When I get back I'll gather up your emails and try to distill them into a coherent whole. Have fun! Tim. From m.krebs at comcast.net Tue Jul 5 13:42:30 2005 From: m.krebs at comcast.net (m.krebs@comcast.net) Date: Tue, 05 Jul 2005 20:42:30 +0000 Subject: [Chicago-talk] Monthly Meeting Message-ID: <070520052042.1654.42CAF0B6000462AA0000067622007507849C0D0A9D05D203@comcast.net> Hello Everyone, I have been out of the loop for awhile (last meeting attended in Vernon Hills location), is there a new location for the Monthly meeting? Thanks Fred Krebs From andy at petdance.com Tue Jul 5 13:50:34 2005 From: andy at petdance.com (Andy Lester) Date: Tue, 5 Jul 2005 15:50:34 -0500 Subject: [Chicago-talk] Monthly Meeting In-Reply-To: <070520052042.1654.42CAF0B6000462AA0000067622007507849C0D0A9D05D203@comcast.net> References: <070520052042.1654.42CAF0B6000462AA0000067622007507849C0D0A9D05D203@comcast.net> Message-ID: <20050705205034.GB6520@petdance.com> On Tue, Jul 05, 2005 at 08:42:30PM +0000, m.krebs at comcast.net (m.krebs at comcast.net) wrote: > I have been out of the loop for awhile (last meeting attended in Vernon Hills location), is there a new location for the Monthly meeting? So far as I can tell, our one meeting in Chicago at Performics was our one meeting in Chicago at Performics. So at this point, no, we have no space. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From andy at petdance.com Tue Jul 5 13:50:34 2005 From: andy at petdance.com (Andy Lester) Date: Tue, 5 Jul 2005 15:50:34 -0500 Subject: [Chicago-talk] Monthly Meeting In-Reply-To: <070520052042.1654.42CAF0B6000462AA0000067622007507849C0D0A9D05D203@comcast.net> References: <070520052042.1654.42CAF0B6000462AA0000067622007507849C0D0A9D05D203@comcast.net> Message-ID: <20050705205034.GB6520@petdance.com> On Tue, Jul 05, 2005 at 08:42:30PM +0000, m.krebs at comcast.net (m.krebs at comcast.net) wrote: > I have been out of the loop for awhile (last meeting attended in Vernon Hills location), is there a new location for the Monthly meeting? So far as I can tell, our one meeting in Chicago at Performics was our one meeting in Chicago at Performics. So at this point, no, we have no space. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Tue Jul 5 20:54:14 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Tue, 05 Jul 2005 23:54:14 -0400 Subject: [Chicago-talk] Config file parsers In-Reply-To: <42825A2A.2050005@heyjay.com> References: <428227B1.709@heyjay.com> <20050511132023.3239.MAGOG@the-wire.com> <42825A2A.2050005@heyjay.com> Message-ID: > Michael Graham wrote: >>> There are about a 1000 config file parsers on cpan. Can anyone >>> recommend one that: >>> >>> 1) uses few (or no) prerequisite modules >>> 2) in heavy use and is maintained. >>> >>> Any suggestions on the format I should be heading toward (ini, apache, >>> xml, yaml...)? Different approach: use NEXT::init to configure the thing via modules. Basically the configuraton can become a layerd hash w/ perly syntax for however deep you need the nesting to go. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Tue Jul 5 20:58:25 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Tue, 05 Jul 2005 23:58:25 -0400 Subject: [Chicago-talk] h2xs & subversion equal looong paths In-Reply-To: <4293DC32.60309@heyjay.com> References: <4293DC32.60309@heyjay.com> Message-ID: <9B3BBA504921E5EAB9AFB924@[192.168.1.2]> > ~/sandbox/Finance-Quote-CBOE/trunk/lib/Finance/Quote > > just to edit my file CBOE.pm file (as well as having to add > ~/sandbox/Finance-Quote-CBOE/trunk/lib to my PERL5LIB for testing) FindBin::libs w/ a symlink in your ~/sandbox/lib if you want to avoid PERL5LIB issues. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Tue Jul 5 21:00:49 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Wed, 06 Jul 2005 00:00:49 -0400 Subject: [Chicago-talk] h2xs & subversion equal looong paths In-Reply-To: <429473AF.4040205@heyjay.com> References: <4293DC32.60309@heyjay.com> <429473AF.4040205@heyjay.com> Message-ID: <9C64B681C479C6C13555502B@[192.168.1.2]> > And still end up with: ~/sand/fqc/trunk/lib, which, granted, is less cd ~/sandbox; mkdir lib; cd lib; ln -fs ../fqc/trunc/lib/* .; #!/opt/bin/perl use strict; use FindBin::libs; # you now have access to anything in ~/sandox/lib from # anywhere in ~/sandbox. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Tue Jul 5 21:00:58 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Wed, 06 Jul 2005 00:00:58 -0400 Subject: [Chicago-talk] h2xs & subversion equal looong paths In-Reply-To: <429473AF.4040205@heyjay.com> References: <4293DC32.60309@heyjay.com> <429473AF.4040205@heyjay.com> Message-ID: -- Jay Strauss > Andy Lester wrote: >> First, stop using h2xs and use Module::Starter. > > outside of the fact that you built Module::Starter, > what's the big difference? > >> >> Second, you can check out your Subversion project into whatever >> directory you want, so you can, if you want: > > Yes > >> >> svn co file:///svn-repository/Finance-Quote-CBOE fqc >> >> and it will check out into directory "fqc". > > And still end up with: ~/sand/fqc/trunk/lib, which, granted, is less > keystrokes but, I'm still a bunch of directories down, but I suppose > that's probably going to be unavoidable, unless I move trunk up, like I > mentioned. >> >> Finally, there's no rule that says that Finance::Quote::CBOE's pm file >> has to live in lib/Finance/Quote/CBOE.pm. You can move it to >> lib/CBOE.pm and adjust the places that checks for it. See modules like >> Test::Memory::Cycle for an example. > > I will look at Test::Memory::Cycle > > thanks > Jay > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Tue Jul 5 21:04:00 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Wed, 06 Jul 2005 00:04:00 -0400 Subject: [Chicago-talk] Capturing OS command output. In-Reply-To: <20050620151653.45647.qmail@web306.biz.mail.mud.yahoo.com> References: <20050620151653.45647.qmail@web306.biz.mail.mud.yahoo.com> Message-ID: <11A1CB8776B6B9995FBB6FF2@[192.168.1.2]> -- Richard Reina > > Does anyone know how can I get the scalar to give me > the path of the convert command? > > my $convert_path = system("which convert"); use Fatal qw( open ); my @result = eval { open my $fh, "$command |"; <$fh> }; die if $@; or my @result = qx( $command ); > > just gives me the success or fail results. > > Thanks, > Richard > > A people that values its privileges above its principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Tue Jul 5 21:05:17 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Wed, 06 Jul 2005 00:05:17 -0400 Subject: [Chicago-talk] Date operator question. In-Reply-To: <20050701192431.63664.qmail@web304.biz.mail.mud.yahoo.com> References: <20050701192431.63664.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: -- Richard Reina > Anyone know of a n easy way to get the last day of a > given month? First day of the following month - 1. $next_month = $curr_month % 12 + 1; -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From brian.d.foy at gmail.com Mon Jul 11 23:14:45 2005 From: brian.d.foy at gmail.com (brian d foy) Date: Tue, 12 Jul 2005 01:14:45 -0500 Subject: [Chicago-talk] Edward Tufte in Chicago Message-ID: <2715accf050711231453bba092@mail.gmail.com> Edward Tufte is one of the gods of visual and information design, and he's going to be in Chicago August10-11 (and in Madison on the 8th). http://www.edwardtufte.com/tufte/courses Although he doesn't talk about computers except to say that monitors are the worst resolution you can pick. He is, however, all about presenting information in a way that effectively communicates the message in the best way possible. That's what computer programs are all about, too. How strange is that? I've been to his seminars, and I think Andy has too. If you get the chance, go. Some of the stuff I learned in his seminar showed up in patches to GD::Graph. :) -- brian d foy http://www.panix.com/~comdog/ From andy at petdance.com Tue Jul 12 07:00:39 2005 From: andy at petdance.com (Andy Lester) Date: Tue, 12 Jul 2005 09:00:39 -0500 Subject: [Chicago-talk] Edward Tufte in Chicago In-Reply-To: <2715accf050711231453bba092@mail.gmail.com> References: <2715accf050711231453bba092@mail.gmail.com> Message-ID: <20050712140039.GB7581@petdance.com> On Tue, Jul 12, 2005 at 01:14:45AM -0500, brian d foy (brian.d.foy at gmail.com) wrote: > I've been to his seminars, and I think Andy has too. If you get the > chance, go. Some of the stuff I learned in his seminar showed up in > patches to GD::Graph. :) He's great. Well worth seeing, and for the $320 you get $150 worth of books in the deal. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From richard at rushlogistics.com Tue Jul 12 07:24:44 2005 From: richard at rushlogistics.com (Richard Reina) Date: Tue, 12 Jul 2005 07:24:44 -0700 (PDT) Subject: [Chicago-talk] How reliable is UDP. Message-ID: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> Good Morning, I am in the process of writing a short program in which a server sends small amounts of info to local clients (on a LAN). I do not need the bi-directional communication offered by TCP, however, I would like the communication to be reliable. I have read that UDP is unreliable. Can anyone tell me quantitatively how unrealiable UDP is? How many transmission can I expect to fail 1 out of 100, 1000, etc? Thank you for your attention, Richard A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From jt at plainblack.com Tue Jul 12 07:28:00 2005 From: jt at plainblack.com (JT Smith) Date: Tue, 12 Jul 2005 09:28:00 -0500 Subject: [Chicago-talk] How reliable is UDP. In-Reply-To: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> References: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> Message-ID: No one can tell you this number because it depends on all sorts of network conditions. By definition UDP is not reliable and should only be used for high speed broadcasts such as in online gaming. If you're really sending small amounts of data over a lan, I'd stick with something more reliable than UDP. On Tue, 12 Jul 2005 07:24:44 -0700 (PDT) Richard Reina wrote: > Good Morning, > > I am in the process of writing a short program in > which a server sends small amounts of info to local > clients (on a LAN). I do not need the bi-directional > communication offered by TCP, however, I would like > the communication to be reliable. I have read that > UDP is unreliable. Can anyone tell me quantitatively > how unrealiable UDP is? How many transmission can I > expect to fail 1 out of 100, 1000, etc? > > Thank you for your attention, > > Richard > > A people that values its privileges above its principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk JT ~ Plain Black ph: 703-286-2525 ext. 810 fax: 312-264-5382 http://www.plainblack.com Create like a god, command like a king, work like a slave. From merlyn at stonehenge.com Tue Jul 12 10:38:13 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 12 Jul 2005 10:38:13 -0700 Subject: [Chicago-talk] How reliable is UDP. In-Reply-To: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> References: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> Message-ID: <86u0izrkl6.fsf@blue.stonehenge.com> >>>>> "Richard" == Richard Reina writes: Richard> I am in the process of writing a short program in Richard> which a server sends small amounts of info to local Richard> clients (on a LAN). I do not need the bi-directional Richard> communication offered by TCP, however, I would like Richard> the communication to be reliable. In order to know that the data got there, you need feedback. That's "bi-directional". So you've just contradicted yourself. If you want to know it got there, use TCP. If it doesn't matter if every packet gets dropped when the net gets full, use UDP. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From me at heyjay.com Tue Jul 12 16:22:55 2005 From: me at heyjay.com (Jay Strauss) Date: Tue, 12 Jul 2005 18:22:55 -0500 Subject: [Chicago-talk] How reliable is UDP. In-Reply-To: <86u0izrkl6.fsf@blue.stonehenge.com> References: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> <86u0izrkl6.fsf@blue.stonehenge.com> Message-ID: <42D450CF.4080703@heyjay.com> He never said he needed to "know" it got there Randal L. Schwartz wrote: >>>>>>"Richard" == Richard Reina writes: > > > Richard> I am in the process of writing a short program in > Richard> which a server sends small amounts of info to local > Richard> clients (on a LAN). I do not need the bi-directional > Richard> communication offered by TCP, however, I would like > Richard> the communication to be reliable. > > In order to know that the data got there, you need feedback. > That's "bi-directional". > > So you've just contradicted yourself. > > If you want to know it got there, use TCP. If it doesn't matter if > every packet gets dropped when the net gets full, use UDP. > From merlyn at stonehenge.com Tue Jul 12 16:47:12 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 12 Jul 2005 16:47:12 -0700 Subject: [Chicago-talk] How reliable is UDP. In-Reply-To: <42D450CF.4080703@heyjay.com> References: <20050712142444.51256.qmail@web312.biz.mail.mud.yahoo.com> <86u0izrkl6.fsf@blue.stonehenge.com> <42D450CF.4080703@heyjay.com> Message-ID: <86r7e3oadb.fsf@blue.stonehenge.com> >>>>> "Jay" == Jay Strauss writes: Jay> He never said he needed to "know" it got there The word "reliable" implies that. And don't top post. A. because it's backwards. Q. Why is top-posting wrong? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From richard at rushlogistics.com Fri Jul 15 13:36:08 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 15 Jul 2005 13:36:08 -0700 (PDT) Subject: [Chicago-talk] TCP server. Message-ID: <20050715203608.94141.qmail@web311.biz.mail.mud.yahoo.com> I am setting up a local TCP server to pass along caller ID info from a PBX server to local clients on a LAN and I am somewhat stuck. I've written a brief program similar to the one in Perl Cookbook and I got it working so that it accepts local connections and successfully sends the client an inniatial welcome message letting the know they're connected. However, I don't know how I can get another script ( the script that's executed eveytime caller ID inof is available from incomming calls ) to send info over that that established connection. Any ideas on how I can do this? Thanks, Richard A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From gdf at speakeasy.net Fri Jul 15 13:50:36 2005 From: gdf at speakeasy.net (Greg Fast) Date: Fri, 15 Jul 2005 15:50:36 -0500 Subject: [Chicago-talk] TCP server. In-Reply-To: <20050715203608.94141.qmail@web311.biz.mail.mud.yahoo.com> References: <20050715203608.94141.qmail@web311.biz.mail.mud.yahoo.com> Message-ID: <20050715155036.A28512@speakeasy.net> On Fri, Jul 15, 2005 at 01:36:08PM -0700, Richard Reina wrote: > I don't know how I can get another script ( the script > that's executed eveytime caller ID inof is available > from incomming calls ) to send info over that that > established connection. Any ideas on how I can do > this? You mean like this? # ... accept( $client, $server_sock ); open( my $in, "/bin/date |" ) || die $!; while( <$in> ) { print {$client_sock} $_; } I don't have the Cookbook handy, so you might have to post some of your code. -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From jason at multiply.org Fri Jul 15 17:11:11 2005 From: jason at multiply.org (Jason Gessner) Date: Fri, 15 Jul 2005 19:11:11 -0500 Subject: [Chicago-talk] Local Book Club Message-ID: Hello All! The ChiPy group is starting a book club and all are welcome. Details here: http://www.lonelylion.com/pipermail/chipy/2005-July/001476.html -jason gessner jason at multiply.org From richard at rushlogistics.com Sat Jul 16 05:57:36 2005 From: richard at rushlogistics.com (Richard Reina) Date: Sat, 16 Jul 2005 05:57:36 -0700 (PDT) Subject: [Chicago-talk] TCP server. In-Reply-To: <20050715155036.A28512@speakeasy.net> Message-ID: <20050716125737.30567.qmail@web308.biz.mail.mud.yahoo.com> > You mean like this? > > # ... > accept( $client, $server_sock ); > open( my $in, "/bin/date |" ) || die $!; > while( <$in> ) { > print {$client_sock} $_; > } > Greg, Thank you very much for your response. Would the lines of code above be something that that the program outside the TCP server uses? A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From comdog at panix.com Sat Jul 16 15:18:20 2005 From: comdog at panix.com (brian d foy) Date: Sat, 16 Jul 2005 18:18:20 -0400 (EDT) Subject: [Chicago-talk] Llama party at my place Message-ID: I'm supposed to get a box of Llamas anyday now, so I'm having a book release party at my place on Friday, June 22th, atarting around 6ish. Let me know if you're coming. :) I said a lot more in my use.perl posting: http://use.perl.org/~brian_d_foy/journal/25718 -- brian d foy From gdf at speakeasy.net Sat Jul 16 18:33:50 2005 From: gdf at speakeasy.net (Greg Fast) Date: Sat, 16 Jul 2005 20:33:50 -0500 Subject: [Chicago-talk] TCP server. In-Reply-To: <20050716125737.30567.qmail@web308.biz.mail.mud.yahoo.com> References: <20050715155036.A28512@speakeasy.net> <20050716125737.30567.qmail@web308.biz.mail.mud.yahoo.com> Message-ID: <20050716203350.A1949@speakeasy.net> On Sat, Jul 16, 2005 at 05:57:36AM -0700, Richard Reina wrote: > > # ... > > accept( $client, $server_sock ); > > open( my $in, "/bin/date |" ) || die $!; > > while( <$in> ) { > > print {$client_sock} $_; > > } > > Thank you very much for your response. Would the > lines of code above be something that that the program > outside the TCP server uses? No, that's code for inside the server. I used the old syscall-style accept() call, with IO::Socket that'd be $client_sock=$server_sock->accept() (I also misspelled $client_sock, oops...) In the client, you should be able to just read and write to the socket, just like in the server. Something like: my $s = IO::Socket::INET->new( PeerAddr => "www.google.com:80", Proto => "tcp", ) || die "Can't connect ($!)"; print {$s} "HEAD / HTTP/1.0\r\n\r\n"; while (<$s>) { print $_; } Is that what you're looking for? -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From comdog at panix.com Sat Jul 16 19:16:53 2005 From: comdog at panix.com (brian d foy) Date: Sat, 16 Jul 2005 22:16:53 -0400 (EDT) Subject: [Chicago-talk] Parking near my place Message-ID: A couple people have asked about parking near my apartment. Street parking is really sketchy, but there are a couple of grocery stores within a block and they have big parking lots. In the below Google Maps, look at the Jewel and Dominics near the top of the list. :) http://maps.google.com/maps?q=grocery+stores&spn=0.012548,0.023973&near=5301+N+Kenmore+Ave,+Chicago,+IL+60640&num=10&start=0&hl=en -- brian d foy From richard at rushlogistics.com Mon Jul 18 06:54:48 2005 From: richard at rushlogistics.com (Richard Reina) Date: Mon, 18 Jul 2005 06:54:48 -0700 (PDT) Subject: [Chicago-talk] TCP server. In-Reply-To: <20050716203350.A1949@speakeasy.net> Message-ID: <20050718135448.36449.qmail@web304.biz.mail.mud.yahoo.com> --- Greg Fast wrote: > On Sat, Jul 16, 2005 at 05:57:36AM -0700, Richard > Reina wrote: > > > # ... > > > accept( $client, $server_sock ); > > > open( my $in, "/bin/date |" ) || die $!; > > > while( <$in> ) { > > > print {$client_sock} $_; > > > } > > Greg, I incorporated the code above into my server program changing "/bin/date" to /home/richard/tcp_client and created another two liner on the server machine: #!/usr/bin/perl # TCP_client my $ph_no = "3125551212"; print $ph_no . "\n"; Although this is successful in passing $ph_no to the tcp_client.pl on the client machine, it only does so when the TCP_sever starts up. Once the tcp server is running if I re-run the tcp client on the server machine nothing is passed. Thanks, very much for the help thus far. A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From Andy_Bach at wiwb.uscourts.gov Mon Jul 18 13:42:08 2005 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon, 18 Jul 2005 15:42:08 -0500 Subject: [Chicago-talk] Fw: Renew your The Perl Review subscription Message-ID: Of course, you've all got subs already but if not, its a good deal for 16 bucks ... ----- Forwarded by Andy Bach/WIWB/07/USCOURTS on 07/18/2005 03:44 PM ----- Hello TPR Subscriber, We've just finished our first year in print, which means we're also starting our first round of renewals. Most of you have been with us since the beginning and made it possible for The Perl Review to get this far. Your renewal will help us get through the next year. Just follow this link, or go to the subscription page on our website. https://www.theperlreview.com/cgi-bin/subscribe.cgi Since we do not store your credit card information, and we don't store your information on the servers Pair.com provides for us, you get to fill out your name and address again. This also helps us update our address database which goes stale faster than you might think. Your subscription, including access to the website, is still good until we send out the next issue in September. If you have any questions, please let me know. Thanks for supporting The Perl Review, -- brian d foy, Publisher, The Perl Review http://www.theperlreview.com/ From easyasy2k at gmail.com Mon Jul 18 20:05:30 2005 From: easyasy2k at gmail.com (Leland Johnson) Date: Mon, 18 Jul 2005 22:05:30 -0500 Subject: [Chicago-talk] Llama party at my place In-Reply-To: References: Message-ID: <2C2E7B79-FF70-4AF7-BB0F-739A4B5F5A8E@gmail.com> I should be coming. See if I can come down with Andy and Pete. On Jul 16, 2005, at 5:18 PM, brian d foy wrote: > > I'm supposed to get a box of Llamas anyday now, so I'm having a book > release party at my place on Friday, June 22th, atarting around > 6ish. Let > me know if you're coming. :) > > I said a lot more in my use.perl posting: > > http://use.perl.org/~brian_d_foy/journal/25718 > > -- > brian d foy > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From richard at rushlogistics.com Tue Jul 19 07:45:03 2005 From: richard at rushlogistics.com (Richard Reina) Date: Tue, 19 Jul 2005 07:45:03 -0700 (PDT) Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050716203350.A1949@speakeasy.net> Message-ID: <20050719144504.2053.qmail@web303.biz.mail.mud.yahoo.com> I put the code below into a new script called TCP_send.pl on the server machine and it causes the console that is running is running the TCP_server.pl to go berserk -- the console streams continously with giberish some of which are symbols that I cannot even type here to show you -- until I do a control-C and then type "reset" at the console prompt. Now everytime I run TCP_server.pl and then run TCP_client.pl on the client machine the console on the server machine goes (where I running TCP_server.pl) goes berserk again -- even if I do not run TCP_send.pl. Can someone please help. Thanks, Richard > my $s = IO::Socket::INET->new( > PeerAddr => "192.168.0.14:8045", > Proto => "tcp", > ) || die "Can't connect ($!)"; > > > A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From gdf at speakeasy.net Tue Jul 19 08:09:42 2005 From: gdf at speakeasy.net (Greg Fast) Date: Tue, 19 Jul 2005 10:09:42 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719144504.2053.qmail@web303.biz.mail.mud.yahoo.com> References: <20050716203350.A1949@speakeasy.net> <20050719144504.2053.qmail@web303.biz.mail.mud.yahoo.com> Message-ID: <20050719100942.A15151@speakeasy.net> On Tue, Jul 19, 2005 at 07:45:03AM -0700, Richard Reina wrote: > I put the code below into a new script called > TCP_send.pl on the server machine and it causes the > console that is running is running the TCP_server.pl > to go berserk -- the console streams continously with Can you post any of the code for TCP_server.pl? -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From richard at rushlogistics.com Tue Jul 19 09:09:11 2005 From: richard at rushlogistics.com (Richard Reina) Date: Tue, 19 Jul 2005 09:09:11 -0700 (PDT) Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719100942.A15151@speakeasy.net> Message-ID: <20050719160911.21861.qmail@web303.biz.mail.mud.yahoo.com> > Can you post any of the code for TCP_server.pl? Sorry it took me so long. #!/usr/bin/perl -w use Socket; $| = 1; socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')); my$server_port = 8045; my$my_addr = sockaddr_in($server_port, INADDR_ANY); bind(SERVER, $my_addr) or die "Couldn't bind to port $server_port : $!\n"; # establish a queue for incoming connections listen(SERVER, SOMAXCONN) or die "Couldn't listen on port $server_port : $!\n"; my $client_address; my ($ph_no) = @_; while ($client_address = accept(CLIENT, SERVER)) { my ($port, $packed_ip) = sockaddr_in($client_address); print "port: " . $port . "Packed IP: " . $packed_ip . "\n"; my $dotted_quad = inet_ntoa($packed_ip); print "Dotted Quad: " . $dotted_quad . "\n"; my $data_to_send = "Welcome to Call Processing"; my$flags = 0; defined (send(CLIENT, $data_to_send, $flags)) or die "Can't send : $!\n"; open( my $in, "/home/richard/test_TCP_send |" ) || die $!; while( <$in> ) { defined (send(CLIENT, $_, $flags)) or die "Can't send : $!\n"; } } close (SERVER); ON THE CLIENT MACHINE #!/usr/bin/perl use Socket; socket(TO_SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')); $| = 1; my $remote_port = 8045; my $remote_host; # not worried about it cause we know the IP my $intranet_addr = 192.168.0.14; my $paddr = sockaddr_in($remote_port, $intranet_addr); connect(TO_SERVER, $paddr) or die "Could not connect to $remote_host:$remote_port : $!\n"; print "CONNECTED TO SERVER\n"; $| = 1; while() { recv (TO_SERVER, $data_read, 45, 0) or die "Can't receive : $!\n"; print $data_read . "\n"; } close (TO_SERVER) A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From gdf at speakeasy.net Tue Jul 19 09:37:01 2005 From: gdf at speakeasy.net (Greg Fast) Date: Tue, 19 Jul 2005 11:37:01 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719160911.21861.qmail@web303.biz.mail.mud.yahoo.com> References: <20050719100942.A15151@speakeasy.net> <20050719160911.21861.qmail@web303.biz.mail.mud.yahoo.com> Message-ID: <20050719113701.A15505@speakeasy.net> On Tue, Jul 19, 2005 at 09:09:11AM -0700, Richard Reina wrote: > > my ($port, $packed_ip) = > sockaddr_in($client_address); > print "port: " . $port . "Packed IP: " . $packed_ip . "\n"; This is my guess for the culprit: the value of $packed_ip is a binary structure, and isn't suitable for printing (sockaddr_in basically just returns the C struct). Also, is there a reason you're using send/recv instead of print/<>? -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From richard at rushlogistics.com Tue Jul 19 10:08:41 2005 From: richard at rushlogistics.com (Richard Reina) Date: Tue, 19 Jul 2005 10:08:41 -0700 (PDT) Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719113701.A15505@speakeasy.net> Message-ID: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> --- Greg Fast wrote: > On Tue, Jul 19, 2005 at 09:09:11AM -0700, Richard > Reina wrote: > > > > my ($port, $packed_ip) = > > sockaddr_in($client_address); > > print "port: " . $port . "Packed IP: " . > $packed_ip . "\n"; > > This is my guess for the culprit: the value of > $packed_ip is a binary > structure, and isn't suitable for printing > (sockaddr_in basically just > returns the C struct). > Any ideas on how can I fix it? > Also, is there a reason you're using send/recv > instead of print/<>? > > Because I have no clue what I'm doing. Thanks for the help. A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From ehs at pobox.com Tue Jul 19 10:21:55 2005 From: ehs at pobox.com (Edward Summers) Date: Tue, 19 Jul 2005 12:21:55 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> References: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> Message-ID: <68FA1A88-E842-42D4-95B3-3E5D7A5ACB57@pobox.com> > Any ideas on how can I fix it? Try printing out the result stored in $dotted_quad on the next line instead. //Ed is that in the right order? From merlyn at stonehenge.com Tue Jul 19 11:49:01 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 19 Jul 2005 11:49:01 -0700 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> References: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> Message-ID: <864qaqljhe.fsf@blue.stonehenge.com> >>>>> "Richard" == Richard Reina writes: Richard> Because I have no clue what I'm doing. If you have no clue what you're doing, why are you writing client/server stuff from scratch? Why not use HTTP, and use the existing modules? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From richard at rushlogistics.com Tue Jul 19 13:16:07 2005 From: richard at rushlogistics.com (Richard Reina) Date: Tue, 19 Jul 2005 13:16:07 -0700 (PDT) Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <864qaqljhe.fsf@blue.stonehenge.com> Message-ID: <20050719201608.62923.qmail@web311.biz.mail.mud.yahoo.com> Dear Randal, I am very greatful for your very knowledgable input. Thank you very much for responding. > Richard> Because I have no clue what I'm doing. > > If you have no clue what you're doing, why are you > writing client/server > stuff from scratch? On page 604 of the Perl CookBook it sais: "or create a socket by hand for better control" it did not seem like it was much more trouble -- and only a few more lines of code --than using than use IO:Socket, so off I went. Was this a misguided decision on my part? Why not use HTTP, and use the > existing modules? I'm looking up HTTP in my perl books right now. A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From chris.mcavoy at gmail.com Tue Jul 19 13:26:23 2005 From: chris.mcavoy at gmail.com (Chris McAvoy) Date: Tue, 19 Jul 2005 15:26:23 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <864qaqljhe.fsf@blue.stonehenge.com> References: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> <864qaqljhe.fsf@blue.stonehenge.com> Message-ID: <3096c19d0507191326735c7808@mail.gmail.com> > If you have no clue what you're doing, why are you writing client/server > stuff from scratch? Because he loves the thrill of the hack. Right? Perl hackers? I hope Perl hasn't gotten so respectable that we turn away people doing it themselves. My copy of Learning Perl just fell off my shelf and hit me in the head. Weird. Chris From merlyn at stonehenge.com Tue Jul 19 13:29:56 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 19 Jul 2005 13:29:56 -0700 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <3096c19d0507191326735c7808@mail.gmail.com> References: <20050719170841.97739.qmail@web302.biz.mail.mud.yahoo.com> <864qaqljhe.fsf@blue.stonehenge.com> <3096c19d0507191326735c7808@mail.gmail.com> Message-ID: <86pstek08r.fsf@blue.stonehenge.com> >>>>> "Chris" == Chris McAvoy writes: >> If you have no clue what you're doing, why are you writing client/server >> stuff from scratch? Chris> Because he loves the thrill of the hack. Well, if that's the case, that's fine. But I bet he's trying to get something done instead, based on past questions here. In that case IO::Socket is almost *always* the wrong place to start. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From Andy_Bach at wiwb.uscourts.gov Tue Jul 19 13:45:20 2005 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Tue, 19 Jul 2005 15:45:20 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: <20050719201608.62923.qmail@web311.biz.mail.mud.yahoo.com> Message-ID: There are some pretty cool server modules available (Net::Daemon for one) but you might also look at the POE stuff. Its a bit of an install but it allows you to build up a complex server w/o having to muss w/ the back end - unless that's what you're trying to learn about. > "or create a socket by hand for better control" also easier to shoot your self in the ... terminal session ;-> a Andy Bach, Sys. Mangler Internet: andy_bach at wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5932 M: Argument is an intellectual process. Contradiction is just the automatic gainsaying of any statement the other person makes. (short pause) A: No it isn't. From shild at sbcglobal.net Tue Jul 19 18:56:47 2005 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Tue, 19 Jul 2005 20:56:47 -0500 Subject: [Chicago-talk] PLESE HELP. TCP server. In-Reply-To: References: Message-ID: <1121824607.667.42.camel@fbsd1.dyndns.org> On Tue, 2005-07-19 at 15:45 -0500, Andy_Bach at wiwb.uscourts.gov wrote: > There are some pretty cool server modules available (Net::Daemon for one) > but you might also look at the POE stuff. Its a bit of an install but it > allows you to build up a complex server w/o having to muss w/ the back end > - unless that's what you're trying to learn about. > > > "or create a socket by hand for better control" > > also easier to shoot your self in the ... terminal session ;-> > > a > If you want to write them yourself, get a copy of "Network Programming with Perl". Not only a good resource for code, but also a good tutorial for these kinds of tasks. > > Andy Bach, Sys. Mangler > Internet: andy_bach at wiwb.uscourts.gov > VOICE: (608) 261-5738 FAX 264-5932 > > M: Argument is an intellectual process. Contradiction is just the > automatic gainsaying of any statement the other person makes. > (short pause) > A: No it isn't. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Scott T. Hildreth From comdog at panix.com Fri Jul 22 06:19:08 2005 From: comdog at panix.com (brian d foy) Date: Fri, 22 Jul 2005 09:19:08 -0400 (EDT) Subject: [Chicago-talk] Llama shindig tonight! Message-ID: Just a reminder: my little shindig is tonight. http://use.perl.org/~brian_d_foy/journal/25718 I have another thought too: If you have a Perl t-shirt, bring it along (even if you don't wear it). I just got a mannequin torso so I can take nice pics of Perl t-shirts for my virtual Perl museum. A coupel of people have asked about bringing snacks or whatever. you don't need to bring anything, but if you like a particular alcoholic beverage you might bring that. Remember that I don't drink, so trusting me to buy anything good is quite the gamble. And, although I'm up at 8 in the morning, that only means I haven't gone to sleep yet. I'll watch the Tour de France coverage then hit the sack, so I won't be around to answer questions about the party. Just show up and I'm sure things will be fine :) -- brian d foy From warren at warrenandrachel.com Fri Jul 22 07:42:41 2005 From: warren at warrenandrachel.com (wsmith) Date: Fri, 22 Jul 2005 09:42:41 -0500 Subject: [Chicago-talk] Llama shindig tonight! In-Reply-To: References: Message-ID: <1122043361.31229.2.camel@wsmithbox> Sorry, I'll have to decline. My wife's in labor! Wish me luck. -Warren On Fri, 2005-07-22 at 09:19 -0400, brian d foy wrote: > Just a reminder: my little shindig is tonight. > > http://use.perl.org/~brian_d_foy/journal/25718 > > I have another thought too: If you have a Perl t-shirt, bring it along > (even if you don't wear it). I just got a mannequin torso so I can take > nice pics of Perl t-shirts for my virtual Perl museum. > > A coupel of people have asked about bringing snacks or whatever. you don't > need to bring anything, but if you like a particular alcoholic beverage > you might bring that. Remember that I don't drink, so trusting me to buy > anything good is quite the gamble. > > And, although I'm up at 8 in the morning, that only means I haven't gone > to sleep yet. I'll watch the Tour de France coverage then hit the sack, so > I won't be around to answer questions about the party. Just show up and > I'm sure things will be fine :) > From easyasy2k at gmail.com Fri Jul 22 15:01:31 2005 From: easyasy2k at gmail.com (Leland Johnson) Date: Fri, 22 Jul 2005 17:01:31 -0500 Subject: [Chicago-talk] Llama party at my place In-Reply-To: <2C2E7B79-FF70-4AF7-BB0F-739A4B5F5A8E@gmail.com> References: <2C2E7B79-FF70-4AF7-BB0F-739A4B5F5A8E@gmail.com> Message-ID: <2df270ef050722150126296ca8@mail.gmail.com> Sorry, I won't be coming. My schedule just got messed up. On 7/18/05, Leland Johnson wrote: > I should be coming. See if I can come down with Andy and Pete. > > On Jul 16, 2005, at 5:18 PM, brian d foy wrote: > > > > > I'm supposed to get a box of Llamas anyday now, so I'm having a book > > release party at my place on Friday, June 22th, atarting around > > 6ish. Let > > me know if you're coming. :) > > > > I said a lot more in my use.perl posting: > > > > http://use.perl.org/~brian_d_foy/journal/25718 > > > > -- > > brian d foy > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk at pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > -- Leland Johnson http://protoplasmic.org From richard at rushlogistics.com Mon Jul 25 09:48:32 2005 From: richard at rushlogistics.com (Richard Reina) Date: Mon, 25 Jul 2005 09:48:32 -0700 (PDT) Subject: [Chicago-talk] strange sockaddr_in error Message-ID: <20050725164832.33852.qmail@web307.biz.mail.mud.yahoo.com> Good Morning All, When I try the following: use Socket; socket(SOCKET, PF_INET, SOCK_DGRAM, getprotobyname("udp"))) or die "socket: $!"; my $portno = 5151; my $packed_ip = inet_aton("192.168.0.2"); my $portaddr = sockaddr_in($portno, $packed_ip); I get: Bad arg length for Socket::pack_sockaddr_in, lenght 0, should be 4 at /usr/lib/perl5/5.8.3/i386-linux-thread-multi/Socket.pm line 373. Does anyone know whatI am doing wrong? Thanks, Richard A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From richard at rushlogistics.com Mon Jul 25 11:00:00 2005 From: richard at rushlogistics.com (Richard Reina) Date: Mon, 25 Jul 2005 11:00:00 -0700 (PDT) Subject: [Chicago-talk] NEVERMIND strange sockaddr_in error In-Reply-To: <20050725164832.33852.qmail@web307.biz.mail.mud.yahoo.com> Message-ID: <20050725180001.20996.qmail@web303.biz.mail.mud.yahoo.com> Nevermind I figured it out. Thanks nonetheless. --- Richard Reina wrote: > Good Morning All, > > When I try the following: > > use Socket; > socket(SOCKET, PF_INET, SOCK_DGRAM, > getprotobyname("udp"))) or die "socket: $!"; > > my $portno = 5151; > my $packed_ip = inet_aton("192.168.0.2"); > my $portaddr = sockaddr_in($portno, $packed_ip); > > I get: > > Bad arg length for Socket::pack_sockaddr_in, lenght > 0, > should be 4 at > /usr/lib/perl5/5.8.3/i386-linux-thread-multi/Socket.pm > line 373. > > Does anyone know whatI am doing wrong? > > Thanks, > > Richard > > A people that values its privileges above its > principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From jt at plainblack.com Tue Jul 26 07:57:57 2005 From: jt at plainblack.com (JT Smith) Date: Tue, 26 Jul 2005 09:57:57 -0500 Subject: [Chicago-talk] perl tests with overhead Message-ID: I need some advice from the testing gods on this list. I have a massive perl application with little or no testing framework, and I want to start adding tests for everything. My problem is that every one of the modules requires the session layer that I've created. Among other things, the session layer manages the database connection. I can easily write tests to verify the session layer, so that's not a problem. The problem comes in that I don't want each test to have to seperately establish a session before running if I can help it. What I'd like to do is create a session and then pass each test a reference to the session. My questions are these: a) Is this a bad idea? Should I just have each module establish it's own session? b) What's the best way to do this? c) What I thought of was making each test a perl module rather than a seperate script, then I can easily pass in the session object. However, will that cause problems? My thought is that if they're all modules theoretically one module could contaminate the results of another module simply because their both being loaded into memory at the same time. There wouldn't be any Exporter or anything so I wouldn't have to worry about overlapping variables and functions, but I worry none-the-less. Do you think this will be a problem? Any pointers? JT ~ Plain Black ph: 703-286-2525 ext. 810 fax: 312-264-5382 http://www.plainblack.com I reject your reality, and substitute my own. ~ Adam Savage From gdf at speakeasy.net Tue Jul 26 09:37:44 2005 From: gdf at speakeasy.net (Greg Fast) Date: Tue, 26 Jul 2005 11:37:44 -0500 Subject: [Chicago-talk] perl tests with overhead In-Reply-To: References: Message-ID: <20050726113744.A21667@speakeasy.net> On Tue, Jul 26, 2005 at 09:57:57AM -0500, JT Smith wrote: > The problem comes in that I don't want each test to have to seperately > establish a session before running if I can help it. What I'd like to do > is create a session and then pass each test a reference to the session. I recently hacked together a solution to a similar testing problem, using the previously-unknown-to-me Test::Harness::Straps. This is the chunk of Harness that runs the test scripts and analyzes/summarizes the output ("1..251", "ok 1", etc). I overrode Straps and swapped out the execution of "perl t/$n.t" with my own test driver. This allowed me to factor a large chunk of common code out of a test suite (basically: configure a server, fork a server, configure a client, run a client, join and cleanup). The relevant bits: package MyStraps; use base 'Test::Harness::Straps'; sub analyze_file { my $self = shift; my $case_file = shift; # run " " my $cmd = $self->_command_line( $self->driver_cmd ) . " $case_file"; open( my $fh, "$cmd |" ) || die $!; return $self->analyze_fh( $case_file, $fh ); } and: use Test::Harness; $Test::Harness::Strap = MyStraps->new(); runtests( @cases ); # t/1.t, t/2.t, ... So this lets you do arbitrary work for each test case. In your example, you could easily replace the exec of the test command ("perl t/1.t") with a in-process execution that provides a shared session (Straps has an analyze() method that takes plain text input), or you could write a driver script that loads and stores the session before providing it to an exec'd script (to avoid local pollution). Normally when you do a "make test", it basically runs runtests(). I haven't bothered to hack up Makefile.PL to make it use my straps (because this is an integration test suite that requires external setup), but it should be possible. -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From jt at plainblack.com Tue Jul 26 18:30:40 2005 From: jt at plainblack.com (JT Smith) Date: Tue, 26 Jul 2005 20:30:40 -0500 Subject: [Chicago-talk] perl tests with overhead In-Reply-To: <20050726113744.A21667@speakeasy.net> References: <20050726113744.A21667@speakeasy.net> Message-ID: Thanks, I'll give this a try. Anybody else got any tips before I get too far? On Tue, 26 Jul 2005 11:37:44 -0500 Greg Fast wrote: > On Tue, Jul 26, 2005 at 09:57:57AM -0500, JT Smith wrote: >> The problem comes in that I don't want each test to have to seperately >> establish a session before running if I can help it. What I'd like to do >> is create a session and then pass each test a reference to the session. > > I recently hacked together a solution to a similar testing problem, > using the previously-unknown-to-me Test::Harness::Straps. This is the > chunk of Harness that runs the test scripts and analyzes/summarizes > the output ("1..251", "ok 1", etc). > > I overrode Straps and swapped out the execution of "perl t/$n.t" with > my own test driver. This allowed me to factor a large chunk of common > code out of a test suite (basically: configure a server, fork a > server, configure a client, run a client, join and cleanup). > > The relevant bits: > > package MyStraps; > use base 'Test::Harness::Straps'; > > sub analyze_file { > my $self = shift; > my $case_file = shift; > > # run " " > my $cmd = $self->_command_line( $self->driver_cmd ) . " $case_file"; > open( my $fh, "$cmd |" ) || die $!; > return $self->analyze_fh( $case_file, $fh ); > } > > and: > > use Test::Harness; > $Test::Harness::Strap = MyStraps->new(); > runtests( @cases ); # t/1.t, t/2.t, ... > > So this lets you do arbitrary work for each test case. In your > example, you could easily replace the exec of the test command ("perl > t/1.t") with a in-process execution that provides a shared session > (Straps has an analyze() method that takes plain text input), or you > could write a driver script that loads and stores the session before > providing it to an exec'd script (to avoid local pollution). > > Normally when you do a "make test", it basically runs runtests(). I > haven't bothered to hack up Makefile.PL to make it use my straps > (because this is an integration test suite that requires external > setup), but it should be possible. > > > -- > Greg Fast > gdf at speakeasy.net > http://cken.chi.groogroo.com/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk JT ~ Plain Black ph: 703-286-2525 ext. 810 fax: 312-264-5382 http://www.plainblack.com I reject your reality, and substitute my own. ~ Adam Savage From ehs at pobox.com Tue Jul 26 20:09:05 2005 From: ehs at pobox.com (Edward Summers) Date: Tue, 26 Jul 2005 22:09:05 -0500 Subject: [Chicago-talk] perl tests with overhead In-Reply-To: References: <20050726113744.A21667@speakeasy.net> Message-ID: > Anybody else got any tips before I get too far? One thing I really like about xUnit [1] style tests is the ability to define a setUp() method that creates an environment for each test to take place in. In addition your test classes can use inheritance: so you could define a top level SessionTest for your other test classes to inherit from. It's unfortunate that Test::Unit appears to have a bad rating on CPAN due to installation problems. Thanks to brian's blog I read an interview w/ Ian Longworth [1] who wrote a new book "Perl Testing a Developer's Notebook". Perhaps there are some hints in there about doing this sort of thing? He mentions a new module called Test::Base which provides a new testing idiom that might be worth taking a look at. [1] http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks [1] http://www.theperlreview.com/Interviews/ian-ptdn-20050712.html //Ed From mongers at bsod.net Wed Jul 27 06:35:51 2005 From: mongers at bsod.net (Pete Krawczyk) Date: Wed, 27 Jul 2005 08:35:51 -0500 (CDT) Subject: [Chicago-talk] perl tests with overhead In-Reply-To: Message-ID: Subject: Re: [Chicago-talk] perl tests with overhead From: Edward Summers Date: Tue, 26 Jul 2005 22:09:05 -0500 }new module called Test::Base which provides a new testing idiom that }might be worth taking a look at. Test::Base is ingy's new data-driven testing framework. He talked about it at YAPC. Slides: http://yapc.kwiki.org/data-driven-testing/slide1.html You need to press "n' on your keyboard to get to the next slide. The color coding goes something like this: red: things going away in the next slide green: things that have changed from the last slide purple: things that are new -Pete K -- Pete Krawczyk mongers at bsod dot net From comdog at panix.com Wed Jul 27 07:49:48 2005 From: comdog at panix.com (brian d foy) Date: Wed, 27 Jul 2005 10:49:48 -0400 (EDT) Subject: [Chicago-talk] Chicago area Perl events on del.icio.us Message-ID: I was chatting with Ed Summers this morning and he was talking about using Del.icio.us to track local computer events. If you know of something, add it to your bookmarks and tag it with "chicomp". Anyone can then see al the events with http://del.icio.us/tag/chicomp or get an RSS feed with http://del.icio.us/rss/tag/chicomp That's cool. :) -- brian d foy From jason at multiply.org Wed Jul 27 10:21:20 2005 From: jason at multiply.org (Jason Gessner) Date: Wed, 27 Jul 2005 12:21:20 -0500 Subject: [Chicago-talk] Chicago area Perl events on del.icio.us In-Reply-To: References: Message-ID: <27FF9910-6AC0-4574-8E5B-D736CAE85878@multiply.org> ed and i also set up an upcoming.org tag for this stuff as well. http://upcoming.org/tag/chicomp upcoming.org is like what meetup.com was, but free and pretty. -jason gessner jason at multiply.org On Jul 27, 2005, at 9:49 AM, brian d foy wrote: > > I was chatting with Ed Summers this morning and he was talking > about using > Del.icio.us to track local computer events. If you know of > something, add > it to your bookmarks and tag it with "chicomp". Anyone can then see > al the > events with > > http://del.icio.us/tag/chicomp > > or get an RSS feed with > > http://del.icio.us/rss/tag/chicomp > > That's cool. :) > > -- > brian d foy > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From joshua.mcadams at gmail.com Thu Jul 28 07:24:18 2005 From: joshua.mcadams at gmail.com (Joshua McAdams) Date: Thu, 28 Jul 2005 09:24:18 -0500 Subject: [Chicago-talk] Internet Provider Message-ID: <49d805d70507280724e69a00d@mail.gmail.com> Do any of you have recommendations for an Internet provider for the area? I picked up a flier in my building for American Wireless Broadband (http://www.awb.us), but have concerns about having multiple PCs connected. Any suggestions? Thanks, Josh From brian.d.foy at gmail.com Thu Jul 28 08:17:59 2005 From: brian.d.foy at gmail.com (brian d foy) Date: Thu, 28 Jul 2005 10:17:59 -0500 Subject: [Chicago-talk] Internet Provider In-Reply-To: <49d805d70507280724e69a00d@mail.gmail.com> References: <49d805d70507280724e69a00d@mail.gmail.com> Message-ID: <2715accf0507280817391eefbe@mail.gmail.com> On 7/28/05, Joshua McAdams wrote: > Do any of you have recommendations for an Internet provider for the > area? I picked up a flier in my building for American Wireless > Broadband (http://www.awb.us), but have concerns about having multiple > PCs connected. Any suggestions? I've been as happy as you can be (which isn't really much) with Comcast (or AT&T Broadband or whatever they call themselves today). I wish only pain and suffering for RCN, however. I would delight in their misery, although the most I can do is not give them money and tell other people not to either. -- brian d foy http://www.panix.com/~comdog/ From shild at sbcglobal.net Thu Jul 28 16:15:30 2005 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Thu, 28 Jul 2005 18:15:30 -0500 Subject: [Chicago-talk] Internet Provider In-Reply-To: <49d805d70507280724e69a00d@mail.gmail.com> References: <49d805d70507280724e69a00d@mail.gmail.com> Message-ID: <1122592530.614.25.camel@fbsd1.dyndns.org> I have been very pleased with SBC. Great service, at least for me. Plus the more services you order from them, phone, dish ...etc) you get monthly discounts on bill. Check out http://www.dslreports.com , look for reviews in your zip code. On Thu, 2005-07-28 at 09:24 -0500, Joshua McAdams wrote: > Do any of you have recommendations for an Internet provider for the > area? I picked up a flier in my building for American Wireless > Broadband (http://www.awb.us), but have concerns about having multiple > PCs connected. Any suggestions? > > Thanks, > Josh > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Scott T. Hildreth From richard at rushlogistics.com Fri Jul 29 11:08:11 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 29 Jul 2005 11:08:11 -0700 (PDT) Subject: [Chicago-talk] delete the first line in a text file. Message-ID: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Anyone know the easiest way remove the 1st line in a text file. I was thinking it should be something like: upen(FILE, "text.txt"); # delete the 1st (top) line close(FILE); but I've obviously come up short. A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From jason at multiply.org Fri Jul 29 11:10:00 2005 From: jason at multiply.org (jason@multiply.org) Date: Fri, 29 Jul 2005 13:10:00 -0500 Subject: [Chicago-talk] possible freelance job.... Message-ID: <20050729131000.hjaco6zuphk4gss0@manage.multiply.org> Hi all. I received this email from a friend of mine at a san francisco based company: =============================================== My company has a need for a web-based tool, probably written in PHP or something similar (inexpensive, *nix friendly, fast to code in) that looks at a DTD, adds in some default/typical values, lays out the options on a web form for the user to pick & choose from, and generates an XML file based on the options that is compliant with the DTD. Do you know if such a tool already exists? Would either of you be interested in helping implement such a tool for us? ================================================ does anyone know of anything like this or would anyone be willing to build something? Thanks! -jason gessner jason at multiply.org From mongers at bsod.net Fri Jul 29 11:23:19 2005 From: mongers at bsod.net (Pete Krawczyk) Date: Fri, 29 Jul 2005 13:23:19 -0500 (CDT) Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: Subject: [Chicago-talk] delete the first line in a text file. From: Richard Reina Date: Fri, 29 Jul 2005 11:08:11 -0700 (PDT) }Anyone know the easiest way remove the 1st line in a }text file. I was thinking it should be something }like: I personally would use: # perl -ni.bak -e'print if ++$a > 1;' filename.txt which will create a filename.bak with the original file, and a filename.txt with the first line missing. (You can shorten to "-ni -e" if you don't need a backup.) -Pete K -- Pete Krawczyk mongers at bsod dot net From thomasoniii at gmail.com Fri Jul 29 11:32:42 2005 From: thomasoniii at gmail.com (Jim Thomason) Date: Fri, 29 Jul 2005 13:32:42 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: <5cfdfaf705072911326b69f18a@mail.gmail.com> Surely we can't let such an obvious challenge go answered by only one response! We Perl guys just love to come up with excessive excessively short ways to do things. perl -ni -e 'print unless 1..1' file.txt God, I'm so turned on right now. -Jim...... On 7/29/05, Pete Krawczyk wrote: > Subject: [Chicago-talk] delete the first line in a text file. > From: Richard Reina > Date: Fri, 29 Jul 2005 11:08:11 -0700 (PDT) > > }Anyone know the easiest way remove the 1st line in a > }text file. I was thinking it should be something > }like: > > I personally would use: > # perl -ni.bak -e'print if ++$a > 1;' filename.txt > which will create a filename.bak with the original file, and a > filename.txt with the first line missing. (You can shorten to > "-ni -e" if you don't need a backup.) > > -Pete K > -- > Pete Krawczyk > mongers at bsod dot net > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From wiggins at danconia.org Fri Jul 29 11:45:37 2005 From: wiggins at danconia.org (Wiggins d'Anconia) Date: Fri, 29 Jul 2005 12:45:37 -0600 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <5cfdfaf705072911326b69f18a@mail.gmail.com> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <5cfdfaf705072911326b69f18a@mail.gmail.com> Message-ID: <42EA7951.7060609@danconia.org> Jim Thomason wrote: > Surely we can't let such an obvious challenge go answered by only one > response! We Perl guys just love to come up with excessive excessively > short ways to do things. > > perl -ni -e 'print unless 1..1' file.txt perl -ni -e 'print if $.>1' file.txt A couple characters.... http://danconia.org > > God, I'm so turned on right now. > > -Jim...... > > On 7/29/05, Pete Krawczyk wrote: > >>Subject: [Chicago-talk] delete the first line in a text file. >>From: Richard Reina >>Date: Fri, 29 Jul 2005 11:08:11 -0700 (PDT) >> >>}Anyone know the easiest way remove the 1st line in a >>}text file. I was thinking it should be something >>}like: >> >>I personally would use: >> # perl -ni.bak -e'print if ++$a > 1;' filename.txt >>which will create a filename.bak with the original file, and a >>filename.txt with the first line missing. (You can shorten to >>"-ni -e" if you don't need a backup.) >> >>-Pete K From andy at petdance.com Fri Jul 29 11:54:32 2005 From: andy at petdance.com (Andy Lester) Date: Fri, 29 Jul 2005 13:54:32 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: <20050729185432.GA15014@petdance.com> On Fri, Jul 29, 2005 at 11:08:11AM -0700, Richard Reina (richard at rushlogistics.com) wrote: > Anyone know the easiest way remove the 1st line in a > text file. I was thinking it should be something > like: Read the FAQ. It's in there. -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From warren at warrenandrachel.com Fri Jul 29 12:18:12 2005 From: warren at warrenandrachel.com (wsmith) Date: Fri, 29 Jul 2005 14:18:12 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729185432.GA15014@petdance.com> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> Message-ID: <1122664692.14217.0.camel@wsmithbox> cat file | tail -n +2 On Fri, 2005-07-29 at 13:54 -0500, Andy Lester wrote: > On Fri, Jul 29, 2005 at 11:08:11AM -0700, Richard Reina (richard at rushlogistics.com) wrote: > > Anyone know the easiest way remove the 1st line in a > > text file. I was thinking it should be something > > like: > > Read the FAQ. It's in there. > From wiggins at danconia.org Fri Jul 29 12:28:23 2005 From: wiggins at danconia.org (Wiggins d'Anconia) Date: Fri, 29 Jul 2005 13:28:23 -0600 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <1122664692.14217.0.camel@wsmithbox> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> Message-ID: <42EA8357.1040609@danconia.org> UUOC alert: tail -n +2 file.txt > out.txt http://danconia.org wsmith wrote: > cat file | tail -n +2 > > On Fri, 2005-07-29 at 13:54 -0500, Andy Lester wrote: > >>On Fri, Jul 29, 2005 at 11:08:11AM -0700, Richard Reina (richard at rushlogistics.com) wrote: >> >>>Anyone know the easiest way remove the 1st line in a >>>text file. I was thinking it should be something >>>like: >> >>Read the FAQ. It's in there. >> > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From andy at petdance.com Fri Jul 29 12:32:41 2005 From: andy at petdance.com (Andy Lester) Date: Fri, 29 Jul 2005 14:32:41 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <1122664692.14217.0.camel@wsmithbox> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> Message-ID: <20050729193241.GB15014@petdance.com> On Fri, Jul 29, 2005 at 02:18:12PM -0500, wsmith (warren at warrenandrachel.com) wrote: > cat file | tail -n +2 cat is unnecessary. tail -n +2 file -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From richard at rushlogistics.com Fri Jul 29 13:48:19 2005 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 29 Jul 2005 13:48:19 -0700 (PDT) Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729185432.GA15014@petdance.com> Message-ID: <20050729204819.35478.qmail@web302.biz.mail.mud.yahoo.com> Thank you for all the great responses. Hope everyone has a great weekend. --- Andy Lester wrote: > On Fri, Jul 29, 2005 at 11:08:11AM -0700, Richard > Reina (richard at rushlogistics.com) wrote: > > Anyone know the easiest way remove the 1st line in > a > > text file. I was thinking it should be something > > like: > > Read the FAQ. It's in there. > > -- > Andy Lester => andy at petdance.com => www.petdance.com > => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > A people that values its privileges above its principles soon loses both. -Dwight D. Eisenhower. From jjstrauss at gmail.com Fri Jul 29 14:24:14 2005 From: jjstrauss at gmail.com (Jay Strauss) Date: Fri, 29 Jul 2005 16:24:14 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <42EA8357.1040609@danconia.org> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> <42EA8357.1040609@danconia.org> Message-ID: I had to look up UUOC (Useless Use of cat). Its funny there is an an acronym for it. Also, I think it was on this list, someone mentioned a term, I can't remember what it is, and I can't come up the the right incantation for google. The term is invoked when someone mentions nazism. And it basically means that the thread is dead and the poster who mentioned nazism loses the argument automatically. Does anyone know the term? Jay On 7/29/05, Wiggins d'Anconia wrote: > UUOC alert: tail -n +2 file.txt > out.txt > > http://danconia.org > > wsmith wrote: > > cat file | tail -n +2 > > > > On Fri, 2005-07-29 at 13:54 -0500, Andy Lester wrote: > > > >>On Fri, Jul 29, 2005 at 11:08:11AM -0700, Richard Reina (richard at rushlogistics.com) wrote: > >> > >>>Anyone know the easiest way remove the 1st line in a > >>>text file. I was thinking it should be something > >>>like: > >> > >>Read the FAQ. It's in there. > >> > > > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk at pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From gdf at speakeasy.net Fri Jul 29 14:43:29 2005 From: gdf at speakeasy.net (Greg Fast) Date: Fri, 29 Jul 2005 16:43:29 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> <42EA8357.1040609@danconia.org> Message-ID: <20050729164329.A14351@speakeasy.net> On Fri, Jul 29, 2005 at 04:24:14PM -0500, Jay Strauss wrote: > Also, I think it was on this list, someone mentioned a term, I can't > remember what it is, and I can't come up the the right incantation for > google. The term is invoked when someone mentions nazism. And it > basically means that the thread is dead and the poster who mentioned > nazism loses the argument automatically. Does anyone know the term? Godwin's Law: http://www.catb.org/~esr/jargon/html/G/Godwins-Law.html http://en.wikipedia.org/wiki/Godwin%27s_law -- Greg Fast gdf at speakeasy.net http://cken.chi.groogroo.com/ From jkeen at verizon.net Fri Jul 29 19:41:17 2005 From: jkeen at verizon.net (James Keenan) Date: Fri, 29 Jul 2005 22:41:17 -0400 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: On Jul 29, 2005, at 2:08 PM, Richard Reina wrote: > > > Anyone know the easiest way remove the 1st line in a > text file. I was thinking it should be something > like: > > upen(FILE, "text.txt"); > # delete the 1st (top) line > > close(FILE); > > > but I've obviously come up short. > Given the simplicity of the problem you pose, what follows is NOT the best way to solve the problem. But it is a useful way to approach many problems of this sort: perldoc Tie::File (or: http://search.cpan.org/dist/Tie-File/) jimk From lembark at wrkhors.com Fri Jul 29 23:09:58 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Sat, 30 Jul 2005 02:09:58 -0400 Subject: [Chicago-talk] Internet Provider In-Reply-To: <49d805d70507280724e69a00d@mail.gmail.com> References: <49d805d70507280724e69a00d@mail.gmail.com> Message-ID: <1A53DAA7AC9E743509ED0012@[192.168.1.2]> -- Joshua McAdams > Do any of you have recommendations for an Internet provider for the > area? I picked up a flier in my building for American Wireless > Broadband (http://www.awb.us), but have concerns about having multiple > PCs connected. Any suggestions? If you have servers and want guaranteed bandwidth, dns secondary, email MX backup check out ISPFH (http://www.ispfh.org/). It's a non-profit "citizens utility" cooperative: less likely to screw the customers than most. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Fri Jul 29 23:10:40 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Sat, 30 Jul 2005 02:10:40 -0400 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> Message-ID: -- Richard Reina > > > Anyone know the easiest way remove the 1st line in a > text file. I was thinking it should be something > like: > > upen(FILE, "text.txt"); ># delete the 1st (top) line > > close(FILE); > > > but I've obviously come up short. > > > > A people that values its privileges above its principles soon loses both. > -Dwight D. Eisenhower. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Fri Jul 29 23:11:35 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Sat, 30 Jul 2005 02:11:35 -0400 Subject: [Chicago-talk] delete the first line in a text file. Message-ID: <58017447C63AEA74A4BE2D3A@A329CA9CF730586E6F5001CC> -- Richard Reina > > > Anyone know the easiest way remove the 1st line in a > text file. I was thinking it should be something > like: > > upen(FILE, "text.txt"); ># delete the 1st (top) line > > close(FILE); > > > but I've obviously come up short. perl -i~ -n -e 'print if $. > 1' /path/to/file; -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From jjstrauss at gmail.com Sat Jul 30 07:23:07 2005 From: jjstrauss at gmail.com (Jay Strauss) Date: Sat, 30 Jul 2005 09:23:07 -0500 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <20050729164329.A14351@speakeasy.net> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> <42EA8357.1040609@danconia.org> <20050729164329.A14351@speakeasy.net> Message-ID: Right. Jim replied offlist and gave me the answer too Jay On 7/29/05, Greg Fast wrote: > On Fri, Jul 29, 2005 at 04:24:14PM -0500, Jay Strauss wrote: > > Also, I think it was on this list, someone mentioned a term, I can't > > remember what it is, and I can't come up the the right incantation for > > google. The term is invoked when someone mentions nazism. And it > > basically means that the thread is dead and the poster who mentioned > > nazism loses the argument automatically. Does anyone know the term? > > Godwin's Law: > http://www.catb.org/~esr/jargon/html/G/Godwins-Law.html > http://en.wikipedia.org/wiki/Godwin%27s_law > > -- > Greg Fast > gdf at speakeasy.net > http://cken.chi.groogroo.com/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Sat Jul 30 11:02:46 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Sat, 30 Jul 2005 14:02:46 -0400 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: <1122664692.14217.0.camel@wsmithbox> References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> Message-ID: -- wsmith > cat file | tail -n +2 why the cat? tail -n +2 file; -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From lembark at wrkhors.com Sat Jul 30 11:04:00 2005 From: lembark at wrkhors.com (Steven Lembark) Date: Sat, 30 Jul 2005 14:04:00 -0400 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> <42EA8357.1040609@danconia.org> Message-ID: <6020722FFE10FE10E8E8454A@[192.168.1.2]> -- Jay Strauss > I had to look up UUOC (Useless Use of cat). Its funny there is an an > acronym for it. Randal Schwartz invented the term after seeing too much feline abuse to stand it any longer. -- Steven Lembark 85-09 90th Street Workhorse Computing Woodhaven, NY 11421 lembark at wrkhors.com 1 888 359 3508 From merlyn at stonehenge.com Sat Jul 30 11:11:14 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 30 Jul 2005 11:11:14 -0700 Subject: [Chicago-talk] delete the first line in a text file. In-Reply-To: References: <20050729180811.55798.qmail@web304.biz.mail.mud.yahoo.com> <20050729185432.GA15014@petdance.com> <1122664692.14217.0.camel@wsmithbox> <42EA8357.1040609@danconia.org> Message-ID: <863bpw88ql.fsf@blue.stonehenge.com> >>>>> "Jay" == Jay Strauss writes: Jay> Also, I think it was on this list, someone mentioned a term, I can't Jay> remember what it is, and I can't come up the the right incantation for Jay> google. The term is invoked when someone mentions nazism. And it Jay> basically means that the thread is dead and the poster who mentioned Jay> nazism loses the argument automatically. Does anyone know the term? Wikipedia sees all, knows all, for some meanings of "all": And there's even a reference to UUOC: -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!