Re: Barbie and Perl
Amusing rewrite: http://caseyfiesler.com/2014/11/18/barbie-remixed-i-really-can-be-a-computer-engineer/ On Wednesday, November 19, 2014, Guinevere Nell guinevere.n...@gmail.com wrote: Hi London.pm (ers) Having just got a reminder from perl's Barbie about LPW, it occured to me that I could share not-perl's Barbie's atrocious book about what it means for a girl to think about going into computery stuff ~ a girl computer engineer ?? ... Don't worry, she'll let the boys do all the hard stuff... Since I know the perl community would like to welcome the femalier sex into its folds (let's not imagine folds of fat, please), I thought you all might be interested: http://gizmodo.com/barbie-f-cks-it-up-again-1660326671 What an amazing role model for girls, huh? Cheers, Guinevere p.s. please feel free to share with the rest of the perl community and brainstorm about possible open-source / public domain solutions to this rubbish ... -- http://economicliberty.net/
Re: Getting the latest related record from a SQL DB
Why not include a sub-select like, ... where album.published = (select max(album.published) from album join artist on album.artist_id = artist.id) ... Paul On Thu, Oct 9, 2014 at 5:28 AM, Andrew Beverley a...@andybev.com wrote: Hi guys, I'm after some best-practice advice regarding SQL database design. I have a table (say artist, couldn't resist...) that has a one-to-many relationship to another table (say album). The album table has a field which references the artist table's ID. So one artist can have many albums. So, if I want to know all of an artist's albums, that's easy. But what if I want to fetch an artist's details and his latest album? I can select the artist from the artists table and then join the albums table. But to get the latest album I'd have to use a max function (say on the album's date), with which it isn't possible to get the related fields in the same row. I see 2 ways of solving this: - Run multiple queries to get the relevant album's ID (if even possible) and then retrieve its row in entirety. - Have a reference from the artist table back to the album table, specifying which is the latest album, which I update each time the albums table is updated. Neither seem particularly tidy to me, so am I missing something completely obvious? Thanks, Andy
Re: Regex to match odd numbers
$thread-resurrect(); On Tue, May 27, 2014 at 12:37 PM, Mark Fowler m...@twoshortplanks.com wrote: On Tuesday, May 27, 2014, Sam Kington s...@illuminated.co.uk wrote: Sounds like you want something like / ( ^ 5[.] ( [79] | \d+ [13579] ) ) /x This is where I mention that \d matches characters other than [0-9] unless you have the /a flag in effect (thanks Unicode!) Does anyone have any concrete examples where the locale affecting meaning/matching of \d causes real problems? I'm assuming the worst case is it matches too much, e.g. picks up spurious Chinese numerals, which seems like a wildly improbable edge case for most datasets+patterns. Presumably there isn't a situation where \d _doesn't_ match [0-9] at least? In other words [0-9] is a subset of \d for all locales. $ export LC_CTYPE=zh_CN.utf-8 $ perl -Mlocale -Mutf8 -le 'print 一 =~ /\d/' # 1 Doesn't print 1 - why? $ export LC_CTYPE=zh_CN.utf-8 $ perl -Mlocale -Mutf8 -le 'print 三 =~ /[一-六]/' # 3 in 1-6? Yes 1 $ export LC_CTYPE=en_US.utf-8 $ perl -Mlocale -Mutf8 -le 'print 三 =~ /[一-六]/' 1 Why is it still 1? OS X with Perl 5.16.2 Paul
Re: Deploying perl code
On Mon, Jul 28, 2014 at 07:51:12PM +0100, Robert Rothenberg wrote: On Thu, Jul 24, 2014 at 4:25 PM, David Cantrell da...@cantrell.org.uk wrote: I'm looking for tools that will make it easy to go from a bunch of code in a release branch on github to an updated bunch of servers, with minimal downtime. If it matters we're using Debian. At $previous, we deployed (mainly bespoke) Catalyst apps using the following toolchain at a small shop: If I were designing an environment from scratch I would take a serious look at docker. I've been using it recently for cpancover.com and, whilst it still has some rough edges, I really like the concept of compartmentalising functionality. It's probably not the whole solution (and in this case in particular it may not be any part of the solution) but I predict a strong future for docker. (Ha! What do I know?) -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: Deploying perl code
On Thu, Jul 24, 2014 at 2:47 PM, Schmoo schmoos...@gmail.com wrote: On 24 July 2014 22:31, Paul Makepeace pa...@paulm.com wrote: On Thu, Jul 24, 2014 at 2:06 PM, James Laver james.la...@gmail.com wrote: Then I’ll double down on my capistrano/tak recommendation. capistrano is a (the?) winner for sure. Why do these new fangled things all have such off-putting names? I'm sure the Italians have a similar opinion of Huddersfield.
Re: YAPC::EU travel plans
On Tue, 22 Jul 2014 06:31:57 +0100 Dave Cross d...@dave.org.uk wrote: You know that the same flight number flies on different days? :-) Huh. I always thought that a flight number always mapped to a given day of the week as well? But perhaps not... -- Paul LeoNerd Evans leon...@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS signature.asc Description: PGP signature
YAPC::EU travel plans
Anyone hereabouts going to YAPC::EU? I've had my arm twisted into giving a talk, so I think I should attend ;) I've not been before, and honestly the concept of travelling that far into a non-natively-English place feels a little apprehensive. I'd appreciate travelling in a group who knows the route/place a little better... -- Paul LeoNerd Evans leon...@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS signature.asc Description: PGP signature
Re: YAPC::EU travel plans
On Mon, 21 Jul 2014 10:56:29 +0100 Gianni Ceccarelli dak...@thenautilus.net wrote: Obligatory link: http://act.yapc.eu/ye2014/wiki?node=Arrivals both for you and for anyone else looking to share the flights. Righty; plane booked and wiki edited. Gianni: It seems coincidentally I'm on the same flights as you; BA0890 + BA0819 but you've entered it in Wednesday on the Arrivals, and myself and Léon have put Thursday - you might want to double-check yours. -- Paul LeoNerd Evans leon...@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS signature.asc Description: PGP signature
Re: Evaluating user-defined conditions
On Mon, 9 Jun 2014 13:10:35 +0100 James Laver james.la...@gmail.com wrote: In short, if you trust the input, just eval() it, and if you don’t, you want a parser. You might consider transforming it automatically into postfix notation and building a really simple stack machine if you just want basic arithmetic and placeholders. Otherwise, I can recommend Parse::RecDescent. Parser::MGC will also let you build quite a simple expression evaluator. For example, see this one that just does +-*/ on integers: https://metacpan.org/source/PEVANS/Parser-MGC-0.12/examples/eval-expr.pl -- Paul LeoNerd Evans leon...@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS signature.asc Description: PGP signature
Re: Finding the intersection between two regexes
On Tue, Apr 22, 2014 at 4:16 AM, David Cantrell da...@cantrell.org.uk wrote: On Sun, Apr 20, 2014 at 10:14:48PM -0400, Mark Fowler wrote: On Sunday, April 20, 2014, David Cantrell da...@cantrell.org.uk wrote: Can anyone point me at some code on the CPAN that, given two regexes, can figure out whether there are any bits of text that will be matched by both? I'm not sure I understand the question here, or moreover why you want to do this..is it just an intellectual exercise? I do actually have a use for it, which would help to explain the question. A large part of Number::Phone is based on data in google's libphonenumber project. That has, for most countries, regular expressions that match valid fixed lines and valid mobiles. For some countries those two regexes can both match some of the same numbers. Here's the data: http://goo.gl/hTBAhZ If you look at the data for Barbados, they have for fixed lines: 246[2-9]\d{6} and for mobiles: 246(?:(?:2[346]|45|82)\d|25[0-4])\d{4} I'd go out on a limb and say that the complete list of overlapping situations all share a /^prefix/ like this. (This doesn't necessarily help you since you'd have to exhaustively falsify it but if you're going for the quick win I bet just looking for prefixes gets you most/all of the way.) then some strings will match both expressions - 246230, for example. But if you look at the data for Jamaica there are no strings that match both regexes. At the moment I detect these overlaps (and then throw the regexes away as being unfit for my purpose) by just going through each country's number space. This is practical for NANP countries as I can do it all with only about a million comparisons in the worst possible case. It would be impractical to apply this to the whole world though. If your goal is to simply identify overlaps rather than generate encompassing regexes, you could try attacking it with intelligently/heuristically generated random numbers. Paul -- David Cantrell | Bourgeois reactionary pig
Re: XP-Replacement for Parents
On Fri, Mar 28, 2014 at 2:55 AM, david da...@chromiq.org wrote: Thread drifting for a moment, do folks have any recommendations for where to buy reasonably priced, legal Win 7 licenses ? I really should upgrade my compatability platform... The trick is to go for the OEM license. This is cheaper because you're opting not to hassle MS for support. http://www.newegg.com/Product/Product.aspx?Item=N82E16832116986 Paul
Re: XP-Replacement for Parents
On Thu, Mar 27, 2014 at 11:48:57AM +, Smylers wrote: • Newer Windows: Would the latest Windows run on her hardware? Even if it did, would it run her several-years-old version of WordPerfect? Or would a newer-than-XP-but-not-the-most-recent version of Windows be better? In which case, is it still possible to buy such a version? And how long till the same question crops up again with that? Another question to consider is whether the scanner would work with a newer version of Windows. I have a perfectly good HP Scanjet 5370C for which there are no drivers available after XP. (I believe there is a commercial program which work on Windows 7.) It works fine with Ubuntu though. So do check that if you are considering a Windows upgrade. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: [ANNOUNCE] London.pm Dim Sum, Wednesday 3rd March, Docklands
On Mon, 3 Mar 2014 21:45:53 + Tom Hukins t...@eborcom.com wrote: Subject: [ANNOUNCE] London.pm Dim Sum, Wednesday 3rd March, Docklands Shome mishtake shurely? Perhaps you mean Wednesday 5th? -- Paul LeoNerd Evans leon...@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/ signature.asc Description: PGP signature
Re: tablets for parents
On Sun, Mar 2, 2014 at 1:37 PM, Martin A. Brooks mar...@antibodymx.net wrote: I don't think I would recommend trying to videoconference over a 3G connection. Not as anything other than a one-off emergency thing, anyway. Works fine in my experience in the US, which on balance has a shittier phone network than any other first world country I've visited. YMMV etc Paul
Re: sub signatures coming
On Feb 25, 2014 7:16 AM, James Laver james.la...@gmail.com wrote: On 25 Feb 2014, at 11:31, Matt Lawrence matt.lawre...@virgin.net wrote: On 25/02/14 11:18, James Laver wrote: But I probably already have List::MoreUtils imported (because Perl). sub pairwise_sum ($a1, $a2) { zip @$a1, @$a2; } And lets ignore the fact that the perl version that was used in the article was buggy. If $arg2 is shorter than $arg1 it breaks. zip's supposed defined behaviour is to stop when either list runs out of elements. Whereas this one is buggy because it doesn't actually do what it says on the tin. Where's the summation? Matt Ah yes. I'd just woken up. sub pairwise_sum($a2,$a2) { map {shift($_)+shift($_)} (zip @$a1, @$a2); } You aren't making a good case for perl here :) James
Re: sub signatures coming
On Mon, Feb 24, 2014 at 2:04 PM, Steve Mynott steve.myn...@gmail.com wrote: http://perltricks.com/article/72/2014/2/24/Perl-levels-up-with-native-subroutine-signatures Finally. But don't believe the python/perl comparison troll, as python, for once, actually outguns perl on a character chomping basis, sub pairwise_sum ($arg1, $arg2) { return map { $arg1-[$_] + $arg2-[$_] } 0 .. $#$arg1; } def pairwise_sum(list1, list2): return [i + j for i, j in zip(list1, list2)] Paul
RE: smutty british expression?
Ford slapped a five-pound note on the bar. He said, Keep the change. What, from a fiver? Thank you sir. In the film they used a £50 note. Of course in the real world anyone paying for beer with a £50 note, especially saying keep the change, would quickly be assumed to be passing on fake notes. - http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -
Re: Main general Perl mailing list
On Wed, Feb 12, 2014 at 9:17 AM, Dave Hodgkinson daveh...@gmail.com wrote: ...or the IRC channels for the thing you're having problems with. Some people, when confronted with a problem, think I know, I'll ask on IRC. Now they have two problems. :)
Re: Perl 6 what can you do today
On Fri, 7 Feb 2014 14:18:59 + Tom Hukins t...@eborcom.com wrote: so there's lots of interesting things to catch up on for those of us who didn't make it to Brussels. Or who made it /to/ Brussels but then got so ill Friday night they couldn't attend the conference on Saturday... . . -- Paul LeoNerd Evans leon...@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/ signature.asc Description: PGP signature
FOSDEM trip / accomodation / etc...
So it seems at somewhat last-minute I'm going to FOSDEM to do a Perl talk. Anyone been before? I'm looking for recommendations on travel and where to stay. Currently all the hotels are looking like a 3x markup for that weekend, so I'm considering the possibility of trying to find someone local who I might drop in on, or else consider how early I could travel on Saturday morning, to at least avoid staying Fri-Sat there. Any thoughts? -- Paul LeoNerd Evans leon...@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/ signature.asc Description: PGP signature
Re: Recommended IDE...?
On Sat, Jan 18, 2014 at 8:39 AM, Peter Corlett ab...@cabal.org.uk wrote: On Fri, Jan 17, 2014 at 10:18:14AM -, Andrew wrote: Looking to try using an Integrated Development Environment. Why? What problem are you having that you expect an IDE to solve? He wants to *try* it. The features I find most compelling in IDEs is background parsing to immediately spot syntax errors and be able to auto-complete or otherwise spot typoes or confusion about what type a method returns. However, this only really works with statically-typed compiled languages such as Java. Perl is very much the antithesis of Java and you don't really get these benefits. Yes you do. It's 2014; parsing dynamic languages in IDEs is largely solved. Any difficulty in finding such a thing for Perl is more a reflection of Perl's status as a language in 2014 than any intrinsic technical difficulty. They also provide various hot keys and shortcuts to perform test compiles, VCS integration and whatnot, but that's really only of marginal benefit. Says you. Maybe the OP would like to *try* it and not have someone second guess their own motivations preferences? Maybe they've read something like http://www.jetbrains.com/ruby/features/ and thought wouldn't they like that for perl? These oh but emacs/vi/nano is great! responses are really irrelevant. Paul
Re: Recommended IDE...?
On Fri, Jan 17, 2014 at 8:27 AM, Kent Fredric kentfred...@gmail.com wrote: I'm curious what the definition of Integrated means in this context. Think of it as already integrated :) Sure you could make your editor do stuff like an IDE but the IDE *already does it*. The scripting IDEs from JetBrains do dynamic code parsing and it's good enough to appear to be black magic. The rest of your answer and several others in this thread (not to be combative) is pretty much the I'm Not Familiar With IDEs So I'm Going To Be Dismissive of Them and Rationalize Why They Suck Anti-Pattern. This is an anti-pattern because the OP asked for IDE recommendations not for any existential commentary. Paul
Re: Regex teaser
On Tue, Dec 3, 2013 at 5:03 PM, Mark Fowler m...@twoshortplanks.com wrote: On Tue, Dec 3, 2013 at 6:54 PM, Paul Makepeace pa...@paulm.com wrote: $ perl -le '($a = aabbb) =~ s/b*$/c/g; print $a' This is where tools like Regexp::Debugger shine. Running perl -le 'use Regexp::Debugger; ($a = aabbb) =~ s/b*$/c/g; print $a' Shows exactly why it gives the output it does (if you hit n for next a lot) Can't use an undefined value as an ARRAY reference at /Library/Perl/5.16/Regexp/Debugger.pm line 499. Glad we're not the only ones confused by it ;-) But yeah that's neat. I don't agree it shows WHY as much as HOW. The puzzle comes down to whether the $ is part of the first b* capture. IMO it is (and python seems to agree). Why the engine restarts having captured as much as it can to the very end strikes me as counter intuitive. Almost, if not actually, bug-like. So, Part II: Construct an elegant* regex (in perl!) to ensure the end of the string contains string: is(fqdn('foo'), 'foo.example.com') is(fqdn('foo.example.com'), 'foo.example.com') Paul * I realise this is hilariously open to interpretation but you'll know what I mean either way
Re: I have a bikeshed, colour suggestions appreciated
On Tue, Dec 3, 2013 at 3:21 PM, Kent Fredric kentfred...@gmail.com wrote: I would just like to convey my disappointment that mauve.bikeshed.org renders as blue. Wait 'til you see http://cream.bikeshed.org/ I think we should table a meeting to discuss a revised painting review process going forward. Paul
Re: filesystems for external drivesx
On Fri, Nov 1, 2013 at 6:30 AM, Nicholas Clark n...@ccl4.org wrote: Dear knowledgeable hive mind, 1) I can mount NTFS read/write on Linux. But is there any good way on Linux to correctly copy files from one NTFS file system to another, preserving everything? (specifically Alternate Data Streams, which I see that I have here, when I mount said file system read-only on OS X) 2) Is there any sane choice of file system to use which will mount read/write on both Linux and OS X, and support at least basic POSIX features? (ownership, permissions, hard links) (on Snow Leopard, if it matters) Personally, I'd just drop the $40 and get this, http://www.paragon-software.com/home/extfs-mac/ Or you can go the free route (YMMV), http://osxfuse.github.io Yet another option that's worked for me in the past is running a Linux VM and sharing it over Samba. Not as painful/unreliable as I was expecting. 3) Is there any Linux equivalent to OS X sparse bundles? (And if the answer to that is yes, I guess it mostly doesn't matter, as one just formats the disk as FAT32, and makes images on top of it) http://www.debian-administration.org/articles/664 - worth a shot? Paul
Re: ORMs du jour?
On Tue, Oct 22, 2013 at 12:19 AM, Peter Corlett ab...@cabal.org.uk wrote: Much of the blog post can be basically summed up by the languages I use are too verbose, error-prone and inflexible that an ORM does not win me anything[0]. Which is something I quite agree with. In case anyone was considering actually reading it, this is a pretty inaccurate summary IMO. There's a small section on verbosity but considering Active Record is referenced it's by far not the most pressing concern the author covers by a long way. It's a long article and does capture pretty thoroughly the impedance mismatches and gotchas with trying to bridge OO/RDBMS. One of the best I've read. Even if you're fully committed to ORMs, and there are many, many great reasons and fully justifiable scenarios to go with one in our current environment (prevalence of built-from-scratch, lightweight webapps), knowing the potential pitfalls down the road is important. Paul
RE: Multi argument open and STDERR
Thanks, that did the job very nicely, and exists as a package in ubuntu, which makes it far easier than converting a cpan one. ffmpeg does tend to be very vague with documentation, we actually use a fork called ffmbc, but same principle. ffprobe can do things in a more structured way, but I do like ffmpeg, as if it detects the duration, I know I'll be able to convert it, and the code already ran it so there was no need to do anything further down in the unreadable mess my code tends to land in. From: london.pm-boun...@london.pm.org [london.pm-boun...@london.pm.org] on behalf of Dave Hodgkinson [daveh...@gmail.com] Sent: 03 October 2013 22:34 To: London.pm Perl M[ou]ngers Subject: Re: Multi argument open and STDERR Capture::Tiny just did the job for me today. Screw line noise. Sent from my iPhone On 3 Oct 2013, at 21:26, Paul Weaver paul.wea...@bbc.co.uk wrote: I have a program that needs to run an external program (ffmpeg) I do this by running my $cmd = $FFMPEG -i '$file' 21| open(CMD, $cmd); while (CMD) { #blah } ; close(CMD); This works fine. Until there's a single quote in the filename. Reading the docs, open FILEHANDLE,MODE,EXPR,LIST Should do the trick, and if I do open(CMD, -|, ls, -l, $file); while (CMD) { printTEST: $_\n; } close(CMD); It works fine. The trouble is, ffmpeg outputs the -i information on STDERR, not STDOUT. open(CMD, -|, ffmpeg, -i, $file, 21); while (CMD) { printTEST: $_\n; } close(CMD); Obviously doesn't work, as 21 is a bash redirection. How can I capture STDERR? Thanks - http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. - - http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -
Multi argument open and STDERR
I have a program that needs to run an external program (ffmpeg) I do this by running my $cmd = $FFMPEG -i '$file' 21| open(CMD, $cmd); while (CMD) { #blah } ; close(CMD); This works fine. Until there's a single quote in the filename. Reading the docs, open FILEHANDLE,MODE,EXPR,LIST Should do the trick, and if I do open(CMD, -|, ls, -l, $file); while (CMD) { printTEST: $_\n; } close(CMD); It works fine. The trouble is, ffmpeg outputs the -i information on STDERR, not STDOUT. open(CMD, -|, ffmpeg, -i, $file, 21); while (CMD) { printTEST: $_\n; } close(CMD); Obviously doesn't work, as 21 is a bash redirection. How can I capture STDERR? Thanks - http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -
Re: Perl publishing and attracting new developers
On Thu, Sep 19, 2013 at 2:49 AM, Philippe Bruhat (BooK) philippe.bru...@free.fr wrote: Some of the secret ops are actually awesome, used in production code, and deserve to be better known. From the top of my head: 0+ !! @{[]} ()x!! Seriously. Perl's lack of a string eval interpolation operator (à la Ruby's #{...}) is a real hole in the language. Paul
Re: Perl publishing and attracting new developers
On Thu, Sep 19, 2013 at 4:21 PM, Peter Corlett ab...@cabal.org.uk wrote: If somebody new discovers Perl and uses it, that's great. If they don't, I'm cool with that too. Well if perl doesn't attract new developers, and the existing user base is a diminishing set, perl will eventually run out of developers. But maybe you don't care about that too, and you'll be alone in your shed with your aging perl binary Commodore 64... ;) Paul
Re: Assigning Classes
On Mon, Sep 09, 2013 at 01:30:00PM +, Dave Hodgkinson wrote: Prolog. Facts and rules then go solve. no -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: Assigning Classes
On Mon, Sep 09, 2013 at 03:10:14PM +, Dave Cross wrote: Quoting James Laver james.la...@gmail.com: On Mon, Sep 9, 2013 at 2:57 PM, Paul Johnson p...@pjcj.net wrote: On Mon, Sep 09, 2013 at 01:30:00PM +, Dave Hodgkinson wrote: Prolog. Facts and rules then go solve. no Actually, Prolog was my first thought too. The major limitation is fallback behaviour. I'm pretty sure that Paul wasn't actually dismissing Prolog. I think you'll find he was making a joke. You're far too kind. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: Perl 5.16 vs Ruby 2.0 UTF-8 support
On Thu, Aug 22, 2013 at 8:39 AM, gvim gvi...@gmail.com wrote: The problematic mail file doesn't display any non-ASCII characters when opened in Vim. Here's the Ruby 2.0 error message: How about when you hexdump it?
Re: Perl 5.16 vs Ruby 2.0 UTF-8 support
On Thu, Aug 22, 2013 at 9:15 AM, gvim gvi...@gmail.com wrote: On 22/08/2013 17:05, Paul Makepeace wrote: How about when you hexdump it? I wouldn't know but here's the result of hexdump -C (literal text removed from line end): You're looking for high bits in the characters, as a first pass. High bit is 0x80-0xff, $ perl -lane 'shift @F; print if @F =~ /\b[89a-f]/i' dump 0560 75 67 68 74 20 66 6f 72 20 75 6e 64 65 72 20 a3 Paul
Re: while in London
On Tue, Aug 20, 2013 at 8:34 AM, Diana Donca diana.do...@evozon.com wrote: I'm Diana Donca, member of cluj.pm. I read this quickly and thought that was one of those non-geographic cute .pm's referring to http://en.wikipedia.org/wiki/Kludge but actually it's a place in Romania. Welcome (soon) to London! Paul (himself in Cupertino but that doesn't matter)
Re: Using grep on undefined array
On Wed, Aug 14, 2013 at 9:35 AM, Avishalom Shalit avisha...@gmail.com wrote: wait, aren't $a and $b special ? (they magically live for {$a=$b} etc. ) IIRC, they're local'ised within the sort block. You can try it yourself, $ perl -wle 'print a=$a (pre init); $a = 5; @f = sort {print a=$a b=$b (in sort); $a = $b} (2,1); print a=$a (later)' Name main::f used only once: possible typo at -e line 1. Use of uninitialized value $a in concatenation (.) or string at -e line 1. a= (pre init) a=2 b=1 (in sort) a=5 (later) Paul
Re: Using grep on undefined array
On Tue, Aug 13, 2013 at 4:09 PM, Andrew Beverley a...@andybev.com wrote: my $select_fields = $fields ? join(',', map { 'users.' . $_ } @fields) : '*'; my $select_fields = @fields ? join(',', map { 'users.' . $_ } @fields) : '*'; ? Maybe a lesson in variable naming there ;-) Paul
Re: Using grep on undefined array
On Tue, Aug 13, 2013 at 4:09 PM, Andrew Beverley a...@andybev.com wrote: get(); sub get($) (You probably know this but calling get() like that, i.e. before it's declared, is denying perl the chance to enforce the subroutine prototype.)
Re: Assigning anonymous hash to a list
On Wed, Jul 31, 2013 at 10:44:23PM -0300, Hernan Lopes wrote: if you dont understood what i meant, i am not going to explain. I understood, and I'm happy to explain. On 7/31/13, Peter Corlett ab...@cabal.org.uk wrote: On Wed, Jul 31, 2013 at 01:04:11PM -0300, Hernan Lopes top-posted: it should be the same size to do what he wants... otherwise it wont work. This is a special case of it should do what he wants, otherwise it won't work which (granted, outside of IT) is generally considered a truism. PS Of the three commas I wrote in the paragraphs above, one is in scalar context, one is in list context, and one is just a comma. Of the three commas in the previous paragraph, one is Oxford. [ Please imagine that I have added sufficient smileys, emoticons, emoji, pictures of cats and ponies, etc. that your day is no worse for having wasted your time reading this message. ] -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: Assigning anonymous hash to a list
On Wed, Jul 31, 2013 at 10:37 AM, Peter Corlett ab...@cabal.org.uk wrote: On Wed, Jul 31, 2013 at 01:04:11PM -0300, Hernan Lopes top-posted: it should be the same size to do what he wants... otherwise it wont work. Why should? Perl doesn't require the LHS of an array assignment have the same number of elements as the RHS, and there are a number of use cases where you may not want it. Indeed. E.g., my ($arg1, $arg2, $..., @...) = @_; # is covered early on in a perl neophyte's training Paul
Re: Heathrow Pushchair on BA
Indeed. I've done about 55 flights on Ba this year, including 12 with a baby and pushchair. At check in they'll add a baggage tag to your chair, and you just push it though security. At boarding they call you first and you leave the chair by the plane. At most airports you can have it delivered back to the plane on landing. However with a 12 month old we found it easier to leave the chair at check in and carry the scamp in a sling. For check in, I leave things quite late, but then I fly several times a month ad cant afford to waste the time. Leave a little longer for security - especially if you're taking baby liquids, and unexpected nappy changes. Security at heathrow can be a pain, there's no way to predict it. Even so, 1h30 should be fine. But I'd aim to get to heathrow about 2 hours just to be sure as you don't want to be stressing, you dont know the airport, and the tube can always get held up. I believe there's a kiddie play area in t5, somewhere near gate 7 once you get through. I think you get 1 bag each, up to 23kg, plus 1 bag for the baby, plus a pushchair, plus a car seat, plus 1 piece of had luggage each, plus 1 for the baby, plus 1 personal item (handbag, laptop bag etc) each. I'm not sure how a two-piece travel system works as far as how many bags it takes - as a frequent flyer, 2 parents and baby get more bags than we can fit in the car, they used two tags for our chair/wheels combo. We took both through security. If you're on a long haul flight, it will probably go from B or C gates, which invokes a train ride after security. Certainly keep the pushchair with you in that case. By best Ba flight was exiting the taxi at 0955, and sitting down on the plane at 1002 for a 1005 departure. That was at Manchester, and I was very lucky. On 8 Jul 2013, at 16:41, Kieren Diment dim...@gmail.com wrote: A pushchair is handled in essentially the same way as a wheelchair in my experience. You'll probably be able to get it to the aircraft door or steps before stowing it. On 08/07/2013, at 4:21 PM, Smylers wrote: Hello there. We've just booked a flight and have a couple of questions about it, which I was wondering if anybody who's flown from Heathrow terminal 5 or travelled with a pushchair on BA before will be able to help with. How long do we need to allow for getting through terminal 5? We don't want to set our alarms unnecessarily early and have to fill time at the airport, but obviously we don't want to miss our flight either. The booking information says that we need to drop bags off by 45 minutes before departure and have entered security at least 35 minutes before departure. Any guidance for translating this into 'time by which we need our Tube to have arrived at the platform' gratefully received. We'll have bags to drop off, and ideally will be avoiding stairs and escalators. Our other question is about flying with buggies, especially with BA. The flight information says our baby can take one fully collapsible pushchair (stroller) in addition to his checked luggage allowance. Does this mean the pushchair gets handed in with the checked luggage, and we have to carry him through security and the gate without? Also, any idea if fully collapsible means something different from collapsible to BA -- does our buggy have to be particularly small when folded in order to be allowed on at all? Thanks for any advice. Smylers -- Stop drug companies hiding negative research results. Sign the AllTrials petition to get all clinical research results published. Read more: http://www.alltrials.net/blog/the-alltrials-campaign/
Re: Why I give up my talk in YAPC
On Wed, Jul 3, 2013 at 9:46 AM, Mark Fowler m...@twoshortplanks.com wrote: On Wednesday, 3 July 2013 at 11:10, Daniel de Oliveira Mantovani wrote: in #perl at freenode freenode is…well, freenode. Most people on this list would not consider it the 'home' of Perl on irc. irc.perl.org doesn't consider itself 'home' either :) http://www.irc.perl.org/faq.html http://www.irc.perl.org/channels.html Paul We mainly use irc.perl.org (where we have our own #perl) and this Perl monger group even has its own channel #london.pm Hope to see you around. Mark.
Re: New pet keeping rules in the Netherlands
Wow, and I thought Oakland (California) was permissive allowing us, in a large (~1M pop.) city, to keep cows and horses. You need an acre minimum for a horse, but so long as you can demonstrate adequate manure processing capacity, cows are a go. Where is this fabulous discussion happening? Is there any urban precedent for water buffalo, or camels, in .NL? Paul On Wed, Jun 19, 2013 at 12:15 PM, Dirk Koopman d...@tobit.co.uk wrote: It appears that my esteemed government has changed the rules about about which pets one might keep at home. Apart from all the usual suspects, it appears one may keep a water buffalo but, crucially, one will *not* be able to keep a camel. Apparently, camels are dirty, disease ridden animals but water buffaloes (by definition) must be clean and (contagious) disease free. Given the respective O'Reilly colophons (MSCE Core Elective Exams in a Nutshell and er.. the Camel Book) what does this all mean? Dirk
Re: New pet keeping rules in the Netherlands
On Wed, Jun 19, 2013 at 1:25 PM, Dirk Koopman d...@tobit.co.uk wrote: An URL in English: http://www.dutchnews.nl/news/archives/2013/06/new_official_rules_you_can_kee.php The approved list contains animals such as dogs, cats, hamsters, mink and water buffalo. I'm sorry but one of these animals is not like the others... (hint: it's the one that can weigh half a tonne)
Re: Scope of variables in a function
On Sat, Jun 01, 2013 at 07:03:45PM +0200, Marcel Grünauer wrote: On H.25/06/01, at 18:43, Andrew Beverley a...@andybev.com wrote: my $result = FOO if $in =~ /foo/; Conditional variable declaration is confusing. Try: my $result; $result = FOO if $in =~ /foo/; See https://metacpan.org/module/Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations And the official line from perlsyn: NOTE: The behaviour of a my, state, or our modified with a statement modifier conditional or loop construct (for example, my $x if ...) is undefined. The value of the my variable may be undef, any previously assigned value, or possibly anything else. Don't rely on it. Future versions of perl might do something different from the version of perl you try it out on. Here be dragons. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
npm, PyPi overtake CPAN
http://modulecounts.com/ ... with Rubygems screaming ahead since overtaking CPAN a couple of years ago. And the hugeness of Maven Central. I'm sure there's plenty of caveats etc but the gradients is probably what's most interesting here; CPAN is relatively static compared with, well, all the others.
Re: Alternative sources of Perl programmers
On 17.05.2013 06:35, Aaron Trevena wrote: Hi Duncan, On 15 May 2013 22:37, Duncan Garland duncan.garl...@ntlworld.com wrote: I didn't mention the company because I was (and still am) using my personal email and it didn't seem appropriate. Anyway, the company is Motortrak (www.motortrak.com). I visited the site, the jobs page renders really badly in my old brower so I can't read it (FF 3.6). It renders in my browser (Firefox 20.0) but there is no perl job listed, the only tech ones were for PHP and a LAMP DBA. I think Aaron pretty much hit the nail on the head with the rest of his comments.
Re: Alternative sources of Perl programmers
I work in a variety of offices around the world. This year my most frequent office has been Jerusalem, about 12 days there, and a couple more up the road in Ramallah and a bit further in Gaza, but I've been to another 8 or 9 on top of that. I'm almost up to 70,000 miles this year, and on my 51st flight of the year while I write this. When I'm not abroad my commute is down stairs into the study. My effective line manager has an insane schedule. He's in Moscow this week, Delhi next week, Singapore after that then Bangkok. This helps a lot, as my real line manager hasn't got a clue about the stresses of (economy class) travel. I'm hoping to be Europe bound for the next 2 weeks, with just day trips or maybe an single overnight, but Delhi, Joburg, sydney, Jakarta, shanghai, new york, kabul, washington and Singapore all need my attention in the next few months. I'm looking forward to my next long haul day flight as I'll get a change to get my teeth into writing some new code (Perl of course). The lack of distraction from email and phones is really useful, but it makes network development a bit harder, and I get funny looks when I string two laptops together on the plane! On 14 May 2013, at 23:43, Philippe Bruhat (BooK) philippe.bru...@free.fr wrote: On Tue, May 14, 2013 at 03:54:07PM +0100, Aaron Trevena wrote: On 14 May 2013 15:20, Ben Vinnerd b...@vinnerd.com wrote: On 14 May 2013 15:02, Dominic Humphries d...@thermeon.com wrote: 50 miles? Luxury! I have to do sixty! :) Indeed. My previous contract was 223 miles, each way! (I became Travelodge guest of the year during that gig!! lol) 223? Pah! my last contracting gig was 682 miles each way (Threemilestone, Cornwall to Groningen, Netherlands) I sense a contest starting... I've been a full-time employee for 6 years, and the office is (according to Google maps) 932km (579 miles, so I do not win the distance contest) away, in a different country, with no shared borders (yeah, not counting the one in the Pacific). Do I win? And I'm not working from home either, because I can go and sit in a local office (opened last year, full of real (non-dev) people, part of the company network; before that, the company rented one for the two devs working from Lyon), which is about 20 minutes walk from home. Surely there's a badge for I go to the office either by foot or by plane? On the other hand, we've not hired any remote dev since 2009. So I can probably claim the endangered species badge too. ;-) -- Philippe Bruhat (BooK) All life affects us... even that which is far from our gaze. (Moral from Groo The Wanderer #59 (Epic))
Re: Alternative sources of Perl programmers
On Tue, May 14, 2013 at 03:54:07PM +0100, Aaron Trevena wrote: On 14 May 2013 15:20, Ben Vinnerd b...@vinnerd.com wrote: On 14 May 2013 15:02, Dominic Humphries d...@thermeon.com wrote: 50 miles? Luxury! I have to do sixty! :) Indeed. My previous contract was 223 miles, each way! (I became Travelodge guest of the year during that gig!! lol) 223? Pah! my last contracting gig was 682 miles each way (Threemilestone, Cornwall to Groningen, Netherlands) I can just about better that with 707 miles (Zurich to Bristol) a few years ago. But to echo what has been said before, work from home, decent money and mail to jobs.perl.org. Yes, there are caveats, some of which are different to the caveats for onsite hiring, but it's a good solution for some people and for some companies. And I think I'm quite safe in saying for more companies than are currently working that way. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: WWW::Lovefilm::API?
I created the package a while back when I worked at LOVEFiLM so I could understand the API before using internally. As far as I know it still works but they are not giving out access to new devs. On 08.05.2013 16:46, Dave Hodgkinson wrote: Anyone still using this? Assuming you have credentials from before they shut it off.
Re: ISNIC DNS
On Wed, May 8, 2013 at 2:06 AM, Dave Cross d...@dave.org.uk wrote: The IP address 2001:1850:1:0:107:0:0:d of nameserver fns1.dnspark.net is missing its PTR record or has an incorrect PTR record. $ host 2001:1850:1:0:107:0:0:d Host d.0.0.0.0.0.0.0.0.0.0.0.7.0.1.0.0.0.0.0.1.0.0.0.0.5.8.1.1.0.0.2.ip6.arpa not found: 3(NXDOMAIN) Why not just add that PTR (IP - name) and be done with it? Paul
Re: #HNLondon?
On 26.03.2013 13:34, DAVID HODGKINSON wrote: Anyone else going tomorrow? I'm not going this time round but it's usually good fun.
Re: Ungooglable interview questions (was: Re: New perl features?)
On Sat, Mar 16, 2013 at 6:54 PM, Sam Kington s...@illuminated.co.uk wrote: I'm slightly concerned that the specific questions are susceptible to being googled. Does anyone have any good examples of non-googlable interview questions that could be answered (or not) over IRC or a similar medium? The usual standby, asking people to write code during their interview, obviously doesn't work when someone can google, cut and paste. In practice it's probably too hard to copy paste code content for an interview. Even if it weren't it's easy for you as an employer to ask questions about said code to test understanding. Everything from explain the syntax of that declaration to explain your choice of top level algorithm to what other ways could you achieve this small aspect/large aspect/entire thing plus you can always insist they TDD the solution; that happened to me recently for a ruby gig and so I wrote a nano-test framework since I couldn't remember the APIs of anything outside of rspec :D Going further you can start to ask variations like the same program with different inputs, outputs, performance characteristics (running on VM v. metal), different environments (your network is really laggy, how would that affect it? How would you mitigate?), different languages (what programming languages have you used that might be more suited to this why? any that would be awful for it?) I've seen a colleague who had a fake question that had an answer online he'd written to catch people searching for the question, so there's that too ;-) Paul
Re: Perl School 4: Database Programming with Perl and DBIx::Class
On Thu, Feb 7, 2013 at 4:09 AM, Dave Cross d...@dave.org.uk wrote: I think the best programmers don't stick with the language they know. I think they see a new language as largely a case of learning new syntax and enjoy having a number of languages to choose from so they can use the best one for each individual task. I feel this is a well-worn trope but not actually how it works except for possibly very small one-off projects. Learning and being productive in a language is far more than just syntax; in fact that's probably the easiest part since they're largely the same, unless you're learning something radically different. By far the lion's share of the work is the libraries, error messages, documentation, and toolchain. From my own experience, if I'm day-to-day productive at a being-paid-for-it level in say Perl, I tend to swap out a bunch of Python knowledge. Sure, I can swap it in, but as ever there's quite a cost to that. Spending one's day constantly referring to Stack Overflow, Google, CPAN, and perldoc is workable but it's slow. Using say Perl + JavaScript is do-able but it requires IME daily use of both. Conclusion: unless Language X was compellingly amazing at Task A I'd do my best to solve Task A with Language I'm Most Familiar With These Days. Curious how others approach this. Paul
Re: Updating lots of database fields in a single row
On Jan 24, 2013 8:48 AM, Greg McCarroll g...@mccarroll.org.uk wrote: No no no, lets just use any language that our process analyst consultant decides - they can come up with a long winded approach to software development that will ensure the lack of any possible security holes by providing long winded documentation to auditors and by selecting whatever language/toolset was cool about 10 years ago. So we're using Perl still then? :D P G.
Re: cpan you have to see
On Fri, Dec 14, 2012 at 4:23 PM, David Cantrell da...@cantrell.org.uk wrote: $ true echo it was true This makes sense. Think of true as thing that succeeded rather than OMG it's 0 so must be false!!1! Ruby treats everything as true unless it's nil or false (so yes, 0 and '' are true). Bit weird to get used to but all this other nonsense goes away. Paul
Re: Perl outreach
On Mon, Nov 26, 2012 at 10:36 AM, Dirk Koopman d...@tobit.co.uk wrote: It isn't that perl isn't fashionable any more, it is that it is actively being promoted as unfashionable. People will get fired for buying perl. Or (yet another analogy): perl is to programming what smoking is to workplaces - something you do in the comfort of your own home - or in a shelter outside specially constructed for the purpose. There's possibly an easier explanation than any conspiracy theory. At some point perl fell out of favour to PHP with the CGI process start up problem, and mod_perl's complexity and perhaps even early bugginess (perceived or actual). At that point its usage declined and it got stuck in a positive (in the control theory sense) feedback loop: usage drops, so a business case needs to be made to counter usage dropping, so usage drops, GOTO 10. Meanwhile other languages (PHP, Python, Java, Ruby) catch up and surpass Perl, each on their own various dimensions: PHP's ease of install, Python's relative language simplicity, Rails having a big successful commercial backer, Java an enormous subcontinent of cheap labour, etc. Now, Perl in a sense has two problems: its relatively low usage, and that the other languages frameworks have caught up in some cases surpassed Perl's, so Perl's advantages over other options just aren't seen as that compelling. Perhaps Perl's biggest problem though is it still uses - as a method invocation operator. (Heh, kidding… kinda… not ;) Anyway, those are the two areas I would look into: 1) getting real stats on perl's usage and seeing whether the perception matches reality -- maybe there is a dark pool of perl users that aren't being counted 1b) making perl more accessible, e.g. meetup.com, facebook, etc rather than just this mailing list 2) drawing up a list of really compelling reasons why perl is a good fit for various tasks. And possibly being OK with the battle having been lost in the short/medium term on various fronts (web frameworks) Key IMO is acknowledging the power of perception: maybe perl is amazing at X, Y, Z but if it's not perceived that way some marketing is needed rather than intellectual discussion. Paul
Re: 25 Years of Perl
On Fri, Nov 23, 2012 at 12:01 AM, Uri Guttman u...@stemsystems.com wrote: On 11/23/2012 02:43 AM, Andrew Savige wrote: Live Perl Golf Apocalypse 2000 at TPC 4, aka uri's triumph. wow. that was a painful event. saved by damian's fill in talk and forgiven by gnat. it was a team failure, so i can't take all the credit. iirc nfs didn't work well on the donated boxes or some similar issue we couldn't test for. it was way too ambitious and should have been a much simpler contest. Ah yes, good times. O'Reilly handed out some awards in the form of book credits ($50?) for this, and being the epic procrastinator I never got around to using it - 'til a few months ago, i.e. twelve years later. Incredibly, and awesomely, O'Reilly honoured it. Paul
Re: 25 Years of Perl
I'd agree with you on python but I can say the Ruby community is packed full of nutballs and is very entertaining. Probably not too surprising considering ruby's perlish origins. So perhaps chalk that up to perl too ;) Written on my phone On Nov 23, 2012 6:57 PM, Uri Guttman u...@stemsystems.com wrote: On 11/23/2012 08:30 PM, James Laver wrote: On 24 Nov 2012, at 00:36, Uri Guttman u...@stemsystems.com wrote: yapc has yet to be properly copied. no one else delivers more bang for the buck and fun as well. mjd invented lightning talks and they are at many confs now, not just lang ones. another perl invention with no credit given. How are these perl inventions? They are community inventions. perl forms the core of the community and attracts the developers who add to the community. it is hard to separate them. i have told this to people about why i like perl and why perl has so many smart hackers. any community that would allow Acme:: and lauds it, has something special there. it stems from larry and timtowtdi and encouraging and allowing for creativity. humor is a part of that. i know larry fairly well and we all have seen his sense of humor. i met guido once at oscon and he seemed to have no fun even when putting a pie in dan sugalski's face. ask a python coder about the fun of the lang. ask them if they would sanction an Acme:: like name space. even the choice of Acme is funny! our community has more fun. that is a win for perl. :) uri
Re: 25 Years of Perl
On Thu, Nov 22, 2012 at 6:05 PM, Sam Kington s...@illuminated.co.uk wrote: Some mention should be made also of the attempt to rewrite the entire Unix support structure in Perl - things like ls, find, head etc. I don't think this ever went very far, and it appears to be very difficult to Google if it's still around, but I remember this being important at the time. http://search.cpan.org/dist/ppt/ And some history on what happened, http://computer-programming-forum.com/53-perl/94afef039a9112e6.htm Paul
Re: Duct Tape Quotation
On Mon, Nov 19, 2012 at 3:03 PM, andrew-per...@mail.black1.org.uk wrote: 1995 Economist 1 JulyThe..servers that make up the most popular part of the Internet are often written in Perl, and virtually all Web-based information exchanges are handled with the language. How the mighty have fallen… Paul
Re: h2xs -x
Did you ever manage to get anywhere with this? Or does anyone on the list have any suggestions? On Fri, Oct 28, 2011 at 03:40:21PM +0100, Dirk Koopman wrote: Has anyone managed to get h2xs -x to produce anything on a modern gcc / linux combination? It seems to barf parsing the interstices of stdio.h etc and, BTW, with totally useless error messages. I also notice that debian removed the package on 2008 on the grounds that nobody used it (and it produced this error then). Expecting parenth after identifier in `struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 364 /usr/include/libio.h 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns)' after `struct _IO_FILE_plus _IO_2_1_stdin_' at /usr/local/share/perl/5.8.8/C/Scan.pm line 729. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
RE: Current State of Auntie Beeb
We use a lot of perl internally in News. Not just monitoring, but in the TV production chain. Pretty much anything you see that's not live, and comes from abroad, comes in via perl. Just this evening I've written a few new lines of perl code which I've deployed to servers in Islamabad, Brussels and Moscow. The last entirely new perl code I created was in March, a jquery front end/perl backend to control some video encoders. -Original Message- From: london.pm-boun...@london.pm.org [mailto:london.pm- boun...@london.pm.org] On Behalf Of Ashley Hindmarsh Sent: 26 September 2012 12:16 To: london.pm@london.pm.org Subject: Re: Current State of Auntie Beeb Message: 1 Date: Tue, 25 Sep 2012 22:40:52 +0100 From: Simon Wistow si...@thegestalt.org Subject: Current State of Auntie Beeb To: london.pm london.pm@london.pm.org Message-ID: 20120925214052.go9...@thegestalt.org Content-Type: text/plain; charset=us-ascii Out of interest which bits of the Beeb are still Perl? Are l.pm-ers still there? And where does http://news.bbc.co.uk fit into everything these days? Well, there's me, and a several others working in Publishing Services. Perl products in our area are: * PIPS (programme metadata database). * Dynamite (client-facing: programme metadata feeds) * Media Selector (client-facing: media access/security), which is very Modern Perl (thanks mainly to pdcawley) There's other odd projects out there too. No new Perl projects though. Don't think the News homepage has anything to do with Perl these days. Ash http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
BritRuby 2013
A niche perl-based language is having its first UK-wide conference http://2013.britruby.com/cfp (with an all-star cast mostly from the US, afaict) :) Paul
Re: Available...
Do you shout your name because some recruiters shout PERL?
Re: Brainbench perl test?
On Thu, Sep 6, 2012 at 12:56 PM, Uri Guttman u...@stemsystems.com wrote: maybe i overstepped in calling that a serious coder filter. i would never just use that determining a skilled coder. it could be useful to filter out the total losers. i speak to hiring managers all the time and they give out similar tests just to filter out the losers. There seems to be some evidence that even trivial problems are a good way of filtering, http://www.codinghorror.com/blog/2010/02/the-nonprogramming-programmer.html (and neighboring posts) is an interesting entertaining ( slightly disturbing) read. I can't imagine scheduling an in-person interview without a phone screen and ideally a github link beforehand. Paul
Re: Brainbench perl test?
On Thu, Sep 6, 2012 at 2:49 PM, David Hodgkinson daveh...@gmail.com wrote: I like the FizzBuzz test. Not far removed from what I was hit with today. Talking of which, here's a fizzbuzz solution that's one of the most amazing presentations I've seen. It's Ruby but if you understand lambdas/coffeescript you can follow along, http://experthuman.com/programming-with-nothing http://rubymanor.org/3/videos/programming_with_nothing/ (video; more fun) Paul
Re: Brainbench perl test?
On Wed, Sep 5, 2012 at 9:35 AM, Abigail abig...@abigail.be wrote: Your first instinct should be Is there a generating function I can use?. Try not to blow your cache pipeline with all that silly branching, sub fib { my $n = shift; int(0.5 + (0.5+0.5*sqrt 5) ** $n / sqrt 5); } High five! :-) Paul
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 9:18 AM, David Hodgkinson daveh...@gmail.com wrote: When was the last time you recursed in day to day web type code? A few weeks ago. It's a flawed premise in any case. There's plenty of techniques and ideas professionals don't make routine use of but you'd be pretty unimpressed if they didn't know how to do it. Paul
Re: Brainbench perl test?
On Tue, Sep 4, 2012 at 9:59 AM, Chris Jack chris_j...@msn.com wrote: I haven't yet had a problem which I felt was worthwhile of a memo-ized solution - but that might just be indicative of the sort of perl work I do. While memoization is a perfect fit for this solution a) the ability to spot the need for a cache b) have a stab at implementing it, would be two things I'd be looking out for. Just adding, my %fib_cache; sub fib { my $n = shift; return $fib_cache{$n} if defined $fib_cache{$n}; # … $fib_cache{$n} = $answer; } would be a good start. If you're working in the web and haven't added memcached to something, that would strike me as surprising. If you haven't read up on web security issues, SQL injection is not immediately obvious and there are various legitimate reasons for avoiding bind variables. If you're working in the web and you haven't read up on web security issues, you need to go do that before applying for any jobs in web. If you haven't worked in the web, fair enough, ish. I do agree on pet subjects - I was amazed to be asked a bit fiddling question in an interview last year (not that I was complaining, having grown up on 8bit assembly…) Paul
Re: Can I get some advice on best way to start Perl Programming
On Fri, Aug 31, 2012 at 4:16 AM, Rick Deller r...@eligo.co.uk wrote: Hi all, I have brought a couple of books on the subject which I'm reading through I'm very keen to learn more and how to do it Can anyone suggest more books or another way of doing it ? You don't say specifically Perl so I'm going to suggest a similar language: An excellent start to get your feet wet that takes about 15 minutes, is quite fun, and you actually do some programming without having to set everything up on your computer is, http://tryruby.org/ Paul
Re: Can I get some advice on best way to start Perl Programming
On Fri, Aug 31, 2012 at 4:50 PM, Uri Guttman u...@stemsystems.com wrote: You don't say specifically Perl so I'm going to suggest a similar language: check the subject! :) Oops! Well the rest of ya can learn from the wonder of tryruby.org :)
Re: Brainbench perl test?
On Tue, Aug 28, 2012 at 11:09 AM, Uri Guttman u...@stemsystems.com wrote: i also did it way back and didn't like it then. multiple choice tests in general suck for actual testing of real world skills and programming ones suck even more. no candidate i have reviewed in ages has ever mentioned brainbench nor has any client. so in my world it is a non-entity. i know of several take home tests from clients that i review or see the answers and they tell me much more than any 'cert' could do. so does reviewing of existing code samples. there is no reason to even consider a timed multiple choice test. When I interviewed at the BBC they had me do Brainbench. It seemed like a fair, reasonably challenging test. The BBC is a pretty decent employer so I'd consider that a reason to do a timed multiple choice test ;-) From an employer's side - it's practically no cost to them on top of their existing recruitment efforts, and has a bunch of benefits associated with involving an unconnected third party. Paul
Re: [OT] Prepaid mobile plans with data, possibly roaming
The charge is to attempt to mitigate the Tragedy of the Commons which would affect everyone else so just fork over the cash already ;) In practice that all said I've never run into any restrictions with T Mobile but I also don't take the piss so who knows... Written on my phone On Aug 22, 2012 11:29 PM, Toby Wintermute t...@wintrmute.net wrote: On 23 August 2012 00:41, Anthony Lucas anthonyjlu...@gmail.com wrote: They just want you to buy their tethering add-on and mifi products. It's probably simpler for me to just pay for the damn tethering add-on, but part of me is annoyed at the restriction and wishes to try to bypass it :) I'll try VPNing back to my shell account and see what happens.. can't be any slower than 3G already is.. TC
Re: [OT] Prepaid mobile plans with data, possibly roaming
Just fyi, EU Data prices on my O2 phone dropped between may and July from £2.55+ vat per meg to £0.58+vat. £100 cap and 300MB max. Outside Europe it's still £6/mb. I tore through £50 between the airport and hotel in Delhi last week while checking the taxi driver was taking me the right way! Capped at £102.13 (??) but for 200MB. On 20 Aug 2012, at 22:47, Toby Wintermute t...@wintrmute.net wrote: Hello all, I'm making a whirlwind visit to London and bits of Europe soon, although with awfully poor timing, just missing YAPC:EU :( Hopefully I'll manage to run into a few of you while I'm in London though. The last time I visited, I picked up an Orange SIM that had Unlimited data on the plan.. only to discover they meant unlimited, but at 5kb/sec. So this time around I thought I should get some local knowledge. Can you suggest a mobile carrier who has: * 3G support for prepaid SIMs * Has reasonably priced data plans * For bonus points -- will work while roaming in Germany. Although I suspect I'll just have to buy yet another SIM over there.. Alternatively.. I'd be happy to just get a data-only SIM and use Skype or similar the whole time. I hope this isn't too off-topic! Thanks, Toby -- Turning and turning in the widening gyre The falcon cannot hear the falconer Things fall apart; the center cannot hold Mere anarchy is loosed upon the world
Re: [OT] Prepaid mobile plans with data, possibly roaming
The joys of corporate deals :) I think I (or my employer) was charged £1.80 a minute while i was in Pakistan last year. I dread to think how much it cost! On 22 Aug 2012, at 19:51, David Cantrell da...@cantrell.org.uk wrote: On Mon, Aug 20, 2012 at 10:57:53PM +0800, Paul Weaver wrote: Just fyi, EU Data prices on my O2 phone dropped between may and July from £2.55+ vat per meg to £0.58+vat. £100 cap and 300MB max. Then you need to change your tariff. O2 charge me 8p per MB on the mainland, 2 quid cap per day unless I authorise another 2 quid (and another, and another, ...). It covers Switzerland too, despite that not being in the EU. I expect it would also cover Norway. -- David Cantrell | Hero of the Information Age Vegetarian: n: a person who, due to malnutrition caused by poor lifestyle choices, is eight times more likely to catch TB than a normal person
Re: search.cpan.org MIA?
Hi, The server that hosts search.cpan.org that people in europe will be sent to as their local mirror is currently having some problems with it's application engine. I've asked the admins to have a look at it and it should be back shortly. regards, Paul On 10/05/2012 17:45, Christian Werner wrote: Works for me. On Thu, May 10, 2012 at 12:38 PM, Gabriel Vieira gabriel.vie...@gmail.com wrote: Here (Brazil) works fine. On Thu, May 10, 2012 at 1:29 PM, Dirk Koopmand...@tobit.co.uk wrote: Er... search.cpan.org seems not to be responding? traceroute to search.cpan.org (194.106.223.155), 30 hops max, 60 byte packets .. 8 10ge-linx226.c4l.co.uk (195.66.236.201) 35.980 ms 38.203 ms 38.325 ms 9 swanzo-wolverine.c4l.co.uk (84.45.90.194) 39.897 ms 41.041 ms 41.508 ms 10 84.45.39.126 (84.45.39.126) 45.708 ms 45.907 ms 49.096 ms 11 194.106.223.155 (194.106.223.155) 47.429 ms 47.636 ms 47.827 ms 12 194.106.223.155 (194.106.223.155) 49.294 ms !X 50.051 ms !X 51.307 ms !X !X = communication administratively prohibited. -- Gabriel Vieira
Re: Professional Indemnity
On Tue, May 1, 2012 at 12:43, Sue Spence s...@pennine.com wrote: On 1 May 2012 20:09, Dave Hodgkinson daveh...@gmail.com wrote: The renewal notice I just got made my eyes water. Two things: 1. When you're not working for the BBC, what levels do you set it at? 2. Are Caunce O'Hara still the go to people for this? How are you defining 'go to' ? I haven't spoken with anyone who has actually needed to make a claim on their PI insurance and I didn't find any reviews I felt I could trust on the subject. I recently found Caunce O'Hara rather expensive (seems I'm not the only one) and got my business insurance from Hiscox in the end. Until I make a claim on the policy I can't say for sure whether they were the correct choice... I went with none. I didn't see the point of paying for something that seems to have zero legal (AFAIK) legal precedent. cat /dev/urandom /dev/null Paul
Re: Free online courses in computer science / maths + others
On Thu, Apr 26, 2012 at 06:41, Adam Witney awit...@sgul.ac.uk wrote: Some of these courses may be of interest to the people here https://www.coursera.org/ .. and they're free! I'm most of the way through https://class.coursera.org/nlp/auth/welcome Natural Language Processing and it's been excellent. Unless you're a prodigiously talented programmer with a solid maths background I'd caution against doing more than one at a time with a full time job: the assignments at least on this course are no joke. Their 10-15 hrs/week estimate is about right, if possibly on the low side if you want to score well. Paul
Re: Programming Heresy
On Fri, Mar 30, 2012 at 08:20, Uri Guttman u...@stemsystems.com wrote: in years (and decades) past, i did some coding on source printouts. i could do it anywhere including outside which i enjoyed immensely. my coding on paper was scribbles, crossed out code, arrows moving things around, very fugly pseudocode notation only i could decipher, etc. often it was just enough to make me remember my ideas which i could then type up on a keyboard. i could be very creative when coding on paper like that (in or outdoors) but i still have fond memories of outdoor sessions in the shade under sunny skies. :) Me too. I actually found these paper sessions some of the most productive ever. Just recently I had my head in a bunch of confusing object relations and wished for the soothing sound of a dot matrix (shows last time I did it) that would let me see wtf was going on… Paul
Re: IPv6 addresses
On Sun, Mar 11, 2012 at 15:43, Chris Dennis cgden...@btinternet.com wrote: Hello folks I'm hacking together a quick script to parse the output from the 'ip' command on Linux, e.g. $ ip a s 1: lo: LOOPBACK,UP,LOWER_UP mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:19:b9:06:4c:86 brd ff:ff:ff:ff:ff:ff inet 192.168.1.7/24 brd 192.168.1.255 scope global eth0 inet6 2001:dead:beef:cafe::1/64 scope global dynamic valid_lft 86147sec preferred_lft 14147sec inet6 fe80::1/64 scope link valid_lft forever preferred_lft forever -- which is straightforward. But then I need to process the IPv6 addresses to be able to extract subnet prefixes etc. $ /sbin/ifconfig | perl -MRegexp::IPv6=\$IPv6_re -lne '/(?:($IPv6_re)(\/\d+))/ and print net $1 size $2' net fe80::fcff:ff:fe00:5272 size /64 net ::1 size /128 HTH, Paul CPAN has so many IPv6-mangling modules that I don't know which to choose, or which will emerge as the best/most stable etc. in the future. Certainly some of the ones I've looked at are badly written or badly documented or just plain broken. Any recommendations? cheers Chris -- Chris Dennis cgden...@btinternet.com Fordingbridge, Hampshire, UK
Re: [ANNOUNCE] London Perl Mongers Technical Meeting 2012-04-11
On Thu, Mar 1, 2012 at 03:48, Peter Corlett ab...@cabal.org.uk wrote: On Wed, Feb 29, 2012 at 11:33:10AM +, Mike Whitaker wrote: [...] Joking aside - I don't think this is the kind of talk one attends because it will be directly useful in my day to day work, but rather because it's DC, and you don't get the chance very often I've seen a video of this talk, got to the end, pushed my brain back in through my ears, and decided to watch it again. The lucky people who got tickets for this are in for a treat. I was going to ask if this talk was going to be taped (and also hoping it wouldn't turn into a huge pro/con discussion at the same time) If it's around on a back-channel I'd love to check it out too, pretty please :) Paul
Re: [ANNOUNCE] London Perl Mongers Technical Meeting 2012-04-11
There are a number of us who live in the home counties, so getting into London requires a bit of planning and is quite a hassle. I have seen Damian talk before, and while he is interesting, I'd just like to know beforehand how much I would find directly useful in my day to day work. Thanks. -- .
Re: Mason
On Wed, Feb 29, 2012 at 06:21:04PM +, Jones, Christopher wrote: On 29 Feb 2012, at 17:11, Leo Lapworth wrote: Quoting Christopher Jones c.jo...@ucl.ac.uk: 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. Mason 2 was released: Feb 16, 2011 - I'm guessing (but don't know) that it changed quite a bit. Personally I use Plack + Template toolkit + Catalyst mostly. But not sure _why_ you want to learn Mason, if it's for an existing site then the book may be of use. New job, old tricks new to old dog Have to confess, I didn't realise Mason (1) was quite *that* old I've learnt enough Mason in the last year to keep an old site up and running and extend it as required before it gets replaced by a .net system. (Yeah, yeah.) From my point of view, there's little to recommend using Mason nowadays. Mason 1 that is, I have no knowledge of Mason 2. The only advantage I can think of is that you might like its templating system. Personally, I don't really, but I can believe that others might. Disadvantages are that it's tied to mod_perl. I believe that means that you can't bring plack into the equation which, in turn, means that you can't take advantage of the plack middleware. I'd be pleased to be shown that I'm mistaken here. Additionally, each template is in the same namespace, and is basically the body of a subroutine. This essentially means that you can't use named subroutines in templates. You can look on this as encouragement to move your logic into modules but, as Leo notes, the other side is that the components can get very messy if you don't heed this encouragement. And then I had to hack Mason itself in order to get code coverage information from the components. I managed alright with the online book that Dave mentioned, but I wasn't trying to learn it thoroughly - just well enough. My best tip, if you need to work with Mason, is to look at the compiled code in the mason_cache directory to see what's really happening. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: [ANNOUNCE] London Perl Mongers Technical Meeting 2012-04-11
On Thursday, 23 February, 2012 at 14:27:17 GMT, L?on Brocard wrote: Damian will be presenting: [...snipped a load of garbage...] What is this meeting actually about? -- .
Who is NS admin for london.pm.org / Exonetric?
I*'ve been an NS for london.pm.org for years and, after slightly fewer years of noting it's been failing, am finally wondering who's in charge / can fix the fact that 89.16.178.168 is being denied zone transfers for london.pm.org. I'm assuming someone at Exonetric, the other NSs that aren't Matthew. One of my others, ns3.realprogrammers.com, doesn't exist any more so ideally that'd be pulled from the list too while we're fixing things. Paul *not personally, ns1.realprogrammers :)
Re: Who is NS admin for london.pm.org / Exonetric?
Fab, thanks, Mark - transfer of 'london.pm.org/IN' from 178.250.72.132#53: Transfer completed: 3 messages, 10 records, 411 bytes, 0.137 secs (3000 bytes/sec) Paul On Wed, Feb 15, 2012 at 15:28, Mark Blackman m...@exonetric.com wrote: Hi, Myself and Marcus Lauder handle the master NS for london.pm.org at Exonetric. I'm not sure how 89.16.178.168 dropped off the list of permitted AXFR clients, but it should be back on the list now and we've pulled ns3.realprogrammers.com from the NS list. I'm guessing you discovered we've been making big IP changes in the last week or so. Let us know what you find. Cheers, Mark On 15 Feb 2012, at 23:17, Paul Makepeace wrote: I*'ve been an NS for london.pm.org for years and, after slightly fewer years of noting it's been failing, am finally wondering who's in charge / can fix the fact that 89.16.178.168 is being denied zone transfers for london.pm.org. I'm assuming someone at Exonetric, the other NSs that aren't Matthew. One of my others, ns3.realprogrammers.com, doesn't exist any more so ideally that'd be pulled from the list too while we're fixing things. Paul *not personally, ns1.realprogrammers :)
Re: The proper way to open()
On Monday, 30 January, 2012 at 16:49:45 GMT, Abigail wrote: die Bad config file $cfg unless open my $ih, , $cfg; The most important bit is the open, not the die, so it's better to have 'open or die' instead of 'die or open', IMHO. -- .
Re: The proper way to open()
On Wed, Feb 01, 2012 at 01:34:05PM +, Smylers wrote: Until I started using Perl I'd only ever seen an OR operator (however spelt) used for combining boolean expressions, such as: if (!$awoke || $booted $awoke) The concept of 'or if that command failed, here's what to do instead' was new to me. I liked it, and that there was an operator for it. This concept will be familiar to shell programmers. I wonder whether it is older than that though. Does anyone have any earlier examples? -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: The proper way to open()
On Feb 1, 2012 2:29 PM, Dominic Thoreau domi...@thoreau-online.net wrote: On 1 February 2012 13:34, Smylers smyl...@stripey.com wrote: Yitzchak Scott-Thoennes writes: On Mon, Jan 30, 2012 at 9:12 AM, David Cantrell da...@cantrell.org.uk wrote: On Mon, Jan 30, 2012 at 05:03:47PM +, James Laver wrote: On 30 Jan 2012, at 16:56, Dominic Thoreau wrote: open IN, '', $cfg || handle_that_error_sub; No, explicitly not. The || operator is far too high precedence binding. Use 'or' to remove your bug. No. The correct solution to buggy code caused by precedence is not to invent a new level of precedence, but to use parens. That makes sense if you see the problem as being one of precedence. My personal style is to put brackets around the open portion of the call, but I understand the current trend is to remove these (for reasons that a: escape me, and b: I'm not that interested in anyway). open(IN, '', $cfg) || die $! made me do it; this would be fine, as would OR instead of the IIs. Personally I feel the brackets make things more explicit. At work I've in the past written complex DB constraints with lots of brackets, and then been annoyed when Postgres threw hem away, and replaced my explicit clause with something functionally identical, but impossible to read. Done on perl code, that could make for an entertaining prank with Deparse and a pre-commit hook... --
Re: The proper way to open()
On Tue, Jan 31, 2012 at 14:29, Peter Corlett ab...@cabal.org.uk wrote: On Tue, Jan 31, 2012 at 01:42:05PM +, Peter Corlett wrote: On 31 Jan 2012, at 05:18, Avleen Vig wrote: [...] This is the problem with TMTOWTDI. There should just be one way to do it. Then we wouldn't have this problem. If you want Python, you know where you can find it. OK, on re-reading, that sounds a little bit grumpy. TMTOWTDI is what gives us the richness and flexibility of Perl and CPAN. Standardising on One True Way and being unforgiving of deviating from that norm prevents innovation and renovation of the language. Would you really still like to be writing in late-1990s Perl instead of Modern Perl? Take TMTOWTDI away, and it's no longer Perl. Python is better than a straightjacketed Perl. I'd make a material bet Avleen was joking. Not to mention, pretty much every modern language exhibits plurality in implementation possibilities (PIMP? :). Paul
Re: [ANNOUNCE] London Perl M[ou]ngers October Social - 2012-02-02 - Somers Town Coffee House, Euston, NW1 1HS
[ANNOUNCE] London Perl M[ou]ngers October Social - 2012-02-02 - Somers Town Coffee House, Euston, NW1 1HS Gives a new interpretation to Template::Manual, heh :) That night's also my leaving dinner so if anyone fancies popping along to Wong Kei's beforehand 7pm or after for pints, do drop by: https://www.facebook.com/events/357889180907264/ Paul On Mon, Jan 30, 2012 at 12:41, Leo Lapworth l...@cuckoo.org wrote: Hi all, The London.pm February social will be on Thursday the 2nd, at the Somers Town Coffee House, just around the corner from Euston station (now under new management). Somers Town Coffee House 60 Chalton Street Euston, NW1 1HS http://london.randomness.org.uk/wiki.cgi?Somers_Town_Coffee_House,_NW1_1HS Unfortunately I can't make it, but don't let that stop you turning up, or maybe it will encourage more people to turn up, either way, have fun :) Standard blurb: Social meets are a chance for the various members of the group to meet up face to face and chat with each other about things - both Perl and (mostly) non-Perl - and newcomers are more than welcome. The monthly meets tend to be bigger than the other ad hoc meetings that take place at other times, and we make sure that they're in easy to get to locations and the pub serves food (meaning that people can eat in the bar if they want to). They normally start around 6.30pm (or whenever people get there after work) and a group tends to be left come closing time.
Re: 5 minimums for any perl script?
On Mon, Jan 30, 2012 at 03:00:00PM +, Sam Kington wrote: One problem with perlcritic is that many of its rules, out of the box, are silly and annoying. You need to do a fair amount of tweaking to stop it bitching about stuff you don't care about, before you can get to the bits where it's actually useful. Here's $WORK's standard perlcriticrc: I wouldn't argue with most of those (though I don't use perlcritic myself anyway) but # Checking return values is a good thing. Checking the return value of # close or print STDERR is downright silly. [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = print close could you explain why you think checking the return value of close() is silly? I tend to have the opposite opinion. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: 5 minimums for any perl script?
On Mon, Jan 30, 2012 at 15:00, Sam Kington s...@illuminated.co.uk wrote: # Checking return values is a good thing. Checking the return value of # close or print STDERR is downright silly. You've clearly not done much IPC… P
Re: 5 minimums for any perl script?
On Mon, Jan 30, 2012 at 04:19:19PM +, Mark Fowler wrote: On Mon, Jan 30, 2012 at 3:40 PM, Sam Kington s...@illuminated.co.uk wrote: # Checking return values is a good thing. Checking the return value of # close or print STDERR is downright silly. In the code that we write at $WORK, any filehandle we close tends to be a log file or something, so adding extra boilerplate to our close statements would just be annoying. Why are you doing this by hand? Why aren't you letting autodie handle this for you? What we really need is for autodie to work on the implicit close on a lexical filehandle going out of scope. Someone please write that. And then fix up all the little bits and bobs around the edges. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net
Re: Tech Talk Slides
On Fri, Jan 27, 2012 at 11:33, Dave Cross d...@dave.org.uk wrote: I hope the slides for the talks will appear online in the not too distant future. Here's mine with a few fixes annotations since last night, http://paulm.com/talks/Cukes%20%20POW.pdf (5.8MB, yay PDF). The bit I think I didn't make clear enough was that Cucumber consists of two languages: the natural language spec you can show your boss, and Ruby/Perl/etc you actually write the test code in. I've labeled them on the slides now. Paul
Re: Emacs as a perl IDE
On Wednesday, 25 January, 2012 at 22:17:11 GMT, Dave Hodgkinson wrote: Dave suggested Padre, comments on features and stuff welcome. I'd love to be able to use vim with it. -- .
Re: Laptop Recommendation
On Tue, Jan 24, 2012 at 17:40, Philip Skinner m...@philip-skinner.co.ukwrote: Apart from the lack of a # keyoh and a crap enter key. My solution here was to select the US layout option. It's very similar, but without those two deficiencies you mention. Con is learning the combo for £. (Shift-Opt-4 on Colemak; maybe Qwerty too) Infact anything to do with actually typing is generally pretty crappy. Home and end don't function as nature intended (really really really annoying, until you change it). OS X has ^A, ^E, ^K baked (afaict) into the OS (surprising number of people don't know/haven't realised this!) Enjoy! Paul
Craigslist drops 100 Gs on Perl
Wowzas: http://news.perlfoundation.org/2012/01/craigslist-charitable-fund-don.html The Perl Foundation is proud to announce that the craigslist Charitable Fund is supporting the Perl community with a generous donation of $100,000 toward Perl5 maintenance and for general use by the Perl Foundation. Paul
Re: Laptop Recommendation
On Tue, Jan 24, 2012 at 03:41:33PM +, Smylers wrote: Chris Carline writes: The solution is to run your favourite choice of OS on top of a VM. ... I would also recommend this setup for Windows-based laptops too. ... solves a lot of compatibility issues with non-standard hardware, power management and suspension support I apologise in advance if this solution is insufficiently idealistic for your taste, No, it's a good idea, thank you. If I end up buying a laptop with Windows or OS X installed I shall definitely give it a go first. I've been developing primarily on Ubuntu running in VirtualBox for a couple of years or so now. I started working this way because Linux doesn't (didn't?) run well on either my desktop or laptop, though it's fine on my server. I find it to be quite a comfortable way or working, with few problems and some advantages. The main downsides for me are that deleting large directories on shared folders sometimes messes up and requires the disk to be unmounted and remounted (solution, try to remember to do that on the native OS) and that whenever I do something with Windows and it wants to be rebooted, I need to stop or suspend the VM. I tend to use notion as my Window Manager and I leave one frame blank and view in Seamless Mode. This means that the host OS is visible in that blank frame. I've put the VM on an SSD and given it access to all the CPUs, so it's quite speedy too. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net