Re: Schwartzian transform

2014-08-13 Thread Damian Conway
If you only want to modify the original hash, you just need this: # Warning: map in void context used for side-effect of setting {position}... # (I feel so dirty! ;-) my $count = 1; map { $_-[1]{position} = $count++ } sort { $a-[0] = $b-[0] } map { [$_-{position}, $_] }

Re: Lazy sort (was Re: Schwartzian transform)

2014-08-13 Thread Damian Conway
Abigail asked: [3] Is [lazyly] a real word? Very nearly. Lazily is the generally accepted spelling. Though I guess one could argue that lazyly is lazily spelt lazily, and hence is even more correct. ;-) Damian

Re: Schwartzian transform

2014-08-13 Thread Damian Conway
In the absence of such benchmarking (and also in the absence of any indication of a performance issue) I think the approach of directly sorting the hash refs wins merely by virtue of being so much simpler. Agreed. Although, I took the the use of the ST in the original code as precisely that:

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-13 Thread Damian Conway
Last week, mascip suggested: for the mongers who cannot come, what would you think of just sharing a list of CPAN/Vim modules mentioned during the talk? Someone could volunteer to write such a list during the talk, and send it to the list without further comments. Here's that list:

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-13 Thread Damian Conway
This is one of those tools where a demonstration really helps to appreciate its value. David's correct. Happily there's a short demo on-line (which I recorded back in 2012 for YAPC::NA): https://www.youtube.com/watch?v=zcSFIUiMgAs Since then the module has been released and updated

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-07 Thread Damian Conway
how did you convince or blackmail damian to be in oslo in march?! about 10 years ago i produced his training in boston in february and he was frozen to icicles The explanation is pretty straight-forward: Average temperature in Oslo in March: +4 Celsius Average temperature in Boston in

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-07 Thread Damian Conway
Dermot wrote: I'd like to add my voice to the I would pay to take one of Damian VI tutorials campaign. I have mentioned this - to him - in the past but I think he'd like more than one person to attend. Perhaps those who have some influence with FLOSS/UUGUK could persuade them that it would be

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-07 Thread Damian Conway
FLOSS recently cancelled one of his courses (through lack of attendees I think), it was due to be next Wednesday Yep. We didn't really have enough lead-time on that one. My fault. I was only able to commit to it and propose it to FlossUK about a month ago. That turns out not to be enough time

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-07 Thread Damian Conway
I would love to do more perl mongers courses and I would have booked the FlossUK one if it hadn't been in office hours. i.e. I would love to see more weekend and evening perl courses. Industry standard door charges would not be an issue for me. Taking a day off work is. Thanks for the

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-06 Thread Damian Conway
Just to elaborate on Sue's kind explanation: I make my entire living from speaking (in one form or another). And I ask not to have my community talks recorded because I also sell many of those presentations to paying clients...who generally wouldn't buy them if they could just download them for

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-06 Thread Damian Conway
Thank you for giving Perl mongers free talks Damian :) It's truly a pleasure, Pierre. I'm sorry you'll miss out this time. Damian

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-06 Thread Damian Conway
Free? I thought they were paid for by the sponsor The venue is paid for by the sponsors. The speaker is not being paid. Damian

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-06 Thread Damian Conway
But to the best of my knowledge, Damian has never charged for speaking to london.pm. Dave is correct. I never charge for community events like this. (In the spirit of full disclosure, very occasionally I *have* accepted unsolicited donations from an audience, or from an event organizer, to

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-06 Thread Damian Conway
for the mongers who cannot come, what would you think of just sharing a list of CPAN/Vim modules mentioned during the talk? (if that is relevant in the context of your talk) It certainly is relevant. And I think it's an excellent idea. Someone could volunteer to write such a list during the

Discount code for next month's QCon

2014-02-11 Thread Damian Conway
[Reposted from my blog] farnsworthGood news, everyone!/farnsworth I'm going to be back in London for the entire first two weeks of March. First up, if anyone is planning on attending QCon London next month (http://qconlondon.com/), here's a discount code that will get you £100 off registration

Re: New pet keeping rules in the Netherlands

2013-06-20 Thread Damian Conway
Wah, New Holland? In the Dutch parliamant? :-) Had history gone just a little differently...that might have been very possible. You might have the provinces of both New Holland and New Zeeland to cope with, eh? And just think how much more complex that animal law would have to be to cover New

