From jay at jays.net Wed Mar 4 16:57:23 2009 From: jay at jays.net (Jay Hannah) Date: Wed, 4 Mar 2009 18:57:23 -0600 Subject: [Omaha.pm] The Genome Center WUSTL Message-ID: Very impressive overview of information management and pipelines at a genome center: http://www.politigenomics.com/2009/02/my-talk-at-agbt.html (15 minutes in there's some Perl code and discussion. -grin-) j From jay at jays.net Tue Mar 10 18:50:36 2009 From: jay at jays.net (Jay Hannah) Date: Tue, 10 Mar 2009 20:50:36 -0500 Subject: [Omaha.pm] github repo Message-ID: Woot! I'm playing with git for the first time: http://github.com/jhannah/odynug/tree/master Join in! :) j From jay at jays.net Tue Mar 10 22:21:17 2009 From: jay at jays.net (Jay Hannah) Date: Wed, 11 Mar 2009 00:21:17 -0500 Subject: [Omaha.pm] Blaine's challenge Redux In-Reply-To: <5dbef1c10903102113s5d099309jfec13a7b10c5cfd7@mail.gmail.com> References: <17BC7CF3-430E-4ABA-B70F-7688A6FF2235@jays.net> <5dbef1c10903102113s5d099309jfec13a7b10c5cfd7@mail.gmail.com> Message-ID: On Mar 10, 2009, at 11:13 PM, Juan Vazquez wrote: > cool, is there a new challenge? Or are we just refactoring our old > stuff? What we discussed at the meeting tonight was launching a github repository (done: http://github.com/jhannah/odynug/tree/master) and then inventing a new challenge that will go in the new_challenge directory. Something small so people can comfortably present their entire solution in 5-10 minutes in the language of their choice. So the new_challenge/README is ready and willing to take all suggestions! I'm a total git / github newb. Seems pretty slick so far. :) So add your suggestions to new_challenge/README (or wherever in that directory), send me a git "pull request", and I'll merge your changes into my repo. I've never done that either -- looking forward to it. :) Blaine has a programming problems book, so he was going to pick one (more?) of those and post it. I haven't thought up an idea yet... -think, think- We certainly could have multiple small challenges... j (karaoke: Breakfast at Tiffany's, Deep Blue Something) From jay at jays.net Wed Mar 11 05:41:35 2009 From: jay at jays.net (Jay Hannah) Date: Wed, 11 Mar 2009 07:41:35 -0500 Subject: [Omaha.pm] New challenge posted: pet_paradise! Message-ID: <660809FA-F090-4888-8389-75C1448B6E61@jays.net> http://github.com/jhannah/odynug/tree/master/pet_paradise/ Which customer IDs do you accept? How much money did you make? May the smartest code (mathmatician?) win! :) Create a directory for your solution and go for it! I threw my random generator in perl_1, just in case other people want to add other perl solutions (perl_2, perl_3, etc.). Perl army: swarm!! :D j From jay at jays.net Thu Mar 12 11:31:16 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 12 Mar 2009 13:31:16 -0500 Subject: [Omaha.pm] Modify an existing PDF? Message-ID: <49B954F4.9060400@jays.net> I need to open an existing .pdf file, change a text field value "CUSTOMER NAME HERE" to "Bob Jones", and save the .pdf file. Has anyone done this programmatically? What did you use? j From andy at petdance.com Thu Mar 12 11:36:37 2009 From: andy at petdance.com (Andy Lester) Date: Thu, 12 Mar 2009 13:36:37 -0500 Subject: [Omaha.pm] Modify an existing PDF? In-Reply-To: <49B954F4.9060400@jays.net> References: <49B954F4.9060400@jays.net> Message-ID: <2359E99F-C981-471B-B706-AC6B8B500671@petdance.com> On Mar 12, 2009, at 1:31 PM, Jay Hannah wrote: > I need to open an existing .pdf file, change a text field value > "CUSTOMER NAME HERE" to "Bob Jones", and save the .pdf file. > > Has anyone done this programmatically? What did you use? I'm pretty sure that PDF::API2 is the only game in town. xoa -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From andy at petdance.com Thu Mar 12 11:39:20 2009 From: andy at petdance.com (Andy Lester) Date: Thu, 12 Mar 2009 13:39:20 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all Message-ID: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> I'm going to be speaking at Infotec in Omaha on April 15, 2009. http://www.infotec.org/sessions.aspx Land the IT Job You Love Andy Lester - Consultant Wednesday, April 15, 2009 - 2:30 PM - 3:30 PM This presentation will provide pragmatic job hunt advice for Programmers, System Administrators and Other Technical Professionals. But I believe I'll be available to meet up with Mongers, or even speak at a meeting if possible. Anyone interested? xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Mar 12 11:50:47 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 12 Mar 2009 13:50:47 -0500 Subject: [Omaha.pm] Modify an existing PDF? In-Reply-To: <49B954F4.9060400@jays.net> References: <49B954F4.9060400@jays.net> Message-ID: <49B95987.3080000@jays.net> Jay Hannah wrote: > I need to open an existing .pdf file, change a text field value > "CUSTOMER NAME HERE" to "Bob Jones", and save the .pdf file. > > Has anyone done this programmatically? What did you use? Huh... Super-ugly hacks straight on the binary data are pretty easy to do... Strangely the J in JONES disappears... Hopefully most of our customers have last name SMITH. -laugh- j #!/usr/bin/perl my $newline = '[(interaction)-301(of)-301(those)-301(BOB)-301(SMITH.)-301(Because)-301(of)-301(this,)-301(c)-30(ontinu-)]TJ'; open (IN, "Rogers.pdf"); open (OUT, ">Rogers_changed.pdf"); while () { if (/elements.*in.*the.*cell/) { print OUT "$newline\n"; } else { print OUT; } } From jay at jays.net Thu Mar 12 12:34:19 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 12 Mar 2009 14:34:19 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> Message-ID: <49B963BB.1050103@jays.net> Andy Lester wrote: > I'm going to be speaking at Infotec in Omaha on April 15, 2009. > > http://www.infotec.org/sessions.aspx > Land the IT Job You Love > Andy Lester - Consultant > Wednesday, April 15, 2009 - 2:30 PM - 3:30 PM > This presentation will provide pragmatic job hunt advice for > Programmers, System Administrators and Other Technical Professionals. > But I believe I'll be available to meet up with Mongers, or even speak > at a meeting if possible. > > Anyone interested? An additional meeting would be great! I don't know how many Omaha Perl Mongers have had a chance to meet a real-life CPAN veteran (34 modules!): http://search.cpan.org/~petdance/ $work and I directly use WWW::Mechanize, Test::Harness / TAP / Test::POD, and Module::Starter... And who knows how many other CPAN modules we use depend on what you've written. :) Would you like me to try to book a room at UNO PKI for Wednesday night? 7PM? UNO PKI (University of Nebraska Omaha, Peter Kiewit Institute): http://tinyurl.com/ablc6m Projector, lots of computers w/ Internet, open wifi, whiteboards, seating for ~30. I'm guessing I'd be most interested in a Mech or TAP presentation. :) j From andy at petdance.com Thu Mar 12 12:40:22 2009 From: andy at petdance.com (Andy Lester) Date: Thu, 12 Mar 2009 14:40:22 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: <49B963BB.1050103@jays.net> References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> <49B963BB.1050103@jays.net> Message-ID: <9D4192E1-8958-4103-B891-2363F9993C3E@petdance.com> On Mar 12, 2009, at 2:34 PM, Jay Hannah wrote: > Would you like me to try to book a room at UNO PKI for Wednesday > night? 7PM? > > UNO PKI (University of Nebraska Omaha, Peter Kiewit Institute): > http://tinyurl.com/ablc6m > > Projector, lots of computers w/ Internet, open wifi, whiteboards, > seating for ~30. > > I'm guessing I'd be most interested in a Mech or TAP presentation. :) Well, let's see if anyone else is interested. And what they want to hear about. I'll be at Infotec talking about my new book, "Land The Tech Job You Love", so that might be doable to. And it would be practice for Wednesday. http://www.pragprog.com/titles/algh/land-the-tech-job-you-love But I can talk about Perl stuff, too, of course. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From ryan at cfwebtools.com Thu Mar 12 12:56:47 2009 From: ryan at cfwebtools.com (Ryan Stille) Date: Thu, 12 Mar 2009 14:56:47 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: <9D4192E1-8958-4103-B891-2363F9993C3E@petdance.com> References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> <49B963BB.1050103@jays.net> <9D4192E1-8958-4103-B891-2363F9993C3E@petdance.com> Message-ID: <49B968FF.9010006@cfwebtools.com> Andy Lester wrote: > > On Mar 12, 2009, at 2:34 PM, Jay Hannah wrote: > >> Would you like me to try to book a room at UNO PKI for Wednesday >> night? 7PM? >> >> UNO PKI (University of Nebraska Omaha, Peter Kiewit Institute): >> http://tinyurl.com/ablc6m >> >> Projector, lots of computers w/ Internet, open wifi, whiteboards, >> seating for ~30. >> >> I'm guessing I'd be most interested in a Mech or TAP presentation. :) > > > Well, let's see if anyone else is interested. And what they want to > hear about. I'll be at Infotec talking about my new book, "Land The > Tech Job You Love", so that might be doable to. And it would be > practice for Wednesday. > > http://www.pragprog.com/titles/algh/land-the-tech-job-you-love > > But I can talk about Perl stuff, too, of course. > > xoxo, > Andy I won't be able to make infotec but would love to come to an after-hours get together on the topic of your book. -Ryan From dan at linder.org Fri Mar 13 09:51:49 2009 From: dan at linder.org (Dan Linder) Date: Fri, 13 Mar 2009 11:51:49 -0500 Subject: [Omaha.pm] Using map to grab multiple fields from file... Message-ID: <3e2be50903130951t5e7d53f0y90fb5cfca4724f6@mail.gmail.com> I have a file that has a number of lines in it. Two lines contain data I want, the rest are unimportant. These two lines can appear most anywhere and in any order. What I'm currently doing is this: while () { -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Fri Mar 13 10:01:20 2009 From: dan at linder.org (Dan Linder) Date: Fri, 13 Mar 2009 12:01:20 -0500 Subject: [Omaha.pm] Using map to grab multiple fields from file... In-Reply-To: <3e2be50903130951t5e7d53f0y90fb5cfca4724f6@mail.gmail.com> References: <3e2be50903130951t5e7d53f0y90fb5cfca4724f6@mail.gmail.com> Message-ID: <3e2be50903131001i37305c29l50868d64b64a1a99@mail.gmail.com> (Sorry for the short e-mail. Let's try that again... - Dan) I have a file that has a number of lines in it. Two lines contain data I want, the rest are unimportant. These two lines can appear most anywhere and in any order. What I'm currently doing is this: $val1 = 0; $val2 = 0; while () { $val1 = $1 if /^COUNT:\s*(\d*)$/; $val2 = $1 if /^SIZE:\s*(\d*)$/; last if ($val1 and $val2); } The "last if" statement is my attempt to exit sooner rather than working through the entire file. I had tried to setup a map function something like this: ($val1, $val2) = map { return ($1, $val2) if /^COUNT:\s*(\d*)$/; return ($val1, $2) if /^SIZE:\s*(\d*)$/; } ; ...but I get a "can't return outside of subroutine. Am I better off with my while loop? It passes the "3AM readability test" in my opinion. Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhannah at omnihotels.com Fri Mar 13 10:09:40 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri, 13 Mar 2009 12:09:40 -0500 Subject: [Omaha.pm] Using map to grab multiple fields from file... Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBD32@l3exchange.omnihotels.net> Dan Linder wrote: > Am I better off with my while loop? It passes the "3AM readability test" in > my opinion. Yup. I don't know what the second thing is doing. The first looks clean to me. :) j -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Sat Mar 14 10:10:09 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 14 Mar 2009 12:10:09 -0500 Subject: [Omaha.pm] Pet paradise challenge: perl_1: basic parsing done Message-ID: :) http://github.com/jhannah/odynug/tree/master/pet_paradise/perl_1 j From jay at jays.net Sat Mar 14 11:38:48 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 14 Mar 2009 13:38:48 -0500 Subject: [Omaha.pm] Pet paradise challenge: perl_1: basic parsing done In-Reply-To: References: Message-ID: http://github.com/jhannah/odynug/tree/master/pet_paradise/perl_1 Basic reservation logic and reports done. So now if you assume my kennel has infinite capacity, everything is peachy. :) Next tasks: # TODO: MAX_SMALL_CAGES, MAX_LARGE_CAGES caps # TODO: Intelligence about $res->payment? # TODO: Handle real dates, not these bogus integers. :) j Hannah-Mac-Mini-2:~/src/odynug/pet_paradise/perl_1 jhannah$ perl first_come_first_serve.pl 1 reserved. 2 reserved. 3 reserved. 4 reserved. 5 reserved. 6 reserved. 7 reserved. 8 reserved. 9 reserved. 10 reserved. 11 reserved. 12 reserved. 13 reserved. 14 reserved. 15 reserved. 16 reserved. 17 reserved. 18 reserved. 19 reserved. 20 reserved. 21 reserved. 22 reserved. 23 reserved. 24 reserved. 25 reserved. 26 reserved. 27 reserved. 28 reserved. 29 reserved. 30 reserved. 31 reserved. 32 reserved. 33 reserved. 34 reserved. 35 reserved. 36 reserved. 37 reserved. 38 reserved. 39 reserved. 40 reserved. Our upcoming reservations: 20090615 SMALL#1: pet#3 (70 lb. CAT) SMALL#2: pet#4 (61 lb. CAT) SMALL#3: pet#14 (75 lb. DOG) SMALL#4: pet#17 (67 lb. CAT) SMALL#5: pet#25 (48 lb. DOG) SMALL#6: pet#27 (34 lb. DOG) SMALL#7: pet#31 (16 lb. DOG) SMALL#8: pet#32 (21 lb. DOG) SMALL#9: pet#41 (82 lb. DOG) SMALL#10: pet#42 (39 lb. CAT) 20090616 SMALL#1: pet#3 (70 lb. CAT) SMALL#2: pet#4 (61 lb. CAT) SMALL#3: pet#5 (34 lb. CAT) SMALL#4: pet#6 (36 lb. CAT) SMALL#5: pet#14 (75 lb. DOG) SMALL#6: pet#15 (32 lb. CAT) SMALL#7: pet#16 (21 lb. DOG) SMALL#8: pet#17 (67 lb. CAT) SMALL#9: pet#19 (62 lb. DOG) SMALL#10: pet#46 (59 lb. DOG) 20090617 SMALL#1: pet#1 (71 lb. DOG) SMALL#2: pet#2 (74 lb. DOG) SMALL#3: pet#3 (70 lb. CAT) SMALL#4: pet#4 (61 lb. CAT) SMALL#5: pet#7 (38 lb. CAT) SMALL#6: pet#8 (26 lb. DOG) SMALL#7: pet#9 (81 lb. CAT) SMALL#8: pet#12 (49 lb. CAT) SMALL#9: pet#13 (61 lb. CAT) SMALL#10: pet#46 (59 lb. DOG) 20090618 SMALL#1: pet#1 (71 lb. DOG) SMALL#2: pet#2 (74 lb. DOG) SMALL#3: pet#4 (61 lb. CAT) SMALL#4: pet#8 (26 lb. DOG) SMALL#5: pet#9 (81 lb. CAT) SMALL#6: pet#10 (33 lb. CAT) SMALL#7: pet#11 (20 lb. CAT) SMALL#8: pet#15 (32 lb. CAT) SMALL#9: pet#16 (21 lb. DOG) SMALL#10: pet#45 (15 lb. CAT) 20090619 SMALL#1: pet#8 (26 lb. DOG) SMALL#2: pet#9 (81 lb. CAT) SMALL#3: pet#10 (33 lb. CAT) SMALL#4: pet#11 (20 lb. CAT) SMALL#5: pet#20 (82 lb. DOG) SMALL#6: pet#21 (59 lb. CAT) SMALL#7: pet#22 (47 lb. DOG) SMALL#8: pet#26 (37 lb. DOG) SMALL#9: pet#28 (41 lb. DOG) SMALL#10: pet#43 (40 lb. CAT) 20090620 SMALL#1: pet#10 (33 lb. CAT) SMALL#2: pet#11 (20 lb. CAT) SMALL#3: pet#28 (41 lb. DOG) SMALL#4: pet#29 (20 lb. DOG) SMALL#5: pet#30 (29 lb. CAT) SMALL#6: pet#34 (22 lb. CAT) SMALL#7: pet#35 (24 lb. CAT) SMALL#8: pet#39 (39 lb. DOG) SMALL#9: pet#40 (82 lb. CAT) SMALL#10: pet#43 (40 lb. CAT) 20090621 SMALL#1: pet#28 (41 lb. DOG) SMALL#2: pet#29 (20 lb. DOG) SMALL#3: pet#30 (29 lb. CAT) SMALL#4: pet#34 (22 lb. CAT) SMALL#5: pet#35 (24 lb. CAT) SMALL#6: pet#39 (39 lb. DOG) SMALL#7: pet#40 (82 lb. CAT) From jay at jays.net Sat Mar 14 18:33:24 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 14 Mar 2009 20:33:24 -0500 Subject: [Omaha.pm] [odynug] Re: Pet paradise challenge: perl_1: basic parsing done In-Reply-To: <1DA1879D-D2DD-4F97-8001-4D4287378278@jays.net> References: <29e24d060903141640k3f63f1a8ieadf159611219f35@mail.gmail.com> <1DA1879D-D2DD-4F97-8001-4D4287378278@jays.net> Message-ID: <66D04EF4-1B7B-4B28-877F-886CBCFFEA54@jays.net> http://github.com/jhannah/odynug/tree/master On Mar 14, 2009, at 8:14 PM, Jay Hannah wrote: > On Mar 14, 2009, at 6:40 PM, Ben Heath wrote: >> So can a small cage hold an animal that is > 60 pounds? > > Nope. I haven't implemented the cage restriction logic yet. Patches > welcome. :) Oh... I should probably check before I answer. :) Looks like the README doesn't say anything about the weight of the single pet allowed in the small cage. So I guess anything is fair game. Things I haven't implemented: - Since "Your hotel has 4 small cages" I need to stop at 4 SMALL and start filling LARGE. - I haven't implemented any of the LARGE logic, including the weight restrictions and DOG/CAT polarity rule. - If on any given night all 4 SMALL and 3 LARGE are full then I have to reject that customer. ... I wonder if this is enough demand? The point of the exercise was to overflow the hotel, forcing you to have to pick which business to accept... Maybe we need more demand or fewer cages for that to really show up? Oops? We'll see... j From jay at jays.net Sun Mar 15 12:41:31 2009 From: jay at jays.net (Jay Hannah) Date: Sun, 15 Mar 2009 14:41:31 -0500 Subject: [Omaha.pm] "order by begin, end" Message-ID: <99243475-BDA9-4B60-A9E9-4BBA0D8455FF@jays.net> In SQL I could accomplish this with "order by begin, end". But in my Perl nested data structure these things take more typing. :) SQL++ :) j foreach my $result (sort by_begin @ordered) { printf(" %s..%s %s\n", $result->{hit_position}->{begin}, $result->{hit_position}->{end}, $result->{small_seq}->{seq} ); } sub by_begin { if ($a->{hit_position}->{begin} > $b->{hit_position}->{begin}) { return 1; } elsif ($a->{hit_position}->{begin} == $b->{hit_position}-> {begin}) { if ($a->{hit_position}->{end} > $b->{hit_position}->{end}) { return 1; } elsif ($a->{hit_position}->{end} == $b->{hit_position}-> {end}) { return 0; } else { return -1; } } elsif ($a->{hit_position}->{begin} < $b->{hit_position}-> {begin}) { return -1; } } From netarttodd at gmail.com Sun Mar 15 18:46:57 2009 From: netarttodd at gmail.com (Todd Christopher Hamilton) Date: Sun, 15 Mar 2009 20:46:57 -0500 Subject: [Omaha.pm] Modify an existing PDF? In-Reply-To: <49B954F4.9060400@jays.net> References: <49B954F4.9060400@jays.net> Message-ID: <1fdb7d920903151846p5356469k12d471120d0560d2@mail.gmail.com> You might also be able your accomplish your goal with the app pdftk. I use both in some of my automated processes. On Thu, Mar 12, 2009 at 1:31 PM, Jay Hannah wrote: > I need to open an existing .pdf file, change a text field value "CUSTOMER > NAME HERE" to "Bob Jones", and save the .pdf file. > > Has anyone done this programmatically? What did you use? > > j > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- Todd Christopher Hamilton (402) 660-2787 From jay at jays.net Sun Mar 22 06:13:27 2009 From: jay at jays.net (Jay Hannah) Date: Sun, 22 Mar 2009 08:13:27 -0500 Subject: [Omaha.pm] Fwd: TPF in Google Summer of Code! References: <200903211709.53023.scratchcomputing@gmail.com> Message-ID: <586A931D-FE76-4201-B402-4095FA9EB78C@jays.net> :) j From: Eric Wilhelm Date: March 21, 2009 7:09:52 PM CDT To: pm_groups at pm.org Cc: Jonathan Leto Subject: [pm_groups] TPF in Google Summer of Code! Hi all, Please forward this to your local groups. The Perl Foundation has been officially accepted into the Google Summer of Code 2009 program as a mentor organization! Hopefully some of you have identified some potential students already. Now we need your help getting them to submit their proposals. http://leto.net/dukeleto.pl/2009/03/tpf-accepted-to-google-summer-of- code-2009.html The student application period begins Monday, March 23rd and runs through April 3rd. (Students note: you can edit your proposal throughout that 11-day period -- getting it started early and talking to potential mentors greatly increases your chances vs throwing it over the wall at the deadline.) See this page for details: http://code.google.com/soc/ Interested students and potential mentors, please read the GSoC info on the Perl wiki: http://www.perlfoundation.org/perl5/index.cgi?gsoc http://www.perlfoundation.org/perl5/index.cgi?gsoc_2009_projects If you're interested in mentoring or have a good project suggestion, now is the time to get your info up on the wiki so students will know about your code and where to find you. Thanks, Eric From jay at jays.net Sun Mar 22 09:05:03 2009 From: jay at jays.net (Jay Hannah) Date: Sun, 22 Mar 2009 11:05:03 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> Message-ID: On Mar 12, 2009, at 1:39 PM, Andy Lester wrote: > But I believe I'll be available to meet up with Mongers, or even > speak at a meeting if possible. > > Anyone interested? You might also try http://groups.google.com/group/odynug Since we have all our meetings in conjuction with that group. j From andy at petdance.com Sun Mar 22 09:07:14 2009 From: andy at petdance.com (Andy Lester) Date: Sun, 22 Mar 2009 11:07:14 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> Message-ID: <0A6C2972-0CF3-4AFD-B52B-6E024354306E@petdance.com> On Mar 22, 2009, at 11:05 AM, Jay Hannah wrote: > You might also try > > http://groups.google.com/group/odynug > > Since we have all our meetings in conjuction with that group. Would you pursue that, since you know them more than I? Maybe have a joint meeting? xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From dthacker9 at cox.net Sun Mar 22 11:08:26 2009 From: dthacker9 at cox.net (Dave Thacker) Date: Sun, 22 Mar 2009 13:08:26 -0500 Subject: [Omaha.pm] I'm coming to town and would like to talk to y'all In-Reply-To: <9D4192E1-8958-4103-B891-2363F9993C3E@petdance.com> References: <3DDE402C-EC7A-4012-9E69-EF3F30238540@petdance.com> <49B963BB.1050103@jays.net> <9D4192E1-8958-4103-B891-2363F9993C3E@petdance.com> Message-ID: <200903221308.27103.dthacker9@cox.net> On Thursday 12 March 2009 14:40:22 Andy Lester wrote: > On Mar 12, 2009, at 2:34 PM, Jay Hannah wrote: > > Would you like me to try to book a room at UNO PKI for Wednesday > > night? 7PM? > > > > UNO PKI (University of Nebraska Omaha, Peter Kiewit Institute): > > http://tinyurl.com/ablc6m > > > > Projector, lots of computers w/ Internet, open wifi, whiteboards, > > seating for ~30. > > > > I'm guessing I'd be most interested in a Mech or TAP presentation. :) > > Well, let's see if anyone else is interested. And what they want to > hear about. I'll be at Infotec talking about my new book, "Land The > Tech Job You Love", so that might be doable to. And it would be > practice for Wednesday. Interested in either Perl or a good job. Dave Thacker From jay at jays.net Mon Mar 23 04:56:59 2009 From: jay at jays.net (Jay Hannah) Date: Mon, 23 Mar 2009 06:56:59 -0500 Subject: [Omaha.pm] First BioPerl patch Message-ID: woot! I've been using BioPerl for years now, but I think this was my first Core patch. I'll show up in CONTRIBUTORS on CPAN whenever another roll occurs (which could be years from now -grin-). j http://bugzilla.open-bio.org/show_bug.cgi?id=2793 ------------------------------------------------------------------------ r15607 | maj | 2009-03-23 00:40:13 -0500 (Mon, 23 Mar 2009) | 1 line Changed paths: M /bioperl-live/trunk/Bio/SimpleAlign.pm patch for bug#2793, based on a solution of Jay Hannah/thanks ------------------------------------------------------------------------ r15608 | maj | 2009-03-23 00:43:09 -0500 (Mon, 23 Mar 2009) | 1 line Changed paths: M /bioperl-live/trunk/t/Align/SimpleAlign.t Tests for bug#2793 patch from Jay Hannah/thanks ------------------------------------------------------------------------ From jhannah at omnihotels.com Wed Mar 25 09:58:45 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Wed, 25 Mar 2009 11:58:45 -0500 Subject: [Omaha.pm] Class::Accessor::Fast (for PDF::TextBlock) Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF101A886F1@l3exchange.omnihotels.net> Just discovered this in the guts of pre-Moose Catalyst: http://search.cpan.org/~kasei/Class-Accessor-0.31/lib/Class/Accessor/Fast.pm Pretty cool zero-config objects with zero CPAN dependencies. And fast. :) For when you don't need a Moose (or even a Mouse). Using this for my new CPAN module I'm writing since lightest-possible dependency tree probably a good thing for small/simple CPAN contributions. Dependency comparison: http://deps.cpantesters.org/?module=Class::Accessor::Fast;perl=latest http://deps.cpantesters.org/?module=Mouse;perl=latest http://deps.cpantesters.org/?module=Moose;perl=latest New module I'm writing: http://github.com/jhannah/pdf-textblock/tree/master j -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhannah at omnihotels.com Wed Mar 25 15:04:35 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Wed, 25 Mar 2009 17:04:35 -0500 Subject: [Omaha.pm] github.com Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF101A886F6@l3exchange.omnihotels.net> Oh, that's slick. I've never seen an HTML diff viewer that highlights changes INSIDE a line: http://github.com/jhannah/pdf-textblock/commit/a2157b8823020237711615c62d3ef488dd84544f It saw that I changed "pdf text fonts" to "pdf page text fonts" so it highlighted "page" a different shade of green... :) j -------------- next part -------------- An HTML attachment was scrubbed... URL: From hostetlerm at gmail.com Thu Mar 26 08:49:46 2009 From: hostetlerm at gmail.com (Mike Hostetler) Date: Thu, 26 Mar 2009 10:49:46 -0500 Subject: [Omaha.pm] Reading a Unix vs a DOS text file Message-ID: We have this log monitoring script that mostly works. Sometimes. Once you get it configured and throw some holy penguin pee on it. So a few months ago I took it upon myself to rework it into something more robust and, well, better. The script itself is one of the worst programs I have ever seen (sadly, not *the* worst). The person who wrote it only thought they knew something about Perl but really didn't. So I spent some off-time working on this off and on (mostly off) until recently I told people that it's working better now -- bigger, faster, and stronger. Regardless of the fact that all our processes run on Linux, this one particular application decided that it wants to save it's log files in DOS format. Perl is thinking that, hey, it's in a Unix-like environment and doesn't quite read that file right. So . . . it there a way I could get Perl to detect a file that uses CRLF as it's line terminator? That way, I could use binmode on that file, and use ASCII on the rest. Or does someone have a better suggestion? -- Mike Hostetler http://mike.hostetlerhome.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Thu Mar 26 09:38:14 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 26 Mar 2009 11:38:14 -0500 Subject: [Omaha.pm] Reading a Unix vs a DOS text file In-Reply-To: References: Message-ID: <49CBAF76.3060003@jays.net> Mike Hostetler wrote: > So . . . it there a way I could get Perl to detect a file that uses CRLF as > it's line terminator? That way, I could use binmode on that file, and use > ASCII on the rest. Or does someone have a better suggestion? > binmode is for binary files. CRLF (\r\n Windows) and LF (\n *nix) are for text files. I think you are confusing those two issues. They are not related. When reading a file you could while () { s/[\r\n]+$//; to remove those characters regardless of which format any given file was written in. Does that help? :) j From hostetlerm at gmail.com Thu Mar 26 11:14:19 2009 From: hostetlerm at gmail.com (Mike Hostetler) Date: Thu, 26 Mar 2009 13:14:19 -0500 Subject: [Omaha.pm] Reading a Unix vs a DOS text file In-Reply-To: <49CBAF76.3060003@jays.net> References: <49CBAF76.3060003@jays.net> Message-ID: On Thu, Mar 26, 2009 at 11:38 AM, Jay Hannah wrote: > Mike Hostetler wrote: > >> So . . . it there a way I could get Perl to detect a file that uses CRLF >> as >> it's line terminator? That way, I could use binmode on that file, and use >> ASCII on the rest. Or does someone have a better suggestion? >> >> > > binmode is for binary files. > > CRLF (\r\n Windows) and LF (\n *nix) are for text files. > > I think you are confusing those two issues. They are not related. When > reading a file you could > > while () { > s/[\r\n]+$//; > > to remove those characters regardless of which format any given file was > written in. > > Does that help? :) > That does help. I mentioned binmode because I saw several references to that, but your solution is better. I knew someone would know more than me. I just moonlight in Perl. :) -- Mike Hostetler http://mike.hostetlerhome.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Fri Mar 27 10:36:33 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 27 Mar 2009 12:36:33 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? Message-ID: <49CD0EA1.4090101@jays.net> Hmm... I find this use of the ternary operator confusing so I changed it... BEFORE: $align = ( $self->align eq 'justify' ) ? 'left' : $self->align; AFTER: # We've run out of words to fill a full line if ($self->align eq 'justify') { $self->align('left'); } What do you think? http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm From ryan at cfwebtools.com Fri Mar 27 10:46:50 2009 From: ryan at cfwebtools.com (Ryan Stille) Date: Fri, 27 Mar 2009 12:46:50 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? In-Reply-To: <49CD0EA1.4090101@jays.net> References: <49CD0EA1.4090101@jays.net> Message-ID: <49CD110A.2090409@cfwebtools.com> I like the ternary. -Ryan Jay Hannah wrote: > Hmm... I find this use of the ternary operator confusing so I changed > it... > > > BEFORE: > > $align = ( $self->align eq 'justify' ) ? 'left' : $self->align; > > AFTER: > > # We've run out of words to fill a full line > if ($self->align eq 'justify') { > $self->align('left'); > } > > > What do you think? > > > http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm From ryan at cfwebtools.com Fri Mar 27 10:50:23 2009 From: ryan at cfwebtools.com (Ryan Stille) Date: Fri, 27 Mar 2009 12:50:23 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? In-Reply-To: <49CD110A.2090409@cfwebtools.com> References: <49CD0EA1.4090101@jays.net> <49CD110A.2090409@cfwebtools.com> Message-ID: <49CD11DF.1080203@cfwebtools.com> I didn't look at it closely enough the first time - you are right that is confusing. -Ryan Ryan Stille wrote: > I like the ternary. > -Ryan > > Jay Hannah wrote: >> Hmm... I find this use of the ternary operator confusing so I changed >> it... >> >> >> BEFORE: >> >> $align = ( $self->align eq 'justify' ) ? 'left' : $self->align; >> >> AFTER: >> >> # We've run out of words to fill a full line >> if ($self->align eq 'justify') { >> $self->align('left'); >> } >> >> >> What do you think? >> >> >> http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm >> >> _______________________________________________ >> Omaha-pm mailing list >> Omaha-pm at pm.org >> http://mail.pm.org/mailman/listinfo/omaha-pm > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm From tedkat at gmail.com Fri Mar 27 10:51:21 2009 From: tedkat at gmail.com (Theodore Katseres) Date: Fri, 27 Mar 2009 12:51:21 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? In-Reply-To: <49CD0EA1.4090101@jays.net> References: <49CD0EA1.4090101@jays.net> Message-ID: On Fri, Mar 27, 2009 at 12:36 PM, Jay Hannah wrote: > Hmm... I find this use of the ternary operator confusing so I changed it... > > > BEFORE: > > $align = ( $self->align eq 'justify' ) ? 'left' : $self->align; > > AFTER: > > # We've run out of words to fill a full line > if ($self->align eq 'justify') { > $self->align('left'); > } > > > What do you think? > How about? $self->align('left') if ($self->align eq 'justify'); -- Ted Katseres ||=O=|| -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Fri Mar 27 10:53:59 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 27 Mar 2009 12:53:59 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? In-Reply-To: References: <49CD0EA1.4090101@jays.net> Message-ID: <49CD12B7.9030801@jays.net> Theodore Katseres wrote: > How about? > $self->align('left') if ($self->align eq 'justify'); > Ya... I like that better here... :) Thanks, j From jay at jays.net Fri Mar 27 12:46:41 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 27 Mar 2009 14:46:41 -0500 Subject: [Omaha.pm] code change ... good? bad? ugly? In-Reply-To: <49CD0EA1.4090101@jays.net> References: <49CD0EA1.4090101@jays.net> Message-ID: <49CD2D21.3030303@jays.net> Jay Hannah wrote: > BEFORE: > > $align = ( $self->align eq 'justify' ) ? 'left' : $self->align; > > AFTER: > > # We've run out of words to fill a full line > if ($self->align eq 'justify') { > $self->align('left'); > } Oops. $align and $self->align are two separate beasts. $self->align is a semi-permanent thing, $align changes in this chunk of code a couple of times, depending. So actually I need both and the BEFORE ternary was the cleanest... So I'm back to that now. The circle of life. Apologies to the original author for sophmoric doubt. :) j http://github.com/jhannah/pdf-textblock/blob/master/lib/PDF/TextBlock.pm From jay at jays.net Fri Mar 27 15:31:50 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 27 Mar 2009 17:31:50 -0500 Subject: [Omaha.pm] PDF::TextBlock Message-ID: <49CD53D6.9060106@jays.net> woot! Looks like I've gotten to the point of usable-for-my-problem. :) I uploaded the .pdf outputs of the test suite: http://github.com/jhannah/pdf-textblock/downloads j From rob.townley at gmail.com Sat Mar 28 22:16:05 2009 From: rob.townley at gmail.com (Rob Townley) Date: Sun, 29 Mar 2009 00:16:05 -0500 Subject: [Omaha.pm] Reading a Unix vs a DOS text file In-Reply-To: References: <49CBAF76.3060003@jays.net> Message-ID: <7e84ed60903282216r5b50d52ejcc1896d40a620669@mail.gmail.com> On Thu, Mar 26, 2009 at 1:14 PM, Mike Hostetler wrote: > > > On Thu, Mar 26, 2009 at 11:38 AM, Jay Hannah wrote: >> >> Mike Hostetler wrote: >>> >>> So . . . it there a way I could get Perl to detect a file that uses CRLF >>> as >>> it's line terminator? ?That way, I could use binmode on that file, and >>> use >>> ASCII on the rest. ?Or does someone have a better suggestion? >>> >> >> binmode is for binary files. >> >> CRLF (\r\n Windows) and LF (\n *nix) are for text files. >> >> I think you are confusing those two issues. They are not related. When >> reading a file you could >> >> while () { >> ?s/[\r\n]+$//; >> >> to remove those characters regardless of which format any given file was >> written in. >> >> Does that help? ? :) > > That does help. > > I mentioned binmode because I saw several references to that, but your > solution is better. > > I knew someone would know more than me.? I just moonlight in Perl. :) > > > -- > Mike Hostetler > http://mike.hostetlerhome.com/ > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > >From what i remember, \n works well across platforms, but have had trouble with socket programming across platform, but that was a decade ago. i would start with the parameters passed to perl to start the scripts. There is a switch to try to make it unnecessary to use chomp among other things. i may have used it to read files from DOS, convert records to a standard, and output a special line ending character. Secondly, "perldoc open" and check what is set for the IN and OUT pragmas as they may be different. Third, i would print the following perlvars and "perldoc perlport" to shed some light on different places newline can be set. # O::Handle->input_record_separator(EXPR) # $INPUT_RECORD_SEPARATOR # $RS # $/ # IO::Handle->output_record_separator EXPR # $OUTPUT_RECORD_SEPARATOR # $ORS # $\ The output record separator for the print operator. If defined, this value is printed after the last of print's arguments. Default is undef. (Mnemonic: you set $\ instead of adding "\n" at the end of the print. Also, it's just like $/ , but it's what you get "back" from Perl.)