Mason
I'm looking for a decent book to help get me up to speed with Mason but could only find Embedding Perl in HTML with Mason on Amazon - a paper edition from 2002 and a more recent 2010 edition on Kindle only. I'm a bit old fashioned and prefer to have a paper copy that I can scrawl all over - so does anyone know if/when the new edition is expected in paperback and is it worth buying? (BTW I'm just assuming the 2002 edition is *way* out of date - but correct me if I'm wrong!) Chris
Re: Beware: NET-A-PORTER
On 9 Dec 2011, at 13:10, James Laver wrote: On 9 Dec 2011, at 12:51, Jones, Christopher c.jo...@ucl.ac.uk wrote: And anyway if NAP don't like this being made public, they should get their shit together and call the disgruntled parties to explain themselves. Alternatively, they equally have to accept that Shit happens. Deal with it. You've never dealt with a vulturous recruiter, have you? Well spotted Sherlock! But soon I might have to. Which is why I'm finding this discussion so interesting. Chris
Re: Buffy tapes
On 22 Jun 2011, at 17:02, Raphael Mankin wrote: I have a collection of about 40 Buffy video tapes to dispose of. If any one would like them please contact me offlist. Collect from NW4 (Hendon). What's a 'video tape'? Chris
Re: Cool/useful short examples of Perl?
On 31 May 2011, at 15:18, Paul Makepeace wrote: On Tue, May 31, 2011 at 15:02, David Cantrell da...@cantrell.org.uk wrote: On Mon, May 30, 2011 at 04:27:30PM +0100, Denny wrote: On Mon, 2011-05-30 at 15:36 +0100, David Precious wrote: if (! Email::Valid-address($email_address) ) { Something wrong with 'unless'? Yes. Most of the time you'll either have an 'else' or want to add it later, and unless ... else is Just Wrong. That's the main problem with unless - once you've written your conditional that way, it's impossible to change it. P I see that as a feature, not a problem. Chris
Re: iPhone Barcode Readers
On 1 Mar 2011, at 11:11, David Cantrell wrote: On Tue, Mar 01, 2011 at 11:05:41AM +, Christopher Jones wrote: I'm fascinated to know how you could use an iPhone to scan a barcode - can someone explain? It has a camera. Of course it has Now I feel more dumb than usual.
Re: Server side chart/graph library?
On 6 Jan 2011, at 12:02, Roger Burton West wrote: On Thu, Jan 06, 2011 at 11:54:39AM +, J??r??me Et??v?? wrote: I've got experience with gd but I remember struggling with unicode and antialiasing and there's been no new version since 2007. I'm wondering if anything more modern is around. Imager does many of the same things as GD but more niftily. R I used to quite like GD - but now I've just read the Imager::Cookbook. Chris.
PerlMagick
I've tried installing PerlMagick on a MacBook (v10.6.4), but the make dies. I've posted a message on the ImageMagick forum, but alas no response. A lot of Googling only turns up the usual problems of not having installed ImageMagick properly in the first place, but that doesn't seem to be the problem here (at least as far as I can tell). Has anyone on London.pm had success installing PerlMagick on a Mac? Cheers, Chris.
Re: PerlMagick
On 28 Oct 2010, at 12:54, Dave Hodgkinson wrote: On 28 Oct 2010, at 12:03, Christopher Jones wrote: I've tried installing PerlMagick on a MacBook (v10.6.4), but the make dies. I've posted a message on the ImageMagick forum, but alas no response. A lot of Googling only turns up the usual problems of not having installed ImageMagick properly in the first place, but that doesn't seem to be the problem here (at least as far as I can tell). Has anyone on London.pm had success installing PerlMagick on a Mac? Not helpful. I was trying to be helpful by not going into too much detail saving time if no one else has bothered trying to install it on a Mac! What error are you getting? .after lots of compiler warnings lipo: can't open input file: /var/folders/EN/ENoEDFrH2P8yFk+BYmhN5TI/-Tmp-//ccqHPWqs.out (No such file or directory) make: *** [Magick.o] Error 1 I know nothing of makefiles, so can't even begin to work out what the missing directory should be, or why its missing. I modified the following lines of Makefile.PL to point to various libraries as suggested in the ReadMe, but presumably messed up somewhere; my $INC_magick = '-I../ -I.. -I/usr/X11/include/cairo -I/usr/X11/include/pixman-1 -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng12 -I/usr/X11/include/freetype2 -I/usr/include/libxml2 -I' . $Config{'usrinc'} . '/ImageMagick'; my $LIBS_magick = '-L/usr/local/lib -lMagickCore -L/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -lm'; my $LDFLAGS_magick = -L/usr/local/lib -lMagickCore $Config{'ldflags'} ; my $LDDLFLAGS_magick = -L/usr/local/lib -lMagickCore $Config{'lddlflags'} ; Maybe the mistake is obvious to the trained eye? Chris
Re: PerlMagick
On 28 Oct 2010, at 13:42, David Cantrell wrote: On Thu, Oct 28, 2010 at 01:10:50PM +0100, Andy Armstrong wrote: On 28 Oct 2010, at 12:03, Christopher Jones wrote: Has anyone on London.pm had success installing PerlMagick on a Mac? Yeah - it's painful. I usually resort to installing ImageMagick from source. ... and then interacting with it through the imagemagick programs' command lines, not through PerlMagick. I have several thousand scan images that contain a barcode, and I'd like to extract the barcode from each one - and after a bit of digging around I figured PerlMagick might be the solution. I'm sure there's more than one way of skinning this cat, but if I *could* install PerlMagick, it would be helpful! Chris
Re: PerlMagick
On 28 Oct 2010, at 14:59, Andy Armstrong wrote: On 28 Oct 2010, at 13:42, David Cantrell wrote: On Thu, Oct 28, 2010 at 01:10:50PM +0100, Andy Armstrong wrote: On 28 Oct 2010, at 12:03, Christopher Jones wrote: Has anyone on London.pm had success installing PerlMagick on a Mac? Yeah - it's painful. I usually resort to installing ImageMagick from source. ... and then interacting with it through the imagemagick programs' command lines, not through PerlMagick. No - installing it from source installs PerlMagick too :) Not on my Mac it didn't. Chris
Re: PerlMagick
On 28 Oct 2010, at 15:36, Andy Armstrong wrote: On 28 Oct 2010, at 15:23, Christopher Jones wrote: No - installing it from source installs PerlMagick too :) Not on my Mac it didn't. Well - going out on a limb here - perhaps you installed it differently from how I did? :) $ cat config.sh #!/bin/bash plib=$(perl -MConfig -MData::Dumper -e '@c=(split =, $Config{shrpenv}, 2); print $c[-1]') echo Perl lib: $plib LDFLAGS=-L/alt/local/lib -L$plib ./configure \ --prefix=/alt/local \ --with-perl (I keep a non-system Perl installed below /alt/local) Of course I did it differently! Which explains a lot. I'm now piecing together what I DID do... I clearly built ImageMagick --without-perl, because (as I've just found from a few posts on the interweb) it simply doesn't compile with the system level Perl, and I don't have a non-system Perl installed. It was a week ago, and I didn't keep notes. Chris
Re: Stand up comedy
On 11 Jun 2010, at 15:25, Nicholas Clark wrote: During the beer track at the German Perl Workshop, I was asked what's a good place to go to in London for an evening of stand up comedy? and I had no clue. I said I hoped that someone on the list would. Will I be disappointed? Jongleurs in Covent Garden, Hammersmith and Notting Hill. Comedy Store close to Piccadily Circus - to name but a few. Chris.
Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010
On 27 Mar 2010, at 18:16, Dave Cross d...@dave.org.uk wrote: On 03/27/2010 09:10 AM, Luis Motta Campos wrote: Dave Cross wrote: On 03/27/2010 08:13 AM, Uri Guttman wrote: and paul and i share the same birthday. not sure what that means. I expect you'll find it's a coincidence :-) As a mathematician I must say coincidences have really low probability of happening... Given the number of people who have birthdays and the relatively small number of days available to have them on - you might want to recheck your working there :) According to someone cleverer than me, you need a group of only 57 people to have a 99% chance that two of them will share a birthday This odd result of probability is called the Birthday Paradox; http://en.m.wikipedia.org/wiki/Birthday_problem?wasRedirected=true Chris
Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010
On 24 Mar 2010, at 21:36, Damian Conway wrote: In this particular case, because James and Paul asked most politely, and because I certainly don't want James to feel eviserated, and because so many individuals from London.pm have been so very generous in supporting me over so many years, and because NO-ONE IS *EVER* GOING TO UPLOAD THE RECORDING TO YOUTUBE OR VIMEO OR ANY OTHER PUBLIC REPOSITORY Not on YouTube? Dang I'd better try and make this tech meet then! Chris
Re: Nice traffic RSS feed
On 5 Mar 2010, at 10:38, Jason Clifford wrote: On Fri, 2010-03-05 at 10:15 +, Michael Lush wrote: I've been writing a little traffic warning script for my nslu2 (nothing special it plays traffic jam noises if there is a problem on the road to work:-) Anyway I started out scraping the BBC traffic page, however I had cause to look for a better source and came across this rss feed from the Highways agency on this page (http://www.highways.gov.uk/traffic/11253.aspx) http://www.highways.gov.uk/rssfeed/rss.xml Thought someone else may find it useful (I like it, it even has the lat/lon of the incident so I can limit the search to bits of the A14 I actually use) Thanks. That looks very useful although it's a shame it only includes unplanned events so most causes of serious traffic problems (roadworks) wont be covered by it. The regional feeds cover both planned and unplanned events; http://www.highways.gov.uk/traffic/11278.aspx Chris.
object oriented databases
A while ago someone posted a link about the Objectivity object- oriented database - does whoever sent that (or anyone else) have any experience (good or bad) of Objectivity they could share with me? Chris.
Re: Cheap perl e-books
On 26 Aug 2009, at 09:39, Nicholas Clark wrote: On Wed, Aug 26, 2009 at 12:05:49AM +0100, Andrew Smith wrote: Don't assume that anyone in particular isn't subscribed to this list already. Last I knew there were about 600 subscribers, in zones 1 to Inf. (Although probably no longer anyone Antarctica) The British Antarctic Survey is based in Cambridge, so they might be on the cam.pm list. Chris
Re: Straight Jackets and Video Cameras
On 30 Jul 2009, at 14:34, Joel Bernstein wrote: On 30 Jul 2009, at 14:23, Peter Corlett wrote: On Thu, Jul 30, 2009 at 01:59:47PM +0100, Denny wrote: [...] Sign: YOU CAN EARN $$$ WITH PERL!! JAPH: *places sticker reading 'WRITE' over 'EARN'* JAPH: *writes underneath* ...and it will compile and run. Well, that's the first one that's actually amusing enough to make me grin. I think what's particularly nice here is that it doesn't seem to be a joke at another group's expense. This script would be harder than some of the others to construe negatively. As Perl programmers we ought to know from personal experience the negative impacts of (being seen as) spreading FUD. It's essential, I feel, that the output of this nice marketing idea gives a mature impression to people who see the videos. So, the complete opposite of the original Mac/PC ads then Chris
Re: Straight Jackets and Video Cameras
On 29 Jul 2009, at 15:32, Ovid wrote: Would anyone be interested in working with me on this project, or perhaps make it a Sponsored by London.pm thing? I already have ideas for small sample scripts for a number of languages (one has a Java programmer in a straight jacket bragging about how he's never poked himself in the eye). Volunteer actors would be welcome, too. Are you seriously asking London Perl M[[ou]]ngers to pretend to be Java programmers? And to volunteer??? Chris.
Re: Big Geek Day Out: Bletchley Park 18th July
On 15 Jun 2009, at 12:50, A Smith wrote: For any steam train enthusiasts, the Nene Valley railway is nearby. -- Andrew in Edinburgh Maybe if you live in Edinburgh it might *seem* nearby.. but its actually about 60 miles and 90 minutes from Bletchley. But well worth another Big Geek Day Out, as they've got the original Thomas the Tank Engine there. By coincidence, 19th July (i.e. the day after the Geeks hit Bletchley) is Thomas's Big Adventure for 2009 - the only day of the year the Fat Controller lets him pull a train the whole length of the Nene Valley line. Chris.
Re: Today's MySQL Suckage
On 23 Jan 2009, at 10:04, Leo Lapworth wrote: 2009/1/23 Andy Wardley a...@wardley.org I have a file which defines a MySQL database schema. It looks a bit like this: /* This table defines users of the system who are Buffy fans. */ CREATE TABLE buffy_fans ( ..etc... ); I feed it in thusly: $ mysql my_db_schema.sql Does: $ cat my_db_schema.sql | mysql Work any better? Or from within MySQL, use the source command; mysql source 'my_db_schema.sql' Chris.
Re: DBI, BLOBS, MySQL
On 8 Jan 2009, at 23:20, Paul Makepeace wrote: Below is ad-hoc commentary... I did say the code was something similar to this - the code snippets weren't copied verbatim, since that would have been overkill for the question I was asking. So for instance, there were variables in the original statement that needed interpolating, and there were actually some other fields in the table that I removed to make it easier for you to read (I just didn't match the number of placeholders). It would be very rude of me to say stop being picky and answer the question!, since if I really had made those mistakes then I would be very grateful for the help.. (although that kind of response seems pretty common on this forum!). So instead - thanks for being so thoughtful for providing those very useful comments (even if they were the overkill to the question that I was trying to avoid by editing the code for you in the first place!) Cheers, Chris. -- Gynaecological Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone; 020 3108 2007 Fax; 020 3108 2010
Re: DBI, BLOBS, MySQL
On 8 Jan 2009, at 23:11, Peter Corlett wrote: On 8 Jan 2009, at 23:02, Christopher Jones wrote: I'm having issues inserting files into a BLOB field in MySQL, using something similar to this; [...] The problem is that files bigger than 64K are being truncated on their insert into the database (i.e. the maximum BLOB length in the database is 64K). The global max_allowed_packet variable is set to 16776192, so that doesn't seem to be the culprit, and I don't know of any other limitations in MySQL that would limit the size of the insert. That's correct. BLOBs are binary TEXT fields, and both have a limit of 64kB. You want a MEDIUMBLOB or LONGBLOB instead, which have 16MB and 4TB limits respectively. (Ah, the rusty razor blade that is MySQL claims another victim.) On 8 Jan 2009, at 23:20, Paul Makepeace wrote: What does 'show table files;' give you? You might have the wrong type of blob/text. http://dev.mysql.com/doc/refman/5.0/en/blob.html A cursory glance at the MySQL documentation does indeed point this out. And to think that I even considered it was possible that this could be a Perl/DBI/coding problem, when the sheer weight of previous circumstantial and incriminating evidence was enough to condemn MySQL from the start. Thanks for your prompt, helpful and annoyingly accurate responses. Chris. Damn these electric sex pants
Re: Introduction to Perl for non-programming Mac folk
On 23 Dec 2008, at 12:25, Paul Makepeace wrote: On Tue, Dec 23, 2008 at 12:16 PM, Peter Corlett ab...@cabal.org.uk wrote: On Mon, Dec 22, 2008 at 01:32:20PM +, Andy Wardley wrote: [...] * Knowing where to look for documentation and how to read it. Anything I've missed? A big lump of clue-by-four to reiterate that last point, applied repeatedly until it registers, or until they stop pestering you to give the answers on a plate. Spoonfeeding people at the beginning is a very powerful teaching technique, primarily as it builds confidence and familiarity. The volume of information required at the beginning of learning a subject can be totally overwhelming, and oral transmission of that knowledge is for many people orders of magnitude more effective than reading docs. Besides, getting the response RTFM! is a total turn-off, even for a seasoned pro. And more to the point, RTFM is just plain rude. Chris --- Gynaecological Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone; 020 3108 2007 Fax; 020 3108 2010
Re: Introduction to Perl for non-programming Mac folk
On 23 Dec 2008, at 13:36, Ovid wrote: - Original Message Besides, getting the response RTFM! is a total turn-off, even for a seasoned pro. And more to the point, RTFM is just plain rude. As has been pointed out by wiser people than me (that would be most, I expect), all you need to do to avoid RTFM is to mock the language and claim it's so stupid that it can't do X and the RTFM jerks will condescendingly prove you're wrong by replying with only a few lines of code. What a cunning ruse! I only hope they haven't read that message, and will continue to respond to such provocation. Chris. --- Gynaecological Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone; 020 3108 2007 Fax; 020 3108 2010
Re: London.pm Dim sum Thursday 1pm: HK Diner
On 16 Dec 2008, at 07:59, Léon Brocard wrote: We've been out a bit west recently, so it's time to head back into Chinatown and try a restaurant I've been meaning to visit. Well, it is a special occasion after all Could Dim sum be turned into a 21st Birthday Party? Chris. --- Gynaecological Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone; 020 3108 2007 Fax; 020 3108 2010
Re: London.pm Dim sum Thursday 1pm: HK Diner
On 17 Dec 2008, at 22:31, the hatter wrote: On Wed, 17 Dec 2008, Christopher Jones wrote: Well, it is a special occasion after all Could Dim sum be turned into a 21st Birthday Party? Depends - are you bringing cake and jelly+ice cream ? Otherwise it's not a real birthday party. We had jelly at the first Dim sum I came along to. And I'm sure the Chinese invented ice cream. Or was that fireworks? Whatever, I don't think we'll need to bring our own. Chris. --- Gynaecological Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone; 020 3108 2007 Fax; 020 3108 2010
Re: testing
On 3 Nov 2008, at 14:31, Andy Armstrong wrote: Your main problem is that the @ISA assignment in my_test_mod isn't executed until after you attempt to instantiate my_test_mod. Thanks for pointing that out! Chris Gynaecological Cancer Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone: 020 3108 2007
testing
Should you be able to create and call methods from a package in a test script? i.e Should something like this work? (i.e.i.e. it doesn't seem to for me right now). #!/usr/bin/perl -w use strict; use Test::More tests = 2; BEGIN { use_ok('My::Module');# contains a package called 'my_mod' }; test 'object init' = sub { ok(my $object = my_test_mod-new(),'init'); }; { package my_test_mod; our @ISA = qw( my_mod ); } Chris Gynaecological Cancer Research Laboratories, UCL EGA Institute for Women's Health, University College London, Paul O'Gorman Building, 72 Huntley Street, London WC1E 6DD United Kingdom Telephone: 020 3108 2007
Re: testing
On 3 Nov 2008, at 13:57, Jonathan Stowe wrote: 2008/11/3 Christopher Jones [EMAIL PROTECTED]: Should you be able to create and call methods from a package in a test script? i.e Should something like this work? (i.e.i.e. it doesn't seem to for me right now). #!/usr/bin/perl -w use strict; use Test::More tests = 2; BEGIN { use_ok('My::Module');# contains a package called 'my_mod' }; test 'object init' = sub { ok(my $object = my_test_mod-new(),'init'); }; { package my_test_mod; our @ISA = qw( my_mod ); } It is highly un-recommended to have have a module file which contains a differently named package. That is to say your $LIB/My/Module.pm should contain the package My::Module. Forgive me for my ignorance I learnt all my ooPerl from Learning Perl Objects, References and Modules, followed by browsing through Object Oriented Perl by Damian Conway, and have no idea which (if either) is considered a good introduction. But assuming Randal and Tom know something about ooPerl, they have no problem with a module $LIB/ My/Module.pm like this; package My::Module; { package my_mod; sub new { # etc } } { package my_other_mod; our @ISA = qw( my_mod ); sub foo { # more etc } } 1; Which is the kind of structure I was referring to in the test script example. Chris.