Re: New pet keeping rules in the Netherlands

2013-06-20 Thread Damian Conway
According to the NCIS fact sheet I looked up, in 2011 there were deaths caused by camels, cats, cattle, dogs, and sheep. As well as the expected killers - bees, crocodiles, emus, horses, kangaroos, sharks and snakes. No mention of spiders, which I find highly suspicious. There is actually a

Re: New pet keeping rules in the Netherlands

2013-06-20 Thread Damian Conway
I particularly like it when they have babies and there are hundreds of tiny cute huntsman spiders all over the ceiling. Yes indeed, baby huntsman are inexplicably adorable. :-) Damian

Re: New pet keeping rules in the Netherlands

2013-06-19 Thread Damian Conway
Apparently the Easter Quoll is a good replacement for a cat. Except that it's a species of Australian wildlife. And nocturnal. Which means that it will wait until you fall asleep before it kills you. Damian

Re: New pet keeping rules in the Netherlands

2013-06-19 Thread Damian Conway
The discussion is in the Dutch Parliament and it's committees. Maybe a bit far out of reach for you :-) Not really: I do live in New Holland, after all. (https://en.wikipedia.org/wiki/New_Holland_%28Australia%29) ;-) Damian

I'll be speaking in London next month

2013-02-03 Thread Damian Conway
Dear fellow Mongers, I just confirmed that I'll be back in London next month, to speak at QCon London. I've posted about this event in more detail on my blog: http://blogs.perl.org/users/damian_conway/2013/02/speaking-at-qcon-london-next-month.html but, in short, I'll be keynoting Fun With

Last chance to see...

2012-09-19 Thread Damian Conway
Dear fellow Mongers, After more than a decade of only giving private classes in the U.K., I've been very fortunate to have had the opportunity to offer public classes in London not once, but twice, this year. However I'm sorry to say that it now looks as though the second set of public classes

Re: One for Damian...

2012-04-17 Thread Damian Conway
http://dilbert.com/strips/comic/2012-04-17/ I wonder how many times this will be sent to him :) I actually saw it last week when my qumail.pl app delivered a message I'm going to send myself later this month. According to that message I will have had been being sent that link 213 times across 7

Re: One for Damian...

2012-04-17 Thread Damian Conway
Is this a scenario for a future  mainstream series ? It makes me think of one that has had been in the future of the current present me. Yes, that old new one Joss Whedon will have done. I shall have loved that! Oh, what *will be* it's name? I can never have been remembering it! Oh, yes:

Re: One for Damian...

