From jay at jays.net Tue Jan 1 06:12:09 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 1 Jan 2008 08:12:09 -0600 Subject: [Omaha.pm] [olug] Bash TCP scripting In-Reply-To: References: <93B2A6DA-E945-46D9-A4BE-85FC62425EAF@jays.net> <1B2D1C06-07F6-49B1-9BF0-9E4B979BD697@jays.net> Message-ID: <5F871A65-9390-4E38-9479-C7BD84B34A6E@jays.net> On Dec 31, 2007, at 7:24 PM, George Neill wrote: > OO PERL :) Just curious ... what was the assignment? Given a text file, do a case-insensitive word count. Print each word and the number of times it appeared in the text file. The Perl solution I wrote in class while the teacher was explaining the assignment: while (<>) { foreach (/([a-zA-Z0-9'-]+)/g) { $cnt{lc($_)}++; } } foreach (sort keys %cnt) { print "$_ $cnt{$_}\n"; } 2 weeks later I turned in my 400 lines of C++ (which I can't share or the nuns will whack my knuckles with a ruler). As I mentioned, the C++ solution was a lot more code then just solving the problem. In C++ we set up a List object which was a "linked list" of Node objects and each Node object contained a Word object. Each object has it's own methods, and we set up operator overloading to dump objects into ostreams (STDOUT), etc. $ wc -l * 10 input.txt 137 list.cpp 31 list.h 28 main.cpp 22 Makefile 149 word.cpp 36 word.h 413 total That said, my Perl program kicked out the exact same output and only took 15 minutes to write and debug. :) My teacher was not surprised. Like I mentioned, solving the problem as specified apparently wasn't the point. If it were then all CS classes would let you turn in a solution in any language you want? (Some upper level classes do, apparently?) IANAE. (I am not an educator. -grin-) There are many things you would never write in Perl. Embedded systems, graphics card drivers, all kinds of low-level stuff. I have no interest in ever coding those systems, but I should be better of for getting a little C++ under my belt? I am interested in scientific programming (bioinformatics), parts of which are insanely computational, so I'll probably end up in C land for that stuff one of these days...? A typical solution is Perl (or Java) doing all the glue, user & system interfacing, and data transformations while insanely optimized C programs sit in the back doing TeraFLOPS of hard- core processing. Toodles, j loves to watch himself type, apparently :) From georgen at neillnet.com Tue Jan 1 13:49:31 2008 From: georgen at neillnet.com (George Neill) Date: Tue, 1 Jan 2008 15:49:31 -0600 Subject: [Omaha.pm] [olug] Bash TCP scripting In-Reply-To: <5F871A65-9390-4E38-9479-C7BD84B34A6E@jays.net> References: <93B2A6DA-E945-46D9-A4BE-85FC62425EAF@jays.net> <1B2D1C06-07F6-49B1-9BF0-9E4B979BD697@jays.net> <5F871A65-9390-4E38-9479-C7BD84B34A6E@jays.net> Message-ID: Jay, > while (<>) { > foreach (/([a-zA-Z0-9'-]+)/g) { > $cnt{lc($_)}++; > } > } > > foreach (sort keys %cnt) { > print "$_ $cnt{$_}\n"; > } You could come pretty close to the amount of code written here if you were using C++ STL (std::map and algorithms) Your PERLy implementation is -not- the same though ... you are using a hash! not a linked list. :) > 2 weeks later I turned in my 400 lines of C++ (which I can't share or > the nuns will whack my knuckles with a ruler). Of course. > As I mentioned, the C++ solution was a lot more code then just > solving the problem. In C++ we set up a List object which was a > "linked list" of Node objects and each Node object contained a Word > object. Each object has it's own methods, and we set up operator > overloading to dump objects into ostreams (STDOUT), etc. The intent of this assignment, I presume (hope?), is to help you understand how much libraries (such as the STL) help ... when you get there in future classes. :) Happy New Year! George. From jay at jays.net Wed Jan 2 09:14:10 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 2 Jan 2008 11:14:10 -0600 Subject: [Omaha.pm] code reduction :) Message-ID: <21CC699E-66B9-4789-9B8A-FF6BBC015B73@jays.net> :) j ------- Before ------- my $pages = { "RR" => [ "RR1","RR1_1","RR1_2","RR2","RR_more_rooms" ], "RR1" => [ "RR1_2","RR_more_rooms" ], }; my $destinations = $pages->{$pagesrc}; if (not defined $destinations) { return 0; } my $found=0; foreach my $dst (sort @{$destinations}) { if ($pagedst eq $dst or $pagesrc eq $pagedst) { $found++; last; } } if (!$found) { return 0; } return 1; ------- After ------- return 0 unless ($pagesrc && $pagedst); return 1 if ($pagesrc eq $pagedst); my $pages = { "RR" => [ "RR1","RR1_1","RR1_2","RR2","RR_more_rooms" ], "RR1" => [ "RR1_2","RR_more_rooms" ], }; return grep { $_ eq $pagedst } @{$pages->{$pagesrc}}; From andy at petdance.com Wed Jan 2 09:16:39 2008 From: andy at petdance.com (Andy Lester) Date: Wed, 2 Jan 2008 11:16:39 -0600 Subject: [Omaha.pm] code reduction :) In-Reply-To: <21CC699E-66B9-4789-9B8A-FF6BBC015B73@jays.net> References: <21CC699E-66B9-4789-9B8A-FF6BBC015B73@jays.net> Message-ID: <0B193032-C52C-4A79-A3CA-E7CD648D87C9@petdance.com> Yeah, any time you're doing "see if this exists or is found", you're talkin' hashes. Soooo much nicer than that loopy loopy stuff. > my $pages = { > "RR" => [ "RR1","RR1_1","RR1_2","RR2","RR_more_rooms" ], > "RR1" => [ "RR1_2","RR_more_rooms" ], > }; my $pages = { RR => [qw( RR1 RR1_1 RR1_2 RR2 RR_more_rooms )], RR1 => [qw( RR1_2 RR_more_rooms )], }; Quotes are no fun! xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Wed Jan 2 09:23:05 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 2 Jan 2008 12:23:05 -0500 (EST) Subject: [Omaha.pm] warnings... boo! Message-ID: Sigh... Using Catalyst for web stuff now, which has warnings on. It's this kind of thing that makes me want to switch warnings off: my $pagesrc = $c->req->param('pagesrc'); my $pagedst = $c->req->param('pagedst'); if ($self->is_valid_pagesrc_pagedst($pagesrc, $pagedst)) { # ... } else { $c->log->debug("is_valid_pagesrc_pagedst($pagesrc, $pagedst) failed"); Use of uninitialized value in concatenation (.) or string at /Users/jhannah/src/Omni2/Phoenix/script/../lib/Phoenix/Controller/Omni.pm line 62. -grumble- I hate adding extra code to stop warnings from whining about stuff like that. j From jay at jays.net Wed Jan 2 09:34:28 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 2 Jan 2008 11:34:28 -0600 Subject: [Omaha.pm] warnings... boo! In-Reply-To: References: Message-ID: <244E5D71-B6A5-4153-8F34-433B9B994743@jays.net> On Jan 2, 2008, at 11:23 AM, Jay Hannah wrote: > Use of uninitialized value in concatenation (.) or string at > /Users/jhannah/src/Omni2/Phoenix/script/../lib/Phoenix/Controller/ > Omni.pm > line 62. I settled for this: } else { no warnings 'uninitialized'; $c->log->debug("is_valid_pagesrc_pagedst($pagesrc, $pagedst) failed"); The no warnings only effects that else block, so it's pretty harmless. j From jay at jays.net Wed Jan 2 09:39:50 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 2 Jan 2008 11:39:50 -0600 Subject: [Omaha.pm] [olug] Bash TCP scripting In-Reply-To: References: <93B2A6DA-E945-46D9-A4BE-85FC62425EAF@jays.net> <1B2D1C06-07F6-49B1-9BF0-9E4B979BD697@jays.net> <5F871A65-9390-4E38-9479-C7BD84B34A6E@jays.net> Message-ID: On Jan 1, 2008, at 3:49 PM, George Neill wrote: > You could come pretty close to the amount of code written here if you > were using C++ STL (std::map and algorithms) Glad to hear C++ doesn't have to be brain-dead. :) > Your PERLy implementation is -not- the same though ... you are > using a hash! not > a linked list. :) Indeed, sir. My Perl goal was to produce the end result, regardless of methodology. > The intent of this assignment, I presume (hope?), is to help you > understand how much libraries (such as the STL) help ... when you get > there in future classes. :) Ahh, I see. From the "we promise it will feel really good when you stop slamming your forehead with that 2x4 department." Classic. > Happy New Year! You too! So far so good. :) j From KThompson at heiskell.com Wed Jan 2 09:41:00 2008 From: KThompson at heiskell.com (Thompson, Kenn) Date: Wed, 2 Jan 2008 09:41:00 -0800 Subject: [Omaha.pm] warnings... boo! In-Reply-To: <244E5D71-B6A5-4153-8F34-433B9B994743@jays.net> References: <244E5D71-B6A5-4153-8F34-433B9B994743@jays.net> Message-ID: } else { no warnings 'uninitialized'; $c->log->debug("is_valid_pagesrc_pagedst($pagesrc, $pagedst) failed"); Here's a dumb question- if it's one line to initialize, why not just initialize it instead of saying not to check? No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 1/1/2008 12:09 PM From jay at jays.net Wed Jan 2 09:54:03 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 2 Jan 2008 11:54:03 -0600 Subject: [Omaha.pm] warnings... boo! In-Reply-To: References: <244E5D71-B6A5-4153-8F34-433B9B994743@jays.net> Message-ID: <9A7B4A31-963F-485A-95C1-2CAB68879105@jays.net> On Jan 2, 2008, at 11:41 AM, Thompson, Kenn wrote: > } else { > no warnings 'uninitialized'; > $c->log->debug("is_valid_pagesrc_pagedst($pagesrc, > $pagedst) failed"); > > Here's a dumb question- if it's one line to initialize, why not > just initialize it instead of saying not to check? Cause it's not always uninitialized. And I need to leave it alone if it is initialized, so I'd have to do something like: unless ($pagesrc) { $pagesrc = "" } unless ($pagedst) { $pagedstc = "" } Or I think this would work in 5.10: $pagesrc //= ""; $pagedst //= ""; Or even for ($pagesrc, $pagedst) { $_ //= ""; } But, I like the no warnings thing better than any of those... (Plus I'm not on Perl 5.10 yet...) j From altodorado at blainebuxton.com Thu Jan 3 19:28:43 2008 From: altodorado at blainebuxton.com (Blaine Buxton) Date: Fri, 04 Jan 2008 03:28:43 +0000 Subject: [Omaha.pm] [dynamic_omaha] January 8: Bob McCoy - PowerShell - Omaha Dynamic Language User Group Message-ID: Our next meeting. Come on down! j http://omaha.pm.org Fingers tired from typing in all of those Emacs commands from trying out new Ruby and Lisp code from the books you got for Christmas? Why don't you take a small break and join your fellow comrades. Trust me your mind and fingers will thank you. This month we have a very special guest from Microsoft, Bob McCoy. He'll be demonstrating all of the cool things that you can do with PowerShell. It just might make Mac users envious. Here's the full abstract: PowerShell is Microsoft?s next generation scripting language and environment. It will be the native shell environment for Windows Server 2008 and is at the heart of every administration task in Exchange 2007. It is extremely powerful and at the same time very simple to use. It is aimed at system administrators and scripters. This will be about 40% slides and about 60% demonstration. I try to keep it highly interactive so it ends up answering a lot of questions along the way. But, that's not all! You not only get Bob McCoy, but we're also bringing the brightest fellows in Omaha. But, wait that's not all! We'll throw in sponsorship from TekSystems which means free food and more pop than you can drink. All for the incredible low price of FREE! Why delay? Come to the meeting! On a side note, a little bird told me that TekSystems has some Ruby openings right now! Get in contact with Heather Blockovich or better yet come to the meeting to find out more. Topic PowerShell Speaker Bob McCoy Time January 8, 7-9pm Location UNO's Peter Kiewit Institute (PKI) building 1110 South 67th Street Omaha, NE -- Blaine Buxton Simplicity Synthesist http://blog.blainebuxton.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20080104/2f56e271/attachment.html From jay at jays.net Sat Jan 5 05:45:26 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 5 Jan 2008 07:45:26 -0600 Subject: [Omaha.pm] perl.com newsletter - check out Parrot from Subversion and type "make perl6:" References: <20080104200522.GA24136@mooresystems.com> Message-ID: Here's a copy of the recent "perl.com newsletter" in case you're interested. They come out occasionally and are pretty good summaries of what's going on in the perl world. j Perl.com update -------------------------------------- The Email for www.perl.com Subscribers =================================================================== Happy New Year, Perl Newsletter subscribers, depending on the appropriate local time and calendar (255 years later, your editor still grumbles about the missing eleven days). With much of the Western World on hiatus for various end of year events, you might think that this is a quiet newsletter. Ha. * Perl News In between sending relatives to their houses and using the wrong type of flour in Ann Barcomb's biscotti recipe, your editor dusted off a piece of code he and Jerry Gay wrote a few months back and, well, now check out Parrot from Subversion and type "make perl6:" http://use.perl.org/article.pl?sid=07/12/30/0912211 Of course, you might want to follow the whole debate on the future of Perl as seen on Perlbuzz. What people are saying about Perl 5.10: http://perlbuzz.com/2007/12/what-people-are-saying-about- perl-510.html Where is Perl 6? http://perlbuzz.com/2007/12/where-is-perl-6-the-question-that-wont- die.html Why Perl 6 needs to be deemphasized and renamed: http://perlbuzz.com/2007/12/why-perl-6-needs-to-be-deemphasized- and-renamed.html Here's What We've Done in Perl 6: http://perlbuzz.com/2007/12/one-view-of-heres-what-weve-done-in- perl-6.html Stop Worrying and Learn to Love Perl 6: http://perlbuzz.com/2007/12/stop-worrying-and-learn-to-love- perl-6.html ... and if you prefer your heated debate over the stupidities of so-called journalists (and more on this later!), "Perl Deserves Better": http://perlbuzz.com/2007/12/linux-journal-is-offensive-perl- deserves-better.html iTWire provided much better technical journalism with a detailed exploration of some of the nice new features of Perl 5.10 (thank you, David M. Williams!): http://www.itwire.com/content/view/15936/1141/1/0/ Simon Cozens -- the perpetuator of the Parrot April Fool's joke, one- time Parrot pumpking, and semi-retired programmer -- returned to the birdhouse speaking the language of hilarious felines. Along the way, he discovered that that crazy project he helped start actually works, and it makes writing compilers almost easy: http://blog.simon-cozens.org/post/view/1323 brian d foy compiled a brief report on statistics for jobs.perl.org: http://use.perl.org/article.pl?sid=08/01/02/0030255 Alberto Simoes issued a call for TPF grants for the first quarter of 2008: http://use.perl.org/article.pl?sid=07/12/28/1832258 Adam Kennedy published his roadmap for the future of the Vanilla, Strawberry, and Chocolate Perl distributions -- these are Perl bundles for Windows users that include compilers and other tools useful for further development: http://use.perl.org/article.pl?sid=07/12/27/1811249 He also released Strawberry Perl 5.10.0: http://use.perl.org/article.pl?sid=07/12/23/1751224 Jon Allen updated perldoc.perl.org with the documentation for Perl 5.10: http://perldoc.perl.org/ Your editor continued to minute the Perl 6 design meetings: http://use.perl.org/~chromatic/journal/35280 * Perl at O'Reilly The previous newsletter mentioned "Memories of 20 Years of Perl;" a handful of other Perl hackers have contributed stories. There's still room for more. If you'd like to add your memories to the article, please post them as comments or mail them to chromatic at oreilly.com for inclusion, along with a one-sentence biography. http://www.perl.com/pub/a/2007/12/21/20-years-of-perl.html Adriano Ferreira didn't take the fortnight off. He posted several more Perl 6 operator explanations, including the cross operator: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_the_cross_operat.html ... the iterate operator: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_iterate_operator.html ... reduce operators: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_reduce_operators.html ... mutating operators: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_mutating_operato_1.html ... the pair constructor: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_the_pair_constru_1.html ... more reduction operators: http://www.oreillynet.com/onlamp/blog/2007/12/ yap6_operator_reduce_operators_1.html ... and the filetest "operators:" http://www.oreillynet.com/onlamp/blog/2008/01/ yap6_operator_filetests.html Your editor objected to one particular publication's mangling of the Perl 5.10 press release: http://www.oreillynet.com/onlamp/blog/2007/12/ what_the_xfiles_taught_us_abou.html Curtis "Ovid" Poe walked through strategies which he and other BBC developers used to reduce the runtime of their test suite by almost an order of magnitude: http://www.oreillynet.com/onlamp/blog/2007/12/ improving_test_performance.html That wraps up a fortnight in which your editor hopes you had enough holiday-appropriate cookies, if that's your thing. Now back to work... or maybe a fresh new video game. Until next time, - 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 jay at jays.net Sat Jan 5 07:39:11 2008 From: jay at jays.net (Jay Hannah) Date: Sat, 5 Jan 2008 09:39:11 -0600 Subject: [Omaha.pm] perl.com newsletter - check out Parrot from Subversion and type "make perl6:" In-Reply-To: References: <20080104200522.GA24136@mooresystems.com> Message-ID: On Jan 5, 2008, at 7:45 AM, Jay Hannah wrote: > Here's a copy of the recent "perl.com newsletter" Sorry for the line wrap. I especially like this graph: http://www.presicient.com/langjobs.html :) j From jay at jays.net Sun Jan 6 20:43:22 2008 From: jay at jays.net (Jay Hannah) Date: Sun, 6 Jan 2008 22:43:22 -0600 Subject: [Omaha.pm] I moved our website to MediaWiki Message-ID: Howdy -- I've ported our website into my shiny new MediaWiki. I hand-converted all the bios and everything from the old wiki. Please create an account and add/replace/remove whatever you want. :) http://omaha.pm.org Cheers, j From TELarson at west.com Mon Jan 7 07:23:15 2008 From: TELarson at west.com (Larson, Timothy E.) Date: Mon, 7 Jan 2008 09:23:15 -0600 Subject: [Omaha.pm] I moved our website to MediaWiki In-Reply-To: References: Message-ID: Jay Hannah <> wrote: > I've ported our website into my shiny new MediaWiki. I hand-converted > all the bios and everything from the old wiki. Please create an > account and add/replace/remove whatever you want. :) > > http://omaha.pm.org www.omahawiki.org/Omaha_Perl_Mongers could use some love, too. Tim -- Tim Larson AMT2 Unix Systems Administrator InterCall, a division of West Corporation Eschew obfuscation! From jay at jays.net Mon Jan 7 07:34:52 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 7 Jan 2008 09:34:52 -0600 Subject: [Omaha.pm] I moved our website to MediaWiki In-Reply-To: References: Message-ID: On Jan 7, 2008, at 9:23 AM, Larson, Timothy E. wrote: > www.omahawiki.org/Omaha_Perl_Mongers could use some love, too. I created an account and logged in, but... "This page has been locked to prevent editing." j Omaha Perl Mongers: http://omaha.pm.org From jay at jays.net Mon Jan 7 08:51:26 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 7 Jan 2008 10:51:26 -0600 Subject: [Omaha.pm] I moved our website to MediaWiki In-Reply-To: References: Message-ID: <67919982-3B2B-4275-B02F-C7CE1659E23A@jays.net> On Jan 7, 2008, at 9:34 AM, Jay Hannah wrote: > On Jan 7, 2008, at 9:23 AM, Larson, Timothy E. wrote: >> www.omahawiki.org/Omaha_Perl_Mongers could use some love, too. > > I created an account and logged in, but... > > "This page has been locked to prevent editing." My bad. The site sent me an email confirmation link, but that thing went into my spam box. Once I confirmed my email address I was able to update the site no problems. http://www.omahawiki.org/Omaha_Perl_Mongers Thanks! j http://omaha.pm.org From TELarson at west.com Wed Jan 16 10:12:46 2008 From: TELarson at west.com (Larson, Timothy E.) Date: Wed, 16 Jan 2008 12:12:46 -0600 Subject: [Omaha.pm] 5.10.0 Message-ID: Well since I've been seeing Perl errors in my CUPS error log, it seems like a good time to jump to 5.10. Don't know that I'll use any new features, but smaller and faster is always a win for my aging server. Anyone here actively using some of the new tricks or seen other benefits from 5.10? Tim -- Tim Larson AMT2 Unix Systems Administrator InterCall, a division of West Corporation Eschew obfuscation! From jay at jays.net Thu Jan 17 05:33:55 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 17 Jan 2008 07:33:55 -0600 Subject: [Omaha.pm] 5.10.0 In-Reply-To: References: Message-ID: <091CFEBD-7B70-421C-9B1A-7BD5198CEFAB@jays.net> On Jan 16, 2008, at 12:12 PM, Larson, Timothy E. wrote: > Anyone here actively using some of the new tricks or seen other > benefits > from 5.10? I haven't played with it yet. I'm looking forward to using // and // = :) http://search.cpan.org/dist/perl-5.10.0/pod/perl5100delta.pod j From dan at linder.org Thu Jan 17 06:16:18 2008 From: dan at linder.org (Dan Linder) Date: Thu, 17 Jan 2008 08:16:18 -0600 Subject: [Omaha.pm] [off topic] Re: 5.10.0 In-Reply-To: <091CFEBD-7B70-421C-9B1A-7BD5198CEFAB@jays.net> References: <091CFEBD-7B70-421C-9B1A-7BD5198CEFAB@jays.net> Message-ID: <3e2be50801170616k672d0e34ka8a2bb89d06e9b94@mail.gmail.com> On Jan 17, 2008 7:33 AM, Jay Hannah wrote: > I haven't played with it yet. I'm looking forward to using // and > //= :) I wonder if similar comments were ever made about other programming languages with as much true desire? "Wow, I can't wait to get to use /* and */ to make actual comment blocks!" (C) "Gosh, I love line numbers!" (Basic) "Why would I need more than two or three arguments to a command?" (Assembly programmer) "You mean blocks of code DON'T have to be in perfect columns?" (Fortran programmer) 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/20080117/8046eada/attachment.html From travis at travisbsd.org Thu Jan 17 06:30:53 2008 From: travis at travisbsd.org (Travis McArthur) Date: Thu, 17 Jan 2008 08:30:53 -0600 Subject: [Omaha.pm] [off topic] Re: 5.10.0 In-Reply-To: <3e2be50801170616k672d0e34ka8a2bb89d06e9b94@mail.gmail.com> References: <091CFEBD-7B70-421C-9B1A-7BD5198CEFAB@jays.net> <3e2be50801170616k672d0e34ka8a2bb89d06e9b94@mail.gmail.com> Message-ID: <478F669D.1050705@travisbsd.org> Dan Linder wrote: > On Jan 17, 2008 7:33 AM, Jay Hannah > wrote: > > I haven't played with it yet. I'm looking forward to using // and > //= :) > > > I wonder if similar comments were ever made about other programming > languages with as much true desire? > > "Wow, I can't wait to get to use /* and */ to make actual comment > blocks!" (C) > "Gosh, I love line numbers!" (Basic) > "Why would I need more than two or three arguments to a command?" > (Assembly programmer) > "You mean blocks of code DON'T have to be in perfect columns?" > (Fortran programmer) > > 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) > ** *** ***** ******* *********** ************* > ------------------------------------------------------------------------ > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm Don't forget "Gee, I sure do love significant whitespace!" (Python). *shivers* never could get over that... I think the switch statement in the core is a nice development, and the named regular-expression identifiers is pretty nice too, I have some programs I use in which that will come quite in handy (mostly text processing stuff naturally, screen scrapers). Best Regards, Travis From jay at jays.net Thu Jan 17 07:21:42 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 17 Jan 2008 09:21:42 -0600 Subject: [Omaha.pm] [off topic] Re: 5.10.0 In-Reply-To: <3e2be50801170616k672d0e34ka8a2bb89d06e9b94@mail.gmail.com> References: <091CFEBD-7B70-421C-9B1A-7BD5198CEFAB@jays.net> <3e2be50801170616k672d0e34ka8a2bb89d06e9b94@mail.gmail.com> Message-ID: <13A9420A-C0C3-4CBD-A283-40617DD866DB@jays.net> On Jan 17, 2008, at 8:16 AM, Dan Linder wrote: > I wonder if similar comments were ever made about other programming > languages with as much true desire? > > "Wow, I can't wait to get to use /* and */ to make actual comment > blocks!" (C) My favorite ME quote of all time: "Why would you need a 'hard drive?'" -- Jay Hannah, circa 1989, perfectly happy with his Commodore-64 cassette tapes and floppy disks. j From dthacker9 at cox.net Sat Jan 19 17:15:42 2008 From: dthacker9 at cox.net (Dave Thacker) Date: Sat, 19 Jan 2008 19:15:42 -0600 Subject: [Omaha.pm] Food for Thought Message-ID: <200801191915.42093.dthacker9@cox.net> Since I'm writing a game.... http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html DT From jay at jays.net Mon Jan 21 09:50:05 2008 From: jay at jays.net (Jay Hannah) Date: Mon, 21 Jan 2008 11:50:05 -0600 Subject: [Omaha.pm] Catalyst: uri_with() Message-ID: uri_with() is cool. it returns the URI for the page you're currently on, plus an arbitrary list of parameter overrides. So to kick out a hyperlink to send the user to the current page, only in French (instead of English), you throw this in your Template Toolkit .tt file: $ {Catalyst.lang('french')} lang() is a method we added to Catalyst to hit our home-brew localization database. It kicks out the word "French" in whatever language you're currently in... :) j From jay at jays.net Tue Jan 22 19:28:19 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 22 Jan 2008 21:28:19 -0600 Subject: [Omaha.pm] warnings annoying me again Message-ID: Grrr... another warning on a problem that can't occur. sub begin_cookie_wrangler : Global { my ($self, $c, $cookie_name) = @_; return 0 unless ($cookie_name); $self->log->debug("begin_cookie_wrangler('$cookie_name')"); # Clear this cookie if they asked us to. if ($c->req->param($cookie_name) eq "clear") { # complaint is here Use of uninitialized value in string eq at /Users/jhannah/src/Omni2/ Phoenix/script/../lib/Phoenix.pm line 219. It'll never get to that line of code if $cookie_name isn't defined. But warnings doesn't understand that. So I have to add more code to get around the warning... ( Off topic: Catalyst is awesome. Our copy of the book arrived and I'm making all kinds of neat-o progress on my current project... :) http://catalyst.perl.org/ ) j From jay at jays.net Tue Jan 29 16:28:14 2008 From: jay at jays.net (Jay Hannah) Date: Tue, 29 Jan 2008 18:28:14 -0600 Subject: [Omaha.pm] Fwd: Newsletter from O'Reilly UG Program, January 25 References: Message-ID: <862DCD51-1F9B-4DDB-A1B0-02352F57E487@jays.net> Full newsletter: http://oreilly.com/emails/ug-jan08.html Below, the Perl stuff. j Begin forwarded message: > Dru Lavigne and Allison Randal Speak at Southern California Linux > Expo (SCALE) > > Feb 8-10, 2008 > Westin Los Angeles Airport > Los Angeles, CA > > Authors Dru Lavigne (BSD Hacks) and Allison Randal (Perl 6 & Parrot > Essentials) will be speaking at the Southern California Linux Expo > from February 8-10, 2008. Located in Los Angeles, the conference > draws many qualified speakers and exhibitors, and Dru & Alison will > be speaking as part of the Women in Open Source Track. > > > How to Tell Your Perl Story (at OSCON) > Have you done something stunningly cool or staggeringly useful with > Perl in the past year? Conference season will be here soon; it's > time to consider giving a talk to your local monger group, a > regional conference, or even OSCON. Perl track committee member > brian d foy gives several guidelines to help you decide what to > talk about and how to present it. From jay at jays.net Wed Jan 30 05:03:56 2008 From: jay at jays.net (Jay Hannah) Date: Wed, 30 Jan 2008 07:03:56 -0600 Subject: [Omaha.pm] what kind of construct is (_) ? Message-ID: <803295DB-0D1C-4945-98D1-EB8D7FA75A51@jays.net> hanging out in irc.perl.org #catalyst this morning... :) j 06:57 <@mst> print join(', ', [ 1, 2, 3 ]->map(f (_) { $_+1 })->grep (f (_) { $_ % 2 == 0 })); 06:57 <@mst> that should print 2, 4 06:58 <@mst> jhannah: that the sort of thing powershell does with pipes? 06:58 <@ash> mst: you're insane. go write some haskel 06:58 < jhannah> mst: sorry, I'm lost 06:59 < jhannah> you see, the Internet is a series of tubes... 07:00 <@marcus> agree, mst is insane 07:01 <@marcus> what kind of construct is (_) ? 07:01 <@mst> marcus: equiv. to "sub { my $_ = shift; ... }" 07:01 <@mst> was introduced in 5.8.8 07:01 <@mst> sub (_) 07:01 < jhannah> off to CHEM lecture! whee!!!! (someone, PLEASE -- shoot me!) 07:01 <@mst> I just used 'f' because I can make that work and it seemed more elegant 07:02 <@ash> mst: it was? 07:02 <@mst> yes. From jay at jays.net Thu Jan 31 20:21:10 2008 From: jay at jays.net (Jay Hannah) Date: Thu, 31 Jan 2008 22:21:10 -0600 Subject: [Omaha.pm] Installing into /home/jhannah/lib Message-ID: <62065393-8073-482D-81E1-4B9C42034295@jays.net> Wow. That was easy. Something went terribly wrong with Date::Calc on a server I don't have root on. So I installed Date::Calc in my personal lib directory... $ perl -MCPAN -e install cpan> o conf makepl_arg "LIB=~/lib INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3" cpan> o conf commit cpan> install Date::Calc $ export PERL5LIB=/home/jhannah/lib poof! My own personal Date::Calc works great. I'm surprised I've never been forced to do that before, and am equally surprised at how easy it was. :) j http://www.wellho.net/forum/Perl-Programming/CPAN-Module-without- root.html