From scott.l.miller at hp.com Tue Feb 1 11:07:58 2005 From: scott.l.miller at hp.com (Miller, Scott L (Omaha Networks)) Date: Tue Feb 1 11:08:13 2005 Subject: [Omaha.pm] Perl-golf -- zero-pad an IP address. Message-ID: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E7E7@omaexc11.americas.cpqcorp.net> Great link. I particularly loved this question/answer: (man, I wanted to paraphrase all this, but it all builds up so well, any attempt at paraphrasing just weakens the message...) (appologies to those reading on fixed width mail readers. Cut and paste it into your favorite word wrapping enabled application.) -------start quote------- Builder AU: In an interview a few years ago you said that "Programming is a Dark Art, and it will always be". Don't you think with the advent of Model Driven Development that this thought of programming being a dark art will cease to exist? Damian Conway: Well, I guess we can always hope. But no, I don't think MDD (or even AMDD) is the silver bullet. It seems that every few years a new development technique is hailed as the start of the Programming Renaissance, the Golden Age of Scientific Software Development. And none ever is. Stored instructions. Assemblers. High-level languages. Structured programming. Functional programming. Logic programming. Object- oriented programming. 4GLs. Model-View-Controller. Visual programming. UML. Extreme Programming. And despite them all, operating systems and applications are buggier, less reliable, less secure, and less usable than ever. Of course, the problem is not in these development tools. It's in us. All of these approaches are based on a false premise, the same desperate illusion that every programmer clings to: that the universe of problems to be solved is homogeneous, and that our task as programmers is predictable enough for one approach, one methodology, one language, one standard library to fit all problems. But the real world isn't like that -- no matter how much our politicians and our religious leaders and our advertising executives would like us to believe it. Our world is complex, and inconsistent, and piecemeal. And it's the same in the virtual worlds in which programmers work. The second half of that quote is: "The programmer is fighting against the two most destructive forces in the universe: entropy and human stupidity. They're not things you can always overcome with a 'methodology' or on a schedule." If we're talking specifically about Module-Driven Development, the underlying fallacy this time is that real problems are always susceptible to being modelled accurately enough. Or at all. Whereas the quotation points out that the universe is governed by entropy -- the tendency for disorder, lack of pattern, and non-conformance to coherent models all to increase over time. And that same tendency is present in every human system and all our organisations, which grow and diversify and adapt under a myriad of conflicting influences and demands, until they collapse under the weight of their own internal contradictions and stupidities. So, for the programmer, reality is constantly outstripping, outsmarting, and out-weirding our ability to model it. And that fundamental limitation is only made worse by the fact that we build systems that are to be used, controlled, operated, maintained, and extended by human beings: creatures of consummate inconsistency, self-contradiction, and irrationality. So not only can't you model your proposed system accurately, you can't even model the expected usage of your system. And the final nail in the coffin is that your system has to be designed and built by the self-same inconsistent, contradiction-wracked, irrational humans (i.e. you). So you can't even reliably model the development of the system. There is no silver bullet. Because not every problem is a werewolf. Some are vampires -- for which you need the wooden stake of OO design or the garlic of functional decomposition. Some are demons -- for which the sacred rites of M-V-C may be the cure. And many problems aren't really classifiable at all: just Frankensteinian amalgams of unrelated parts, cobbled together by some crazed developer. In which case your only option is to grab your favorite text editor, roll up your sleeves, descend into the darkness, and start hacking. -------end quote------- -Scott -----Original Message----- From: omaha-pm-bounces@pm.org [mailto:omaha-pm-bounces@pm.org]On Behalf Of Jay Hannah Sent: Sunday, January 30, 2005 11:14 PM To: Perl Mongers of Omaha, Nebraska USA Subject: Re: [Omaha.pm] Perl-golf -- zero-pad an IP address. On Jan 30, 2005, at 10:46 PM, Daniel Linder wrote: > And that is just why I love Perl -- compactness when needed, or > verboseness when warranted... Ya. Here's Damian pointing out how much overhead "hello world" has in Java: http://www.builderau.com.au/program/0,39024614,39160082,00.htm j _______________________________________________ Omaha-pm mailing list Omaha-pm@pm.org http://mail.pm.org/mailman/listinfo/omaha-pm From scott.l.miller at hp.com Tue Feb 1 12:56:49 2005 From: scott.l.miller at hp.com (Miller, Scott L (Omaha Networks)) Date: Tue Feb 1 12:56:59 2005 Subject: [Omaha.pm] next can jump out of a sub? Message-ID: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E7E8@omaexc11.americas.cpqcorp.net> I actually discovered one of my scripts was using this feature after I'd moved some code into a subroutine, and forgot about dealing with the "next" statements... It also reminds me of an ugly construct I'd created in BASIC back in high school. Basically I ended up with an if, next, endif, for, goto sequence that placed the next before the for, and it worked. I had a bit of a reputation for hideous spaghetti code after that one :) -Scott -----Original Message----- From: omaha-pm-bounces@mail.pm.org [mailto:omaha-pm-bounces@mail.pm.org]On Behalf Of Jay Hannah Sent: Thursday, December 23, 2004 12:47 PM To: omaha-pm@pm.org Subject: [Omaha.pm] next can jump out of a sub? Wow. What do you suppose this prints? I thought it would (1) syntax error (next without loop) or (2) print 1 and then exit. I was wrong... j for (1..5) { print "$_\n"; x(); exit; } sub x { next; } _______________________________________________ Omaha-pm mailing list Omaha-pm@mail.pm.org http://www.pm.org/mailman/listinfo/omaha-pm From scott.l.miller at hp.com Tue Feb 1 12:56:49 2005 From: scott.l.miller at hp.com (Miller, Scott L (Omaha Networks)) Date: Tue Feb 1 12:57:00 2005 Subject: [Omaha.pm] next can jump out of a sub? Message-ID: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E7E8@omaexc11.americas.cpqcorp.net> I actually discovered one of my scripts was using this feature after I'd moved some code into a subroutine, and forgot about dealing with the "next" statements... It also reminds me of an ugly construct I'd created in BASIC back in high school. Basically I ended up with an if, next, endif, for, goto sequence that placed the next before the for, and it worked. I had a bit of a reputation for hideous spaghetti code after that one :) -Scott -----Original Message----- From: omaha-pm-bounces@mail.pm.org [mailto:omaha-pm-bounces@mail.pm.org]On Behalf Of Jay Hannah Sent: Thursday, December 23, 2004 12:47 PM To: omaha-pm@pm.org Subject: [Omaha.pm] next can jump out of a sub? Wow. What do you suppose this prints? I thought it would (1) syntax error (next without loop) or (2) print 1 and then exit. I was wrong... j for (1..5) { print "$_\n"; x(); exit; } sub x { next; } _______________________________________________ Omaha-pm mailing list Omaha-pm@mail.pm.org http://www.pm.org/mailman/listinfo/omaha-pm From hjarce2001 at yahoo.com Thu Feb 3 14:51:03 2005 From: hjarce2001 at yahoo.com (Hugh Jarce) Date: Thu Feb 3 14:51:13 2005 Subject: [Omaha.pm] if ($a > $b) { $b = $a } In-Reply-To: <8046479841F5F84C9BD1F5CF4AD4379E027F90C2@OMA-G-L.intranet.hdr> Message-ID: <20050203225104.98842.qmail@web50506.mail.yahoo.com> "Tegels, Kent" wrote: > Well, there's the dreaded: > $b = ($a > b$ ? $a : $b); > > But that's less readable than what you have. This expression returns the maximum of $a and $b: [ $a => $b ] -> [ $a <= $b ] Though less readable than your version, it's more enjoyable to read. :-) As much as I like it, I can't recommend it for production code. Hugh __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From jay at jays.net Sat Feb 5 18:26:17 2005 From: jay at jays.net (Jay Hannah) Date: Sat Feb 5 18:26:26 2005 Subject: [Omaha.pm] debugger breaks automatically if you're 100 levels deepin subroutine calls! In-Reply-To: <8046479841F5F84C9BD1F5CF4AD4379E0250E9DB@OMA-G-L.intranet.hdr> References: <8046479841F5F84C9BD1F5CF4AD4379E0250E9DB@OMA-G-L.intranet.hdr> Message-ID: <7ADB9970-77E6-11D9-BD72-000A95E317B8@jays.net> A month later... -grin- On Dec 29, 2004, at 5:08 PM, Tegels, Kent wrote: > Q. What song do PerlMonger most like to Karaoke to? > A. #!s, duh. Pound bangs? > Q. Does that mean that William Huang uses Perl? > A. I'd need to study() that. What? uhhh...... I don't get it. help! -grin- j From jay at jays.net Sat Feb 5 19:22:32 2005 From: jay at jays.net (Jay Hannah) Date: Sat Feb 5 19:22:44 2005 Subject: [Omaha.pm] next can jump out of a sub? In-Reply-To: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E7E8@omaexc11.americas.cpqcorp.net> References: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E7E8@omaexc11.americas.cpqcorp.net> Message-ID: <5691D1F4-77EE-11D9-BD72-000A95E317B8@jays.net> On Feb 1, 2005, at 2:56 PM, Miller, Scott L (Omaha Networks) wrote: > It also reminds me of an ugly construct I'd created in > BASIC back in > high school. Basically I ended up with an if, next, endif, for, > goto sequence > that placed the next before the for, and it worked. I had a bit > of a reputation > for hideous spaghetti code after that one :) > IMHO anyone that intentionally uses next to jump out of a subroutine deserves some sort of reputation... :) -shudder- Gives me the willies... Anyone else remember "programming" Logo in school? http://www.terrapinlogo.com/show.cgi? id=100090421012721968831&file=about/start.html We only did the most basic shapes. I didn't know they've taken it to the level of fractal art. -laugh- Here's an online version! http://www.embry.com/rLogo/rLogo.html j From ranorton at cox.net Sat Feb 5 21:04:48 2005 From: ranorton at cox.net (Richard Norton) Date: Sat Feb 5 21:05:01 2005 Subject: [Omaha.pm] debugger breaks automatically if you're 100 levels deepin subroutine calls! In-Reply-To: <7ADB9970-77E6-11D9-BD72-000A95E317B8@jays.net> References: <8046479841F5F84C9BD1F5CF4AD4379E0250E9DB@OMA-G-L.intranet.hdr> <7ADB9970-77E6-11D9-BD72-000A95E317B8@jays.net> Message-ID: Amoung UNIX/Linux scripters, the #! structure that's used to allow your shell to determine what alternate shell/interpreter should be used to execute a script, without having to state the shell/interpreter on the command line, if frequently spoken as 'shebang', rather than pound bang. I don't know why, it's just the way it is. And it makes the joke sort of make sense. Richard On Sat, 5 Feb 2005 20:26:17 -0600, Jay Hannah wrote: > > A month later... -grin- > > On Dec 29, 2004, at 5:08 PM, Tegels, Kent wrote: >> Q. What song do PerlMonger most like to Karaoke to? >> A. #!s, duh. > > Pound bangs? > >> Q. Does that mean that William Huang uses Perl? >> A. I'd need to study() that. > > What? > > uhhh...... I don't get it. help! -grin- > > j > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm@pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ From jhannah at omnihotels.com Sun Feb 6 08:29:14 2005 From: jhannah at omnihotels.com (Jay Hannah) Date: Sun Feb 6 08:28:35 2005 Subject: [Omaha.pm] 1992 source code... Message-ID: <200502061628.j16GSNjZ011381@omares-email.omnihotels.com> "Committed to RCS" (9 years, 4 months ago) by jhannah (I used the RCS commit switch which commits effective the last mod time stamp on the file.) # MODULE S_getmthtx Version: 01-01/28/92 # # # # By Steve Osborn http://cvs/source/common/i4gl/S_getmthtx.4gl?rev=1.1&sortby=date&content-type=text/vnd.viewcvs-markup Wow. 13 years ago. I feel really bad for whatever programmer is going to be reading my Perl in the year 2018! -grin- j From jay at jays.net Sun Feb 6 21:39:39 2005 From: jay at jays.net (Jay Hannah) Date: Sun Feb 6 21:39:51 2005 Subject: [Omaha.pm] debugger breaks automatically if you're 100 levels deepin subroutine calls! In-Reply-To: References: <8046479841F5F84C9BD1F5CF4AD4379E0250E9DB@OMA-G-L.intranet.hdr> <7ADB9970-77E6-11D9-BD72-000A95E317B8@jays.net> Message-ID: >> On Dec 29, 2004, at 5:08 PM, Tegels, Kent wrote: >>> Q. What song do PerlMonger most like to Karaoke to? >>> A. #!s, duh. >> >> Pound bangs? On Feb 5, 2005, at 11:04 PM, Richard Norton wrote: > Amoung UNIX/Linux scripters, the #! structure that's used to allow > your shell to determine what alternate shell/interpreter should be > used to execute a script, without having to state the > shell/interpreter on the command line, if frequently spoken as > 'shebang', rather than pound bang. I don't know why, it's just the > way it is. And it makes the joke sort of make sense. Uhh... There's a song/s called "shebang/s"? -googling- Uhh... Here's a group called shebang... http://www.stlyrics.com/songs/s/shebang9625.html j still doesn't get it -laugh- From dan at linder.org Wed Feb 9 11:27:45 2005 From: dan at linder.org (Daniel Linder) Date: Wed Feb 9 11:19:37 2005 Subject: [Omaha.pm] Passing arguments to "sprintf"... Message-ID: <55365.207.108.40.31.1107977265.squirrel@207.108.40.31> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here is a quick one...hopefully. I have the following program: - --- begin code --- #!/usr/bin/perl use strict; my $testcase; sub LogIt { my @LogString = @_; open (LOGFILE, ">>/tmp/mylogfile"); printf (LOGFILE "This is test case %d\n", $testcase); if (1 == $testcase) { # This section works just fine! printf (LOGFILE @LogString); #line in question } else { # This section prints "2" for the my $myline = sprintf (@LogString); print (LOGFILE $myline); } printf (LOGFILE "\n"); close (LOGFILE); } $testcase = 1; LogIt ("one: %s\n", "This works!"); my $string = "This works too!"; LogIt ("two: %s\n", $string); $testcase = 2; LogIt ("one: %s\n", "This fails!"); my $string = "This fails too!"; LogIt ("two: %s\n", $string); - --- end code --- The contents of the log file are here: - --- begin logfile --- This is test case 1 one: This works! This is test case 1 two: This works too! This is test case 2 2 This is test case 2 2 - --- end logfile --- Why does the changing from "sprintf" to "printf" seem to make such a huge difference? Or am I missing something? Dan - - - - - "I do not fear computer, I fear the lack of them." -- Isaac Asimov GPG fingerprint:9EE8 ABAE 10D3 0B55 C536 E17A 3620 4DCA A533 19BF -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCCmQxNiBNyqUzGb8RAm2hAJ4hKT9HsUXG77Jpxvg/15EzmmwR7gCdFj5T JGHFY5+XJ9tpUT9XScVBdWo= =J6bD -----END PGP SIGNATURE----- From andy at petdance.com Wed Feb 9 12:11:37 2005 From: andy at petdance.com (Andy Lester) Date: Wed Feb 9 12:12:01 2005 Subject: [Omaha.pm] Passing arguments to "sprintf"... In-Reply-To: <55365.207.108.40.31.1107977265.squirrel@207.108.40.31> References: <55365.207.108.40.31.1107977265.squirrel@207.108.40.31> Message-ID: <20050209201137.GA22798@petdance.com> On Wed, Feb 09, 2005 at 01:27:45PM -0600, Daniel Linder (dan@linder.org) wrote: > # This section prints "2" for the > my $myline = sprintf (@LogString); sprintf's prototype is ($;@), meaning it demands the first parm be a scalar. Because it wants a scalar first, it coerces @LogString into a scalar, in this case "2" since that's the number of elements in @LogString; Do it as: my $mask = shift @LogString; my $line = sprintf( $mask, @LogString ); xoxo, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From dan at linder.org Wed Feb 9 13:19:56 2005 From: dan at linder.org (Daniel Linder) Date: Wed Feb 9 13:11:44 2005 Subject: [Omaha.pm] Passing arguments to "sprintf"... In-Reply-To: <20050209201137.GA22798@petdance.com> References: <55365.207.108.40.31.1107977265.squirrel@207.108.40.31> <20050209201137.GA22798@petdance.com> Message-ID: <55277.207.108.40.31.1107983996.squirrel@207.108.40.31> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I asked why this line didn't work: > my $myline = sprintf (@LogString); Andy Lester replied: > Do it as: > my $mask = shift @LogString; > my $line = sprintf( $mask, @LogString ); Thanks, that works perfectly! Dan - - - - - "I do not fear computer, I fear the lack of them." -- Isaac Asimov GPG fingerprint:9EE8 ABAE 10D3 0B55 C536 E17A 3620 4DCA A533 19BF -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCCn58NiBNyqUzGb8RAry8AJwJrLlG6QW/MLpPinR6loHaeollLwCePmrG YuHJoZ7zHQ0Y4i2D7yU5C2k= =ZLsq -----END PGP SIGNATURE----- From jay at jays.net Wed Feb 9 14:03:19 2005 From: jay at jays.net (Jay Hannah) Date: Wed Feb 9 14:03:28 2005 Subject: [Omaha.pm] (no subject) Message-ID: <05130b534ec76063c11420652a1dc46c@jays.net> Test suites rule... We're up to 2121 tests now! j ... ./Control/t/Hotels..........................................ok ./Control/t/RatesAvailBlock.................................ok ./Control/t/Globals.........................................ok ./Control/t/Logger..........................................ok ./Control/t/Inventory.......................................ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- ./Model/Pegasus/Message/t/BOOKRQ_ 2 512 83 2 2.41% 32 42 ./Model/Pegasus/Message/t/BOOKRQ_ 255 65280 8 2 25.00% 5 8 ./Model/omares/crs/t/RoomTypes.t 5 1280 14 5 35.71% 4-8 38 subtests skipped. Failed 3/123 test scripts, 97.56% okay. 9/2121 subtests failed, 99.58% okay. From andy at petdance.com Wed Feb 9 14:27:05 2005 From: andy at petdance.com (Andy Lester) Date: Wed Feb 9 14:27:14 2005 Subject: [Omaha.pm] (no subject) In-Reply-To: <05130b534ec76063c11420652a1dc46c@jays.net> References: <05130b534ec76063c11420652a1dc46c@jays.net> Message-ID: <20050209222705.GB24347@petdance.com> On Wed, Feb 09, 2005 at 04:03:19PM -0600, Jay Hannah (jay@jays.net) wrote: > Test suites rule... We're up to 2121 tests now! Excellent! Are you tracking test counts over time? xoxo, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Wed Feb 9 15:09:01 2005 From: jay at jays.net (Jay Hannah) Date: Wed Feb 9 15:09:11 2005 Subject: [Omaha.pm] test suites In-Reply-To: <20050209222705.GB24347@petdance.com> References: <05130b534ec76063c11420652a1dc46c@jays.net> <20050209222705.GB24347@petdance.com> Message-ID: <21d1375a53df7f122b1e0d7b8483fb11@jays.net> On Feb 9, 2005, at 4:27 PM, Andy Lester wrote: > On Wed, Feb 09, 2005 at 04:03:19PM -0600, Jay Hannah (jay@jays.net) > wrote: >> Test suites rule... We're up to 2121 tests now! > > Excellent! Are you tracking test counts over time? Ya. 2002: 0 2005: 2121 -grin- I suppose we should snapshot that once a month or something... > xoxo, Are you blowing me kisses? I don't think my wife would appreciate that. -grin- j From andy at petdance.com Wed Feb 9 15:26:57 2005 From: andy at petdance.com (Andy Lester) Date: Wed Feb 9 15:27:07 2005 Subject: [Omaha.pm] test suites In-Reply-To: <21d1375a53df7f122b1e0d7b8483fb11@jays.net> References: <05130b534ec76063c11420652a1dc46c@jays.net> <20050209222705.GB24347@petdance.com> <21d1375a53df7f122b1e0d7b8483fb11@jays.net> Message-ID: <20050209232657.GB24843@petdance.com> > On Feb 9, 2005, at 4:27 PM, Andy Lester wrote: > 2002: 0 > 2005: 2121 > > I suppose we should snapshot that once a month or something... It's easier to see trends, and what I suspect will be a roughly parabolic curve. Not that we snapshot 'em, mind you. :-) xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Wed Feb 9 16:32:24 2005 From: jay at jays.net (Jay Hannah) Date: Wed Feb 9 16:32:34 2005 Subject: [Omaha.pm] test suites In-Reply-To: <20050209232657.GB24843@petdance.com> References: <05130b534ec76063c11420652a1dc46c@jays.net> <20050209222705.GB24347@petdance.com> <21d1375a53df7f122b1e0d7b8483fb11@jays.net> <20050209232657.GB24843@petdance.com> Message-ID: <03f4e9e7c871365ccd82735319c4029f@jays.net> >> 2002: 0 >> 2005: 2121 >> >> I suppose we should snapshot that once a month or something... > > It's easier to see trends, and what I suspect will be a roughly > parabolic curve. > > Not that we snapshot 'em, mind you. :-) Sweet... I hooked one of my tests back in. It's a doozy -- it multiplexes a bunch of data through a ball of goo and tests the "packets" on the other side. 1000 packets. So now we have 1000 more tests than we did a couple hours ago (is that cheating? -grin-) ... ./Control/Multiplex/Buffer/t/FIFO...........................ok ./Control/Multiplex/Buffer/t/TCP............................ok ./Control/Multiplex/Buffer/TCP/t/WriteOnce..................ok ./Control/Multiplex/Buffer/TCP/t/Listen.....................ok ./Control/Multiplex/Payload/t/Raw...........................ok ./Control/Multiplex/Payload/t/USW...........................ok ./Control/Multiplex/Payload/t/ASCII00_Delim.................ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- ./Model/Pegasus/Message/t/BOOKRQ_ 2 512 83 2 2.41% 32 42 ./Model/Pegasus/Message/t/BOOKRQ_ 255 65280 8 2 25.00% 5 8 ./Model/Rewards/File/t/2V.t 255 65280 4 4 100.00% 3-4 1 test and 38 subtests skipped. Failed 3/139 test scripts, 97.84% okay. 6/3253 subtests failed, 99.82% okay. 3253 tests! Rock on!! > xoa eXtremely Ornery Aardvarks? j From jay at jays.net Wed Feb 9 16:47:26 2005 From: jay at jays.net (Jay Hannah) Date: Wed Feb 9 16:47:37 2005 Subject: [Omaha.pm] We nuked 36,717 lines of Perl code today Message-ID: <87d9d22575f05d5696cc976a3b339f2d@jays.net> I wrote an OO base class yesterday that is so re-usable that we got rid of 36K lines of Perl code today. Don't worry, we didn't actually *write* all that code we just threw away -- it was all auto-generated (by another Perl script (surprise!)): one class for each of our 300+ database tables. The new way shoves a lot of OO closure goo into a single, central location instead of copies of it in every class. There's only 147,075 more lines of Perl left for me to optimize! (In this "project"...) Woof! j $ cvs checkout -D2005-02-08 -d MVC_y source/MVC $ wc -l `find MVC_y -name "*.pm"` | tail 107 MVC_y/Control/Multiplex/Payload.pm 408 MVC_y/Control/Multiplex/Buffers.pm 100 MVC_y/Control/Multiplex/Children.pm 187 MVC_y/Control/Multiplex/Buffer.pm 34 MVC_y/Control/Globals.pm 232 MVC_y/Control/Hotels.pm 232 MVC_y/Control/RatesAvail.pm 632 MVC_y/Control/Multiplex.pm 420 MVC_y/Control/Logger.pm 183792 total $ cvs checkout -d MVC_t source/MVC $ wc -l `find MVC_t -name "*.pm"` | tail 107 MVC_t/Control/Multiplex/Payload.pm 408 MVC_t/Control/Multiplex/Buffers.pm 100 MVC_t/Control/Multiplex/Children.pm 187 MVC_t/Control/Multiplex/Buffer.pm 34 MVC_t/Control/Globals.pm 232 MVC_t/Control/Hotels.pm 232 MVC_t/Control/RatesAvail.pm 632 MVC_t/Control/Multiplex.pm 422 MVC_t/Control/Logger.pm 147075 total From jhannah at omnihotels.com Fri Feb 11 16:48:18 2005 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri Feb 11 16:48:46 2005 Subject: [Omaha.pm] RE: finding installed Perl modules In-Reply-To: <200502072331.j17NVCjZ006841@omares-email.omnihotels.com> Message-ID: <200502120048.j1C0mWcN015230@omares-email.omnihotels.com> Is that different/better than "perldoc perllocal"? Thanks, j > -----Original Message----- > From: Sean Baker [mailto:pbaker@omnihotels.com] > Sent: Monday, February 07, 2005 5:31 PM > To: dthacker@omnihotels.com > Cc: resmis@omnihotels.com > Subject: finding installed Perl modules > > This script will tell us what Perl modules are installed: > > > > #!/usr/bin/perl > > use ExtUtils::Installed; > > my $inst = ExtUtils::Installed->new(); > > my @modules = $inst->modules(); > > foreach (@modules) { print "$_\n"; } > > > > pbaker@razorbill:~> perldoc perlfaq3 > > > > Sean Baker > > Software Architect > > Omni Hotels > > (402) 952-6508 > > pbaker@omnihotels.com > > > > From jhannah at omnihotels.com Fri Feb 11 17:14:36 2005 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri Feb 11 17:15:00 2005 Subject: [Omaha.pm] OSCON Call For Proposals Closing Soon Message-ID: <200502120114.j1C1EocN013558@omares-email.omnihotels.com> OSCON is great. Lots of Perl stuff. Highly recommended that you go at least once before you meet your maker. j "Larry Wall is my maker." -----Original Message----- From: O'Reilly Conferences [mailto:elists-admin@oreilly.com] Sent: Tuesday, February 08, 2005 11:30 AM To: jhannah@omnihotels.com Subject: OSCON Call For Proposals Closing Soon The Call for Proposals will end soon for the 7th Annual O'Reilly Open Source Convention http://conferences.oreillynet.com/os2005/ OSCON is headed back to friendly, economical Portland, Oregon during the week of August 1-5, 2005. If you've ever wanted to join the OSCON speaker firmament, now's your chance to submit a proposal (or two) by February 13, 2005. Complete details are available on the OSCON web site, but we're particularly interested in exploring how software development is moving to another level, and how developers and businesses are adjusting to new business models and architectures. We're looking for sessions, tutorials, and workshops proposals that appeal to developers, systems and network administrators, and their managers in the following areas: - All aspects of building applications, services, and systems that use the new capabilities of the open source platform - Burning issues for Java, Mozilla, web apps, and beyond - The commoditization of software: who and/or what can show us the money? - Network-enabled collaboration - Software customizability, including software as a service - Law, licensing, politics, and how best to navigate other troubled waters Specific topics and tracks at OSCON 2005 include: Linux and other open source operating systems, Java, PHP, Python, Perl, Databases (including MySQL and PostgreSQL), Apache, XML, Applications, Ruby, and Security. Attendees have a wide range of experience, so be sure to target a particular level of experience: beginner, intermediate, advanced. Talks and tutorials should be technical; strictly no marketing presentations. Session presentations are 45 or 90 minutes long, and tutorials are either a half-day (3 hours) or a full day (6 hours). Feel free to spread the word about the Call for Proposals to your friends, family, colleagues, and compatriots. We want everyone to submit, from American women hacking artificial life into the Linux kernel to Belgian men building a better mousetrap from PHP and recycled military hardware. We mean everyone! Even if you don't want to participate as a speaker, send us your suggestions--topics you'd like to see covered, groups we should bring into the OSCON fold, extra-curricular activities we should organize--to oscon-idea@oreilly.com . This year, we're moving to the wide open spaces of the Oregon Convention Center. We've arranged for the nearby Doubletree Hotel to be our headquarters hotel--it's a short, free Max light rail ride (or a lovely walk) from the Convention Center. Registration opens in April 2005; hotel information will be available shortly. Deadline to submit a proposal is Midnight (PST), February 13. For all the conference details, go to: http://conferences.oreillynet.com/os2005/ Press coverage, blogs, photos, and news from the 2004 O'Reilly Open Source Convention can be found at: http://www.oreillynet.com/oscon2004/ Would your company like to make a big impression on the open source community? If so, consider exhibiting or becoming a sponsor. Contact Andrew Calvo at (707) 827-7176, or andrewc@oreilly.com for more info. See you Portland next summer, The O'Reilly OSCON Team ******************************************************* To change your newsletter subscription options, please visit https://epoch.oreilly.com/account/default.orm and click the "Manage My Newsletters" link. For assistance, email help@oreillynet.com O'Reilly Media, Inc. 1005 Gravenstein Highway North, Sebastopol, CA 95472 ******************************************************* From hjarce2001 at yahoo.com Fri Feb 11 23:58:22 2005 From: hjarce2001 at yahoo.com (Hugh Jarce) Date: Fri Feb 11 23:58:33 2005 Subject: [Omaha.pm] RE: finding installed Perl modules In-Reply-To: <200502120048.j1C0mWcN015230@omares-email.omnihotels.com> Message-ID: <20050212075822.71393.qmail@web50503.mail.yahoo.com> > This script will tell us what Perl modules are installed: > > #!/usr/bin/perl > use ExtUtils::Installed; > my $inst = ExtUtils::Installed->new(); > my @modules = $inst->modules(); > foreach (@modules) { print "$_\n"; } See also http://www.perlmonks.org/?node_id=420210 Hugh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From hjarce2001 at yahoo.com Fri Feb 11 23:58:22 2005 From: hjarce2001 at yahoo.com (Hugh Jarce) Date: Fri Feb 11 23:58:40 2005 Subject: [Omaha.pm] RE: finding installed Perl modules In-Reply-To: <200502120048.j1C0mWcN015230@omares-email.omnihotels.com> Message-ID: <20050212075822.71393.qmail@web50503.mail.yahoo.com> > This script will tell us what Perl modules are installed: > > #!/usr/bin/perl > use ExtUtils::Installed; > my $inst = ExtUtils::Installed->new(); > my @modules = $inst->modules(); > foreach (@modules) { print "$_\n"; } See also http://www.perlmonks.org/?node_id=420210 Hugh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jay at jays.net Tue Feb 15 09:14:02 2005 From: jay at jays.net (Jay Hannah) Date: Tue Feb 15 09:14:14 2005 Subject: [Omaha.pm] Mtg this Thursday Message-ID: <85c8ec6c09a1f1e31a501ba51890f3e7@jays.net> There will be a mtg this Thr: http://omaha.pm.org/ If no one else has fun ideas for the agenda I'll demo recent OO goodness I've been working on. Perhaps we need an in-house Perl Golf challenge? j From jay at jays.net Wed Feb 16 11:25:28 2005 From: jay at jays.net (Jay Hannah) Date: Wed Feb 16 11:25:48 2005 Subject: [Omaha.pm] Mtg this Thursday In-Reply-To: <85c8ec6c09a1f1e31a501ba51890f3e7@jays.net> References: <85c8ec6c09a1f1e31a501ba51890f3e7@jays.net> Message-ID: <9a9431d52d4d11f8159ddef894512041@jays.net> On Feb 15, 2005, at 11:14 AM, Jay Hannah wrote: > There will be a mtg this Thr: > > http://omaha.pm.org/ Hey Ron -- Have you played w/ log4perl enough to do a demo at the meeting yet? I've been wondering if I want to throw mine away. Thanks, j From jhannah at omnihotels.com Thu Feb 17 16:03:02 2005 From: jhannah at omnihotels.com (Jay Hannah) Date: Thu Feb 17 16:03:35 2005 Subject: [Omaha.pm] FW: killall.pl Message-ID: <200502180003.j1I03BcN024468@omares-email.omnihotels.com> You meant expedia_kill.pl. Ya. Now you could rewrite expedia_kill.pl in 1 line of perl: `killall.pl exped`; Grin, j > -----Original Message----- > From: Sean Baker [mailto:pbaker@omnihotels.com] > Sent: Monday, February 07, 2005 8:53 AM > To: 'Jay Hannah' > Subject: RE: killall.pl > > This looks strangely familiar to: > > http://cvs/source/MVC/View/Expedia/perl/kill_exped.pl?rev=1.2&content-type=text/vnd.viewcvs-markup > > but it allows ARGSV[0], and it's three times the size. > > Sean Baker > Software Architect > Omni Hotels > (402) 952-6508 > pbaker@omnihotels.com > > -----Original Message----- > From: Jay Hannah [mailto:jhannah@omnihotels.com] > Sent: Sunday, February 06, 2005 12:45 PM > > > I wrote a new program. AIX's killall still stinks I got sick of trying to > kill a bunch of processes manually (orphan palsrqs). > > It lives in /oexec/__oscripts, so if you have that in your path you could: > > killall.pl palsrq > > To kill off all orphan palsrq processes. Or > > killall.pl prcavai > > To kill off all prcavai's if theres 20 running accidentally. > > Etc... > > (killall on Linux has done this for years.) > > FWIW, > > j > > > --------------------------------------------------------- #!/usr/bin/perl # grrr... aix's toolset sucks # Write our own killall... unless ($ARGV[0]) { usage(); } my @killthese; open (IN, "ps -ef |"); while () { next unless (/$ARGV[0]/); next if (/killall/); #print; chomp; @l = split /\s+/; push @killthese, $l[1]; } close IN; foreach (@killthese) { #print "kill $_\n"; system("kill $_"); } sub usage { print < References: <20050218040038.3068.qmail@vr.reboottheuser.com> Message-ID: <27e548120e4fb6c6e6a1a3c59dbb7893@jays.net> Neat! Our library gizmo works! http://library.reboottheuser.com/ Ron: Why status reserved? Shouldn't they be status "borrowed" or "checked out" or something? I'd try that, but it won't let me borrow *my* items from the library. -grin- I flagged Template Toolkit as "external" since I've got it here at work. j On Feb 17, 2005, at 10:00 PM, Ron Chloupek wrote: > > Hi Jay Hannah, > > The following item(s) have been reserved: > * "Advanced DBI (OSCON 2003 Presentation)" > * "Advanced Object Oriented Perl (OSCON 2003 Presentation)" > * "Mastering Data Structures and References in Perl (OSCON 2003 > Presentation)" > > > ----------------------------------------------------------------------- > ------- > User Group Library at Reboot The User. 0.62p6 - Open Lending Database > Project. > http://library.reboottheuser.com/ > ----------------------------------------------------------------------- > ------- From jhannah at omnihotels.com Fri Feb 18 14:51:24 2005 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri Feb 18 14:51:50 2005 Subject: [Omaha.pm] FW: [Visualperl-discuss] gui builder? Message-ID: <200502182251.j1IMpWcN002820@omares-email.omnihotels.com> FYI. Someone at the meeting last night was asking about Perl IDEs for Windows. (From the Visual Perl mailing list that I'm on.) j -----Original Message----- From: visualperl-discuss-bounces@listserv.ActiveState.com [mailto:visualperl-discuss-bounces@listserv.ActiveState.com] On Behalf Of Eric Promislow Sent: Thursday, February 17, 2005 6:56 PM To: airplays55@yahoo.com Cc: visualperl-discuss@listserv.ActiveState.com Subject: Re: [Visualperl-discuss] gui builder? airplays55@yahoo.com wrote: > I want to get into tk programming in perl and am > seeking a gui builder. > > Is there an IDE by activestate for visual perl to > allow drag & drop gui building in tk? Yes, there is -- it's in Komodo (http://www.activestate.com/Products/Komodo/). You drag-and-drop widgets on a form, and it produces Perl/Tk code. Komodo and Visual Perl have a lot of overlap -- Perl debugger, code completion, syntax checking and colorizing, code folding, PDK integration. Regards, Eric Promislow > > Awhile back I loaded up an activestate plugin (for > perl.net I think) and alas, there was no gui > designer... > > Otherwise the only gui builder I know of is something > called guido, which I couldn't get to install > correctly for me... > _______________________________________________ VisualPerl-discuss mailing list VisualPerl-discuss@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs From dan at linder.org Fri Feb 18 23:07:55 2005 From: dan at linder.org (Daniel Linder) Date: Fri Feb 18 22:59:26 2005 Subject: [Omaha.pm] FW: [Visualperl-discuss] gui builder? In-Reply-To: <200502182251.j1IMpWcN002820@omares-email.omnihotels.com> References: <200502182251.j1IMpWcN002820@omares-email.omnihotels.com> Message-ID: <19212.24.252.28.203.1108796875.squirrel@24.252.28.203> > Someone at the meeting last night was asking about Perl IDEs for Windows. Also check out open-perl-ide.sourceforge.net. I have used this one quite a bit and it is pretty nice. The only thing is that it hasn't been updated since Feb 2003... On the plus side, the only bugs I have ever experienced with it were with the most recent versions of ActiveState Perl and some very beta modules not interacting nicely. Give it a shot, you'll like it. It's not as polished or as feature-full as others, but it's better than the command line. Dan - - - - "I do not fear computer, I fear the lack of them." -- Isaac Asimov GPG fingerprint:9EE8 ABAE 10D3 0B55 C536 E17A 3620 4DCA A533 19BF From jay at jays.net Sat Feb 19 06:45:01 2005 From: jay at jays.net (Jay Hannah) Date: Sat Feb 19 06:45:12 2005 Subject: [Omaha.pm] wiki launched Message-ID: I've launched a wiki for the Omaha Perl Mongers: http://omaha.pm.org/kwiki/ It may or may not have interesting stuff on it someday. I could set up a wiki for OLUG in about 3 minutes if anyone is interested. j Omaha Perl Mongers: http://omaha.pm.org From jay at jays.net Sat Feb 19 14:46:34 2005 From: jay at jays.net (Jay Hannah) Date: Sat Feb 19 14:46:52 2005 Subject: [Omaha.pm] search.cpan.org Message-ID: <1735ba47d40fb150c1114622fe56f84e@jays.net> If you noticed search.cpan.org was offline quite a bit, this might explain: http://www.askbjoernhansen.com/archives/2005/02/11/001169.html j From mat at phpconsulting.com Sat Feb 19 19:53:16 2005 From: mat at phpconsulting.com (Mat Caughron) Date: Sat Feb 19 19:50:04 2005 Subject: [Omaha.pm] Perl <-> PHP translation guide In-Reply-To: <1735ba47d40fb150c1114622fe56f84e@jays.net> References: <1735ba47d40fb150c1114622fe56f84e@jays.net> Message-ID: Dear Omaha Perl Addicts: Thought you all might find this useful/interesting as I do: http://www.cs.wcupa.edu/%7Erkline/perl2php/ Also, maybe one of these months we could have the PHP and Perl get-to-gether occur at the same time/place. Add wireless network. Hilarity ensues. Take care, Mat Caughron, CISSP PHP Consulting On Sat, 19 Feb 2005, Jay Hannah wrote: > > If you noticed search.cpan.org was offline quite a bit, this might > explain: > > http://www.askbjoernhansen.com/archives/2005/02/11/001169.html > > j > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm@pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > From dthacker9 at cox.net Sun Feb 20 15:36:51 2005 From: dthacker9 at cox.net (Dave Thacker) Date: Sun Feb 20 15:33:20 2005 Subject: [Omaha.pm] Perl <-> PHP translation guide In-Reply-To: References: <1735ba47d40fb150c1114622fe56f84e@jays.net> Message-ID: <200502201736.51919.dthacker9@cox.net> On Saturday 19 February 2005 21:53, Mat Caughron wrote: > > Also, maybe one of these months we could have the PHP and Perl > get-to-gether occur at the same time/place. Add wireless network. > Hilarity ensues. > You should invite the python programmers too. It would be a real foo fight. DT From rps at willconsult.com Tue Feb 22 08:59:46 2005 From: rps at willconsult.com (Ryan Stille) Date: Tue Feb 22 08:59:56 2005 Subject: [Omaha.pm] Converting an array of strings into a scalar Message-ID: <9A8B75E3985324438F1BFA08B160E8203FE2CF@suxsvr.willconsult.com> I have an array of lines, each one containing a newline character at the end. I want to convert this to a scalar variable that I will pass on to something else. I was using $body = "@filecontents"; But that ends up adding a space to the beginning of each line except the first one. So I changed it to this: $body = ''; foreach $line (@filecontents) { $body .= $line; } But I wonder if there is a more elegant way? -Ryan From Andrew.Hadenfeldt at alltel.com Tue Feb 22 09:20:12 2005 From: Andrew.Hadenfeldt at alltel.com (Andrew.Hadenfeldt@alltel.com) Date: Tue Feb 22 09:20:24 2005 Subject: [Omaha.pm] Converting an array of strings into a scalar Message-ID: Two ideas: 1. $body = join(undef,@filecontents); 2. If @filecontents originally came from a file handle then you can just read it in "slurp mode" (see 'perldoc perlvar' for $/): open(FH,"blah"); { local($/); undef $/; $body=; } -Andy -----Original Message----- From: omaha-pm-bounces@pm.org [mailto:omaha-pm-bounces@pm.org]On Behalf Of Ryan Stille Sent: Tuesday, February 22, 2005 11:00 AM To: omaha-pm@pm.org Subject: [Omaha.pm] Converting an array of strings into a scalar I have an array of lines, each one containing a newline character at the end. I want to convert this to a scalar variable that I will pass on to something else. I was using $body = "@filecontents"; But that ends up adding a space to the beginning of each line except the first one. So I changed it to this: $body = ''; foreach $line (@filecontents) { $body .= $line; } But I wonder if there is a more elegant way? -Ryan _______________________________________________ Omaha-pm mailing list Omaha-pm@pm.org http://mail.pm.org/mailman/listinfo/omaha-pm ****************************************************************************************** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. From rps at willconsult.com Tue Feb 22 09:36:10 2005 From: rps at willconsult.com (Ryan Stille) Date: Tue Feb 22 09:36:23 2005 Subject: [Omaha.pm] Converting an array of strings into a scalar Message-ID: <9A8B75E3985324438F1BFA08B160E8203FE2D0@suxsvr.willconsult.com> Andrew.Hadenfeldt@alltel.com wrote: > Two ideas: > > 1. $body = join(undef,@filecontents); I'll try that. > 2. If @filecontents originally came from a file handle then you can > just read it in "slurp mode" (see 'perldoc perlvar' for $/): I started doing it this way at first, but the first line of the file contains a delimited list of parameters I need to parse separately. So I just put it into an array, shift the first line off, then do something with the rest of the lines. Thanks, -Ryan From hjarce2001 at yahoo.com Tue Feb 22 12:33:41 2005 From: hjarce2001 at yahoo.com (Hugh Jarce) Date: Tue Feb 22 12:33:51 2005 Subject: [Omaha.pm] Converting an array of strings into a scalar In-Reply-To: Message-ID: <20050222203341.50847.qmail@web50505.mail.yahoo.com> --- Andrew.Hadenfeldt@alltel.com wrote: > Two ideas: > > 1. $body = join(undef,@filecontents); Untested, but I'd worry about that undef generating a warning, so I suggest: $body = join("", @filecontents); > 2. If @filecontents originally came from a file handle then you can just > read it in "slurp mode" (see 'perldoc perlvar' for $/): > > open(FH,"blah"); > { > local($/); > undef $/; > $body=; > } Shorter is: my $body = do { local $/; }; See: http://www.perlmonks.org/?node_id=50532 Hugh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com