2012-04-17 Thread Damian Conway
Your temporal linguistics are enough to give Dr. Dan Streetmentioner an apoplectic attack. Good old Doc S/m. I wonder what will happen to him? He was never at the forthcoming meetings, any more. :-( They *say* he found an new orthogonal time dimension and has been living there quite happily

Conway @ Conway Hall

2012-04-12 Thread Damian Conway
My sincere thanks to everyone who came along to last night's tech talk. I hope everyone enjoyed it as much as I did. Thank-you to Hugo and Anthony and the team at Venda, who provided the excellent venue, and to Leo and Leon, who managed everything on the London.pm side. I'm already thinking

Re: A new leader is born...

2012-04-02 Thread Damian Conway
Nicholas wrote: I'm really not sure what power the leader has. Well, for a start: Mangalores won't fight without the leader. Thanks, Leo. Congratulations, Tom. Damian

Re: [ANNOUNCE] London Perl Mongers Technical Meeting 2012-04-11

2012-02-29 Thread Damian Conway
Paul wrote: I'd just like to know beforehand how much I would find directly useful in my day to day work. Ah, that's easy: absolutely NONE of it will be directly useful in your day to day work (unless your day to day work is very unusual indeed). It will be instructive, it will be amusing, it

Presentation skills class in London this April

2012-02-27 Thread Damian Conway
(Apologies for the following U.C.E. But, hey, at least it's off-topic! ;-) Several of the denizens of this list have already contacted me regarding the class on presentation skills that I'm running for FlossUK on April 16 there in London, but I just realized that I never actually announced it.

Re: 5 minimums for any perl script?

2012-01-29 Thread Damian Conway
So if Perl Best Practices is too much, and you could only have 5 rules for any perl script, what would they be? Can I have six, please Sir??? These are in decreasing order of bang for your buck [and with PBP references, in case PBP *isn't* too much]... 1. Commenting: Code in commented

Re: 5 minimums for any perl script?

2012-01-29 Thread Damian Conway
Joseph Werner wrote: I will agree with always 'use strict', I have never [yet] had to not 'use warnings' AFTER development. If your test suite's code coverage is thorough and your tests closely mimic your users' real-world usages, then I agree that leaving warnings on in deployed code does no

Re: 5 minimums for any perl script?

2012-01-29 Thread Damian Conway
don't use subroutine prototypes unless you've read about them and know what you're doing. Damn straight. But I'd also add: even if you *have* read about them and think you know what you're doing...think again. ;-) Even when used correctly, prototypes change the behaviour of client code in

Re: Cool/useful short examples of Perl?

2011-05-30 Thread Damian Conway
Uri wrote: ever taken a class with damian? he doesn't pussy foot around with kiddie code. that line is just like stuff he trains with No it isn't. Not in my beginners classes, nor in PBP. When I'm teaching newcomers to Perl, I focus my examples entirely on readability and maintainability. For

Re: Damian Conway: Understanding Regular Expressions (properly)

2010-09-16 Thread Damian Conway
Dear all, Back in July I wrote: I'd like to take the opportunity to apologise to anyone who signed up for any of my classes in Zurich, Pisa, or London. We hope to reschedule some of those events later in the year, but at present it is far too early to know when (or if) that will be possible.

Re: Damian Conway: Understanding Regular Expressions (properly)

2010-07-07 Thread Damian Conway
Abigail correctly inferred: Considering that Damian suddenly had to return to Australia and isn't attending YAPC in Pisa, I presume the August 11 event isn't going to happen either. I'm afraid not. On Monday my father-in-law, whom my wife and I have cared for on a daily basis for the past

Re: Damian Conway: Understanding Regular Expressions (properly)

2010-06-25 Thread Damian Conway
From my point of view: Pisa is Damian trying to give back to the Perl community (by offering classes to YAPC attendees at well below cost) whereas London is Damian trying to *stay* in the Perl community (by earning a living at standard commercial rates). In practical terms, the difference in

Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010

2010-03-26 Thread Damian Conway
[Various all-too-easily-copied archival format suggestions discarded] Look, if we *really* want to preserve and protect this extremely valuable intellectual property, I propose that we don't film it at all. Instead, let us commission Piers to record and commemorate the great event in the form of

Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010

2010-03-26 Thread Damian Conway
Paul Makepeace wrote: First or last line of a haiku... Damian Conway: dactyl-trochee. The winter of Piers' discontent. Con Wei

Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010

2010-03-24 Thread Damian Conway
Chris is correct that I rarely ever allow my talks to be recorded or uploaded. And right about the reason too. Information may well want to be free, but it therefore also wants my family to starve. However... In this particular case, because James and Paul asked most politely, and because I

Re: [ANNOUNCE] London Perl Mongers Technical Meeting 12th April 2010

2010-03-24 Thread Damian Conway
Uri asked: if you are going to give this talk at yapc::na and/or oscon, I did so, at OSCON in 2008. Damian

Re: Every other

2009-10-30 Thread Damian Conway
Mark Fowler m...@twoshortplanks.com wanted: I have an array in Perl 5 [2].  I want *every* *other* element from it. Not especially fast, but very easy: use List::Maker; my @new = @old[ 0,2,..$#old ]; There's very nice syntax for this in Perl 6, isn't there? Yes. Several in fact.

Re: Every other

2009-10-30 Thread Damian Conway
Nicholas Clark n...@ccl4.org:     my @new = @old[0,2...*]; That's a sequence of 0, 2, extrapolate? Yep.     my @new = @old[ 0...*+2, 6 ]; Where's that's a sequence from 0 to whatever, with a stepping of 2? What is the 6 for? Sorry, that's my brain spasming. The test code I was using

Re: [OT] accessors pragma

2003-09-17 Thread Damian Conway
Steve Purkis asked: Will generated accessors be overridable? Indeed they will. If the class has an explicitly declared method of the same name, that method will prevent the accessor from being generated. And, of course, accessors are just methods, so derived classes can override them in the

Re: [OT] accessors pragma

2003-09-16 Thread Damian Conway
For what it's worth... Perl 6 classes will autogenerate accessors that return the underlying attribute itself as an lvalue: class DogTag { has $.name is public; has $.rank is public; has $.serial is readonly; has @.medals

Re: Perl 6 Apocalypse 6

2003-03-13 Thread Damian Conway
Piers Cawley wrote: ...Piers is perfectly capable of coding equally cleverly in Python, or Java, or Pascal or any other language. ;-) Frankly, Piers would rather stick his nuts in a blender than program in either Python, Java or Pascal thank you very much. Now you're just being

Re: Perl 6 Apocalypse 6

2003-03-13 Thread Damian Conway
alex wrote: I then got bored and started programming it. I think my knowledge of Perl (native) is complete. I wonder if Damian would make such a claim... Most definitely not. Nor, I suspect would Larry. Perl is like quantum physics, or the opposite sex, or the films of David Lynch...if you

Re: Perl 6 Apocalypse 6

2003-03-13 Thread Damian Conway
Piers Cawley wrote: Now you're just being silly. I mean, where would they find a blender big enough??? You are a Very Bad Man. Why thank-you, sir! And I must certainly extend the same high compliment to you. grin Damian

Re: Perl 6 Apocalypse 6

2003-03-11 Thread Damian Conway
Dirk Koopman wrote: I realise that I am an old and useless programmer, a dinosaur even, but is all this going to add up to a language that is:- a) easier to learn Yes. Not so much the stuff we're adding in A6, but other stuff like sigil reform, operator rationalization, chained comparisons,

Re: Perl 6 Apocalypse 6

2003-03-11 Thread Damian Conway
Simon Wistow wrote: There was a mildly interesting post on Slashdot that said [snip] It would be a shame if perl 6 went the same way. Which are sentiments that I heartily agree with. As do we in the design team. We're working very hard to see that that doesn't happen. It goes on to say.

Re: How to split 6 digits into 3 lots of 2

2003-01-28 Thread Damian Conway
Paul Johnson wrote: If you insist: echo 123456 | perl -lne 'print join -, /../g' Are you *mad*?! Do you think keystrokes grow on *trees*??!! There's about to be a war on, you know! Start conserving those characters now, citizen! echo 123456 | perl -ple's/..(?=.)/$-/g' ;-) Damian

Re: How to split 6 digits into 3 lots of 2

2003-01-28 Thread Damian Conway
Paul Makepeace wrote: Hmm, time to whip out the mind-twisting metacharacters, echo 123456 | perl -ple's/..\B/$-/g' Patriotically yours, Paul Well done, thet mahn! See cheps, thets the spirit! Aht this rayte we'll jolly well heve Johnny Foreigner orn the bally wropes in noh tahme! Tally ho!

Re: Look ma, no barewords!

2002-12-08 Thread Damian Conway
Dave Cross wrote: [ Aren't you supposed to be taking a well-earned break? ] Yes, I am. I'm following a strict policy of only posting off-topic to newsgroups. Hence I post about Perl here. ;-) I thought that was using = quotes its left-hand operand magic quoting, not unary - quotes its

Re: Look ma, no barewords!

2002-12-08 Thread Damian Conway
Nicholas Clark complained: But barewords are not allowed under strict. So why is -bareword being allowed? Because it's not a bareword. ;-) No more than any of these are: key = value; $hash{ key } qw( unbare ); In each case, a sequence of \w characters is marked as a string in some way.

Re: fun with maps

2002-11-08 Thread Damian Conway
David Cantrell wrote: If I have nest maps, like so ... map { map { foo } bar } is there any (elegant) way of getting at the outer map's idea of what $_ is from within the inner map? I'd rather not use a temporary variable if at all possible. How about an alias instead? For example: map {

Re: Rindolf again

2002-03-14 Thread Damian Conway
...and aren't we still waiting for the accompanying Exegesis 4? It's done. Well, almost done. Done except for Larry giving it the final imprimatur and nihil obstat. The delay now is that -- as always happens -- actually using Perl 6 to write a real program brought up some critical design

Re: Rindolf again

2002-03-11 Thread Damian Conway
Simon Wistow wrote: I'm grumpy, probably coming down with something and some fucker's knicked my big mug at work. So you're spreading the cheer? So, the spec for Rindolf has been released. To my eyes, ignoring a few problems, this is what the new version of Perl *should* have been.

Re: Aliased subs with prototypes

2001-12-24 Thread Damian Conway
Paul Makepeace wrote: If I use an alias to poke a sub into the symbol table I lose that ability and thus can't treat that sub as another other first class sub, Adding a dummy sub greet {} illicits the predictable subroutine redefined warning. Is there some way to avoid these contortions,

Re: Text::Column ?

2001-12-19 Thread Damian Conway
Simon Wilcox wrote: I've been looking to format some text into two columns and write it to stdout This facility is slated for inclusion in Text::Reflow in 2002. Not that that helps you now, of course. :-( Damian

Re: Your Advocacy ideas

2001-11-20 Thread Damian Conway
Regarding the lack of effective user support for Open Source software, you might like to point out that effective user support for commercial software is a less-than-certain proposition too. My favourite example is the study reported at: http://www.bmug.org/news/articles/MSvsPF.html

Re: Rant: Working in a vacuum

2001-10-27 Thread Damian Conway
Lately I've been wondering more and more why I keep writing and releasing modules, as no one ever seems to use them or even notice - there's zero feedback. Welcome to the club. :-( Although I have a significant number of popular and useful modules, I very rarely get feedback either

Re: [off-topic] Getopt::Declare problems

2001-10-26 Thread Damian Conway
my %args=( action = ($args-{'-d'} || $args-{'-delete'})?'delete':'add', md5 = ($args-{'-md5'})?1:0, url = $args-{'-d'} || $args-{'-delete'} || $args-{'url'} ); I tried that, but I end up with $args{url} being '-d' or '-delete' instead

Re: [off-topic] Getopt::Declare problems

2001-10-25 Thread Damian Conway
I'm sorry for posting something off-topic, but I hope one of the Very Clever People here can help me. I'm having trouble with Getopt::Declare. Well, I'm not Very Clever, but I can probably help you with that. I get: Can't use string (-delete) as a HASH ref while strict

Re: How's Hildo?

2001-09-13 Thread Damian Conway
Any word on the New York MSDW folk? According to the information I have received, most of the Morgan Stanley people known to the Perl community work in midtown, not downtown where the tragedy occurred. MS *did* however have several thousand people from their credit card division in the WTC