From jay at jays.net Fri Nov 2 19:45:27 2007 From: jay at jays.net (Jay Hannah) Date: Fri, 2 Nov 2007 21:45:27 -0500 Subject: [Omaha.pm] Fwd: November 6, 2007 - ODYNUG - PHP - Ben Heath References: <20071103023838.31856.qmail@server271.com> Message-ID: <439A060E-C2A6-48FC-8391-0119778D643E@jays.net> I'm in New York until the 7th, but YOU should go. :) j Begin forwarded message: > From: "Blaine Buxton" > Date: November 2, 2007 9:38:38 PM CDT > To: "dynamic_omaha at blainebuxton.com" > Subject: [dynamic_omaha] November 6, 2007 - ODYNUG - PHP - Ben Heath > Reply-To: "Blaine Buxton" > > You wanted the best. You got the best. The hottest presenter in the > land...Ben Heath! What could be better than a Kiss concert, a talk > on PHP of course. This month Ben has offered to show us what we > have been missing in PHP. The language itself is loved by web > programmers all over. If you have ever been curious, now's the time > to find what the fuss about PHP is all about. > ProKarma is sponsoring this presentation. They will be providing > the food and drinks. So, what do you have to lose? You get to learn > something new, hang with the smartest people in Omaha, and free > food. My friends, it just doesn't get any better! > TopicPHP: Practical Web Programming > SpeakerBen Heath > TimeNovember 6, 7-9pm > LocationUNO's Peter Kiewit Institute (PKI) building 1110 South 67th > Street Omaha, NE > -- > Blaine Buxton > Simplicity Synthesist > http://blog.blainebuxton.com From dan at linder.org Thu Nov 8 12:58:48 2007 From: dan at linder.org (Daniel Linder) Date: Thu, 8 Nov 2007 14:58:48 -0600 (CST) Subject: [Omaha.pm] Catalyst for Perl...? Message-ID: <51595.70.165.110.36.1194555528.squirrel@webmail.linder.org> After listening to the FLOSS weekly podcast: http://www.podtrac.com/pts/redirect.mp3/twit.cachefly.net/FLOSS-020.mp3 I am interested in the Catalyst framework for Perl. (I was interested in Ruby on Rails, but just haven't had the time to learn Ruby and pick up the "on Rails" piece too...) Anyone using this in real life? Dan - - - - "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -- Ed Howdershelt (Author) "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* Secure Internet Connections, National Information Infrastructure, DES, Panama, Satellite imagery, eternity server, Bubba the Love Sponge Texas, CSE, Iris, TDR, Hillal, Spyderco, Aladdin DIA, FSB, Fax encryption, virus, MD4, Chelsea, B.D.M.,Sphinx From jay at jays.net Fri Nov 9 07:31:43 2007 From: jay at jays.net (Jay Hannah) Date: Fri, 9 Nov 2007 09:31:43 -0600 Subject: [Omaha.pm] Catalyst for Perl...? In-Reply-To: <51595.70.165.110.36.1194555528.squirrel@webmail.linder.org> References: <51595.70.165.110.36.1194555528.squirrel@webmail.linder.org> Message-ID: <3F581237-4B0C-4D5D-AAD9-D9601AEA9D24@jays.net> On Nov 8, 2007, at 2:58 PM, Daniel Linder wrote: > I am interested in the Catalyst framework for Perl. (I was > interested in > Ruby on Rails, but just haven't had the time to learn Ruby and pick > up the > "on Rails" piece too...) > > Anyone using this in real life? We're not. We rolled our own MVC structure. We use Template::Toolkit for our Views and we rolled our own ORM for our Model. I've played with various ORMs that they list, but we don't use any of them. ORM: http://en.wikipedia.org/wiki/Object-relational_mapping I like their new web page... Very clean and modern. http://www.catalystframework.org/ I like shiny things. :) If you give it a shot let us know what you think. Better yet, come show it to us at a meeting. We can do a Perl-specific meeting if the DynLUG meeting schedule doesn't work well. j From travis at travisbsd.org Fri Nov 9 08:20:13 2007 From: travis at travisbsd.org (Travis McArthur) Date: Fri, 09 Nov 2007 10:20:13 -0600 Subject: [Omaha.pm] Catalyst for Perl...? In-Reply-To: <3F581237-4B0C-4D5D-AAD9-D9601AEA9D24@jays.net> References: <51595.70.165.110.36.1194555528.squirrel@webmail.linder.org> <3F581237-4B0C-4D5D-AAD9-D9601AEA9D24@jays.net> Message-ID: <473488BD.3030300@travisbsd.org> Jay Hannah wrote: > On Nov 8, 2007, at 2:58 PM, Daniel Linder wrote: > >> I am interested in the Catalyst framework for Perl. (I was >> interested in >> Ruby on Rails, but just haven't had the time to learn Ruby and pick >> up the >> "on Rails" piece too...) >> >> Anyone using this in real life? >> > > We're not. We rolled our own MVC structure. We use Template::Toolkit > for our Views and we rolled our own ORM for our Model. I've played > with various ORMs that they list, but we don't use any of them. > > ORM: http://en.wikipedia.org/wiki/Object-relational_mapping > > I like their new web page... Very clean and modern. > > http://www.catalystframework.org/ > > I like shiny things. :) > > If you give it a shot let us know what you think. Better yet, come > show it to us at a meeting. We can do a Perl-specific meeting if the > DynLUG meeting schedule doesn't work well. > > j > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > > I haven't ever used it, but it looks pretty clean from the documentation. My big beef with rails is that if you don't do things the way it wants, it makes it a living hell (in my experience at least) to get it done. This seems to be fairly adaptable and let you do your own things and just provide a framework to help you out. And I agree with Jay, please let us know what you find out from using it, I'm curious to see how it works out for you, if it seems cool I'll be much more likely to experiment with it on my next project :}. Oh, and should you want to show it off I'd be game for a perl-only meeting, I haven't been able to make it to the last two DynLug meetings do to schedule conflicts. Best Regards, Travis From jhannah at omnihotels.com Sat Nov 10 05:47:43 2007 From: jhannah at omnihotels.com (Jay Hannah) Date: Sat, 10 Nov 2007 07:47:43 -0600 Subject: [Omaha.pm] FW: we have 15,599 unit tests in Core now In-Reply-To: Message-ID: Anyone have a larger automated test suite than we do? Mwoo hahahah, j ------ Forwarded Message From: Sean Baker Date: Fri, 9 Nov 2007 10:36:24 -0600 We?re up to only 15,599 unit tests in Core now. The tests range from simple integer tests to full availability and bookings. Feel free to swing by if you want a walkthrough of them all. Output from the latest run: All tests successful, 5 tests and 42 subtests skipped. Files=280, Tests=15599, 1188 wallclock secs (411.70 cusr + 70.68 csys = 482.38 CPU) Sean Baker Software Architect Omni Hotels -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20071110/5ff20e84/attachment.html From jay at jays.net Sun Nov 11 07:16:08 2007 From: jay at jays.net (Jay Hannah) Date: Sun, 11 Nov 2007 09:16:08 -0600 Subject: [Omaha.pm] Perl 6 NotReally book cover Message-ID: <9AE08D9F-C16E-4A61-8D27-01A9AA838DB4@jays.net> http://bleaklow.com/blog/images/p6_cover.gif :) j From jay at jays.net Fri Nov 16 13:32:24 2007 From: jay at jays.net (Jay Hannah) Date: Fri, 16 Nov 2007 15:32:24 -0600 Subject: [Omaha.pm] Lines of code vs. lines of POD Message-ID: <473E0C68.2050600@jays.net> Found this "one-liner" reading Games, Diversions & Perl Culture Best of the Perl Journal http://www.oreilly.com/catalog/tpj3/index.html So is 17% a good documentation ratio? Bad? Too low? :) It doesn't take comments into account, just POD. j $ cat j.pl @a = (0,0); while (<>) { ++$a[ not m/^=\w+/s .. m/^=cut/s] } printf "%d pod lines, %d code lines\n", @a; $ find ./ -name "*pm" | xargs cat | perl j.pl 26623 pod lines, 154644 code lines From jay at jays.net Sat Nov 17 14:06:01 2007 From: jay at jays.net (Jay Hannah) Date: Sat, 17 Nov 2007 16:06:01 -0600 Subject: [Omaha.pm] CPAN dependencies & test results checker Message-ID: Ok, this is way too cool: http://cpandeps.cantrell.org.uk/ Punch if "Jifty" and check out that dependency list. :) Then the links send you to CPAN Testers test results. For example, I'm probably to blame for these failures: http://cpantesters.perl.org/show/Devel-Timer.html Oops. I guess I should do something about those. j From jay at jays.net Wed Nov 21 13:39:26 2007 From: jay at jays.net (Jay Hannah) Date: Wed, 21 Nov 2007 15:39:26 -0600 Subject: [Omaha.pm] Moose - OO programming Message-ID: <4744A58E.3030809@jays.net> Holy crap. Forget everything I've ever said about OO programming in Perl, and use Moose instead? http://www.stonehenge.com/merlyn/LinuxMag/col94.html http://www.iinteractive.com/moose/ It blows my mind how people turn Perl into whatever they want Perl to be to solve their problem. :) What other language lets you do that? Wow. j From jay at jays.net Thu Nov 29 06:37:01 2007 From: jay at jays.net (Jay Hannah) Date: Thu, 29 Nov 2007 08:37:01 -0600 Subject: [Omaha.pm] [olug] Test for integer in bash In-Reply-To: References: Message-ID: <474ECE8D.8030808@jays.net> John Hobbs wrote: > First, does anyone know of a better way to test for an integer in bash > than this? > > #!/bin/bash > > function testInt { > echo "Testing: $1" > echo "$1" | grep ^[0-9]*$ > /dev/null > > if [ "$?" -eq 0 ]; then > echo 'yep, it should be an integer.' > else > echo 'nope, dunno what it is.' > fi > echo > } > > testInt 900 > testInt foobar > testInt > Unless you're intentionally failing negative integers you might want to throw an optional - onto the front of your regex. Cheers, j A Perl solution: $ cat j 900 foobar -900 $ perl -nle 'print $_, ": ", /^-?\d+$/ ? "yep" : "nope"' j 900: yep foobar: nope -900: yep From jay at jays.net Thu Nov 29 13:25:41 2007 From: jay at jays.net (Jay Hannah) Date: Thu, 29 Nov 2007 15:25:41 -0600 Subject: [Omaha.pm] Tight XML::Twig code Message-ID: <474F2E55.2060007@jays.net> Here are some shorter ways to do some XML::Twig stuff I stumbled into today... j Before: (@x) = $root->get_xpath( 'RoomStays/RoomStay/TimeSpan' ); foreach my $TimeSpanNode (@x) { $TimeSpanNode->delete; } After: for ($root->get_xpath('RoomStays/RoomStay/TimeSpan')) { $_->delete; } Or use map, if you're into that: map { $_->delete } $root->get_xpath('RoomStays/RoomStay/TimeSpan'); Before: my (@p) = $GuestCounts->get_xpath( 'GuestCount' ); foreach my $GuestCount (@p) { After: foreach my $GuestCount ($GuestCounts->get_xpath('GuestCount')) { Before: $BookArg= new XML::Twig::Elt( 'BookItArgument', ''); # create the element $BookArg->set_att(Name => 'affiliate'); $BookArg->set_att(Value => 'Kayak.com'); After: $BookArg= XML::Twig::Elt->new( BookItArgument => { Name => 'affiliate', Value => 'Kayak.com', });