From grant at mclean.net.nz Mon Nov 5 19:33:24 2012 From: grant at mclean.net.nz (Grant McLean) Date: Tue, 06 Nov 2012 16:33:24 +1300 Subject: [Wellington-pm] Meeting next Tuesday Message-ID: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> Hi Mongers The November Meeting of Wellington Perl Mongers is scheduled for next Tuesday - the 13th. We do not as yet have any talks scheduled so please let me know if you'd like to speak. I am considering doing a talk about how to write a jQuery plugin. The more astute among you will have noticed that jQuery is Javascript and not Perl but I'm not planning on letting that stop me :-) Usual time and place: 6:00pm Tuesday 13 November 2012 Level 3, Catalyst House 150 Willis Street Wellington Regards Grant From grant at mclean.net.nz Wed Nov 7 19:20:02 2012 From: grant at mclean.net.nz (Grant McLean) Date: Thu, 08 Nov 2012 16:20:02 +1300 Subject: [Wellington-pm] Meeting next Tuesday In-Reply-To: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> References: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> Message-ID: <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> I should point out that a) I'm still looking for another speaker for Tuesday; and b) This will be the last opportunity to do a talk @ Wgtn.pm in 2012! The December meeting will be a social on Tuesday the 11th. There will be no meeting in January. Traditionally the February meeting is a lightning talk meeting so start thinking about your 5 minute talk options too. Cheers Grant On Tue, 2012-11-06 at 16:33 +1300, Grant McLean wrote: > Hi Mongers > > The November Meeting of Wellington Perl Mongers is scheduled for next > Tuesday - the 13th. > > We do not as yet have any talks scheduled so please let me know if you'd > like to speak. > > I am considering doing a talk about how to write a jQuery plugin. The > more astute among you will have noticed that jQuery is Javascript and > not Perl but I'm not planning on letting that stop me :-) > > Usual time and place: > > 6:00pm Tuesday 13 November 2012 > Level 3, Catalyst House > 150 Willis Street > Wellington > > Regards > Grant > > _______________________________________________ > Wellington-pm mailing list > Wellington-pm at pm.org > http://mail.pm.org/mailman/listinfo/wellington-pm From grant at mclean.net.nz Thu Nov 8 13:27:54 2012 From: grant at mclean.net.nz (Grant McLean) Date: Fri, 09 Nov 2012 10:27:54 +1300 Subject: [Wellington-pm] Meeting next Tuesday In-Reply-To: <509C1FC6.6010803@halo.gen.nz> References: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> <509C1FC6.6010803@halo.gen.nz> Message-ID: <1352410074.29341.2.camel@putnam.wgtn.cat-it.co.nz> On Fri, 2012-11-09 at 10:10 +1300, Douglas Bagnall wrote: > On 08/11/12 16:20, Grant McLean wrote: > > I should point out that > > > > a) I'm still looking for another speaker for Tuesday; > > I could talk about my troubles with speech recognition, as a sort of > rehearsal for an LCA talk. Perl is involved in the background. Consider yourself booked - thanks! So our lineup looks like this: * Grant McLean - Writing jQuery plugins * Hugh Davenport - Dynamic IP's on a dedicated server * Douglas Bagnall - Adventures with speech recognition See you on Tuesday evening. Grant From douglas at halo.gen.nz Thu Nov 8 13:42:46 2012 From: douglas at halo.gen.nz (Douglas Bagnall) Date: Fri, 09 Nov 2012 10:42:46 +1300 Subject: [Wellington-pm] Grant McLean, NZ Open Source Awards champion In-Reply-To: <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> References: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> Message-ID: <509C2756.30307@halo.gen.nz> Grant wrote: > I should point out that Just in case anyone here missed it, the real thing Grant neglected to point out is that on Wednesday he won the Open Source Contributor prize at NZOSA 2012 "for contributions to Perl and the wider open source community". Well deserved too. Rather than enumerate Grant's achievements directly (for that, watch Francois Marier in the r2.co.nz recording), I will point out that one of the runners-up wrote a 1553 page book on Linux system calls while the other spends 14 hours a day helping people in PHP forums. Grant's sacrifices for the community eclipsed both these efforts. three cheers, Douglas From grant at mclean.net.nz Thu Nov 8 13:53:45 2012 From: grant at mclean.net.nz (Grant McLean) Date: Fri, 09 Nov 2012 10:53:45 +1300 Subject: [Wellington-pm] Grant McLean, NZ Open Source Awards champion In-Reply-To: <509C2756.30307@halo.gen.nz> References: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> <509C2756.30307@halo.gen.nz> Message-ID: <1352411625.29341.14.camel@putnam.wgtn.cat-it.co.nz> On Fri, 2012-11-09 at 10:42 +1300, Douglas Bagnall wrote: > Grant wrote: > > I should point out that > > Just in case anyone here missed it, the real thing Grant neglected to > point out is that on Wednesday he won the Open Source Contributor prize > at NZOSA 2012 "for contributions to Perl and the wider open source > community". Well deserved too. > > Rather than enumerate Grant's achievements directly (for that, watch > Francois Marier in the r2.co.nz recording), I will point out that one > of the runners-up wrote a 1553 page book on Linux system calls while > the other spends 14 hours a day helping people in PHP forums. Grant's > sacrifices for the community eclipsed both these efforts. a) I am currently blushing b) I'm glad Douglas wasn't presenting the award :-) Thanks for the kind words. Grant From grant at mclean.net.nz Mon Nov 12 17:51:18 2012 From: grant at mclean.net.nz (Grant McLean) Date: Tue, 13 Nov 2012 14:51:18 +1300 Subject: [Wellington-pm] Meeting this evening Message-ID: <1352771478.27740.41.camel@kereru> Hi Mongers Our final technical meeting of 2012 is on this evening. We have three talks lined up: * Grant McLean - Writing jQuery plugins * Hugh Davenport - Dynamic IP's on a dedicated server * Douglas Bagnall - Adventures with speech recognition Normal time and place: 6:00pm Tuesday 13 November 2012 Level 3, Catalyst House 150 Willis Street Wellington See there Grant From grant at mclean.net.nz Tue Nov 13 13:37:37 2012 From: grant at mclean.net.nz (Grant McLean) Date: Wed, 14 Nov 2012 10:37:37 +1300 Subject: [Wellington-pm] Roundup of last night's meeting Message-ID: <1352842657.16745.9.camel@putnam.wgtn.cat-it.co.nz> Hi Mongers It was a great turnout last night, sorry I had to rush away at the end. Thanks to Hugh (no longer a "PM virgin") and Douglas (this whole thing would be easier if we all spoke American) for their talks. I've put my jQuery slides up on the web site. If either of Hugh or Doug want to send me slides or links, I'll put them up too: http://wellington.pm.org/archive/ See you on December 11th for drinks! Cheers Grant From dan.horne at redbone.co.nz Wed Nov 14 12:53:14 2012 From: dan.horne at redbone.co.nz (Dan Horne) Date: Thu, 15 Nov 2012 09:53:14 +1300 Subject: [Wellington-pm] decompressing a string Message-ID: Hi Mongers I'm trying to convert a Python routine to Perl. The point where I'm stuck is where I need to decompress a string. The Python code is something like (extraneous code removed) import zlib mystring = '' print zlib.decompress(mystring) However, it's not clear to me how to replicate this in Perl. I've tried use Compress::Zlib; my $mystring = ''; my $x = deflateInit(); my ($out,$status) = $x->deflate($mystring ); $status == Z_OK or die "deflation failed\n"; print $out; Unfortunately, the Perl code doesn't work - $out is gobbledygook -- and as far as I can tell from the doco, Compress::Zlib seems to be interested in decompressing filehandles not strings. Any advice on how to decompress a string appreciated Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From olly at survex.com Wed Nov 14 13:05:33 2012 From: olly at survex.com (Olly Betts) Date: Wed, 14 Nov 2012 21:05:33 +0000 Subject: [Wellington-pm] decompressing a string In-Reply-To: References: Message-ID: <20121114210533.GW32685@survex.com> On Thu, Nov 15, 2012 at 09:53:14AM +1300, Dan Horne wrote: > I'm trying to convert a Python routine to Perl. The point where I'm stuck > is where I need to decompress a string. The Python code is something like > (extraneous code removed) > > import zlib > mystring = '' > print zlib.decompress(mystring) > > However, it's not clear to me how to replicate this in Perl. I've tried Don't you just want to use Compress::Zlib::uncompress: $dest = uncompress($source) ; Uncompresses $source. If successful it returns the uncompressed data. Otherwise it returns undef. The source buffer can either be a scalar or a scalar reference. Cheers, Olly From steve.piner at signify.co.nz Wed Nov 14 13:17:29 2012 From: steve.piner at signify.co.nz (Steve Piner) Date: Thu, 15 Nov 2012 10:17:29 +1300 Subject: [Wellington-pm] decompressing a string In-Reply-To: References: Message-ID: <50A40A69.3030806@signify.co.nz> Shouldn't that be inflate rather than deflate? Steve On 15/11/2012 9:53 a.m., Dan Horne wrote: > Hi Mongers > I'm trying to convert a Python routine to Perl. The point where I'm > stuck is where I need to decompress a string. The Python code is > something like (extraneous code removed) > import zlib > mystring = '' > print zlib.decompress(mystring) > However, it's not clear to me how to replicate this in Perl. I've tried > use Compress::Zlib; > my $mystring = ''; > my $x = deflateInit(); > my ($out,$status) = $x->deflate($mystring ); > $status == Z_OK or die "deflation failed\n"; > print $out; > Unfortunately, the Perl code doesn't work - $out is gobbledygook -- and > as far as I can tell from the doco, Compress::Zlib seems to be > interested in decompressing filehandles not strings. Any advice on how > to decompress a string appreciated > Dan > > > _______________________________________________ > Wellington-pm mailing list > Wellington-pm at pm.org > http://mail.pm.org/mailman/listinfo/wellington-pm > -- Steve Piner Senior Developer ========================================== +SIGNIFY LIMITED :: a smarter web company+ ========================================== ph: +64 4 803-3211 | fax: +64 4 803-3241 Level 2, 120 Featherston St, Wellington P.O. Box 24-068, Manners St, Wellington ========================================== This communication, including any attachment, is confidential. If you are not the intended recipient, you should delete/destroy this communication; you may not read and must not copy, send on or retain any part of this communication. Please do not disclose to any third party anything about this communication. From grant at mclean.net.nz Wed Nov 14 13:15:16 2012 From: grant at mclean.net.nz (Grant McLean) Date: Thu, 15 Nov 2012 10:15:16 +1300 Subject: [Wellington-pm] decompressing a string In-Reply-To: References: Message-ID: <1352927716.5842.8.camel@putnam.wgtn.cat-it.co.nz> On Thu, 2012-11-15 at 09:53 +1300, Dan Horne wrote: > Hi Mongers > > I'm trying to convert a Python routine to Perl. The point where I'm > stuck is where I need to decompress a string. The Python code is > something like (extraneous code removed) I fought with something similar to this a while ago. The key detail that I was missing is the difference between gzip and inflate/deflate. My understanding is that they are both implemented in zlib but gzipping adds some envelope around the raw deflated data. I ended up using the IO::Uncompress::RawInflate module because I found a code example that worked in my situation (I was dealing with an XML document that had been compressed and then base64 encoded and then URL encoded). Despite the 'IO::' prefix, this module does work with in-memory strings. The relevant snippet is here: https://metacpan.org/source/GRANTM/Authen-NZigovt-1.05/lib/Authen/NZigovt/AuthenRequest.pm#L202 Hope that helps Grant From dan.horne at redbone.co.nz Wed Nov 14 15:08:44 2012 From: dan.horne at redbone.co.nz (Dan Horne) Date: Thu, 15 Nov 2012 12:08:44 +1300 Subject: [Wellington-pm] decompressing a string In-Reply-To: <1352927716.5842.8.camel@putnam.wgtn.cat-it.co.nz> References: <1352927716.5842.8.camel@putnam.wgtn.cat-it.co.nz> Message-ID: Hi All Thanks for your reponses. You're right - using a scalarref is what I needed. My source data was following a pattern similar to Grant's - uncompressing a base 64 decoded string. IO::Uncompress::Inflate is what worked for me rather than the RawInflate version Dan On 15 November 2012 10:15, Grant McLean wrote: > On Thu, 2012-11-15 at 09:53 +1300, Dan Horne wrote: > > Hi Mongers > > > > I'm trying to convert a Python routine to Perl. The point where I'm > > stuck is where I need to decompress a string. The Python code is > > something like (extraneous code removed) > > I fought with something similar to this a while ago. The key detail that > I was missing is the difference between gzip and inflate/deflate. My > understanding is that they are both implemented in zlib but gzipping > adds some envelope around the raw deflated data. > > I ended up using the IO::Uncompress::RawInflate module because I found a > code example that worked in my situation (I was dealing with an XML > document that had been compressed and then base64 encoded and then URL > encoded). Despite the 'IO::' prefix, this module does work with > in-memory strings. The relevant snippet is here: > > > https://metacpan.org/source/GRANTM/Authen-NZigovt-1.05/lib/Authen/NZigovt/AuthenRequest.pm#L202 > > Hope that helps > Grant > > _______________________________________________ > Wellington-pm mailing list > Wellington-pm at pm.org > http://mail.pm.org/mailman/listinfo/wellington-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarich at perltraining.com.au Wed Nov 21 17:17:29 2012 From: jarich at perltraining.com.au (Jacinta) Date: Thu, 22 Nov 2012 12:17:29 +1100 Subject: [Wellington-pm] Grant McLean, NZ Open Source Awards champion In-Reply-To: <509C2756.30307@halo.gen.nz> References: <1352172804.17142.6.camel@putnam.wgtn.cat-it.co.nz> <1352344802.27847.26.camel@putnam.wgtn.cat-it.co.nz> <509C2756.30307@halo.gen.nz> Message-ID: <50AD7D29.4080509@perltraining.com.au> On 09/11/12 08:42, Douglas Bagnall wrote: > Grant wrote: >> I should point out that > Just in case anyone here missed it, the real thing Grant neglected to > point out is that on Wednesday he won the Open Source Contributor prize > at NZOSA 2012 "for contributions to Perl and the wider open source > community". Well deserved too. > > Rather than enumerate Grant's achievements directly (for that, watch > Francois Marier in the r2.co.nz recording), I will point out that one > of the runners-up wrote a 1553 page book on Linux system calls while > the other spends 14 hours a day helping people in PHP forums. Grant's > sacrifices for the community eclipsed both these efforts. > > three cheers, > Hooray! Well done Grant! That's awesome news. Congratulations and well deserved! J