From toby.corkindale at strategicdata.com.au Mon May 7 18:34:26 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 08 May 2012 11:34:26 +1000 Subject: [Melbourne-pm] Melbourne Perl mongers May meeting is tomorrow Message-ID: <4FA87822.5040403@strategicdata.com.au> Hello, The Melbourne Perl Mongers will be meeting tomorrow, on Wednesday the 9th of May, 2012 and will start around 6:30pm at this location: Strategic Data Level 2 51-55 Johnston street Fitzroy I believe we have the following agenda: * Kahlil Hodgson presenting on "Perl for profit" - experiences of using Perl in a new technology start-up. * Tony Smith, leading a discussion on best practices when working with (and hopefully upgrading) 20th century Perl code. It doesn't look like Perl 5.16 will be released by tomorrow, so we'll have to hold the party for that next month :) Cheers, Toby From toby.corkindale at strategicdata.com.au Tue May 8 18:24:31 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 09 May 2012 11:24:31 +1000 Subject: [Melbourne-pm] TONIGHT - Melbourne Perlmongers In-Reply-To: <4FA87822.5040403@strategicdata.com.au> References: <4FA87822.5040403@strategicdata.com.au> Message-ID: <4FA9C74F.4020703@strategicdata.com.au> Don't forget, tonight's meeting is.. Tonight! Toby -------- Original Message -------- Subject: [Melbourne-pm] Melbourne Perl mongers May meeting is tomorrow Date: Tue, 08 May 2012 11:34:26 +1000 From: Toby Corkindale To: melbourne-pm Hello, The Melbourne Perl Mongers will be meeting tomorrow, on Wednesday the 9th of May, 2012 and will start around 6:30pm at this location: Strategic Data Level 2 51-55 Johnston street Fitzroy I believe we have the following agenda: * Kahlil Hodgson presenting on "Perl for profit" - experiences of using Perl in a new technology start-up. * Tony Smith, leading a discussion on best practices when working with (and hopefully upgrading) 20th century Perl code. It doesn't look like Perl 5.16 will be released by tomorrow, so we'll have to hold the party for that next month :) Cheers, Toby _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm From kahlil.hodgson at dealmax.com.au Fri May 11 01:54:27 2012 From: kahlil.hodgson at dealmax.com.au (Kahlil Hodgson) Date: Fri, 11 May 2012 18:54:27 +1000 Subject: [Melbourne-pm] Working with old Perl code Message-ID: <4FACD3C3.5050603@dealmax.com.au> Hi All, After Tony's discussion at Wednesdays meeting, I've had some thoughts about generic strategies for cleaning up old perl code. I totally agree with Tony's reluctance to mess with the structure of the code too early: the potential to change or break functionality before it is well understood is just to great. One fairly safe strategy, however, is to clean up the use of variables and references. The code in Tony's example was clearly from a time before lexical variables either existed or where in common use. Simply walking through this code and inserting 'my' in the appropriate places to bring non-global variables into a lexical scope should be fairly safe (provided you carefully check that the variables are not being used globally). More importantly, the process helps to pin-point the nasty global variables, which you can mark and fix up later. As part of this code walk, you will probably find uses of 'local' that are really just being used for scoping. Figuring out which instances can be replaced with 'my' helps to point out the genuine uses of localization (if any) which you may also decide to mark and fix up later. This 'first pass' can be done fairly quickly and will make the code look and behave a lot more like a modern perl Older code sometimes uses *TYPEGLOBs instead of variable references. Now, for those who don't know, *TYPEGLOB's are references into the symbol table (the place where we keep global variables) and simultaneously point to all 'things' (or types?) which match (or glob to?) a particular symbol name. Okay, that's a _very_ rough definition, but *TYPEGLOBs (or *TYPEGOBLINs?) are _very_ odd creatures. I found the first chapter of "Advanced Perl Programming" by Simon Cozens particularly enlightening on this topic (contact me off-list if you want to borrow a copy). Believe it or not, there are sensible places to use *TYPEGLOBs, but they are relatively rare in modern perl and mostly live in CPAN modules (mostly) written by people who "really know what they are doing". Using *TYPEGLOBs in place of variable references is _not_ a sensible thing to do in modern perl. The code that Tony's is dealing with is a good example. From memory we had something like: &read_config(*my_config); ... %my_config{'some_key'} = 'some_value'; We could try to replace this with my $my_config_ref = {}; &read_config($my_config_ref); ... $my_config_ref->{'some_key'} = 'some_value'; But then we're going to have to change the code in 'read_config' to get it to work, and that's not in spirit of making small changes and not breaking functionality. You can get around this with the following trick: my $my_config_ref = {}; *my_config = $my_config_ref; # temp until we fix read_config &read_config(*my_config); ... $my_config_ref->{'some_key'} = 'some_value'; The trick changes the 'hash' slot for the symbol 'my_config' to point to the same hash that $my_config_ref points to. The following little test script may clarify for those who doubt #!/usr/bin/perl use v5.10; sub read_config { local (*my_config) = @_; # NB: can't use 'my' on a TYPEGLOB $my_config{'pre'} = 'from config'; } my $my_config_ref = {}; *my_config = $my_config_ref; read_config(*my_config); say $my_config_ref->{'pre'}; $my_config_ref->{'post'} = 'after config'; say $my_config_ref->{'post'}; say $my_config_ref->{'pre'}; Once you are happy that this is all working correctly, you can then go into 'read_config' and replace the *TYPEGOBLIN and get rid of the trick (I'm assuming nothing else calls read_config this way). Getting rid of the superfluous '&' in front of subroutine calls is another quick fix. Finally, after doing all that you can probably try use strict; use warnings; and see if the remaining badness is manageable. Thanks to Tony for bringing up this topic and I hope my suggestions help. Happy Hacking! Kal -- Kahlil (Kal) Hodgson GPG: C9A02289 Head of Technology (m) +61 (0) 4 2573 0382 DealMax Pty Ltd (w) +61 (0) 3 9008 5281 Suite 1415 401 Docklands Drive Docklands VIC 3008 Australia "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer." -- IBM maintenance manual, 1925 From toby.corkindale at strategicdata.com.au Mon May 14 23:12:17 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 15 May 2012 16:12:17 +1000 Subject: [Melbourne-pm] Next meeting - 14th June Message-ID: <4FB1F3C1.7090706@strategicdata.com.au> Hi all, our next meeting is scheduled to be Wednesday 14th of June, 2012. Potential talks I have so far are: * What's new in Perl 5.16 * Scott may be ready for a talk on Perl on BeagleBone by then (and if not, I might do a ten minute overview of what the BB is, at least) Does anyone else have a presentation they'd like to present at the next meeting? Regarding Perl 5.16: The 2nd release candidate came out today, and if no showstopper bugs are found, 5.16.0 should be out in a week from now. Cheers, Toby From christopher.short at monash.edu Tue May 15 22:51:31 2012 From: christopher.short at monash.edu (Christopher Short) Date: Wed, 16 May 2012 15:51:31 +1000 Subject: [Melbourne-pm] XML::Xerces Message-ID: Howdy folks, have any of you managed to successfully install XML::Xerces under Perl 5.14 ? I gather it has issues after Perl 5.8 cheers, Christopher From rob at eatenbyagrue.org Wed May 16 00:07:06 2012 From: rob at eatenbyagrue.org (Robert Norris) Date: Wed, 16 May 2012 17:07:06 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: On Wed, May 16, 2012 at 3:51 PM, Christopher Short wrote: > have any of you managed to successfully install XML::Xerces under Perl 5.14 ? Just worked through it now. Its fiddly, but it appears to work. If you haven't already got Xerces-C installed, you'll need to build it. XML::Xerces requires 2.7.0 only, so the latest version isn't much good to you. Grab it here: http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/source/xerces-c-src_2_7_0.tar.gz Unpack and build, setting XERCESROOT along the way (critical to the Xerces-C and Xerces::XML builds). Explicitly specifying the compilers in runConfigure is important, as Xerces::XML will fail to build if Xerces was not built with g++, but on many Linuxes configure finds c++. Explicit is good! $ tar xvfz xerces-c-src_2_7_0.tar.gz $ cd xerces-c-src_2_7_0 $ export XERCESROOT=`pwd` $ cd src/xercesc $ ./runConfigure -p linux -c gcc -x g++ You'll probably want to install this somewhere, but I didn't for now. XML::Xerces will link to wherever its built so it will work properly, but you need to keep the build dir around if you don't install it. Or you can do crazy shenanigans with static linking and such. Up to you :) Now XML::Xerces. For Perl later that 5.9.notsure it needs to rebuild the SWIG bindings. You'll need SWIG on your path, and XML::Xerces needs the XERCES_DEVEL=1 environment variable to tell it what to do. $ XERCES_DEVEL=1 cpanm XML::Xerces. That completed successfully for me. I haven't verified it other than to note that Perl can load it ok: $ perl -MXML::Xerces -e1 $ echo $? 0 Good luck! Rob. From christopher.short at monash.edu Wed May 16 01:19:30 2012 From: christopher.short at monash.edu (Christopher Short) Date: Wed, 16 May 2012 18:19:30 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: Hey there Rob! Sorry went down the path of "rebuilding SWIG bindings" on Monday and couldn't get Swig to install :-( Tried again right now and no dice. So ... following that we regressed to Xerces 1.5.2 (and discovered Rus, our predecessor had also done that for reason long forgotten). But 1.5.2 doesn't want to install either, despite not requiring Swig. :-( Marc may have found an interesting patch for XML::Xerces in a Fedora package, so that may be worth investigating. Christopher On 16 May 2012 17:07, Robert Norris wrote: > On Wed, May 16, 2012 at 3:51 PM, Christopher Short > wrote: >> have any of you managed to successfully install XML::Xerces under Perl 5.14 ? > > Just worked through it now. Its fiddly, but it appears to work. > > If you haven't already got Xerces-C installed, you'll need to build > it. XML::Xerces requires 2.7.0 only, so the latest version isn't much > good to you. Grab it here: > > http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_7_0/source/xerces-c-src_2_7_0.tar.gz > > Unpack and build, setting XERCESROOT along the way (critical to the > Xerces-C and Xerces::XML builds). Explicitly specifying the compilers > in runConfigure is important, as Xerces::XML will fail to build if > Xerces was not built with g++, but on many Linuxes configure finds > c++. Explicit is good! > > $ tar xvfz xerces-c-src_2_7_0.tar.gz > $ cd xerces-c-src_2_7_0 > $ export XERCESROOT=`pwd` > $ cd src/xercesc > $ ./runConfigure -p linux -c gcc -x g++ > > You'll probably want to install this somewhere, but I didn't for now. > XML::Xerces will link to wherever its built so it will work properly, > but you need to keep the build dir around if you don't install it. Or > you can do crazy shenanigans with static linking and such. Up to you > :) > > Now XML::Xerces. For Perl later that 5.9.notsure it needs to rebuild > the SWIG bindings. You'll need SWIG on your path, and XML::Xerces > needs the XERCES_DEVEL=1 environment variable to tell it what to do. > > $ XERCES_DEVEL=1 cpanm XML::Xerces. > > That completed successfully for me. I haven't verified it other than > to note that Perl can load it ok: > > $ perl -MXML::Xerces -e1 > $ echo $? > 0 > > Good luck! > Rob. From christopher.short at monash.edu Wed May 16 18:46:48 2012 From: christopher.short at monash.edu (Christopher Short) Date: Thu, 17 May 2012 11:46:48 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: Well, we finally managed to get Swig and Xerces C and XML::Xerces 2.7 installed ... ... but then we found that they'd removed DOMParser which we needed, so we're now trying to reinstall an earlier, buggier version. grr Christopher From christopher.short at monash.edu Mon May 21 20:59:41 2012 From: christopher.short at monash.edu (Christopher Short) Date: Tue, 22 May 2012 13:59:41 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: Well, we've not managed to get this working. To give you some background, we've decided it's probably time to upgrade our website from perl 5.8 to 5.14 ;-) I'm installing a copy of our site onto a fresh server and so am methodically plodding through the site to find required modules etc. Part of the site uses XML::Xerces and XML::Xerces::DOMParser so I need to get those working. As per the requirements for this package, I am indeed installing the matching version of Xerces-C first, as well as SWIG 2.0.6 to "regenerate the bindings" using the XERCES_DEVEL = 1 trick mentioned by Rob. Version 2.7.0 => everything installs => but DOMParser has been removed Version 1.7.0 => includes DOMParser => fails during the build of Xerces-C "UnixHTTPURLInputStream.cpp:99:22: error: iostream.h: No such file or directory" Version 1.5.2 => includes DOMParser => Xerces-C builds and installs => fails during the build of XML::Xerces "error: iostream.h: No such file or directory" Also many complaints about "deprecated conversion from string constant to "char *" and "cannot convert "char*" to "PerlInterpreter*" Bleh! Anyone have any tips? Christopher On 17 May 2012 11:46, Christopher Short wrote: > Well, we finally managed to get Swig and Xerces C and XML::Xerces 2.7 > installed ... > > ... but then we found that they'd removed DOMParser which we needed, > so we're now trying to reinstall an earlier, buggier version. grr > > Christopher From toby.corkindale at strategicdata.com.au Mon May 21 21:11:25 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 22 May 2012 14:11:25 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: <4FBB11ED.1030505@strategicdata.com.au> On 22/05/12 13:59, Christopher Short wrote: > Well, we've not managed to get this working. > > To give you some background, we've decided it's probably time to > upgrade our website from perl 5.8 to 5.14 ;-) > > I'm installing a copy of our site onto a fresh server and so am > methodically plodding through the site to find required modules etc. > > Part of the site uses XML::Xerces and XML::Xerces::DOMParser so I need > to get those working. It looks like they removed DOMParser from that module ten years ago, so it really doesn't look like it was popular enough to get reincarnated elsewhere. Could you re-write the bits of the site that use DOMParser to use a current API? (It doesn't look like DOMParser provided anything particularly special) > As per the requirements for this package, I am indeed installing the > matching version of Xerces-C first, as well as SWIG 2.0.6 to > "regenerate the bindings" using the XERCES_DEVEL = 1 trick mentioned > by Rob. > > Version 2.7.0 > => everything installs > => but DOMParser has been removed > > Version 1.7.0 > => includes DOMParser > => fails during the build of Xerces-C > "UnixHTTPURLInputStream.cpp:99:22: error: iostream.h: No such file or directory" > > Version 1.5.2 > => includes DOMParser > => Xerces-C builds and installs > => fails during the build of XML::Xerces > "error: iostream.h: No such file or directory" > Also many complaints about > "deprecated conversion from string constant to "char *" > and > "cannot convert "char*" to "PerlInterpreter*" > > Bleh! > Anyone have any tips? > Christopher > > On 17 May 2012 11:46, Christopher Short wrote: >> Well, we finally managed to get Swig and Xerces C and XML::Xerces 2.7 >> installed ... >> >> ... but then we found that they'd removed DOMParser which we needed, >> so we're now trying to reinstall an earlier, buggier version. grr -- .signature From toby.corkindale at strategicdata.com.au Mon May 21 21:13:51 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 22 May 2012 14:13:51 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: <4FBB11ED.1030505@strategicdata.com.au> References: <4FBB11ED.1030505@strategicdata.com.au> Message-ID: <4FBB127F.1060302@strategicdata.com.au> On 22/05/12 14:11, Toby Corkindale wrote: > On 22/05/12 13:59, Christopher Short wrote: >> Well, we've not managed to get this working. >> >> To give you some background, we've decided it's probably time to >> upgrade our website from perl 5.8 to 5.14 ;-) >> >> I'm installing a copy of our site onto a fresh server and so am >> methodically plodding through the site to find required modules etc. >> >> Part of the site uses XML::Xerces and XML::Xerces::DOMParser so I need >> to get those working. > > It looks like they removed DOMParser from that module ten years ago, so > it really doesn't look like it was popular enough to get reincarnated > elsewhere. > > Could you re-write the bits of the site that use DOMParser to use a > current API? (It doesn't look like DOMParser provided anything > particularly special) In case it helps, this is an example of how to use the newer XercesDOMParser API: http://cpansearch.perl.org/src/JASONS/XML-Xerces-2.7.0-0/samples/DOMPrint.pl Toby From rob at eatenbyagrue.org Mon May 21 21:19:46 2012 From: rob at eatenbyagrue.org (Robert Norris) Date: Tue, 22 May 2012 14:19:46 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: On Tue, May 22, 2012 at 1:59 PM, Christopher Short wrote: > Anyone have any tips? Rewrite the application, or at least part of it. Alternatively, move the application off to its own ancient server (or VM, or chroot) and let it live out its days in isolation. I'm not kidding. Rob. From sam at nipl.net Tue May 22 01:02:06 2012 From: sam at nipl.net (Sam Watkins) Date: Tue, 22 May 2012 18:02:06 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: References: Message-ID: <20120522080206.GB23422@opal.nipl.net> Any XML parser much longer than this: /(<.*?>|[^<]+)\s*/g /(\w+)="(.*?)"/g is too big, slow, and complex for me! :p Sam From andrew at sericyb.com.au Tue May 22 01:37:20 2012 From: andrew at sericyb.com.au (Andrew Pam) Date: Tue, 22 May 2012 18:37:20 +1000 Subject: [Melbourne-pm] XML::Xerces In-Reply-To: <20120522080206.GB23422@opal.nipl.net> References: <20120522080206.GB23422@opal.nipl.net> Message-ID: <4FBB5040.5010609@sericyb.com.au> On 22/05/12 18:02, Sam Watkins wrote: > Any XML parser much longer than this: > > /(<.*?>|[^<]+)\s*/g > /(\w+)="(.*?)"/g > > is too big, slow, and complex for me! :p You're a bad man. :) Andrew From toby.corkindale at strategicdata.com.au Tue May 22 19:25:41 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 23 May 2012 12:25:41 +1000 Subject: [Melbourne-pm] BeagleBone Perl library Message-ID: <4FBC4AA5.3010005@strategicdata.com.au> Hi, I've been playing around with a BeagleBone for the past week, and I've come up with some initial Perl libraries to do GPIO and SPI, plus written some drivers to make it easy to talk to a certain LCD panel controller. I know Scott is working with the BB as well, and maybe others? My code so far is at: https://github.com/TJC/BeagleBone And a small blog post about the LCD controller is here: http://blog.dryft.net/2012/05/ssd1306-lcd-controller-in-perl-for.html Unlike on the Arduino, Perl seems like a decent language to work with on the 'bone.. Although I did break out into Inline::C for one part when driving the spidev device, since it meant I could copy-and-paste the ioctls from example C code :) Cheers, Toby From scottp at dd.com.au Tue May 22 19:45:29 2012 From: scottp at dd.com.au (Scott Penrose) Date: Tue, 22 May 2012 21:45:29 -0500 (CDT) Subject: [Melbourne-pm] BeagleBone Perl library In-Reply-To: <4FBC4AA5.3010005@strategicdata.com.au> References: <4FBC4AA5.3010005@strategicdata.com.au> Message-ID: Excellent. We should merge. And I gave a domain. Perlbone Sent from my iPhone On 23/05/2012, at 12:26, Toby Corkindale wrote: > Hi, > I've been playing around with a BeagleBone for the past week, and I've come up with some initial Perl libraries to do GPIO and SPI, plus written some drivers to make it easy to talk to a certain LCD panel controller. > > I know Scott is working with the BB as well, and maybe others? > My code so far is at: > https://github.com/TJC/BeagleBone > > And a small blog post about the LCD controller is here: > http://blog.dryft.net/2012/05/ssd1306-lcd-controller-in-perl-for.html > > > Unlike on the Arduino, Perl seems like a decent language to work with on the 'bone.. Although I did break out into Inline::C for one part when driving the spidev device, since it meant I could copy-and-paste the ioctls from example C code :) > > > Cheers, > Toby > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm From tconnors at rather.puzzling.org Tue May 22 23:00:26 2012 From: tconnors at rather.puzzling.org (Tim Connors) Date: Wed, 23 May 2012 16:00:26 +1000 (EST) Subject: [Melbourne-pm] BeagleBone Perl library In-Reply-To: <4FBC4AA5.3010005@strategicdata.com.au> References: <4FBC4AA5.3010005@strategicdata.com.au> Message-ID: On Wed, 23 May 2012, Toby Corkindale wrote: > Unlike on the Arduino, Perl seems like a decent language to work with on the > 'bone.. Although I did break out into Inline::C for one part when driving the > spidev device, since it meant I could copy-and-paste the ioctls from example C > code :) Thanks for Inline::C :) But doesn't work on my debian testing/hybrid box at work (but does at home) (output at end of this email)! I don't *have* /usr/lib/perl/5.14/CORE/cc_runtime.h on my system. Debian last had a cc_runtime.h in the perl 5.10 version in stable. It's also not on the system I have at home where Inline::C is working! Anyone seen or recognise this? > perl /tmp/inlinec.pl /usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap inlinec_pl_f5a7.xs > inlinec_pl_f5a7.xsc && mv inlinec_pl_f5a7.xsc inlinec_pl_f5a7.c make: *** No rule to make target `/usr/lib/perl/5.14/CORE/cc_runtime.h', needed by `inlinec_pl_f5a7.o'. Stop. A problem was encountered while attempting to compile and install your Inline C code. The command that failed was: make > out.make 2>&1 The build directory was: /home/tconnors/_Inline/build/inlinec_pl_f5a7 To debug the problem, cd to the build directory, and inspect the output files. at /tmp/inlinec.pl line 0 INIT failed--call queue aborted. -- Tim Connors From andrew at sericyb.com.au Wed May 23 21:43:53 2012 From: andrew at sericyb.com.au (Andrew Pam) Date: Thu, 24 May 2012 14:43:53 +1000 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants Message-ID: <4FBDBC89.3020302@sericyb.com.au> https://github.com/mirrors/perl/blob/book/perlsecret/pod/perlsecret.pod Enjoy! Andrew From toby.corkindale at strategicdata.com.au Wed May 23 21:51:09 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Thu, 24 May 2012 14:51:09 +1000 Subject: [Melbourne-pm] BeagleBone Perl library In-Reply-To: References: <4FBC4AA5.3010005@strategicdata.com.au> Message-ID: <4FBDBE3D.60902@strategicdata.com.au> On 23/05/12 12:45, Scott Penrose wrote: > Excellent. We should merge. And I gave a domain. Perlbone I went looking for your code a week or two ago and couldn't find your library on github any more. Merging the codebases sounds sensible though. Although I haven't been trying to clone the bonescript/arduino language, so I have a more OO approach. ie. the arduino-style way would be: setPin(13, DIGITAL); digitalWrite(13, HIGH); and my Perlish way is: my $pin = BeagleBone::Pins->new('P9_13'); $pin->digitalWrite(1); (my code automatically sets the appropriate mode the first time you call a read/write/etc function on the pin) -Toby > On 23/05/2012, at 12:26, Toby Corkindale wrote: > >> Hi, >> I've been playing around with a BeagleBone for the past week, and I've come up with some initial Perl libraries to do GPIO and SPI, plus written some drivers to make it easy to talk to a certain LCD panel controller. >> >> I know Scott is working with the BB as well, and maybe others? >> My code so far is at: >> https://github.com/TJC/BeagleBone >> >> And a small blog post about the LCD controller is here: >> http://blog.dryft.net/2012/05/ssd1306-lcd-controller-in-perl-for.html >> >> >> Unlike on the Arduino, Perl seems like a decent language to work with on the 'bone.. Although I did break out into Inline::C for one part when driving the spidev device, since it meant I could copy-and-paste the ioctls from example C code :) >> >> >> Cheers, >> Toby >> _______________________________________________ >> Melbourne-pm mailing list >> Melbourne-pm at pm.org >> http://mail.pm.org/mailman/listinfo/melbourne-pm -- .signature From sam at nipl.net Thu May 24 20:42:00 2012 From: sam at nipl.net (Sam Watkins) Date: Fri, 25 May 2012 13:42:00 +1000 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: <20120525034144.GD27437@opal.nipl.net> References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> Message-ID: <20120525034200.GE27437@opal.nipl.net> On Fri, May 25, 2012 at 01:41:44PM +1000, Sam Watkins wrote: > Andrew Pam wrote: > > https://github.com/mirrors/perl/blob/book/perlsecret/pod/perlsecret.pod > > > > Enjoy! > > LOL thanks! I promise not to use them at work. From andrew at sericyb.com.au Thu May 24 20:47:09 2012 From: andrew at sericyb.com.au (Andrew Pam) Date: Fri, 25 May 2012 13:47:09 +1000 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: <20120525034200.GE27437@opal.nipl.net> References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> <20120525034200.GE27437@opal.nipl.net> Message-ID: <4FBF00BD.5010108@sericyb.com.au> On 25/05/12 13:42, Sam Watkins wrote: > LOL thanks! I promise not to use them at work. Actually IMHO a few of them are sufficiently useful and well known to be appropriate for regular use. I would include: 0+ @{[ ]} !! ,=> = <> =~ Possibly also () x !! Cheers, Andrew From brong at fastmail.fm Thu May 24 23:15:22 2012 From: brong at fastmail.fm (Bron Gondwana) Date: Fri, 25 May 2012 08:15:22 +0200 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: <4FBF00BD.5010108@sericyb.com.au> References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> <20120525034200.GE27437@opal.nipl.net> <4FBF00BD.5010108@sericyb.com.au> Message-ID: <20120525061522.GE10110@launde.brong.net> On Fri, May 25, 2012 at 01:47:09PM +1000, Andrew Pam wrote: > On 25/05/12 13:42, Sam Watkins wrote: > > LOL thanks! I promise not to use them at work. > > Actually IMHO a few of them are sufficiently useful and well known to be > appropriate for regular use. I would include: I got told I was obfuscating code for using: my $copy = [@$orig]; But that was a screwed up work environment towards the end. Bron. From andrew at sericyb.com.au Thu May 24 23:18:46 2012 From: andrew at sericyb.com.au (Andrew Pam) Date: Fri, 25 May 2012 16:18:46 +1000 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: <20120525061522.GE10110@launde.brong.net> References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> <20120525034200.GE27437@opal.nipl.net> <4FBF00BD.5010108@sericyb.com.au> <20120525061522.GE10110@launde.brong.net> Message-ID: <4FBF2446.5080308@sericyb.com.au> On 25/05/12 16:15, Bron Gondwana wrote: > I got told I was obfuscating code for using: > > my $copy = [@$orig]; > > But that was a screwed up work environment towards the end. At a previous employer I was warned against using "map" on the grounds that junior developers couldn't be expected to understand it. Thankfully I (successfully) argued that we had to expect at least some minimal level of competence and that since we already had a mentoring program in place, anyone who didn't understand map and couldn't figure it out was welcome to ask me. Andrew From toby.corkindale at strategicdata.com.au Sun May 27 19:31:25 2012 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Mon, 28 May 2012 12:31:25 +1000 Subject: [Melbourne-pm] Perl Foundation hacked? Message-ID: <4FC2E37D.8090700@strategicdata.com.au> While attempting to visit the perlfoundation.org website, Google Chrome told me they're a known malware site, viz: Of the 177 pages we tested on the site over the past 90 days, 21 page(s) resulted in malicious software being downloaded and installed without user consent. The last time Google visited this site was on 2012-05-27, and the last time suspicious content was found on this site was on 2012-05-27. Malicious software includes 262 scripting exploit(s). From tim.w.connors at gmail.com Sun May 27 19:50:12 2012 From: tim.w.connors at gmail.com (Tim Connors) Date: Mon, 28 May 2012 12:50:12 +1000 (EST) Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: <4FBF2446.5080308@sericyb.com.au> References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> <20120525034200.GE27437@opal.nipl.net> <4FBF00BD.5010108@sericyb.com.au> <20120525061522.GE10110@launde.brong.net> <4FBF2446.5080308@sericyb.com.au> Message-ID: On Fri, 25 May 2012, Andrew Pam wrote: > On 25/05/12 16:15, Bron Gondwana wrote: > > I got told I was obfuscating code for using: > > > > my $copy = [@$orig]; > > > > But that was a screwed up work environment towards the end. > > At a previous employer I was warned against using "map" on the grounds > that junior developers couldn't be expected to understand it. ie, the boss didn't understand it. Strewth. -- Tim Connors From andrew at sericyb.com.au Sun May 27 19:51:58 2012 From: andrew at sericyb.com.au (Andrew Pam) Date: Mon, 28 May 2012 12:51:58 +1000 Subject: [Melbourne-pm] perlsecret - Perl secret operators and constants In-Reply-To: References: <4FBDBC89.3020302@sericyb.com.au> <20120525034144.GD27437@opal.nipl.net> <20120525034200.GE27437@opal.nipl.net> <4FBF00BD.5010108@sericyb.com.au> <20120525061522.GE10110@launde.brong.net> <4FBF2446.5080308@sericyb.com.au> Message-ID: <4FC2E84E.2060308@sericyb.com.au> On 28/05/12 12:50, Tim Connors wrote: >> At a previous employer I was warned against using "map" on the grounds >> that junior developers couldn't be expected to understand it. > > ie, the boss didn't understand it. Strewth. Actually the boss was the developer team lead. He understood it just fine, but had a low opinion of the quality of staff we were hiring. :) Andrew