From toby.corkindale at strategicdata.com.au Tue Nov 1 22:05:17 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 02 Nov 2011 16:05:17 +1100 Subject: [Melbourne-pm] Next Wednesday - Perl mongers - call for presenters In-Reply-To: <4EA669EA.30303@strategicdata.com.au> References: <4EA669EA.30303@strategicdata.com.au> Message-ID: <4EB0CF8D.3030506@strategicdata.com.au> Hello everybody, The next meeting date would be next Wednesday.. But I don't have any talks lined up for it yet. Does anyone want to do a test-run of their OSDC talk, perhaps? Or something else you've done lately? Cheers, Toby -------- Original Message -------- Subject: [Melbourne-pm] Next Perl mongers meeting - call for presenters Date: Tue, 25 Oct 2011 18:48:58 +1100 From: Toby Corkindale To: melbourne-pm Hello Perl mongers, The next Melbourne Perl-mongers meeting will be on the second wednesday of the month as usual - so, November the 9th. We need some volunteers to present things! Is anyone prepared to do so? thanks, Toby _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm From melbourne-pm at mjch.net Thu Nov 3 17:47:57 2011 From: melbourne-pm at mjch.net (Malcolm Herbert) Date: Fri, 4 Nov 2011 11:47:57 +1100 Subject: [Melbourne-pm] DBIx::Class inflate/deflate vs split/combined fields Message-ID: <20111104004755.GA501@fastmail.fm> What's the recommended way to deal with cases where multiple fields in a database record need to be combined to produce a value? How does one then arrange to automatically split these back into their various components for insert/updates? I'm thinking here of cases where a database field has a string representing multiple values (I didn't write this schema) in a key=value;key=value format and other cases where I need to combine a date (without timezone) and a string containing the zone name into a DateTime object. Ideally I'd like to deal with that with the DBIx::Class inflate/deflate mechanism which should make things more portable ... In the case of the multi-value field I can create a class to represent this easily enough and write parse/dump routines as appropriate, but I'm stumped on how to work with the dates, split as they are over two database fields ... Has anyone had to tackle this before? Regards, Malcolm -- Malcolm Herbert This brain intentionally mjch at mjch.net left blank From ickphum at gmail.com Thu Nov 3 18:02:35 2011 From: ickphum at gmail.com (Ian Macdonald) Date: Fri, 4 Nov 2011 12:02:35 +1100 Subject: [Melbourne-pm] DBIx::Class inflate/deflate vs split/combined fields In-Reply-To: <20111104004755.GA501@fastmail.fm> References: <20111104004755.GA501@fastmail.fm> Message-ID: Not a Perl answer, and may not be practical depending how many examples of this you have and/or access to db schema, but I'd be tempted to put a view in front of the table to combine those two fields. Ian Macdonald Armaguard On Fri, Nov 4, 2011 at 11:47 AM, Malcolm Herbert wrote: > What's the recommended way to deal with cases where multiple fields > in a database record need to be combined to produce a value? How does > one then arrange to automatically split these back into their various > components for insert/updates? > > I'm thinking here of cases where a database field has a string > representing multiple values (I didn't write this schema) in a > key=value;key=value format and other cases where I need to combine a > date (without timezone) and a string containing the zone name into a > DateTime object. > > Ideally I'd like to deal with that with the DBIx::Class inflate/deflate > mechanism which should make things more portable ... > > In the case of the multi-value field I can create a class to represent > this easily enough and write parse/dump routines as appropriate, but > I'm stumped on how to work with the dates, split as they are over two > database fields ... > > Has anyone had to tackle this before? > > Regards, > Malcolm > > -- > Malcolm Herbert This brain intentionally > mjch at mjch.net left blank > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -- Ian Macdonald -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Thu Nov 3 18:04:24 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 04 Nov 2011 12:04:24 +1100 Subject: [Melbourne-pm] DBIx::Class inflate/deflate vs split/combined fields In-Reply-To: <20111104004755.GA501@fastmail.fm> References: <20111104004755.GA501@fastmail.fm> Message-ID: <4EB33A18.6050405@strategicdata.com.au> On 04/11/11 11:47, Malcolm Herbert wrote: > What's the recommended way to deal with cases where multiple fields > in a database record need to be combined to produce a value? How does > one then arrange to automatically split these back into their various > components for insert/updates? > > I'm thinking here of cases where a database field has a string > representing multiple values (I didn't write this schema) in a > key=value;key=value format and other cases where I need to combine a > date (without timezone) and a string containing the zone name into a > DateTime object. > > Ideally I'd like to deal with that with the DBIx::Class inflate/deflate > mechanism which should make things more portable ... > > In the case of the multi-value field I can create a class to represent > this easily enough and write parse/dump routines as appropriate, but > I'm stumped on how to work with the dates, split as they are over two > database fields ... > > Has anyone had to tackle this before? Inflation from the database is easy. For deflation, you can override the actual field name methods, plus update() and create() methods, and handle the conversion there? It's a bit messy, but works. -Toby From jarich at perltraining.com.au Fri Nov 4 00:31:53 2011 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Fri, 04 Nov 2011 18:31:53 +1100 Subject: [Melbourne-pm] Choice of topics for next MPM meeting Message-ID: <4EB394E9.8030609@perltraining.com.au> G'day folk, I've volunteered to provide a talk for the next meeting, but the options of what I can put together in the time available are both fairly introductory. So you get to pick which you like best. Whichever seems to have the most votes by midday this Sunday wins. If noone expresses any preferences, then I don't know that we'll have a talk at all. Given that these are both fairly introductory topics, please consider bringing a friend or colleague along ;) 1. Introduction to testing * Why do we test? * What do we test? * White box vs black box testing * What do tests look like? * Basic tests * Having a plan (including done_testing) * TODO and SKIP blocks * Simple tests * is it true? * is it this value? * does it match this expression? * More interesting tests * does it throw an exception? * are these two data structures the same? * what is the difference between these two strings? or these two lists? * does running my tests generate warnings * Test coverage with Devel::Cover * Test driven development (concepts) 2. Perl::Critic * Why do code review? * Good code review * Automated code review (and it's limitations) * Using Perl::Critic * Profiles * Policies * Verbosity * no_critic * Promoting and demoting policies * writing your own policies (maybe) * Worked example of making code pass Perl::Critic Respond to the list (preferably) or to me (if you really want to) regarding which topic you'd most like me to present on, if either. Or don't respond if neither are interesting. :) Votes count until I board my bus on Sunday and start writing said talk. J From ajsavige at yahoo.com.au Fri Nov 4 14:41:34 2011 From: ajsavige at yahoo.com.au (Andrew Savige) Date: Fri, 4 Nov 2011 14:41:34 -0700 (PDT) Subject: [Melbourne-pm] Choice of topics for next MPM meeting In-Reply-To: <4EB394E9.8030609@perltraining.com.au> References: <4EB394E9.8030609@perltraining.com.au> Message-ID: <1320442894.71716.YahooMailNeo@web125505.mail.ne1.yahoo.com> Though I won't be in Melbourne for the next meeting, I'm interested in both topics and would enjoy viewing the slides to either talk. A couple of old nodes I wrote a while ago that might be of use: ? ?http://www.perlmonks.org/?node_id=776607?(Why do code review?) ?http://www.perlmonks.org/?node_id=536384?(Some benefits of TDD) Cheers, /-\ ________________________________ From: Jacinta Richardson To: Melbourne Perlmongers Sent: Friday, 4 November 2011 6:31 PM Subject: [Melbourne-pm] Choice of topics for next MPM meeting G'day folk, I've volunteered to provide a talk for the next meeting, but the options of what I can put together in the time available are both fairly introductory.? So you get to pick which you like best.? Whichever seems to have the most votes by midday this Sunday wins.? If noone expresses any preferences, then I don't know that we'll have a talk at all.? Given that these are both fairly introductory topics, please consider bringing a friend or colleague along ;) 1. Introduction to testing ? ? * Why do we test? ? ? * What do we test? ? ? * White box vs black box testing ? ? * What do tests look like? ? ? * Basic tests ? ? * Having a plan (including done_testing) ? ? * TODO and SKIP blocks ? ? * Simple tests ? ? ? ? * is it true? ? ? ? ? * is it this value? ? ? ? ? * does it match this expression? ? ? * More interesting tests ? ? ? ? * does it throw an exception? ? ? ? ? * are these two data structures the same? ? ? ? ? * what is the difference between these two strings? or these two lists? ? ? ? ? * does running my tests generate warnings ? ? * Test coverage with Devel::Cover ? ? * Test driven development (concepts) 2. Perl::Critic ? ? * Why do code review? ? ? * Good code review ? ? * Automated code review (and it's limitations) ? ? * Using Perl::Critic ? ? ? ? * Profiles ? ? ? ? * Policies ? ? ? ? * Verbosity ? ? * no_critic ? ? * Promoting and demoting policies ? ? * writing your own policies (maybe) ? ? * Worked example of making code pass Perl::Critic Respond to the list (preferably) or to me (if you really want to) regarding which topic you'd most like me to present on, if either.? Or don't respond if neither are interesting.? :)? Votes count until I board my bus on Sunday and start writing said talk. ? ? J _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm From hamish at hamishcarpenter.com Fri Nov 4 16:50:31 2011 From: hamish at hamishcarpenter.com (Hamish Carpenter) Date: Sat, 5 Nov 2011 10:50:31 +1100 Subject: [Melbourne-pm] DBIx::Class inflate/deflate vs split/combined fields In-Reply-To: <4EB33A18.6050405@strategicdata.com.au> References: <20111104004755.GA501@fastmail.fm> <4EB33A18.6050405@strategicdata.com.au> Message-ID: On Fri, Nov 4, 2011 at 12:04 PM, Toby Corkindale < toby.corkindale at strategicdata.com.au> wrote: > Inflation from the database is easy. > For deflation, you can override the actual field name methods, plus > update() and create() methods, and handle the conversion there? It's a bit > messy, but works. > It could be more setup but definitely worth it if you have many of these fields. Try looking at other modules on cpan which do similar things eg: DBIx::Class::InflateColumn::IP and DBIx::Class::TimeStamp they appear to define a new field type with a corresponding component plugin which takes care of the {in,de}flate actions for you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjc at wintrmute.net Sat Nov 5 16:46:00 2011 From: tjc at wintrmute.net (Toby Wintermute) Date: Sun, 6 Nov 2011 10:46:00 +1100 Subject: [Melbourne-pm] Choice of topics for next MPM meeting In-Reply-To: <4EB394E9.8030609@perltraining.com.au> References: <4EB394E9.8030609@perltraining.com.au> Message-ID: Hi Jacinta, Thanks for offering to produce a talk for the meeting. My preference goes to the Perl::Critic talk. Cheers, Toby On 4 November 2011 18:31, Jacinta Richardson wrote: > G'day folk, > > I've volunteered to provide a talk for the next meeting, but the options of > what I can put together in the time available are both fairly introductory. > ?So you get to pick which you like best. ?Whichever seems to have the most > votes by midday this Sunday wins. ?If noone expresses any preferences, then > I don't know that we'll have a talk at all. ?Given that these are both > fairly introductory topics, please consider bringing a friend or colleague > along ;) > > 1. Introduction to testing > ? ?* Why do we test? > ? ?* What do we test? > ? ?* White box vs black box testing > ? ?* What do tests look like? > ? ?* Basic tests > ? ?* Having a plan (including done_testing) > ? ?* TODO and SKIP blocks > ? ?* Simple tests > ? ? ? ?* is it true? > ? ? ? ?* is it this value? > ? ? ? ?* does it match this expression? > ? ?* More interesting tests > ? ? ? ?* does it throw an exception? > ? ? ? ?* are these two data structures the same? > ? ? ? ?* what is the difference between these two strings? or these two > lists? > ? ? ? ?* does running my tests generate warnings > ? ?* Test coverage with Devel::Cover > ? ?* Test driven development (concepts) > > 2. Perl::Critic > ? ?* Why do code review? > ? ?* Good code review > ? ?* Automated code review (and it's limitations) > ? ?* Using Perl::Critic > ? ? ? ?* Profiles > ? ? ? ?* Policies > ? ? ? ?* Verbosity > ? ?* no_critic > ? ?* Promoting and demoting policies > ? ?* writing your own policies (maybe) > ? ?* Worked example of making code pass Perl::Critic > > Respond to the list (preferably) or to me (if you really want to) regarding > which topic you'd most like me to present on, if either. ?Or don't respond > if neither are interesting. ?:) ?Votes count until I board my bus on Sunday > and start writing said talk. > > ? ?J > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -- 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 From toby.corkindale at strategicdata.com.au Mon Nov 7 23:11:07 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Tue, 08 Nov 2011 18:11:07 +1100 Subject: [Melbourne-pm] Reminder - Melbourne Perlmongers are meeting Wednesday 9th November Message-ID: <4EB8D60B.7080401@strategicdata.com.au> Hello Perl Mongers, This month, the Perl Mongers will be meeting on Wednesday 9th November. (We meet on the second wednesday of each month) This week, Jacinta Richardson will be presenting a talk on Perl Critic, a form of automated code review. Strategic Data will provide some food and refreshments. I will give a quick update on this year's AI Challenge, "Ants". We are open to any short lightning talks.. The meeting will start at 6:30pm, and be held at: Strategic Data Level 2 51-55 Johnston street Fitzroy See you tomorrow! Toby From toby.corkindale at strategicdata.com.au Tue Nov 8 18:11:49 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 09 Nov 2011 13:11:49 +1100 Subject: [Melbourne-pm] Tonight's meeting - update Message-ID: <4EB9E165.7050100@strategicdata.com.au> Hello Perl mongers, I'm afraid I have bad news. Jacinta is unwell today, and will not be able to make our meeting tonight to present her talk on Perl Critic. Is anyone able to come up with a talk to present at short notice for tonight? Or does anyone have a suggestion for something else that we'd like to do as a group? Otherwise, we're likely to cancel tonight's meeting. Cheers Toby From toby.corkindale at strategicdata.com.au Tue Nov 8 20:57:59 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Wed, 9 Nov 2011 15:57:59 +1100 (EST) Subject: [Melbourne-pm] Tonight's meeting - update In-Reply-To: <4EB9E165.7050100@strategicdata.com.au> Message-ID: <1023286840.13283.1320814679839.JavaMail.root@dmz03> Hi, A further update - we've lost one phase of power to the building. That, combined with lack of speakers for tonight, means I'm cancelling tonight's meeting. I'm sorry, mongers - hope to catch you again soon! -Toby ----- Original Message ----- From: "Toby Corkindale" To: "melbourne-pm" Sent: Wednesday, 9 November, 2011 1:11:49 PM Subject: [Melbourne-pm] Tonight's meeting - update Hello Perl mongers, I'm afraid I have bad news. Jacinta is unwell today, and will not be able to make our meeting tonight to present her talk on Perl Critic. Is anyone able to come up with a talk to present at short notice for tonight? Or does anyone have a suggestion for something else that we'd like to do as a group? Otherwise, we're likely to cancel tonight's meeting. Cheers Toby _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm From sam at nipl.net Tue Nov 8 23:45:00 2011 From: sam at nipl.net (Sam Watkins) Date: Wed, 9 Nov 2011 18:45:00 +1100 Subject: [Melbourne-pm] Tonight's meeting - update In-Reply-To: <1023286840.13283.1320814679839.JavaMail.root@dmz03> References: <4EB9E165.7050100@strategicdata.com.au> <1023286840.13283.1320814679839.JavaMail.root@dmz03> Message-ID: <20111109074500.GO21334@opal.ai.ki> Toby Corkindale wrote: > A further update - we've lost one phase of power to the building. Seems that the meeting was not meant to be this month! In other news, my 'inbox' now has a message number 11111, it arrived just a couple days early for 11/11/11. Sam From celtic at sairyx.org Wed Nov 9 02:47:39 2011 From: celtic at sairyx.org (Anneli Cuss) Date: Wed, 9 Nov 2011 21:47:39 +1100 Subject: [Melbourne-pm] Tonight's meeting - update In-Reply-To: <20111109074500.GO21334@opal.ai.ki> References: <4EB9E165.7050100@strategicdata.com.au> <1023286840.13283.1320814679839.JavaMail.root@dmz03> <20111109074500.GO21334@opal.ai.ki> Message-ID: > > In other news, my 'inbox' now has a message number 11111, > it arrived just a couple days early for 11/11/11. > Nice! I turn 0b10101 years old on 11/11/11, full of nice numbers! - A -------------- next part -------------- An HTML attachment was scrubbed... URL: From scottp at dd.com.au Thu Nov 10 18:27:45 2011 From: scottp at dd.com.au (Scott Penrose) Date: Fri, 11 Nov 2011 13:27:45 +1100 Subject: [Melbourne-pm] Fwd: Less than a week until OSDC 2011 References: Message-ID: <1A6A5997-A38D-43F0-BC45-F17867218047@dd.com.au> One week to go everyone. Still tickets available. Come up, drive, fly, camp, hotel - you have the choice :-) Begin forwarded message: > From: Evan Leybourn > Subject: Less than a week until OSDC 2011 > Date: 11 November 2011 1:21:47 PM AEDT > To: undisclosed-recipients:; > > Hello everyone, > > Please note there are important changes in this email. > With less than a week to go before the main conference, I hope you have sorted out your travel and accommodation arrangements and are looking forward to the conference as much as we are. Some information to help get you ready for the conference: > > The Pentaho Visualisation / Mozilla Metrics workshop has been moved from Monday to Tuesday 9am, as the international presenters will not be arriving until Monday. > Arjen Lentz will be running an Upstart workshop (details below) on Tuesday afternoon. Please respond to this email if you wish to attend to help us with catering numbers. There is an additional $20 fee for this workshop. > Please make sure you arrive and have registered well before the conference opening at 9am on Wednesday. Once Senator Kate Lundy's talk starts the doors will remain closed. There's nothing worse than having frequent interruptions as people arrive throughout our VIP guest's presentation. Tea and coffee will be available from 8am to help give you a little boost. > Here is a map with key conference locations: http://maps.google.com/maps/ms?msid=205819915092920701577.0004b0dfa155fdbe04ff1&msa=0&ll=-35.279889,149.121401&spn=0.011123,0.022724 > If you are intending to come to one or more of the workshops or miniconfs on Monday & Tuesday, and haven't already contacted us, could you please let us know which ones you are attending so we can cater appropriately. > If you are working on an open source product and want to show it off, we would love you to put together a small poster for our "Wall of Australian Open Source" > Make Hack Void has invited OSDC attendees to take part in their Maker Meeting at their space in Downer on Tuesday (15/11/11). No registration is necessary, Just show up at the space around 6:15pm (for a 6:30pm start). Location and details can be found here: http://www.makehackvoid.com/community/our-space (bring $11 to share half a large pizza) > We still have tickets available so please tweet, facebook, email, or semaphor all your friends and collegues to let them know about the conference. Otherwise if you have any questions please feel free to ask. Looking forward to seeing you at the conference. > > TTFN > Evan > on Behalf of the OSDC Canberra Organising Committee. > > === > Upstarta Workshop @ OSDC 2011 > > Held on the Tuesday afternoon (15th November) before the main OSDC 2011 conference in Canberra. > Cost: $20 > > First up Arjen will introduce you to the basics of the Upstarta philosophy, so we're all on the same wavelength. Then we'll introduce a number of practical tools to assess disruptive viability of an idea (product or service), work out best marketing positioning to not be hindered by competition, and other applications of the Upstarta principles. We'll see why various known products succeeded or failed, and discuss (case studies). > > In the second part of the workshop, we'll put your new skills to use on both known concepts as well as any new ideas the participants bring along. Please bring ideas in abundance, and write them down beforehand so that you can tell what it's about within 10-20 seconds. We'll specifically filter for disruptive ideas (or tweak an idea to make it disruptive) as it enables cheap market entry, pick a few, and work on them in smaller groups. We then recombine to discuss what each group has come up with! > > Exchanging ideas and insights, and asking questions, even with people some might consider to be direct competitors, is more valuable than risky. If your idea is dependent on secrecy, it's probably not that viable. > > Arjen will also do an Upstarta-related talk in the OSIA miniconf Monday afternoon. > > Upstarta was started in 2009 by Arjen Lentz, and focuses on people who run -or are interested in starting- their business according to a set of Principles (http://upstarta.biz/principles) that make them more people friendly (both to clients and self), resilient to recessions, (potentially) better for the environment, and more. > > Obviously, this is not just something for half a day. After the workshop, you can become an Upstarta member for $5/month and participate in the ongoing co-mentoring, benefiting yourself as well as helping others. > === > > -- > Evan Leybourn > http://theagiledirector.com/ > Agile Management / Business Intelligence > Leadership / Consulting / Training > -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby.corkindale at strategicdata.com.au Thu Nov 10 21:03:11 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 11 Nov 2011 16:03:11 +1100 Subject: [Melbourne-pm] pmap execution time (was I <3 map & grep too) In-Reply-To: References: <4EA8E721.5020706@strategicdata.com.au> <20111027061225.GV11592@opal.ai.ki> <4EA8F893.8050509@strategicdata.com.au> Message-ID: <4EBCAC8F.2000207@strategicdata.com.au> On 27/10/11 20:26, Anneli Cuss wrote: >> And indeed, I picked up this style of programming from Scala, which does do >> those operations in parallel - in both senses. >> It can start running the later operations before the early ones have >> finished - and it can use multiple CPUs to process each stage in parallel. > > I misunderstood the point you were making, but I might as well share > what I've got, as it could serve as a springboard for others. It > shouldn't be too hard to feed results into subsequent operations early > (though you might need to ugly up the syntax or use something like > iterators to make it happen). > > I'm sure there's already this on the CPAN (or ten of them), but maybe > it'll be as fun for others to read as it was for me to write. A simple > parallel map: > > use threads; > use threads::shared; > > our $PARALLEL = 4; > > sub pmap (&@) { > my $fun = shift; > my @args :shared = @_; > > my $each = @args / $PARALLEL; > my @threads; > > for ($i = 0; $i< $PARALLEL; ++$i) { > my $from = $each * $i; > my $to = ($i< $PARALLEL - 1) ? ($each * ($i + 1) - 1) : $#args; > print STDERR "from $from to $to\n"; > > my ($thr) = threads->create(sub { > map&$fun, @args[$from..$to] > }); > push @threads, $thr; > } > > print STDERR "joining\n"; > my @results; > push @results, $_->join for (@threads); > @results; > } > > Adjust $PARALLEL to the number of cores your CPU has. > > SERVING SUGGESTION: > > sub dumb_fib { > my $n = shift; > $n<= 2 ? 1 : dumb_fib($n-1) + dumb_fib($n-2) > } > > my @a = (39) x 8; > my @r = pmap { dumb_fib $_ } @a; > print join ', ', @r; > > With $PARALLEL = 8 on a suitable server: > > $ time perl pmap.pl > from 0 to 0 > from 1 to 1 > from 2 to 2 > from 3 to 3 > from 4 to 4 > from 5 to 5 > from 6 to 6 > from 7 to 7 > joining > 63245986, 63245986, 63245986, 63245986, 63245986, 63245986, 63245986, 63245986 > real 1m20.436s > user 10m36.575s > sys 0m0.188s > $ > > If I replace 'pmap' with 'map': > > $ time perl map.pl > 63245986, 63245986, 63245986, 63245986, 63245986, 63245986, 63245986, 63245986 > real 5m56.631s > user 5m56.570s > sys 0m0.006s > $ > > So, half the time spent in the CPU (not managing context switches), > but 5 times longer on the wall! So, I thought I'd give this a shot in Scala.. The code is: object pmaptest extends App { // This is like my @foo = (39) x 8; // Surely there's a better way.. val foo = (1 to 8).toList.par.map(_ => 39) foo map dumb_fib foreach println // or you can write: // foo.map(dumb_fib).foreach(println) def dumb_fib(x: Int) :Int = x match { case 1 => 1 case 2 => 1 case _ => dumb_fib(x-1) + dumb_fib(x-2) } } The performance with the parallel maps are: real 0m0.795s user 0m2.316s sys 0m0.012s If I force the single-threaded version, it is: real 0m2.222s user 0m2.220s sys 0m0.012s The thing that is embarrassing is that on the same hardware, this is how long it takes to run it through Perl: parallel: real 1m14.370s user 4m47.610s sys 0m0.392s single thread: real 4m46.886s user 4m45.982s sys 0m0.040s I expected Scala to be quicker, but that's ridiculous. That time includes booting the JVM too. If I benchmark just the actual internal execution time, it comes out at around 500 to 600 ms! Ah, poor old Perl - it just isn't that good when it comes to pure maths. The only area it won out in was memory usage - about 6M, vs 28M for Scala. From toby.corkindale at strategicdata.com.au Thu Nov 10 21:34:34 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 11 Nov 2011 16:34:34 +1100 Subject: [Melbourne-pm] pmap execution time (was I <3 map & grep too) In-Reply-To: <4EBCAC8F.2000207@strategicdata.com.au> References: <4EA8E721.5020706@strategicdata.com.au> <20111027061225.GV11592@opal.ai.ki> <4EA8F893.8050509@strategicdata.com.au> <4EBCAC8F.2000207@strategicdata.com.au> Message-ID: <4EBCB3EA.2080007@strategicdata.com.au> On 11/11/11 16:03, Toby Corkindale wrote: > The code is: > val foo = (1 to 8).toList.par.map(_ => 39) > foo map dumb_fib foreach println > // or you can write: > // foo.map(dumb_fib).foreach(println) Someone asked about the alternative ways to write that line, so I thought I'd explain here in case others were curious. Scala, like Perl, has some shortcuts in the language. The following lines are all equivalent: The long way: foo.map(x => dumb_fib(x)).foreach(y => println(y)) Shortened by using _ (it's like $_ in perl): foo.map(dumb_fib(_)).foreach(println(_)) If you only have one parameter, you don't need to even use _, it'll use it by default: foo.map(dumb_fib).foreach(println) And if you only have one parameter to a function, you can skip the parentheses and it'll just take the next symbol as the parameter. You can also leave the dots out too: foo map dumb_fib foreach println This last form looks a bit more confusing to me than the previous one. However if you're building DSLs, you can make stuff read a bit more like natural language. -Toby From javier at candeira.com Mon Nov 21 08:21:19 2011 From: javier at candeira.com (Javier Candeira) Date: Tue, 22 Nov 2011 03:21:19 +1100 Subject: [Melbourne-pm] XPath 2 support? Message-ID: I am a user of Xacobeo, a XPath visualiser (written in Perl) that uses libxml2 to show the result of queries. libxml2 only supports XPath 1. Is there a recommended XPath 2 library? Googling turns up some results, but as I am using this tool to learn, I can't judge. I'd rather go with a recomendation. Thanks! J From alfiej at opera.com Wed Nov 23 00:39:23 2011 From: alfiej at opera.com (Alfie John) Date: Wed, 23 Nov 2011 19:39:23 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December Message-ID: <1322037563.29320.140661002581257@webmail.messagingengine.com> Hello Perl Mongers, This month the Melbourne Perl Mongers meeting will be on Wednesday the 14th of December. Opera Software Australia have just moved into our new office and we would like to host. Opera Software Australia will be providing pizza and drinks. All we need now are talks for the night. Has anyone got any long, short or even lightning talks to give? The meeting will start around 6:30pm at: Opera Software Australia Level 1, 91-97 William Street Melbourne CBD Alfie -- Alfie John alfiej at opera.com From alfiej at opera.com Wed Nov 23 00:42:06 2011 From: alfiej at opera.com (Alfie John) Date: Wed, 23 Nov 2011 19:42:06 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: <1322037563.29320.140661002581257@webmail.messagingengine.com> References: <1322037563.29320.140661002581257@webmail.messagingengine.com> Message-ID: <1322037726.30327.140661002582541@webmail.messagingengine.com> On Wednesday, November 23, 2011 7:39 PM, "Alfie John" wrote: > This month the Melbourne Perl Mongers meeting will be on Wednesday the > 14th of December. Next month not this month :) Alfie -- Alfie John alfiej at opera.com From cosimo.streppone at gmail.com Sun Nov 27 02:38:03 2011 From: cosimo.streppone at gmail.com (Cosimo Streppone) Date: Sun, 27 Nov 2011 11:38:03 +0100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: <1322037726.30327.140661002582541@webmail.messagingengine.com> References: <1322037563.29320.140661002581257@webmail.messagingengine.com> <1322037726.30327.140661002582541@webmail.messagingengine.com> Message-ID: 2011/11/23 Alfie John : > On Wednesday, November 23, 2011 7:39 PM, "Alfie John" > wrote: > >> This month the Melbourne Perl Mongers meeting will be on Wednesday the >> 14th of December. Cool! Yay for Opera Software Australia!! Opera HQ hosted the Oslo Perl Mongers meeting in October. I hope to meet you guys again SomeDay (tm). -- Cosimo From alfiej at opera.com Sun Nov 27 12:46:29 2011 From: alfiej at opera.com (Alfie John) Date: Mon, 28 Nov 2011 07:46:29 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: References: <1322037563.29320.140661002581257@webmail.messagingengine.com><1322037726.30327.140661002582541@webmail.messagingengine.com> Message-ID: <1322426789.10197.140661004240105@webmail.messagingengine.com> On Sunday, November 27, 2011 11:38 AM, "Cosimo Streppone" wrote: > >> This month the Melbourne Perl Mongers meeting will be on Wednesday the > >> 14th of December. > > Cool! Yay for Opera Software Australia!! > Opera HQ hosted the Oslo Perl Mongers meeting in October. We still don't have any talks for the meeting. If you're thinking about giving a talk please speak up :) Also if anyone is interested in a subject and wants to learn more, mention it on the list... it might encourage somebody knowledgeable in the area to give a talk. > I hope to meet you guys again SomeDay (tm). There's a desk waiting for you when you get back :) Alfie -- Alfie John alfiej at opera.com From myfwhite at gmail.com Sun Nov 27 14:12:09 2011 From: myfwhite at gmail.com (Myf White) Date: Mon, 28 Nov 2011 09:12:09 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: <1322426789.10197.140661004240105@webmail.messagingengine.com> References: <1322037563.29320.140661002581257@webmail.messagingengine.com> <1322037726.30327.140661002582541@webmail.messagingengine.com> <1322426789.10197.140661004240105@webmail.messagingengine.com> Message-ID: I'm enjoying using Mojolicious. I could do a talk on that, if there's any interest. Kind Regards, Myf White * Email:* myfwhite at gmail.com On Mon, Nov 28, 2011 at 7:46 AM, Alfie John wrote: > > On Sunday, November 27, 2011 11:38 AM, "Cosimo Streppone" > wrote: > > >> This month the Melbourne Perl Mongers meeting will be on Wednesday the > > >> 14th of December. > > > > Cool! Yay for Opera Software Australia!! > > Opera HQ hosted the Oslo Perl Mongers meeting in October. > > We still don't have any talks for the meeting. If you're thinking about > giving a talk please speak up :) Also if anyone is interested in a > subject and wants to learn more, mention it on the list... it might > encourage somebody knowledgeable in the area to give a talk. > > > I hope to meet you guys again SomeDay (tm). > > There's a desk waiting for you when you get back :) > > Alfie > > -- > Alfie John > alfiej at opera.com > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfiej at opera.com Sun Nov 27 15:53:49 2011 From: alfiej at opera.com (Alfie John) Date: Mon, 28 Nov 2011 10:53:49 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: References: <1322037563.29320.140661002581257@webmail.messagingengine.com><1322037726.30327.140661002582541@webmail.messagingengine.com> <1322426789.10197.140661004240105@webmail.messagingengine.com> Message-ID: <1322438029.18720.140661004294609@webmail.messagingengine.com> Hey Myf, On Monday, November 28, 2011 9:12 AM, "Myf White" wrote: I'm enjoying using Mojolicious. I could do a talk on that, if there's any interest. I'm a bit of a hipster when it comes to web frameworks so a talk on Mojolicious would be great. Alfie -- Alfie John [1]alfiej at opera.com References 1. mailto:alfiej at opera.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.sharpe at developersatlarge.com Sun Nov 27 19:21:58 2011 From: m.sharpe at developersatlarge.com (Matt Sharpe) Date: Sun, 27 Nov 2011 19:21:58 -0800 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December Message-ID: <-4235513647491912833@unknownmsgid> That sounds awesome Myf, I'd be really interested to see how other people are using mojo and mojolicious. Unfortunately I won't be back in Australia until February, would it be possible to get the talk recorded? That would be much appreciated. I'm also curious if you tried Dancer or Leyland or any of the other web-service type frameworks? Matt ------------------------------ From: Alfie John Sent: 28/11/2011 10:53 AM To: Myf White Cc: melbourne-pm at pm.org Subject: Re: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December Hey Myf, On Monday, November 28, 2011 9:12 AM, "Myf White" wrote: I'm enjoying using Mojolicious. I could do a talk on that, if there's any interest. I'm a bit of a hipster when it comes to web frameworks so a talk on Mojolicious would be great. Alfie -- Alfie John alfiej at opera.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfiej at opera.com Mon Nov 28 18:01:14 2011 From: alfiej at opera.com (Alfie John) Date: Tue, 29 Nov 2011 13:01:14 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers meeting for Wednesday the 14th of December In-Reply-To: <-4235513647491912833@unknownmsgid> References: <-4235513647491912833@unknownmsgid> Message-ID: <1322532074.7814.140661004834765@webmail.messagingengine.com> Hey Matt, On Sunday, November 27, 2011 7:21 PM, "Matt Sharpe" wrote: That sounds awesome Myf, I'd be really interested to see how other people are using mojo and mojolicious. Unfortunately I won't be back in Australia until February, would it be possible to get the talk recorded? That would be much appreciated. We don't have any recoding equipment so unless somebody is able to bring proper gear the talks are going to have to be recoded using my iphone (that is of course if speakers give their consent to be recorded). Alfie -- Alfie John [1]alfiej at opera.com References 1. mailto:alfiej at opera.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tconnors at astro.swin.edu.au Tue Nov 29 04:29:14 2011 From: tconnors at astro.swin.edu.au (Tim Connors) Date: Tue, 29 Nov 2011 23:29:14 +1100 (EST) Subject: [Melbourne-pm] WTF were they thinking? Message-ID: http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html Does anyone know whether this was completely arbitrary, or whether there was good logic behind this change? -- Tim Connors From andrew at sericyb.com.au Tue Nov 29 04:54:31 2011 From: andrew at sericyb.com.au (Andrew Pam) Date: Tue, 29 Nov 2011 23:54:31 +1100 Subject: [Melbourne-pm] WTF were they thinking? In-Reply-To: References: Message-ID: <4ED4D607.2000206@sericyb.com.au> On 29/11/11 23:29, Tim Connors wrote: > http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html > > Does anyone know whether this was completely arbitrary, or whether there > was good logic behind this change? Explained quite well in the comments, I thought? Andrew -- Andrew Pam Serious Cybernetics From david.warring at gmail.com Tue Nov 29 10:58:12 2011 From: david.warring at gmail.com (David Warring) Date: Wed, 30 Nov 2011 05:58:12 +1100 Subject: [Melbourne-pm] WTF were they thinking? In-Reply-To: <4ED4D607.2000206@sericyb.com.au> References: <4ED4D607.2000206@sericyb.com.au> Message-ID: Here's a reference to the change in the 5.14.0 perl delta: http://search.cpan.org/~jesse/perl-5.14.0/pod/perldelta.pod#Use_of_qw(...)_as_parentheses On Tue, Nov 29, 2011 at 11:54 PM, Andrew Pam wrote: > On 29/11/11 23:29, Tim Connors wrote: > > > http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html > > > > Does anyone know whether this was completely arbitrary, or whether there > > was good logic behind this change? > > Explained quite well in the comments, I thought? > > Andrew > -- > Andrew Pam > Serious Cybernetics > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathew.blair.robertson at gmail.com Tue Nov 29 16:58:39 2011 From: mathew.blair.robertson at gmail.com (Mathew Robertson) Date: Wed, 30 Nov 2011 11:58:39 +1100 Subject: [Melbourne-pm] WTF were they thinking? In-Reply-To: <4ED4D607.2000206@sericyb.com.au> References: <4ED4D607.2000206@sericyb.com.au> Message-ID: On 29 November 2011 23:54, Andrew Pam wrote: > On 29/11/11 23:29, Tim Connors wrote: > > > http://blogs.perl.org/users/rurban/2010/09/qw-in-list-context-deprecated.html > > > > Does anyone know whether this was completely arbitrary, or whether there > > was good logic behind this change? > > Explained quite well in the comments, I thought? > > Not really... 'for' is a statement, not a function. If that were the case 'if ...' and 'print ...' and so on, should also require parens... ' Alternatively... 'for' takes a list as its third (or second) argument, qw// provides that. Parens is only syntactic sugar for generating a list. For example (arguably) this should also work, but the parsing would be almost impossible: for keys %hash { print $_ } My $0.02 -> the core developers should be making Perl faster (and fixing bugs), as highlighted by the recent comparison on this mailing list. I know that in the past, I have moved code to a different language for a speed increase, once the business rules had stabilized. Cheers, Mathew Robertson -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfiej at opera.com Wed Nov 30 18:53:35 2011 From: alfiej at opera.com (Alfie John) Date: Thu, 01 Dec 2011 13:53:35 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers date change for December? Message-ID: <1322708015.30362.140661005845365@webmail.messagingengine.com> Hi everyone, If you were thinking of coming along to the December meeting which was on the 14th (Wednesday), would you object to moving it to either the Tuesday or the Thursday (13th or 15th)? Also is there anyone else that might want to give a talk? Alfie -- Alfie John alfiej at opera.com From toby.corkindale at strategicdata.com.au Wed Nov 30 18:56:41 2011 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Thu, 01 Dec 2011 13:56:41 +1100 Subject: [Melbourne-pm] Thanks Alfie! Message-ID: <4ED6ECE9.20708@strategicdata.com.au> I've been away a lot (conferences, holidays) for the past two weeks - thanks to Alfie for ensuring the Perlmonger meetings are still on track! -Toby From myfwhite at gmail.com Wed Nov 30 21:39:27 2011 From: myfwhite at gmail.com (Myf White) Date: Thu, 1 Dec 2011 16:39:27 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers date change for December? In-Reply-To: <1322708015.30362.140661005845365@webmail.messagingengine.com> References: <1322708015.30362.140661005845365@webmail.messagingengine.com> Message-ID: Hi I can't do the Tues, but the Thursday works (and it gives me an extra day to procrastinate preparing a talk!) Kind Regards, Myf White* * On Thu, Dec 1, 2011 at 1:53 PM, Alfie John wrote: > Hi everyone, > > If you were thinking of coming along to the December meeting which was on > the 14th (Wednesday), would you object to moving it to either the Tuesday > or the Thursday (13th or 15th)? > > Also is there anyone else that might want to give a talk? > > Alfie > > -- > Alfie John > alfiej at opera.com > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarich at perltraining.com.au Wed Nov 30 22:05:32 2011 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 01 Dec 2011 17:05:32 +1100 Subject: [Melbourne-pm] Melbourne Perl Mongers date change for December? In-Reply-To: <1322708015.30362.140661005845365@webmail.messagingengine.com> References: <1322708015.30362.140661005845365@webmail.messagingengine.com> Message-ID: <4ED7192C.8030302@perltraining.com.au> On 01/12/11 13:53, Alfie John wrote: > Hi everyone, > > If you were thinking of coming along to the December meeting which was on the 14th (Wednesday), would you object to moving it to either the Tuesday or the Thursday (13th or 15th)? Thursday would be fabulous for me if SD are up to the change of night. J