From jay at jays.net Sat Mar 1 06:18:33 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 1 Mar 2008 08:18:33 -0600 Subject: [Omaha.pm] Catalyst: Adding Action Timings To Your Output Message-ID: <55C4F3EE-C486-4F9D-9A1C-9ED58DBB7536@jays.net> Oh, neato. Use the timing stuff built into Catalyst for your own purposes: http://www.onemogin.com/blog/559-adding-action-timings-to-your- output.html Try to ignore the oh-so-pretty yet oh-so-ugly blog layout. :) j From jay at jays.net Sat Mar 1 08:16:51 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 1 Mar 2008 10:16:51 -0600 Subject: [Omaha.pm] Cheesy XML wrangling Message-ID: <2E704022-F7DC-4E97-A2B1-4D6521910055@jays.net> I've been doing a lot of cheesy XML parsing w/ command-line perl lately. Perl is great at elegant XML handling too (I'm a fan of XML::Twig), but it's hard to beat 30-second command line solutions to answer simple questions... Linux + GNU + Perl is awesome. :) j preaching to the choir $ head -3 RevData.DALMAN.20080301.xml $ grep ' Message-ID: <3FC7F397-318C-48FF-9DF1-D87BB65DB5C3@jays.net> From: Eric Wilhelm Date: March 1, 2008 9:03:41 PM CST To: pm_groups at pm.org Subject: [pm_groups] Summer of Code -- volunteers needed Hi all, TPF needs volunteers to make summer of code happen this year. It sounds like the administrators got stretched too thin in 2005 and 2006, and we really didn't have ourselves together in 2007. So, I'm proposing a departmental structure under a TPF umbrella, which will localize the cat-herding effects within various large projects (so far, parrot and Catalyst appear to be on board with this.) I would like to demonstrate that we have our act together this year, so we need to get a solid pool of administrative volunteers and mentors together before the 8th. Administrative needs: (Contact ewilhelm at cpan.org or join #soc on irc.perl.org.) * backup administrator (reduce the bus number) * Department heads for p5p, "modules", etc * Suggestions about department structure Mentors and project ideas needed: We need to get these pages populated before March 8th or it is quite likely to be a no-go. Potential mentors, please add yourselves and your project ideas here: http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_mentors http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects If you hate wikis as much as I do, please visit this handy form and I will batch the wiki edits on your behalf. http://scratchcomputing.com/loveperlhatewiki.html Thanks, Eric -- We who cut mere stones must always be envisioning cathedrals. --Quarry worker's creed --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- -- From trey-b at cox.net Sun Mar 2 10:37:02 2008 From: trey-b at cox.net (trey) Date: Sun, 2 Mar 2008 12:37:02 -0600 Subject: [Omaha.pm] Cheesy XML wrangling References: <2E704022-F7DC-4E97-A2B1-4D6521910055@jays.net> Message-ID: <000701c87c94$68dd5980$8601a8c0@fruitloops> I love ready mixed instant reports by throwning anything into sort | uniq -c. ----- Original Message ----- From: "Jay Hannah" To: "Nebraska USA Perl Mongers of Omaha" Cc: "Omaha Linux User Group" Sent: Saturday, March 01, 2008 10:16 AM Subject: [Omaha.pm] Cheesy XML wrangling > I've been doing a lot of cheesy XML parsing w/ command-line perl > lately. Perl is great at elegant XML handling too (I'm a fan of > XML::Twig), but it's hard to beat 30-second command line solutions to > answer simple questions... > > Linux + GNU + Perl is awesome. :) > > j > preaching to the choir > > > $ head -3 RevData.DALMAN.20080301.xml > ver="1.5"> > > doa="20071027" evt="notevent" exprrev="972" gcnt="1" > grp="13700106165" gtd="Y" id="2009477241" inlos="6" > intime="20071027100400" los="6" off="notoffer" > outtime="20071102041200" rcnt="1" rt="DELUXE" seg="06" src="WB" > st="R" time="20080301091703" xltime=""/> > > $ grep ' print $1' | sort | uniq -c > 50699 DELUXE > 16144 SUITES > 1180 UMAN > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm From andy at petdance.com Sun Mar 2 13:17:24 2008 From: andy at petdance.com (Andy Lester) Date: Sun, 2 Mar 2008 15:17:24 -0600 Subject: [Omaha.pm] Cheesy XML wrangling In-Reply-To: <000701c87c94$68dd5980$8601a8c0@fruitloops> References: <2E704022-F7DC-4E97-A2B1-4D6521910055@jays.net> <000701c87c94$68dd5980$8601a8c0@fruitloops> Message-ID: On Mar 2, 2008, at 12:37 PM, trey wrote: >> perl -nle '/rt="(.*?)"/; print $1' That's the same as ack /rt="(.*?)" --output='$1' ack lets you use all the Perl regex goodness. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Sun Mar 2 15:14:12 2008 From: jay at jays.net (Jay Hannah) Date: Sun, 2 Mar 2008 17:14:12 -0600 Subject: [Omaha.pm] Little tab-delimited file manipulator Message-ID: <50DC1F75-DB18-43E8-BA6D-B91986C775AC@jays.net> Yet another little program I wrote today. Perl roolz. :) (Let's see if this RTF format will post to the list OK w/o line wrapping...) j $ cat in zero one two three four 01 11 21 31 41 02 12 22 32 42 03 13 23 33 43 01 11 21 31 41 02 12 22 32 42 03 13 23 33 43 01 11 21 31 41 02 12 22 32 42 03 13 23 33 43 01 11 21 31 41 02 12 22 32 42 03 13 23 33 43 $ perl ./microarray_to_R.pl --label_column 4 --discard_columns "1..2" --file in four zero three 41 01 31 42 02 32 43 03 33 41 CLAB2 01 31 42 CLAB2 02 32 43 CLAB2 03 33 41 CLAB3 01 31 42 CLAB3 02 32 43 CLAB3 03 33 41 CLAB4 01 31 42 CLAB4 02 32 43 CLAB4 03 33 #!/usr/bin/perl -w use strict; use Getopt::Long; my ($discard_columns, $label_column, $file); my $result = GetOptions ( "discard_columns=s" => \$discard_columns, "label_column=s" => \$label_column, "file=s" => \$file, ); usage() unless (-r $file && defined $label_column); my @discard_columns; if ($discard_columns) { @discard_columns = eval $discard_columns; } foreach my $column (reverse sort numerically @discard_columns) { # Stop silliness if ($column == $label_column) { die "You can't discard your label_column."; } # Each splice might move my label_column to the left... if ($column < $label_column) { $label_column--; } } my %labels; open (IN, $file) or die; my $row = 1; while () { chomp; my @input = split /\t/; my @output = @input; # discard_columns foreach my $column (reverse sort numerically @discard_columns) { splice @output, $column, 1; } # label_column # Grab the label my $label = splice @output, $label_column, 1; # Make sure it's unique $labels{$label}++; if ($labels{$label} > 1) { $label = "$label CLAB$labels{$label}"; } # Stick it on the front of the array unshift @output, $label; no warnings 'uninitialized'; print join "\t", @output; print "\n"; $row++; } close IN; # END MAIN sub numerically { $a <=> $b } sub usage { print < Another quicky I was given today. Problem: Given one file which is a list of keys, and another file which is tab-delimited and the key is the 0th column, find all the keys that are present in both files. 5m solution and example run below. j $ cat /tmp/j.pl #!/usr/bin/perl my %hash; open (IN, $ARGV[0]); while () { chomp; $hash{$_} = 1; } close IN; my @matches; open (IN, $ARGV[1]); while () { chomp; my @l = split /\t/; if ($hash{$l[0]}) { push @matches, $l[0]; } } close IN; print join ", ", @matches; print "\n"; $ /tmp/j.pl probeName.list2 lookup.file 200644_at, 200754_x_at, 200761_s_at, 200892_s_at, 200923_at, 201277_s_at, 201381_x_at, 201663_s_at, 201885_s_at, 202007_at, 202095_s_at, 202164_s_at, 202181_at, 202336_s_at, 202376_at, 202589_at, 202779_s_at, 203234_at, 203418_at, 203432_at, 203434_s_at, 204281_at, 204441_s_at, 205053_at, 205240_at, 205574_x_at, 205676_at, 206074_s_at, 206102_at, 206316_s_at, 206336_at, 207165_at, 207345_at, 208079_s_at, 208084_at, 208779_x_at, 209183_s_at, 209714_s_at, 209774_x_at, 209974_s_at, 209980_s_at, 210987_x_at, 211066_x_at, 211747_s_at, 211762_s_at, 212281_s_at, 212417_at, 212438_at, 212503_s_at, 213008_at, 213226_at, 213462_at, 213861_s_at, 214710_s_at, 215446_s_at, 216250_s_at, 217783_s_at, 218016_s_at, 218115_at, 218804_at, 219212_at, 219725_at, 219770_at, 219933_at, 219981_x_at, 221729_at, 221922_at, 221986_s_at, 222077_s_at, 38149_at, 59625_at, 222549_at, 222673_x_at, 223194_s_at, 223307_at, 224779_s_at, 224944_at, 225300_at, 225541_at, 225687_at, 226104_at, 226325_at, 226932_at, 227212_s_at, 227379_at, 228286_at, 228654_at, 229538_s_at, 229610_at, 231823_s_at, 235509_at, 242517_at, 242873_at, 1552348_at, 1552619_a_at, 1553768_a_at, 1554696_s_at, 1555007_s_at, 1555758_a_at, 1564911_at From jay at jays.net Thu Mar 6 13:16:48 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 06 Mar 2008 15:16:48 -0600 Subject: [Omaha.pm] Pulling data from a crappy MS-SQL server somewhere in Mexico... Message-ID: <47D05F40.6060304@jays.net> It's nice to know that with enough retries and error handling, you can, eventually pull data from a bad server over a terrible network connection... :) Perl in Omaha <-> DBI <-> DBD::Sybase <-> freetds <-> MS-SQL in Mexico :) j my $sth = $dbh_pms->prepare($strsql); for (1..50) { if ($sth->execute) { last; } else { $logger->warn("Database error detected (attempt # $_). Waiting 3 seconds, then retrying: $DBI::errstr"); $sth->finish; $sth = $dbh_pms->prepare($strsql); sleep 3; } } From jay at jays.net Fri Mar 7 12:47:18 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 07 Mar 2008 14:47:18 -0600 Subject: [Omaha.pm] get_xpath via Perl, Template Toolkit (XML::Twig) Message-ID: <47D1A9D6.9010703@jays.net> When parsing XML your xpath statement can say things like: 'b/c[@jay="rules" and @justin="rules too"]/d' Which says... foreach b node that has a child c node that has an attribute "jay" set to "rules" AND an attribute "justin" set to "rules too" and has a child d node ...grab those d nodes. We were having problems, though. The AND part seemed not to be working deep in the bowels of our real-world scenario inside Template Toolkit. So I made the simplest possible recreation set, below. XML::Twig rules. :) j $ cat blah.xml boo-ya! $ cat j.pl #!/usr/bin/perl use Template; use XML::Twig; my $twig = XML::Twig->new( pretty_print => 'indented' ); $twig->parsefile('blah.xml'); $twig = $twig->root; # ----------------------------- # Using Perl # ----------------------------- print "Using Perl:\n"; foreach my $d ($twig->get_xpath('b/c[@jay="rules" and @justin="rules too"]/d')) { print $d->text; } print "\n\n"; # ----------------------------- # Using Template Toolkit # ----------------------------- my $template = Template->new(); $template->process('j.tt', { twig => $twig }) || die $template->error(); $ cat j.tt Using Template Toolkit: [% FOREACH d IN twig.get_xpath('b/c[@jay="rules" and @justin="rules too"]/d'); d.text; END; %] $ perl j.pl Using Perl: boo-ya! Using Template Toolkit: boo-ya! From pbaker at omnihotels.com Fri Mar 7 13:08:22 2008 From: pbaker at omnihotels.com (Sean Baker) Date: Fri, 7 Mar 2008 15:08:22 -0600 Subject: [Omaha.pm] get_xpath via Perl, Template Toolkit (XML::Twig) In-Reply-To: <47D1A9D6.9010703@jays.net> References: <47D1A9D6.9010703@jays.net> Message-ID: >foreach my $d ($twig->get_xpath('b/c[@jay="rules" and @justin="rules too"]/d')) { Does anyone else find that incredibly ugly? Maybe it's just me + Friday. Sean From jay at jays.net Fri Mar 7 13:18:19 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 7 Mar 2008 15:18:19 -0600 (CST) Subject: [Omaha.pm] get_xpath via Perl, Template Toolkit (XML::Twig) In-Reply-To: References: <47D1A9D6.9010703@jays.net> Message-ID: On Fri, 7 Mar 2008, Sean Baker wrote: >> foreach my $d ($twig->get_xpath('b/c[@jay="rules" and @justin="rules too"]/d')) { > > Does anyone else find that incredibly ugly? Maybe it's just me + > Friday. What? My errant line wraps because I keep forgetting that Thunderbird enjoys torturing me? :) Oh, you probably meant the xpath syntax. Ya, the syntax overlap between Perl and xpath attributes is pretty painful. I haven't seen anything I like better, though. I have yet to talk to anyone in any language that is in love with their XML processing syntax... j From jay at jays.net Fri Mar 7 13:26:50 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 7 Mar 2008 15:26:50 -0600 (CST) Subject: [Omaha.pm] get_xpath via Perl, Template Toolkit (XML::Twig) In-Reply-To: <47D1A9D6.9010703@jays.net> References: <47D1A9D6.9010703@jays.net> Message-ID: On Fri, 7 Mar 2008, Jay Hannah wrote: > Using Template Toolkit: > [% > FOREACH d IN twig.get_xpath('b/c[@jay="rules" and @justin="rules too"]/d'); > d.text; > END; > %] Just to give everyone a taste of our real-world pain (in Template Toolkit syntax): xpath = 'AvailResponseSegments/a:AvailResponseSegment/a:RoomStayList/hc:RoomStay/hc:RoomRates/hc:RoomRate[@ratePlanCode="' _ ratePlanCode _ '" and @roomTypeCode=" _ roomTypeCode _ "]/hc:Rates/hc:Rate/hc:Base'; FOREACH Base IN AvailabilityResponse.get_xpath(xpath); # ... Evil laugh, j From jay at jays.net Mon Mar 10 20:51:31 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 10 Mar 2008 22:51:31 -0500 Subject: [Omaha.pm] Fwd: [Templates] Python and TT References: Message-ID: <619235BA-D79D-43B0-9E33-B61EF9E20A2A@jays.net> Well, I'll be... You can do Template Toolkit in Python now... What WILL they think of next? :) j Begin forwarded message: > From: "Sean McAfee" > Date: March 10, 2008 8:05:49 PM CDT > To: "Sean Allen" > Cc: templates at template-toolkit.org > Subject: Re: [Templates] Python and TT > > On Mon, Mar 10, 2008 at 5:29 PM, Sean Allen > wrote: > We are getting ready to embark on porting a bunch of old code ( and > several hundred TT templates ) to Python and plan on using template- > python to ease everything along. Anyone else but in any serious work > with the python version of TT? If yes, do you have any gotchas to > share that we should be aware of ahead of time? > > As the implementor of template-python, I'm probably the person with > most > serious work under my belt--the most that I know of, anyway. While > I haven't yet attempted to convert any sizeable Perl-TT project to > Python, I did document every potential gotcha I could think of in > the file README.python, located at the top of the Python source > distribution. I'd encourage you to read that file carefully. > Other than that, all of the inline POD documentation from the Perl > source code has been carried over into the Python source code, > suitably translated into the Python paradigm. It can be read > either by browsing the source code, or (as noted in README.python) > by the built-in help feature of the interactive Python > interpreter. For example: > > >>> import template.stash > >>> help(template.stash.Stash) > ... documentation for the Stash class ... > > If you come across any problems I didn't foresee, I'd be happy to > help you resolve them. You can contact me privately, or--more > preferably--bring up any issues here on the mailing list. > > > --Sean > _______________________________________________ > templates mailing list > templates at template-toolkit.org > http://mail.template-toolkit.org/mailman/listinfo/templates From jay at jays.net Sat Mar 15 09:38:12 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 15 Mar 2008 11:38:12 -0500 Subject: [Omaha.pm] Cheesy XML wrangling In-Reply-To: <200803150047.14933.luke@dashjr.org> References: <2E704022-F7DC-4E97-A2B1-4D6521910055@jays.net> <200803150047.14933.luke@dashjr.org> Message-ID: <90A20976-5157-4F4C-BF37-2923ED965B7C@jays.net> On Mar 15, 2008, at 12:47 AM, Luke -Jr wrote: > I love Perl, but your example is one of how NOT to manage XML, > because it will > very easily break just by adding a valid newline in your input. Yup. That's why it's cheesy. But sometimes a cheesy solution in 30 seconds is "better" than an elegant solution that takes longer. It all depends on what your goals are. j From jay at jays.net Sun Mar 16 07:43:32 2008 From: jay at jays.net (Jay Hannah) Date: Sun, 16 Mar 2008 09:43:32 -0500 Subject: [Omaha.pm] KC Hack Day Message-ID: <221D667E-AEB8-4BDA-9770-F03B1AEDE12A@jays.net> We peaked out at 4 attendees: http://jays.net/wiki/KC_Hack_Day It was fun! Thanks, Kit, for organizing! I like that coffee shop. I'd probably be there for their chess events too if I lived close. :) Take care, j From jhannah at omnihotels.com Tue Mar 18 07:46:32 2008 From: jhannah at omnihotels.com (Jay Hannah) Date: Tue, 18 Mar 2008 09:46:32 -0500 Subject: [Omaha.pm] regex to lift Crypt::Tea strings out of XML Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF111DB43@l3exchange.omnihotels.net> Looking at the source of Crypt/Tea.pm, it appears your possible chars are [A-Za-z0-9\-_] So you could "do one or more of any of those": my ($encrypted) = ($row =~ /attr_key="([A-Za-z0-9\-_]+)"/); or "one or more anything that is not a quote": my ($encrypted) = ($row =~ /attr_key="([^"]+)"/); or "one or more anything, non-greedy": my ($encrypted) = ($row =~ /attr_key="(.+?)"/); ? untested... --- reverse() is neat. I didn't know/remember that Perl function. :) my %a2b = ( A=>000, B=>001, C=>002, D=>003, E=>004, F=>005, G=>006, H=>007, I=>010, J=>011, K=>012, L=>013, M=>014, N=>015, O=>016, P=>017, Q=>020, R=>021, S=>022, T=>023, U=>024, V=>025, W=>026, X=>027, Y=>030, Z=>031, a=>032, b=>033, c=>034, d=>035, e=>036, f=>037, g=>040, h=>041, i=>042, j=>043, k=>044, l=>045, m=>046, n=>047, o=>050, p=>051, q=>052, r=>053, s=>054, t=>055, u=>056, v=>057, w=>060, x=>061, y=>062, z=>063, '0'=>064, '1'=>065, '2'=>066, '3'=>067, '4'=>070,'5'=>071,'6'=>072,'7'=>073,'8'=>074,'9'=>075,'-'=>076,'_'=>077, ); my %b2a = reverse %a2b; ------ HTH, j -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20080318/8abb0882/attachment.html From dan at linder.org Tue Mar 18 09:55:10 2008 From: dan at linder.org (Dan Linder) Date: Tue, 18 Mar 2008 11:55:10 -0500 Subject: [Omaha.pm] regex to lift Crypt::Tea strings out of XML In-Reply-To: <396CEDAA86B38646ACE2FEAA22C3FBF111DB43@l3exchange.omnihotels.net> References: <396CEDAA86B38646ACE2FEAA22C3FBF111DB43@l3exchange.omnihotels.net> Message-ID: <3e2be50803180955n195c81aat74a6c0f48bd2fdd7@mail.gmail.com> On Tue, Mar 18, 2008 at 9:46 AM, Jay Hannah wrote: > > reverse() is neat. I didn't know/remember that Perl function. :) > And for those of you wondering (like I was), here's what happens when you run it with multiple values on the right side of the => sign... *Code:* use Data::Dumper; use strict; use warnings; my %a2b = ( A=>000, B=>001, C=>001, D=>002 ); printf ("Original:\n"); printf Dumper(\%a2b); my %b2a = reverse %a2b; printf ("\n======================\nReversed:\n"); printf Dumper(\%b2a); printf ("Done!\n"); *Output:* Original: $VAR1 = { 'A' => 0, 'D' => 2, 'C' => 1, 'B' => 1 }; ====================== Reversed: $VAR1 = { '1' => 'C', '0' => 'A', '2' => 'D' }; Done! *RESULT:* *"There can be only one*" (to be expected with a hash variable), but there aren't any warnings that appear when there are multiple values. I'm not certain if it is 'last one wins' (last being last one defined in original hash), or 'first one wins' (first being the first as stored in memory and shown in the Dumper output)... 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: http://mail.pm.org/pipermail/omaha-pm/attachments/20080318/20f1ab32/attachment.html From jay at jays.net Tue Mar 18 13:48:16 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 18 Mar 2008 15:48:16 -0500 Subject: [Omaha.pm] regex to lift Crypt::Tea strings out of XML In-Reply-To: <3e2be50803180955n195c81aat74a6c0f48bd2fdd7@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF111DB43@l3exchange.omnihotels.net> <3e2be50803180955n195c81aat74a6c0f48bd2fdd7@mail.gmail.com> Message-ID: On Mar 18, 2008, at 11:55 AM, Dan Linder wrote: > RESULT: > "There can be only one" (to be expected with a hash variable), but > there aren't any warnings that appear when there are multiple > values. I'm not certain if it is 'last one wins' (last being last > one defined in original hash), or 'first one wins' (first being the > first as stored in memory and shown in the Dumper output)... I assume since the order of keys in a hash is not defined there is no way to reliably predict the result. Anyone volunteers to stare at the source code of perl itself? "Not it!" :) j From jay at jays.net Tue Mar 18 18:24:07 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 18 Mar 2008 20:24:07 -0500 (CDT) Subject: [Omaha.pm] from homebrew objects to Moose Message-ID: Tonight I'm moving a bunch of classes from our homebrew object system to use Moose instead. Below is a sample svn diff. Moose: http://search.cpan.org/~stevan/Moose/lib/Moose.pm j party king! :) use strict; -use Base; -use vars qw(@ISA @ATT); - at ISA = qw( Base ); - at ATT = qw( ); +use Moose; +extends 'Omni2::Base'; + # My current buffer. Is left blank for TCP* buffers. +has buffer => ( is => 'rw', isa => 'Str' ); +has c_mux => ( is => 'rw', isa => 'HashRef' ); # Omni2::Control::Multiplex object +has label => ( is => 'rw', isa => 'Str' ); # What people call me +has mode => ( is => 'rw', isa => 'Str' ); # read? write? (both?) +has fh => ( is => 'rw', isa => 'FileHandle' ); # My read/write filehandle +no Moose; -{ - my %_attr_data = ( - # My current buffer. Is left blank for TCP* buffers. - buffer => ['1', 'RW', 'attr', 'O','is_string', ''], - c_mux => ['2', 'RW', 'attr', 'R','is_hash', ''], # Omni2::Control::Multiplex object - label => ['3', 'RW', 'attr', 'R','is_string', ''], # What people call me - mode => ['4', 'RW', 'attr', 'R','is_string', ''], # read? write? (both?) - fh => ['5', 'RW', 'attr', 'R','is_glob', ''], # My read/write filehandle - ); - sub get_attr_data_ref { return \%_attr_data; } - sub get_ATT { return @ATT; } -} From jay at jays.net Thu Mar 20 11:45:32 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 20 Mar 2008 13:45:32 -0500 Subject: [Omaha.pm] FW: URGENT EMBARQ CLIENT CALL - EDI SPECIALIST NEEDED Message-ID: <47E2B0CC.10707@jays.net> Anyone dying to move to suburb SW of Kansas City? :) j -------- Original Message -------- Subject: [Kc] FW: URGENT EMBARQ CLIENT CALL - EDI SPECIALIST NEEDED Date: Thu, 20 Mar 2008 13:33:36 -0500 From: Bill Joeckel To: kc at pm.org Just spoke with the client. Recognizing that Gentran is very hard to find, the client is approaching from another angle **Heavy UNIX PERL Scripting** with desire to learn EDI (good skill set to learn!) Needs to be ready to start out in Gardner KS as **early as possible next week** - client has 1 week to cross train this candidate before they lose their resource. Several of their programmers have left for other jobs and they've reached a critical point NEED: EDI Developer on UNIX midrange Using Gentran Software for their EDI Scripting capabilities LOCATION: Gardner KS BILL RATE: probably around $65/hour -- We will inform them of the pricing we're seeing and if we need to raise, we raise TIMING: Need someone to start *next Monday as they have 1 week transition period before their last resource * *# *of openings -- ultimately they need to hire two people. If this first resource is soley career contractor, they are fine with that as they need a body in the chair ASAP for the transition. Then we'd have time to fill the to-hire openings next. Thanks Bill joeckel MCG -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20080320/e2456ee1/attachment.html From georgen at neillnet.com Thu Mar 20 12:09:44 2008 From: georgen at neillnet.com (George Neill) Date: Thu, 20 Mar 2008 14:09:44 -0500 Subject: [Omaha.pm] FW: URGENT EMBARQ CLIENT CALL - EDI SPECIALIST NEEDED In-Reply-To: <47E2B0CC.10707@jays.net> References: <47E2B0CC.10707@jays.net> Message-ID: Several of their programmers have left for other jobs and they've reached a critical point Looks like folks are dying to move out ... :) On 3/20/08, Jay Hannah wrote: > > > Anyone dying to move to suburb SW of Kansas City? :) > > j > > > -------- Original Message -------- Subject: [Kc] FW: URGENT EMBARQ CLIENT > CALL - EDI SPECIALIST NEEDED Date: Thu, 20 Mar 2008 13:33:36 -0500 From: > Bill Joeckel To: kc at pm.org > > > > Just spoke with the client. Recognizing that Gentran is very hard to > find, the client is approaching from another angle > > > > *Heavy UNIX PERL Scripting* with desire to learn EDI (good skill set to > learn!) > > Needs to be ready to start out in Gardner KS as *early as possible next > week* - client has 1 week to cross train this candidate before they lose > their resource. > > > > > > Several of their programmers have left for other jobs and they've reached > a critical point > > > > NEED: EDI Developer on UNIX midrange > > Using Gentran Software for their EDI > > Scripting capabilities > > > > > > LOCATION: Gardner KS > > BILL RATE: probably around $65/hour ? We will inform them of the pricing > we're seeing and if we need to raise, we raise > > > > TIMING: Need someone to start *next Monday as they have 1 week transition > period before their last resource * > > > > *# *of openings ? ultimately they need to hire two people. If this first > resource is soley career contractor, they are fine with that as they need a > body in the chair ASAP for the transition. Then we'd have time to fill the > to-hire openings next. > > > > > > Thanks > > > > Bill joeckel > > > > MCG > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20080320/8cfef91d/attachment.html From jay at jays.net Thu Mar 20 14:42:58 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 20 Mar 2008 16:42:58 -0500 Subject: [Omaha.pm] FW: URGENT EMBARQ CLIENT CALL - EDI SPECIALIST NEEDED In-Reply-To: References: <47E2B0CC.10707@jays.net> Message-ID: <47E2DA62.6030504@jays.net> George Neill wrote: > Several of their programmers have left for other jobs and > they've reached a critical point > > Looks like folks are dying to move out ... :) > Apply money liberally and repeatedly to any open wounds. :) j http://en.wikipedia.org/wiki/Faustian From jay at jays.net Fri Mar 21 04:26:22 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 21 Mar 2008 06:26:22 -0500 Subject: [Omaha.pm] Fwd: Back to the Template References: Message-ID: :) j From: "Perl.com Newsletter" Date: March 14, 2008 2:09:00 PM CDT To: Subject: Back to the Template Reply-To: "Perl.com Newsletter" Perl.com update -------------------------------------- The Email for www.perl.com Subscribers =================================================================== Read this newsletter online at: http://www.oreillynet.com/perl/newsletters/031408-perl-news.html? CMP=NLC-otx_nlrs_2html =================================================================== Beware the IDEs of March, Perl hackers. (Or beware puns that come from Shakespeare plays brazenly stolen from Plutarch.) Here's what's new this fortnight. * Perl News Google's annual Summer of Code begins soon. TPF awaits eagerly its confirmation as a mentoring organization. In the meantime, please check the Perl SoC wiki (lovingly prepared by Eric "The Current Josh of PDX.pm" Wilhelm). Students are more than welcome. Your editor can't recommend actually bribing them to work on these projects, but do find every available student in your area and offer them gifts of money and food to participate: http://www.perlfoundation.org/perl5/index.cgi?gsoc2008 Saturday, March 15 (fire up that IDE), is the monthly Parrot Contributor Day. In preparation for the release of Parrot 0.6.0 next Tuesday, the Parrot developers will be in #parrot on irc.perl.org all day to fix bugs, update documentation, and help new developers get Parrot installed and running on their machines. Of particular interest this week is Parrot on non-Linux platforms -- especially 64-bit platforms. One of the goals of Parrot is to make Perl 6 possible. There are plenty of opportunities to hack on that without knowing C. You do need to know a little bit about Parrot as well as the Parrot compiler tools. Klaas-Jan Stol is writing a series of tutorials on how to build your own language on Parrot. (That language can also be Perl 6.) http://www.parrotblog.org/2008/03/targeting-parrot-vm.html Dave Rolsky, TPF's grant manager for Parrot, posted a report for the months of January and February: http://www.perlfoundation.org/ parrot_grant_update_for_january_and_february Nicholas Clark, Andy Armstrong, and Rafael Garcia-Suarez helped Tom "Spot" Callaway get Perl 5.10 into Fedora Core 9. Servers the world over rejoice: http://use.perl.org/article.pl?sid=08/03/11/0833217 Andy Lester is looking for someone to take over perl101.org. Your editor suggests that encouraging people to use Perl as it exists in 5.10 -- with all of the nice features and discipline and best practices as they stand now -- is highly important: http://perl101.org/ Along those lines is the new Enlightened Perl Organization, designed to encourage the use of Perl as a modern, high-level development platform. You may recognize some of the signatories as contributors to Catalyst, DBIx::Class, Moose, RT, and SVK: http://www.enlightenedperl.org/ Andy Lester has argued that good code is the best form of evangelism. Your editor also likes getting big checks in the mail: http://perlbuzz.com/2008/03/good-perl-code-is-the-best-form-of- evangelism.html ... and Andy also sees what may become a promising trend of businesses admitting that, yes, the camel helps them get their work done effectively: http://perlbuzz.com/2008/03/more-companies-openly-supporting-perl- projects.html While you're logging into #parrot, remember that the 15th is also the deadline for YAPC::NA talk proposals. Your editor has already offered to talk about how to recognize and rescue a damaged project: http://use.perl.org/article.pl?sid=08/03/07/1725220 Mark Leighton Fisher released a new version of pmtools, for everyone living in exile away from a lovely and true Unix-like platform: http://search.cpan.org/dist/pmtools-1.10/ Jesse Vincent and Best Practical released the customized code behind rt.cpan.org: http://use.perl.org/article.pl?sid=08/03/05/0023258 David Landgren, your editor's favorite expat living in France, summarized the activities on Perl 5 Porters: http://use.perl.org/article.pl?sid=08/03/06/2255257 Your editor minuted the Perl 6 design meetings: http://use.perl.org/article.pl?sid=08/03/13/2015258 http://use.perl.org/article.pl?sid=08/03/13/2015225 * Perl at O'Reilly There are two well-known templating styles in the world today. One mixes your language's code with markup in the output format, calling back into your code to fetch data. The other executes a mini language with conditionals, loops, and substitutions, operating on data passed into it. Both work, though both have strengths and weaknesses. There's also a third approach. James Robson describes the reverse callback templating technique, and demonstrates how it has advantages over the other two more famous approaches: http://www.perl.com/pub/a/2008/03/14/reverse-callback-templating.html Your editor riffed on Bryce "Not a Josh" Harrington's ideas about the ratio of users to contributors, and what that means for platforms more exotic than a GNU/Linux distribution running on a 32-bit x86 processor: http://www.oreillynet.com/onlamp/blog/2008/03/ the_contributoruser_ratio_vari.html Speaking of contributor/user ratios, Dustin Puryear wondered how much life OpenOffice.org has remaining: http://www.oreillynet.com/onlamp/blog/2008/03/ openoffice_how_much_longer_doe.html Andy Oram considered the SD West conference a bellwether for programming theory: http://www.oreillynet.com/onlamp/blog/2008/03/sd_west_2008_wrapup.html Tim O'Reilly revealed that Markmail is now tracking over half a million messages in seventy five Perl mailing lists: http://radar.oreilly.com/archives/2008/03/perl-mailing-lists-added-to- ma.html That's it for this week. Your editor now idly wonders a few things: - do you know what The Perl Foundation does? - do you visit its web site ever/occasionally/often? - did you know that it has its own weblog? http://news.perlfoundation.org/ - how can TPF reach the people it needs to reach but doesn't already know? Your editor wins a shiny new quarter if your answers match his, - c chromatic editor Perl.com, et al =================================================================== Visit our Sponsored Developer Resource Pages and learn about cool stuff from our sponsors! Downloads - Free Training - Webinars - Updates Inside Lightroom: http://digitalmedia.oreilly.com/lightroom ------------------------------------------------------------------ Interested in sponsoring the Perl.com newsletter? Please email us at advertising at oreilly.com for rate and availability information. Thank you! ------------------------------------------------------------------ To change your newsletter subscription options, please visit http://www.oreillynet.com/cs/nl/home For assistance, email help at oreillynet.com O'Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 (707) 827-7000 ------------------------------------------------------------------ From netarttodd at gmail.com Fri Mar 21 17:55:13 2008 From: netarttodd at gmail.com (Todd Christopher Hamilton) Date: Fri, 21 Mar 2008 19:55:13 -0500 Subject: [Omaha.pm] Pulling data from a crappy MS-SQL server somewhere in Mexico... In-Reply-To: <47D05F40.6060304@jays.net> References: <47D05F40.6060304@jays.net> Message-ID: <1fdb7d920803211755n337f1e72j125e5a0659074592@mail.gmail.com> Jay, I am trying to do something very similar. Would you be interesdted in helping me. I could possibly pay you for your time (i.e beer, gift cert. donation to fav charity, cash). I have a sql2000 database I would like to access via perl DBD::ODBC (or DBD::Sybase I suppose). I installed Freetds and am able to access the database with the tsql command line client But I am having trouble with my perl app accessing it. I am sure it is all the wierd freetds.conf, odbc.ini stuff. Let me know if you can help. I could provide you with ssh/vnc access to my box. Todd 660-2787 On Thu, Mar 6, 2008 at 4:16 PM, Jay Hannah wrote: > It's nice to know that with enough retries and error handling, you can, > eventually pull data from a bad server over a terrible network > connection... :) > > Perl in Omaha <-> DBI <-> DBD::Sybase <-> freetds <-> MS-SQL in Mexico > > :) > > j > > > > my $sth = $dbh_pms->prepare($strsql); > for (1..50) { > if ($sth->execute) { > last; > } else { > $logger->warn("Database error detected (attempt # $_). Waiting > 3 seconds, then retrying: $DBI::errstr"); > $sth->finish; > $sth = $dbh_pms->prepare($strsql); > sleep 3; > } > } > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- Todd Christopher Hamilton (402) 660-2787 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20080321/3475ca5c/attachment.html From jay at jays.net Sat Mar 22 12:49:29 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 22 Mar 2008 14:49:29 -0500 Subject: [Omaha.pm] Pulling data from a crappy MS-SQL server somewhere in Mexico... In-Reply-To: <1fdb7d920803211755n337f1e72j125e5a0659074592@mail.gmail.com> References: <47D05F40.6060304@jays.net> <1fdb7d920803211755n337f1e72j125e5a0659074592@mail.gmail.com> Message-ID: On Mar 21, 2008, at 7:55 PM, Todd Christopher Hamilton wrote: > I have a sql2000 database I would like to access via perl DBD::ODBC > (or DBD::Sybase I suppose). I installed Freetds and am able to > access the database with the tsql command line client But I am > having trouble with my perl app accessing it. I am sure it is all > the wierd freetds.conf, odbc.ini stuff. I've never tried DBD::ODBC. I've used a lot of this: Perl <-> DBI <-> DBD::Sybase <-> freetds <-> MS-SQL The key is getting DBD::Sybase to install successfully. Set all the environmental variables per the README, and it should work or tell you what's wrong. Once you get DBD::Sybase working, you're done. :) If DBD::Sybase won't install post the full dialogue here and or to the dbi-users mailing list, and we should be able to figure it out. HTH, j From jay at jays.net Wed Mar 26 06:02:02 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 26 Mar 2008 08:02:02 -0500 Subject: [Omaha.pm] Jonathan Coulton song: Code Monkey Message-ID: Possibly the greatest song ever for code monkeys like me. http://www.jonathancoulton.com/store/downloads "Code Monkey" and "Re: Your Brains" are hilarious. All Creative Commons licensed. :) j From jay at jays.net Thu Mar 27 14:08:06 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 27 Mar 2008 16:08:06 -0500 Subject: [Omaha.pm] Fwd: [Bioperl-l] Call for Student Applications - NESCent participates in the Google Summer of Code References: <5AC4F213-8D88-41C6-B380-59B2EF7831F0@gmx.net> Message-ID: <40935163-E609-4AD6-8E73-943E897F992E@jays.net> Oh, cool. BioPerl is involved in Google Summer of Code... j From: Hilmar Lapp Date: March 22, 2008 1:18:45 PM CDT To: Bioperl BioPerl , BioSQL Subject: [Bioperl-l] Call for Student Applications - NESCent participates in the Google Summer of Code Hi all - just wanted to draw your attention to our Google Summer of Code participation this year. One of the projects deals directly with BioPerl, another one builds on BioSQL (and could be implemented taking advantage of BioPerl or Bio::Phylo, or Biojava). Cheers, -hilmar -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net : =========================================================== Phyloinformatics Summer of Code 2008 http://phyloinformatics.net/Phyloinformatics_Summer_of_Code_2008 *** Please disseminate this announcement widely to appropriate students at your institution *** The National Evolutionary Synthesis Center (NESCent: http:// www.nescent.org/) is participating in 2008 for the second year as a mentoring organization in the Google Summer of Code (http:// code.google.com/soc). Through this program, Google provides undergraduate, masters, and PhD students with a unique opportunity to obtain hands-on experience writing and extending open-source software under the mentorship of experienced developers from around the world. Our goal in participating is to train future researchers and developers to not only have awareness and understanding of the value of open-source and collaboratively developed software, but also to gain the programming and remote collaboration skills needed to successfully contribute to such projects. Students will receive a stipend from Google, and may work from their home, or home institution, for the duration of the 3 month program. Students will each have one or more dedicated mentors with expertise in phylogenetic methods and open-source software development. NESCent is particularly targeting students interested in both evolutionary biology and software development. Project ideas (see URL below) range from visualizing phylogenetic data in R, to development of a Mesquite module, web-services for phylogenetic data providers or geophylogeny mashups, implementing phyloXML support, navigating databases of networks, topology queries for PhyloCode registries, to phylogenetic tree mining in a MapReduce framework, and more. The project ideas are flexible and many can be adjusted in scope to match the skills of the student. If the program sounds interesting to you but you are unsure whether you have the necessary skills, please email the mentors at the address below. We will work with you to find a project that fits your interests and skills. INQUIRIES: Email any questions, including self-proposed project ideas, to phylosoc {at} nescent {dot} org. TO APPLY: Apply on-line at the Google Summer of Code website (http://code.google.com/soc/2008), where you will also find GSoC program rules and eligibility requirements. The 1-week application period for students opens on Monday March 24th and runs through Monday, March 31st, 2008. Hilmar Lapp and Todd Vision US National Evolutionary Synthesis Center ===== URLs: ===== 2008 NESCent Phyloinformatics Summer of Code: http://phyloinformatics.net/Phyloinformatics_Summer_of_Code_2008 Eligibility requirements: http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_eligibility Stipends: http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_administrivia To sign up for quarterly NESCent newsletters: with announcements about upcoming programs at the Center: http://www.nescent.org/about/contact.php _______________________________________________ Bioperl-l mailing list Bioperl-l at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioperl-l From jay at jays.net Fri Mar 28 10:51:57 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 28 Mar 2008 12:51:57 -0500 Subject: [Omaha.pm] [pm_groups] Summer of Code Students -- Last call In-Reply-To: <200803271053.26626.ewilhelm@cpan.org> References: <200803271053.26626.ewilhelm@cpan.org> Message-ID: <47ED303D.8090208@jays.net> All: http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects Hi Eric -- I'm not aware that anyone here in Omaha has done anything. Personally I'm already drowning in work and school. Best of luck, j Eric Wilhelm wrote: > Hi all, > > Please forward to your local groups. Also, a poll: have you or your > fellow mongers done anything (bonus points for interesting or creative) > to get the word out? > > --- > > If you are a student or know a student who could be creating some > awesome code with Perl or Parrot this summer, you need to act NOW. > > The application deadline is Monday, but if you haven't gone through a > couple rounds of feedback by then you probably won't succeed. > Applications sent at the last minute are unlikely to be accepted. > > If you know some students or professors, you should contact them about > this today (not tomorrow.) > > http://www.perlfoundation.org/perl5/index.cgi?gsoc2008_projects > > Thanks, > Eric > From jay at jays.net Fri Mar 28 10:59:17 2008 From: jay at jays.net (Jay Hannah) Date: Fri, 28 Mar 2008 12:59:17 -0500 Subject: [Omaha.pm] pseudo-code, browser-based ERDs Message-ID: <47ED31F5.8000501@jays.net> Page 2 of this .pdf has a flow-control diagram: http://www.advms.pl/roczniki_2005_supl_2/volumes/04_Borowska.pdf A couple days ago someone asked me how to implement that in source code with NO goto statements. (Because (1) goto statements are evil, and (2) MATLAB doesn't support them.) Here's the psuedo-code I wrote. It looks right to me? Seemed like a simple task? -ponder- c=1 j=0 i=-1 k=1 kmax=1 while (1) { if (s[i+k]==s[j+k]) { k=k+1; if (j+k > N-1) { c = c+1 return # or last or whatever } } else { if (k > kmax) { kmax = k } i = i + 1 if (i==j) { c = c + 1; j = j + kmax; if (j + 1 > N - 1) { return; } else { i = -1 k = 1 kmax = 1 } } else { k = 1 } } } ----------- WWW SQL Designer is way too cool. 2.0 was released today: http://ondras.zarovi.cz/sql/ This tool allows you to draw and create database schemas (E-R diagrams) directly in browser, without the need for any external programs (flash). You only need JavaScript enabled. Data Monkeys represent! Cheers, j From jay at jays.net Sun Mar 30 08:13:33 2008 From: jay at jays.net (Jay Hannah) Date: Sun, 30 Mar 2008 10:13:33 -0500 Subject: [Omaha.pm] Perl syntax on it's head #2 Message-ID: I'm playing with POE for the first time. It does stuff like this: sub accept_handler { my ($socket, $remote_address, $remote_port) = @_[ARG0, ARG1, ARG2]; } Which is explained here: http://poe.perl.org/?POE_FAQ/calling_convention This is the second time this year I've had the Perl syntax part of my brain jolted. The first time was Catalyst, which does this: sub end : ActionClass('RenderView') {} Which is explained here: http://www.perlmonks.org/?node_id=631931 Building new synapses, :) j From jay at jays.net Mon Mar 31 11:20:39 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 31 Mar 2008 13:20:39 -0500 Subject: [Omaha.pm] April 1: 7pm-9pm, Why Smalltalk - Blaine Buxton Message-ID: <47F12B77.9010908@jays.net> Perl Mongers, crash the par-tay with me! j -------- Original Message -------- Subject: [odynug] April 1: 7pm-9pm, Why Smalltalk - Blaine Buxton Date: Mon, 31 Mar 2008 09:50:32 -0400 From: Blaine Buxton Reply-To: odynug at googlegroups.com To: odynug No Joke. Blaine Buxton will be walking us through the Smalltalk environment. He will be displaying the future of software development by showing the present in Squeak. Guaranteed to change the way you think about programming. Expand your mind! There might be a secret suprise in store. As always food and drink will be provided. Hope to see everyone there! http://odynug.kicks-ass.org Meeting location is UNO's Peter Kiewit Institute (PKI) building 1110 South 67th Street Omaha, NE -- Blaine Buxton Mad Scientist in Training http://blog.blainebuxton.com