From kim at hawtin.net.au Thu Feb 18 21:15:35 2010 From: kim at hawtin.net.au (Kim Hawtin) Date: Fri, 19 Feb 2010 15:45:35 +1030 Subject: [adelaide.pm] next perl mongers Message-ID: <4B7E1E77.2050205@hawtin.net.au> evening all, well, its been a while since the last catch up. how about we thrash out a day, time and venue for the next catchup... how does 22nd March, 6pm at the Exeter sound as a starting point? are there other venues that would suit us better ? 72, kim From justin at hawkins.id.au Mon Feb 22 21:46:39 2010 From: justin at hawkins.id.au (Justin Hawkins) Date: Tue, 23 Feb 2010 16:16:39 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: <4B7E1E77.2050205@hawtin.net.au> References: <4B7E1E77.2050205@hawtin.net.au> Message-ID: On 19/02/2010, at 3:45 PM, Kim Hawtin wrote: > evening all, > > well, its been a while since the last catch up. > how about we thrash out a day, time and venue for the next catchup... Hi Kim, I think the best bet is to do the 'done thing' and make it on a known day every month (third Monday, Last Thursday, etc). Most groups seem to do this, and I think it'd be the best thing here too. That way there are no excuses, and no to trying to organise meetings around anyones schedules. I appreciate that this may sometimes exclude some people (myself included, kids and what not). The only bad scenario there are the unfortunates who are never available on a particular day of the week.... Take it to the extreme, and we devise an algorithm which: * is easily calculable * changes the day of the week regularly * never puts meetings too close together * allows us to exclude certain days (lets call Fridays too busy, or not clash with LinuxSA etc) There are already a few modules in the Acme::PM::* space. Maybe we need another :-) What days work for people? Would a rotating DOW make things easier or harder for your schedule? Am I making this too complicated? Mail me privately if you're shy :-) - Justin -- Justin Hawkins justin at hawkins.id.au From lloy0076 at adam.com.au Mon Feb 22 22:06:53 2010 From: lloy0076 at adam.com.au (David Lloyd) Date: Tue, 23 Feb 2010 16:36:53 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: References: <4B7E1E77.2050205@hawtin.net.au> Message-ID: <1266905213.1595.5.camel@isengaard> #!/usr/bin/perl use strict; use warnings; use autodie; use JustinHawkings; sub days_I_like { return { Monday => "Least", Thursday => "Middle", Friday => "Most", Weekends => "No Thanks", } } sub time_I_like { return { AfterFive => "Least", AfterSix => "Most", WorkHours => "No Thanks", } } my $justin_hawkins = JustinHawkins->new(); $justin_hawkins->volunteered("To Organise the One Time To Rule Them All"); $justin_hawkins->( { liked_days => days_I_like(), liked_times => time_I_like() ); $justin_hawkins->send_email(); 1; # Well you get the gist... -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloy0076 at adam.com.au Mon Feb 22 22:08:41 2010 From: lloy0076 at adam.com.au (David Lloyd) Date: Tue, 23 Feb 2010 16:38:41 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: <1266905213.1595.5.camel@isengaard> References: <4B7E1E77.2050205@hawtin.net.au> <1266905213.1595.5.camel@isengaard> Message-ID: <1266905321.1595.6.camel@isengaard> -----Original Message----- From: David Lloyd To: Justin Hawkins Cc: adelaide-pm at pm.org Subject: Re: [adelaide.pm] next perl mongers Date: Tue, 23 Feb 2010 16:36:53 +1030 #!/usr/bin/perl use strict; use warnings; use autodie; use JustinHawkings; sub days_I_like { return { Monday => "Least", Thursday => "Middle", Friday => "Most", Weekends => "No Thanks", } } sub time_I_like { return { AfterFive => "Least", AfterSix => "Most", WorkHours => "No Thanks", } } my $justin_hawkins = JustinHawkins->new(); $justin_hawkins->volunteered("To Organise the One Time To Rule Them All"); #$justin_hawkins->( { liked_days => days_I_like(), liked_times => time_I_like() ); # # Croak me, that was a syntax error... $justin_hawkins->( { liked_days => days_I_like(), liked_times => time_I_like(), } ); $justin_hawkins->send_email(); 1; # Well you get the gist... _______________________________________________ http://adelaide.pm.org adelaide-pm at pm.org http://mail.pm.org/mailman/listinfo/adelaide-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.kirkpatrick at adelaide.edu.au Tue Feb 23 00:12:08 2010 From: andrew.kirkpatrick at adelaide.edu.au (Andrew Kirkpatrick) Date: Tue, 23 Feb 2010 18:42:08 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: References: <4B7E1E77.2050205@hawtin.net.au> Message-ID: <4B838DD8.8080404@adelaide.edu.au> I like thursdays. That is all. Or not - the following allows for votes as integers representing the day of month, by taking the last mode of the sample as the winner. Without votes, it tries for the same day and week of month in the following month. Error handling and removing or supporting time of day is left as an exercise for the reader. #!/usr/bin/perl package AdelaidePM; use Moose; use DateTime; use Date::Parse; use Statistics::Descriptive; has votes => (isa => 'ArrayRef[Int]', is => 'rw', default => sub { [] }); has last_date => (isa => 'DateTime', is => 'rw'); has day_of_week => (isa => 'Int', is => 'rw'); has week_of_month => (isa => 'Int', is => 'rw'); around 'last_date' => sub { my ($orig, $self) = splice @_, 0, 2; my $result; if (@_) { my $date = shift; unless (eval { $date->isa('DateTime') }) { $date = DateTime->from_epoch( epoch => str2time($date) ); $date->set_time_zone('Australia/Adelaide'); } $result = $self->$orig($date); $self->day_of_week($date->day_of_week); $self->week_of_month($date->week_of_month); } else { $result = $self->$orig; } return $result; }; sub next_date { my $self = shift; $self->add_votes(@_) if @_; my $next_date = $self->last_date->clone; $next_date->subtract(days => $next_date->day - 1)->add(months => 1); my $next_month = $next_date->month; my $votes = $self->votes; if (@$votes) { my $stats = Statistics::Descriptive::Full->new; $stats->add_data(@$votes); my $mode = $stats->mode; $next_date->add(days => $mode - 1); } else { my ($dow, $wom) = map $self->$_, qw(day_of_week week_of_month); while ($next_date->day_of_week != $dow || $next_date->week_of_month != $wom) { $next_date->add(days => 1); last if $next_date->month != $next_month; } } die "We're all DOOMED" if $next_date->month != $next_month; return $next_date; } sub add_votes { my ($self) = shift; push @{$self->votes}, @_; } package main; use Getopt::Long; my %opt = ( last_date => "2010-02-23", votes => [], ); GetOptions(\%opt, qw(last_date=s votes=i@)) or exit 1; push @{$opt{votes}}, grep /^\d{1,2}$/, @ARGV; my $pm = AdelaidePM->new; $pm->votes($opt{votes}); $pm->last_date($opt{last_date}); print $pm->next_date, "\n"; # ~/dev/perl$ ./adelaide_pm.pl --last_date 2010-4-13 7 7 13 24 24 # 2010-05-24T00:00:00 -- Andrew Kirkpatrick Web Application Programmer, Online Media Team Department of Marketing and Strategic Communications The University of Adelaide, CRICOS Provider Number 00123M Work Requests: http://www.adelaide.edu.au/webguide/request.html PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals. -- Jon Ribbens ----------------------------------------------------------- This email message is intended only for the addressee(s) and contains information that may be confidential and/or copyright. If you are not the intended recipient please notify the sender by reply email and immediately delete this email. Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient. From lloy0076 at adam.com.au Tue Feb 23 02:09:13 2010 From: lloy0076 at adam.com.au (David Lloyd) Date: Tue, 23 Feb 2010 20:39:13 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: <4B838DD8.8080404@adelaide.edu.au> References: <4B7E1E77.2050205@hawtin.net.au> <4B838DD8.8080404@adelaide.edu.au> Message-ID: <8A78D828-AA02-4C8D-94A0-B00F4CF4FD6F@adam.com.au> Hehe, Can't locate Moose.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at - line 1. BEGIN failed--compilation aborted at - line 1. ... :) From justin at hawkins.id.au Tue Feb 23 02:31:42 2010 From: justin at hawkins.id.au (Justin Hawkins) Date: Tue, 23 Feb 2010 21:01:42 +1030 Subject: [adelaide.pm] perl @ the Fringe Message-ID: <7D46D79F-DF64-48F0-96A5-7E2D4217920D@hawkins.id.au> Just as a little bit of pimpage, if you are heading into the Fringe festivities, make sure you check this out: http://whatgoesontourstays.com/ The guts of the system is a little PC running Asterisk, talking to a SIP box, with an old rotary phone connected to it. The IVR stuff that answers when you pick up the phone and records your sordid stories is all perl (see the Asterisk::AGI module). Hideous, crufty perl, to be sure. I spent so long messing about with recalcitrant pulse-to-DTMF converters, uncooperative phones and truly ancient system packages, I had very little time to do the actual interesting part! But it does work, and it is cool. - Justin P.S. If you happen to meet the person who ripped off the first phone, please beat them about the head with it. -- Justin Hawkins justin at hawkins.id.au From justin at hawkins.id.au Tue Feb 23 02:37:24 2010 From: justin at hawkins.id.au (Justin Hawkins) Date: Tue, 23 Feb 2010 21:07:24 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: <4B838DD8.8080404@adelaide.edu.au> References: <4B7E1E77.2050205@hawtin.net.au> <4B838DD8.8080404@adelaide.edu.au> Message-ID: <2FFFF591-BD7D-4E3C-9C45-62800C436D14@hawkins.id.au> On 23/02/2010, at 6:42 PM, Andrew Kirkpatrick wrote: > Error handling and removing or supporting time of day is left as an exercise for the reader. .... or we could just meet at midnight. - Justin -- Justin Hawkins justin at hawkins.id.au From justin at hawkins.id.au Tue Feb 23 02:43:34 2010 From: justin at hawkins.id.au (Justin Hawkins) Date: Tue, 23 Feb 2010 21:13:34 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: References: <4B7E1E77.2050205@hawtin.net.au> Message-ID: On 23/02/2010, at 4:16 PM, Justin Hawkins wrote: > I think the best bet is to do the 'done thing' and make it on a known day every month (third Monday, Last Thursday, etc). Most groups seem to do this, and I think it'd be the best thing here too. > > That way there are no excuses, and no to trying to organise meetings around anyones schedules. I appreciate that this may sometimes exclude some people (myself included, kids and what not). The only bad scenario there are the unfortunates who are never available on a particular day of the week.... Oops, the other important factor (Thanks Kim) is that the 'regular' meetings should definitely be social in nature, with the actually techy meetings being scheduled separately (though perhaps in an agreed-upon manner, say the wednesday before/after the social meeting, if there will be one that month). This seems to work for london.pm, social meetings every month, 'emergency socials' when appropriate (like someone Important being in town) and technical meetings scheduled in advance when someone has a talk to give. Thoughts? Hate it? Love it? - Justin -- Justin Hawkins justin at hawkins.id.au From kim at hawtin.net.au Tue Feb 23 17:07:00 2010 From: kim at hawtin.net.au (Kim Hawtin) Date: Wed, 24 Feb 2010 11:37:00 +1030 Subject: [adelaide.pm] perl @ the Fringe In-Reply-To: <7D46D79F-DF64-48F0-96A5-7E2D4217920D@hawkins.id.au> References: <7D46D79F-DF64-48F0-96A5-7E2D4217920D@hawkins.id.au> Message-ID: <4B847BB4.7000900@hawtin.net.au> Justin Hawkins wrote: > Just as a little bit of pimpage, if you are heading into the Fringe festivities, make sure you check this out: > > http://whatgoesontourstays.com/ > > The guts of the system is a little PC running Asterisk, talking to a SIP box, with an old rotary phone connected to it. The IVR stuff that answers when you pick up the phone and records your sordid stories is all perl (see the Asterisk::AGI module). > > Hideous, crufty perl, to be sure. I spent so long messing about with recalcitrant pulse-to-DTMF converters, uncooperative phones and truly ancient system packages, I had very little time to do the actual interesting part! But it does work, and it is cool. Sounds like a candidate for the first technical talk? chers, Kim From kim at hawtin.net.au Tue Feb 23 18:29:28 2010 From: kim at hawtin.net.au (Kim Hawtin) Date: Wed, 24 Feb 2010 12:59:28 +1030 Subject: [adelaide.pm] Using Net::FTPServer ... Message-ID: <4B848F08.8080903@hawtin.net.au> Hi, Has anyone played around with extending Net::FTPServer to use alternative auth backend ? cheers, Kim From adelaidepm at sevenone.com Wed Feb 24 23:53:55 2010 From: adelaidepm at sevenone.com (Grue) Date: Thu, 25 Feb 2010 18:23:55 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: References: <4B7E1E77.2050205@hawtin.net.au> Message-ID: <21483bf29a820277a7219ae772a10d2c@mail.au.sevenone.com> Erm while I admit that it works well for London.pm, the group is much bigger so there's always a decent quorum present when using regular day each month. I kind of like the rotating days thing to allow for people who have regular commitments on a particular day of the week. Maybe a set week of each month and timetable it to rotate from Monday to Friday or something or even get people to vote for days they *can* attend on and make sure we pick a rotation that fits the whole bunch of geeks ;-p -grue- On Tue, 23 Feb 2010 21:13:34 +1030, Justin Hawkins wrote: > On 23/02/2010, at 4:16 PM, Justin Hawkins wrote: > >> I think the best bet is to do the 'done thing' and make it on a known >> day every month (third Monday, Last Thursday, etc). Most groups seem to >> do this, and I think it'd be the best thing here too. >> >> That way there are no excuses, and no to trying to organise meetings >> around anyones schedules. I appreciate that this may sometimes exclude >> some people (myself included, kids and what not). The only bad scenario >> there are the unfortunates who are never available on a particular day of >> the week.... > > > Oops, the other important factor (Thanks Kim) is that the 'regular' > meetings should definitely be social in nature, with the actually techy > meetings being scheduled separately (though perhaps in an agreed-upon > manner, say the wednesday before/after the social meeting, if there will be > one that month). > > This seems to work for london.pm, social meetings every month, 'emergency > socials' when appropriate (like someone Important being in town) and > technical meetings scheduled in advance when someone has a talk to give. > > Thoughts? Hate it? Love it? > > - Justin From lloy0076 at adam.com.au Thu Feb 25 01:08:40 2010 From: lloy0076 at adam.com.au (David Lloyd) Date: Thu, 25 Feb 2010 19:38:40 +1030 Subject: [adelaide.pm] next perl mongers In-Reply-To: <21483bf29a820277a7219ae772a10d2c@mail.au.sevenone.com> References: <4B7E1E77.2050205@hawtin.net.au> <21483bf29a820277a7219ae772a10d2c@mail.au.sevenone.com> Message-ID: <391EC5EB-558F-444B-8D57-4A5030D9B649@adam.com.au> Monday, March 22 Friday, April 30 Monday, May 31 Friday, June 25 .... Hopefully we can see the pattern here...odd months on Mondays, even months on Fridays, last month of the year. Actually, why don't we settle those dates NOW? DSL