From rjbs-perl-abe at lists.manxome.org Thu Jul 14 06:12:32 2005 From: rjbs-perl-abe at lists.manxome.org (Ricardo SIGNES) Date: Thu, 14 Jul 2005 09:12:32 -0400 Subject: [ABE.pm] What's new in ABE Perldom? Message-ID: <20050714131232.GK4552@manxome.org> Man, the list has been so dead lately! What's everyone up to? Phil and I went to YAPC last month, and we both had a good ol' time. I had a small refresher on what makes Kwiki so much fun to play with (as well as so much of a pain) and I got to engage in a ninja battle. Beer was consumed and code was written, although not much of it by me. Last year's YAPC led to Acme::ProgressBar, but nothing much has come from this YAPC for me, yet. Hopefully I'll get around to uploading some of my code to http://openjsan.org soon, though. I also got to meet Meng Wong, the guy who owns my new workplace, Pobox.com. I rode his Segway. It was weird. My personal projects (Rubric, CPAN::Mini, Module::Starter) are sort of festering right now, but I'm hopeful. CGI::Application has been getting a good bit of community activity, and it looks like they might decide to use a Rubric as their community blog, which would give me good reason to get some more work done on it. Work is all nice and Perly, too, although the particular Perl I'm working on is of questionable awesomeness. It's Freeside, a free ISP billing system, which I'm trying to integrate with our internal systems. At least it shouldn't take much longer to have good bits of it in use! What's everyone else up to? I'm pretty sure you're not all dead. Maybe everyone has abandoned Perl for Python and Java, though. (Speaking of which, my first day at OSCON this year looks to be eight hours of Python. That should be fun...) -- rjbs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/abe-pm/attachments/20050714/bb1463e0/attachment.bin From phil at five-lawrences.com Thu Jul 14 06:34:20 2005 From: phil at five-lawrences.com (Phil Lawrence) Date: Thu, 14 Jul 2005 09:34:20 -0400 Subject: [ABE.pm] What's new in ABE Perldom? In-Reply-To: <20050714131232.GK4552@manxome.org> References: <20050714131232.GK4552@manxome.org> Message-ID: On Jul 14, 2005, at 9:12 AM, Ricardo SIGNES wrote: > > Man, the list has been so dead lately! What's everyone up to? > > I also got to meet Meng Wong Great guy. Hung out with him a lot in Boca Raton for YAPC 2003. > What's everyone else up to? I'm pretty sure you're not all dead. > Maybe > everyone has abandoned Perl for Python and Java, though. (Speaking of > which, my first day at OSCON this year looks to be eight hours of > Python. That should be fun...) I went to Pycon this year... was hoping to discover a good web app framework. Turned out that was a major topic for the conference. Purportedly, all Python programmers go through a phase were they roll their own web app framework. :-) Problem is, the frameworks are all out there, hawking their own benefits, and there is ZERO clear winner. In fact, there are so many, there is basically no way to know what to use. Most of that community's conversation took the form of "what shall we put out there as an answer to Ruby on Rails?" Of course there were individual voices saying "Zope is best," or "Twisted is a great underlying framework that more of our web app frameworks need to standardize on," but the gist of the conference for me was... just use Ruby! :-) Oh, and to clarify, no new Perl form me for a while. :-( Phil From rjbs-perl-abe at lists.manxome.org Thu Jul 14 06:46:26 2005 From: rjbs-perl-abe at lists.manxome.org (Ricardo SIGNES) Date: Thu, 14 Jul 2005 09:46:26 -0400 Subject: [ABE.pm] What's new in ABE Perldom? In-Reply-To: References: <20050714131232.GK4552@manxome.org> Message-ID: <20050714134626.GL4552@manxome.org> * Phil Lawrence [2005-07-14T09:34:20] > I went to Pycon this year... was hoping to discover a good web app > framework. Turned out that was a major topic for the conference. > Purportedly, all Python programmers go through a phase were they roll > their own web app framework. :-) Problem is, the frameworks are all > out there, hawking their own benefits, and there is ZERO clear > winner. In fact, there are so many, there is basically no way to > know what to use. Most of that community's conversation took the > form of "what shall we put out there as an answer to Ruby on Rails?" Yeah, Python and Ruby both seem to have that problem -- too many or too few or too large or too small solutions. Perl often seems to be best at finding the middle way. I think Ruby has great potential, if they can just get a good packaging system. Maybe after JSAN is stable, someone will get CRAN (or something) working. The existing Ruby stuff is no better than the Vaults of Parnassus (the awful Python attempt at a CPAN). I'm interested to see how the various attempts by Perlists to replicate the hype of Ruby on Rails goes. Catalyst seems to be doing well, especially with the release of HTML::Prototype, which lets you easily create smart "AJAX" forms using the Prototype JavaScript library. > Oh, and to clarify, no new Perl form me for a while. :-( Did you read much more of Advanced Perl Programming 2? I finished it, and frankly I was somewhat disappointed. I wrote a review of it (and a few other recent reads) on our wiki: http://abe.pm.org/wiki/index.cgi?BookLibrary -- rjbs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/abe-pm/attachments/20050714/71df4c62/attachment.bin From phil at five-lawrences.com Thu Jul 14 07:12:00 2005 From: phil at five-lawrences.com (Phil Lawrence) Date: Thu, 14 Jul 2005 10:12:00 -0400 Subject: [ABE.pm] What's new in ABE Perldom? In-Reply-To: <20050714134626.GL4552@manxome.org> References: <20050714131232.GK4552@manxome.org> <20050714134626.GL4552@manxome.org> Message-ID: <4433149E-2D67-424F-AA89-F5E7F12E9EB2@five-lawrences.com> On Jul 14, 2005, at 9:46 AM, Ricardo SIGNES wrote: > > Did you read much more of Advanced Perl Programming 2? I finished it, > and frankly I was somewhat disappointed. I wrote a review of it > (and a > few other recent reads) on our wiki: > > http://abe.pm.org/wiki/index.cgi?BookLibrary Well, I read the preface, ch 1, and half of ch 2. I think he does a fine job in ch1 of explaining *how* the advanced perl coding works, and then goes on to show the modules that have already done the heavy lifting for you. Frankly, I was excited when i started the book, because it starts at exactly my level. I've done a lot of the things he talks about in ch 1, but only one time or something. So it was kinda fun to see in one place a lot of the info I had to scrape together the hard way before. But really I have to call this book a reference, because I'm not parsing anything now, I'm not creating any fancy OO stuff now, I'm not doing any Unicode now, in fact I'm not writing *any* perl now! But it certainly has a place next to the Camel for anyone actually doing, well, "advanced" perl programming. Phil From rjbs-perl-abe at lists.manxome.org Thu Jul 14 07:20:04 2005 From: rjbs-perl-abe at lists.manxome.org (Ricardo SIGNES) Date: Thu, 14 Jul 2005 10:20:04 -0400 Subject: [ABE.pm] What's new in ABE Perldom? In-Reply-To: <4433149E-2D67-424F-AA89-F5E7F12E9EB2@five-lawrences.com> References: <20050714131232.GK4552@manxome.org> <20050714134626.GL4552@manxome.org> <4433149E-2D67-424F-AA89-F5E7F12E9EB2@five-lawrences.com> Message-ID: <20050714142004.GM4552@manxome.org> * Phil Lawrence [2005-07-14T10:12:00] > On Jul 14, 2005, at 9:46 AM, Ricardo SIGNES wrote: > > Did you read much more of Advanced Perl Programming 2? I finished it, > > and frankly I was somewhat disappointed. I wrote a review of it > [ ... ] > > But really I have to call this book a reference, because I'm not > parsing anything now, I'm not creating any fancy OO stuff now, I'm > not doing any Unicode now, in fact I'm not writing *any* perl now! > But it certainly has a place next to the Camel for anyone actually > doing, well, "advanced" perl programming. I guess. To me it's more like a guide to a few good CPAN modules that adress problems someone might encounter while doing things other than system administration with Perl. Maybe it's about doing advanced things with Perl, but ... well, maybe I'm spitting hairs. APP1 was a little more "advanced Perl," although it was also a lot of module review. The two best books I've read on advanced Perl programming are without a doubt Conway's Object-Oriented Perl and Dominus's Higher-Order Perl. Now, if Ovid writes a Logical Perl, we'll be set all over. (And maybe an Event-Driven Perl for POE would help.) -- rjbs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/abe-pm/attachments/20050714/08f27d96/attachment.bin From rjbs-perl-abe at lists.manxome.org Sat Jul 16 19:40:55 2005 From: rjbs-perl-abe at lists.manxome.org (Ricardo SIGNES) Date: Sat, 16 Jul 2005 22:40:55 -0400 Subject: [ABE.pm] Book Reviews Message-ID: <20050717024055.GB261@manxome.org> I don't know why I forgot to mention this. Maybe I did and now can't find the relevant message. I wrote some new reviews of some books I've recently read: http://abe.pm.org/wiki/index.cgi?BookLibrary The new ones are the Mason book, Advanced Perl Programming 2, and Higher Order Perl. I *still* haven't written a review for Practical Common Lisp, probably because I *still* haven't read it! Ugh. I need to get that written (or someone does) or Apress won't want to give us books in the future. Also, John Cappiello (new-to-the-area Perl hacker) and I updated the wiki tonight, so it's finally using a modern Kwiki (as opposed to the ancient CGI::Kwiki v0.18). It should be nicer in a lot of ways, but given that there isn't much use made of the wiki... it's not a big deal. -- rjbs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/abe-pm/attachments/20050717/a4c1639c/attachment.bin From faber at linuxnj.com Fri Jul 22 14:56:04 2005 From: faber at linuxnj.com (Faber Fedor) Date: Fri, 22 Jul 2005 17:56:04 -0400 Subject: [ABE.pm] ternary operator Message-ID: <20050722215604.GA2038@uranus.faber.nom> I'm confoozled about the ternary operator. I want to do this: if($endYYYYMM) { $tempDate = $endYYYYMM."28"; }else{ $tempDate = $YYYY.$MM."28"; } IOW, if $endYYYYMM *exists* then $tempDate = $endYYYYMM."28" otherwise, if $endYYYYMM *doesn't exist* (the user didn't pass it in on the command line) set $tempdate to something different. That works fine. I thought I could be more succint by saying $endYYYYMM ? $tempDate = $endYYYYMM."28" : $tempDate = $YYYY.$MM."28"; but that always executes the false statment, e.g. $tempDate = $YYYY.$MM."28". I've run into this problem in a few other places, so I know it's not related to the variables but rather my understanding of things. What am I missing? -- Regards, Faber Fedor President Linux New Jersey, Inc. 908-320-0357 800-706-0701 http://www.linuxnj.com From mct at toren.net Fri Jul 22 15:19:24 2005 From: mct at toren.net (Michael C. Toren) Date: Fri, 22 Jul 2005 18:19:24 -0400 Subject: [ABE.pm] ternary operator In-Reply-To: <20050722215604.GA2038@uranus.faber.nom> References: <20050722215604.GA2038@uranus.faber.nom> Message-ID: <20050722221924.GA8216@netisland.net> On Fri, Jul 22, 2005 at 05:56:04PM -0400, Faber Fedor wrote: > I thought I could be more succint by saying > > $endYYYYMM ? $tempDate = $endYYYYMM."28" : $tempDate = $YYYY.$MM."28"; > > but that always executes the false statment If you add a few parentheses to the above, this should work just fine: $foo ? ($bar = 1) : ($bar = 2); However, if you factor out the common code, you end up with: $bar = $foo ? 1 : 2; which is a bit more readable, imo. HTH, -mct -- perl -e'$u="\4\5\6";sub H{8*($_[1]%79)+($_[0]%8)}sub G{vec$u,H(@_),1}sub S{vec ($n,H(@_),1)=$_[2]}$_=q^{P`clear`;for$iX){PG($iY)?"O":" "forX8);P"\n"}for$iX){ forX8){$c=scalar grep{G@$_}[$i-1Y-1Z-1YZ-1Y+1ZY-1ZY+1Z+1Y-1Z+1YZ+1Y+1];S$iY,G( $iY)?$c=~/[23]/?1:0:$c==3?1:0}}$u=$n;select$M,$C,$T,.2;redo}^;s/Z/],[\$i/g;s/Y /,\$_/xg;s/X/(0..7/g;s/P/print+/g;eval' # Michael C. Toren From tfiedler at elevenfour.com Fri Jul 22 18:08:32 2005 From: tfiedler at elevenfour.com (Ted Fiedler) Date: Fri, 22 Jul 2005 21:08:32 -0400 Subject: [ABE.pm] ternary operator In-Reply-To: <20050722215604.GA2038@uranus.faber.nom> References: <20050722215604.GA2038@uranus.faber.nom> Message-ID: <42E19890.1040503@elevenfour.com> try this my $tempDate = ( defined ($endYYYYMM) ) ? $endYYYYMM."28" : $YYYY.$MM."28"; Faber Fedor wrote: > I'm confoozled about the ternary operator. I want to do this: > > if($endYYYYMM) { > $tempDate = $endYYYYMM."28"; > }else{ > $tempDate = $YYYY.$MM."28"; > } > > IOW, if $endYYYYMM *exists* then $tempDate = $endYYYYMM."28" otherwise, > if $endYYYYMM *doesn't exist* (the user didn't pass it in on the command > line) set $tempdate to something different. > > That works fine. > > I thought I could be more succint by saying > > $endYYYYMM ? $tempDate = $endYYYYMM."28" : $tempDate = $YYYY.$MM."28"; > > but that always executes the false statment, e.g. > $tempDate = $YYYY.$MM."28". > > I've run into this problem in a few other places, so I know it's not > related to the variables but rather my understanding of things. > > What am I missing? > >