Perl 6 - the future is here, just unevenly distributed

IRC log for #pr-challenge, 2015-01-30

| Channels | #pr-challenge index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 rnewsham joined #pr-challenge
00:15 kid51 joined #pr-challenge
00:27 cakirke joined #pr-challenge
00:44 cakirke joined #pr-challenge
01:01 kid51_ joined #pr-challenge
01:03 vairav joined #pr-challenge
01:04 bambams Done and done. >:(
01:07 kid51_ joined #pr-challenge
01:19 BRAD joined #pr-challenge
01:25 jb360 joined #pr-challenge
02:02 Su-Shee joined #pr-challenge
02:02 itcharlie joined #pr-challenge
03:21 boreas joined #pr-challenge
03:26 kid51 joined #pr-challenge
03:35 deven_ Wow, it's been quiet in here tonight!
03:35 deven_ haarg: Are you around again tonight?  You were tremendously helpful last night and I'm hoping to solve these test failures tonight...
03:36 haarg i can probably help some
03:36 deven_ sweet :)
03:38 thrig http://www.gocomics.com/calvinandhobbes/1986/11/26
03:38 deven_ haarg: In case you didn't see my message this morning, thanks again for catching that HashRef bug.  I was getting so tired by that point that I didn't even stop to ask myself what I was dereferencing!
03:38 Peter deven_, I'm here too! /needy
03:39 deven_ Peter: Cool!  The more help, the better!  I'm in unfamiliar waters here, never having worked with Moose or Moo before.  (I've read code samples and follow the idea, and used similar constructs in ruby, but just don't have real practice with it.)
03:40 Peter I'm looking forward to porting my stuff back to Moo now, I'm so easily amused :D
03:40 deven_ lol
03:40 boreas joined #pr-challenge
03:40 Peter Just need to finish my PR thing first
03:41 deven_ thrig: Is that a reference to our little bridge collapse here in Cincinnati? :)
03:41 deven_ (which did, in fact, affect my commute the next day)
03:42 Peter Pulling values out of a deeply nested structure is always horrible :(
03:42 deven_ haarg: Maybe I should have tried this Any::Moose -> Moo porting on a smaller distribution first. lol
03:43 haarg deven_: there are a few use Any::Moose left
03:43 deven_ haarg: Sorry if my unfamiliarity with Moo & Moose makes me look like a beginner.  While I'm a relative beginner with those, I've actually been programming in Perl as my language of choice for 25 years now.
03:44 haarg no problem
03:44 deven_ haarg: I very much appreciate your help, you've been awesome. :)
03:44 deven_ haarg++
03:44 deven_ haarg++
03:44 Peter haarg++
03:45 Peter haarg, Thanks again for solving my strict constructor woes
03:45 deven_ haarg: Have you tried running any tests on my work in progress, or were you just reviewing the commit itself when you noticed the HashRef bug?
03:45 haarg just reviewing
03:46 deven_ cool
03:46 Peter I had a professor once who graded compilers in C on paper
03:46 Peter He caught more errors than GCC
03:47 Peter including a lot that are just opinion <>_<>
03:47 deven_ Peter: Fun :)
03:50 deven_ haarg: So what's the difference between $self->storage and $self->_storage?  Is the latter an internal getter?
03:51 pink_mist things starting with _ are usually only meant to be called internally, yeah
03:51 deven_ haarg: Apart from that obvious HashRef bug (well, obvious once you noticed the single character that was wrong!) -- what did you think of the rest of the changes I had been making>?
03:52 haarg it all looked correct to me
03:52 deven_ pink_mist: I know that in general programming practice, but I didn't know if it had special significance in a Moo/Moose context.
03:52 deven_ haarg: Good to know.  Not bad for a first try? :)
03:53 deven_ Apart from the MouseX::Getopt stuff (which I haven't even started fixing), did anything else jump out at you as an oversight?
03:53 Peter Is doing this kind of thing evil?
03:53 Peter next if eval "\$prev_$command eq $setting";
03:53 pink_mist yes
03:53 Peter setting can only ever be "on" or "off"
03:54 deven_ Peter: It's best to avoid string eval on general principle.  Usually there's a better way.
03:54 Peter It seems like more effort to get this stuff into a hash keyed unfer command
03:54 Peter *under
03:54 Peter I also completely control the value of command
03:56 deven_ haarg: So this first failing test now is t/02_trivial.t
03:56 deven_ haarg: The test object is just constructed with: my $test = Hailo::Test->new( storage => 'SQLite', );
03:57 deven_ haarg: Then it calls $test->test_trivial;
03:57 deven_ haarg: So far, so good.  That part doesn't blow up in any obvious way, but I don't know if it's working either.
03:58 deven_ haarg: Inside test_trivial(), it has: my $hailo = $self->hailo;  my $storage = $self->storage;  my $string = 'Hello there';  $hailo->learn($string);
03:59 deven_ haarg: The assertion failure for undef instead of Int happens inside learn()
04:00 raj4perl joined #pr-challenge
04:01 deven_ haarg: The $hailo object comes back as { brain => ':memory:', storage_class => 'SQLite', storage_args => { in_memory => 0 } } (blessed as the Hailo class)
04:02 deven_ haarg: Curious that it has ':memory:' in conjunction with in_memory => 0, but perhaps that's normal for all I know?  I haven't checked the original Any::Moose code to see if the object has the same values.
04:03 haarg so the strange thing is that order isn't getting a value, even though it has an order
04:03 deven_ haarg: $storage comes back as undef before learn() is called.  I think I'd better check if that's what happens in the original code.
04:03 deven_ haarg: I don't think the storage object is ever initializing.
04:03 deven_ haarg: (working theory)
04:04 deven_ haarg: but to finish the trace, $hailo->learn($string) isn't directly using $storage anyway (it's in the test result message below)
04:05 pink_mist do you have SQLite stuff installed? perhaps it needs some of that?
04:06 deven_ pink_mist: Not to discourage you and such inquiries are welcome, but it's not module prerequisites -- they're all available, and the tests pass with the original code; my changes in progress broke it.
04:07 deven_ joined #pr-challenge
04:07 deven_ Whoops!  Stupid web client.  Somehow did a "back" on my browser and lost the connection and all context.
04:07 Peter pink_mist, any way to do this in one go? my %prevVals; @prevVals{'device', 'retweets'} =
04:08 deven_ Peter: Why are you slicing a hash there?
04:08 pink_mist my %prevVals = (device => ..., retweets => ..., );
04:08 deven_ what he said :)
04:08 haarg deven_: figured the basic issue
04:08 deven_ haarg: Did I miss something?
04:08 Peter I would need to zip then I think
04:08 haarg namespace::clean and StrictConstructor don't play well together
04:09 deven_ haarg: oh?
04:09 Peter I have stuff pulled out of a nested data structure
04:09 Peter I want to go into those keys
04:09 haarg easiest solution is to add 'new' to the -except option
04:10 Peter pink_mist, deven_, this is how it looks http://pastebin.com/kRBVzPgv
04:10 deven_ haarg: as I was saying, in learn(): $inputs = ['Hello there'] -- but this doesn't get used because the next line calls my $storage = $self->_storage and blows up.
04:10 haarg deven_: it blows up because the defaults aren't getting applied
04:10 deven_ Peter: ugly that
04:10 haarg because the constructor is getting deleted
04:11 Peter It is, but I don't want to split it up just because, it is ugly either way
04:11 deven_ haarg: So when it tries to construct the object, the constructor is gone?
04:11 Peter Just with lots of intermediate variables
04:11 haarg yeah.  and Moo has a default constructor that will get used instead
04:12 haarg but that one doesn't apply the class specific default values
04:12 Peter haarg, any problems with StrictConstructor and namespace::autoclean?
04:12 haarg Peter: that should work without issue
04:12 pink_mist Peter: well can't say I'd know the optimum solution, but I'd probably try something like: my $source = $self->........->{relationship}{source}; my %prevVals = (device => $source->{notifications_enabled}, retweets => $source->{want_retweets});
04:12 Peter cool, thanks
04:13 jamessan joined #pr-challenge
04:13 Peter haarg++ pink_mist++
04:16 deven_ Peter: I would rewrite that like this for readability: http://pastebin.com/R0MEEkBr
04:16 deven_ haarg: So namespace::autoclean is blowing away the constructor?
04:16 haarg namespace::clean
04:17 deven_ haarg: Why would that be happening now, when the original code didn't have that problem?
04:17 Peter deven_, thanks
04:17 deven_ Peter: np
04:17 haarg order of operations in terms of how the constructors are generated
04:18 haarg with Moose or Mouse, the strictconstructor thing is attached to the metaclass
04:19 haarg which is used either by the inherited constructor, or the inlined constructor generated by make_immutable
04:19 haarg with MooX::StrictConstructor, it ends up creating the initial constructor as soon as you do that use line
04:19 deven_ haarg: Immediately after _storage() is called, the next bit of Hailo code that runs appears to be the order() getter, which returns undef.  This is because a constructor should have run first, but got blown away?
04:20 haarg yeah.  the default value for order should have been applied in the constructor.
04:20 deven_ pink_mist: lol!  Look at my paste. :)
04:20 deven_ pink_mist: Great minds think alike! ;)
04:21 deven_ pink_mist: (You typed it quicker, I was looking over the code and wondering at the strange structure.)
04:23 deven_ haarg: So you figure this line is causing the problem? use namespace::clean -except => 'meta';
04:23 haarg yes
04:23 deven_ haarg: Does it need another exception?  Or should I just remove that line?
04:24 deven_ haarg: If I comment out the namespace::clean, order() comes back with 2 instead of undef.
04:24 haarg -except => [ 'meta', 'new' ]
04:24 deven_ haarg: Good call!
04:24 deven_ haarg++
04:24 haarg although really you don't need the exception for meta with Mooo
04:24 haarg *Moo
04:24 deven_ I just *love* action at a distance problems.
04:24 deven_ haarg: So use 'new' in place of 'meta' instead?
04:25 haarg should work
04:25 deven_ haarg: Now I know that Moo is supposed to inflate to Moose on demand.  I don't need the 'meta' still in case that happens, right?
04:26 haarg it inherits the meta method from Moo::Object
04:26 haarg Moose installs it in the individual classes.  Moo does not.
04:29 deven_ haarg: Got it.  I gathered it was something like that.
04:29 deven_ haarg: Woot!  Replacing "meta" with "new" in all the namespace::clean instances fixed that bug!
04:29 deven_ haarg++
04:30 Peter nice
04:30 Peter I like autoclean myself, it "just works"
04:30 deven_ haarg: In fact, a lot more of the test suite is passing now.
04:31 itcharlie left #pr-challenge
04:32 deven_ haarg: Several failures from the command stuff -- to be expected at this point.
04:32 haarg yeah, that will take a bit more work
04:33 deven_ haarg: Indeed, it just looks to be an impedence mismatch in the APIs
04:33 deven_ haarg: This test failure is curious: t/storage/SQLite/file-exhaustive.t .. Reference [\*{'File::Temp::$fh'},"/tmp/hailo-test-SQLite-JNZRw/NWyTF0Qjo4.trn"] did not pass type constraint "Str" (in $self->{"tmpfile"}) at (eval 439) line 31
04:35 raj4perl joined #pr-challenge
04:40 rvandam joined #pr-challenge
04:50 deven_ haarg: Any idea how recent MooX::Options needs to be?  I don't want to point the prerequisite to the latest and greatest if that's not required, since that just came out 5 days ago!
04:51 haarg for MooX::Options, i'm not going to be able to help as much.  i haven't really used it, and it works differently from MooseX::Getopt.
04:52 deven_ haarg: If there's a MooseX::Getopt and MouseX::Getopt, why no MooX::Getopt to match?
04:52 deven_ I'll just try downgrading to an older version and develop against that.
04:52 haarg i wouldn't worry much about the prereq version yet.  install the latest and work with that.  you can figure out an appropriate version requirement after you get it working.
04:52 haarg it doesn't exist because nobody has written it
04:55 deven_ haarg: Well, obviously! :)
04:55 deven_ Just a little surprised nobody has pursued that.
04:56 haarg i haven't really even compared MooX::Options and MooseX::Getopt.  i just know that they are in the same problem space.
05:00 deven_ haarg: Indeed they are.  I haven't looked closely yet, but it appears that MouseX::Getopt (and maybe MooseX::Getopt also?) tries to automatically make all your attributes into command-line options, while MooX::Options requires you to make it explicit, using "option" instead of "has" for the attributes to use as options.
05:01 deven_ (and other differences)
05:06 Peter Why would anyone want all their attributes as options :S
05:08 haarg if you are building a class primarily for use on the command line, it's not a terrible default
05:09 haarg and it's all done with traits in MooseX::Getopt, so you can exclude attributes
05:12 deven_ just different approaches, I guess.
05:14 deven_ Okay, time to port Hailo::Command to MooX::Options...
05:18 raj4perl1 joined #pr-challenge
05:58 raj4perl joined #pr-challenge
06:04 deven_ Okay, really starting now, I think. :)
06:05 deven_ (got distracted with family members)
07:34 rvandam joined #pr-challenge
07:41 boreas joined #pr-challenge
07:55 mvuets joined #pr-challenge
07:57 reneeb joined #pr-challenge
08:11 sue joined #pr-challenge
08:11 neilb joined #pr-challenge
08:17 neilb_ joined #pr-challenge
08:39 dolmen joined #pr-challenge
08:57 neilb joined #pr-challenge
09:06 Relequestual joined #pr-challenge
09:07 shorty_mu joined #pr-challenge
09:15 neilb joined #pr-challenge
09:21 reneeb joined #pr-challenge
09:21 Relequestual is it considered bad form if I try to make my pull request today? =D
09:22 haarg nope
09:23 Relequestual haarg I may try if it's not too hard =]
09:24 reneeb_ joined #pr-challenge
09:35 choroba joined #pr-challenge
09:39 Relequestual Is there a "my first perl module on CPAN" guide anyone can personally recommend?
09:44 chsanch Relequestual: maybe this http://perlmaven.com/minimal-requirement-to-build-a-sane-cpan-package
09:45 Relequestual thanks chsanch . I want to do something very simple. a package which provides a mapping between two groups of terms. sounds simple enough right?
09:46 chsanch Relequestual: nice :)
09:52 choroba Working on the challenge made me find more time to work on other open source projects, too :)
10:27 cakirke joined #pr-challenge
10:32 dolmen1 joined #pr-challenge
10:34 mvuets joined #pr-challenge
10:34 punter joined #pr-challenge
10:35 jnap joined #pr-challenge
11:11 marderh joined #pr-challenge
11:28 Relequestual joined #pr-challenge
11:56 vroom joined #pr-challenge
12:31 veryrusty joined #pr-challenge
12:32 kid51 joined #pr-challenge
13:02 raj4perl joined #pr-challenge
13:11 reneeb joined #pr-challenge
13:38 shorty_mu1 joined #pr-challenge
13:43 neilb No, you can’t choose your dist for next month.
13:55 raj4perl1 joined #pr-challenge
14:03 StylusEater joined #pr-challenge
14:04 jluis joined #pr-challenge
14:26 vroom joined #pr-challenge
14:36 deven joined #pr-challenge
14:41 vroom joined #pr-challenge
15:02 tinypig joined #pr-challenge
15:21 Ptolemarch joined #pr-challenge
15:44 fredericop joined #pr-challenge
15:54 gryphon joined #pr-challenge
15:57 jluis joined #pr-challenge
16:02 gryphon OK, so this is really, really OT, but this room has a tradition of being helpful, so here we go: I'm looking for a reliable, good, simple, OSS, CLI-only listserv. But my knowledge of the landscape is well over a decade old, maybe more. Is Majordomo still viable? Better alternatives? Thanks.
16:03 PerlJam gryphon: most people I know use mailman
16:04 thrig kinda not CLI-only
16:04 gryphon That's what I've been using, but I'm not a super fan.
16:04 thrig hilarious fun upgrading it, as they pooched the 32/64 thing, so I had to export and then rebuild all the lists when moving from 32 to 64 bit
16:05 gryphon Ouch.
16:05 gryphon I'm a python n00b, so I dread trying to export.
16:05 thrig eh, that was a bundle of sh and Perl to get the job done
16:06 gryphon Oh, interesting. You wouldn't happen to have your exporter handy anywhere, would you?
16:09 thrig http://72.14.189.113/tmp/build-migration-data
16:10 gryphon You rock. Thanks. Got it.
16:10 deven chsanch: Thanks for the overnight link, I'll have to read through that.  I have one Perl module on CPAN, but I probably didn't get all the packaging details quite right.
16:10 gryphon thrig++
16:10 deven For anyone who missed it, I'm talking about this link: http://perlmaven.com/minimal-requirement-to-build-a-sane-cpan-package
16:11 deven I never did get back to coding last night. :(
16:12 deven Has anyone here ever converted MouseX::Getopt to MooX::Options?
16:31 kanashiro joined #pr-challenge
17:01 dolmen joined #pr-challenge
17:41 neilb joined #pr-challenge
17:48 vairav joined #pr-challenge
18:37 Peter_R joined #pr-challenge
18:54 ether deven: do you know about the #moose channel?
18:54 deven ether: lol
18:54 deven ether: I suppose I should have thought that through, eh? lol
18:55 deven ether: Good point, better place to ask.  I haven't had much sleep. :)
19:01 rvandam joined #pr-challenge
19:02 vroom joined #pr-challenge
19:08 punter joined #pr-challenge
19:26 Peter deven, How's it going with the porting?
19:30 reneeb joined #pr-challenge
19:35 vroom joined #pr-challenge
19:44 deven Peter: I got too distracted last night to make much further progress (family stuff).  Hit a bit of a roadblock with MooX::Options because it's not clear how to specify an equivalent to cmd_flag in MouseX::Getopt...
19:59 vairav joined #pr-challenge
20:41 Lee joined #pr-challenge
21:20 reneeb joined #pr-challenge
21:24 vroom joined #pr-challenge
21:35 vroom joined #pr-challenge
21:44 neilb 40.1% done (127/317)
21:45 StylusEater joined #pr-challenge
21:47 pink_mist I think I'm going to haveto skip =/ damnit ... I'll probably work on a PR for it later though anyway, when I have the time :P
21:47 pink_mist neilb: do I need to email you?
21:53 rvandam joined #pr-challenge
21:53 punter joined #pr-challenge
22:16 neilb pink_mist: what’s your github username?
22:16 pink_mist pink-mist
22:17 neilb pink_mist: I’ve skipped you.
22:17 pink_mist thanks =)
22:17 * neilb sobs
22:17 pink_mist I'm sorry :P I'll make sure to make up for it :P
22:17 thrig no, wait, he's some python imposter!
22:18 vti neilb: you're preparing a public shame list of some kind, aren't you? :)
22:19 neilb you might think so, but I couldn’t possibly comment
22:27 vroom joined #pr-challenge
22:39 Peter neilb, are you taking part in the PRC?
22:39 neilb does a bear core dump in the woods?
22:40 neilb I’ve claimed done, but I’m hoping my changes will be released before blogging about them. The first of my PRs has been merged, the second smaller one hasn’t yet.
22:41 neilb But OVID is at FOSDEM, and had a talk to write for it, so I’m prepared to cut him some slack
22:47 boreas joined #pr-challenge
22:51 choroba it's a shame they didn't fix blogs.perl.org
22:51 choroba anyone gathering all the blog posts related to the challenge?
22:58 boreas joined #pr-challenge
23:23 punter joined #pr-challenge
23:31 * ether wonders what happened to her PR challenger
23:31 boreas joined #pr-challenge
23:32 ether he sent me an email and a PR on the first day, all bright-eyed and bushy-tailed... I replied back saying his PR wasn't good as it was, but showed what to modify so I'd accept it... and then he vanished :/
23:32 ether since then I've held off making other changes to that dist, so as to still allow him to get credit for a PR
23:33 ether I'll wait until the weekend, and then I guess send a "hello, are you still there?" email
23:33 ether maybe he's at FOSDEM! he's in Germany afaik
23:33 thrig we'll sic Su-Shee on him
23:37 neilb ether: ping him now, might nudge him into action tomorrow!
23:40 * ether commented on the PR, and replied to his separate email.
23:40 ether Simon Wilper
23:49 neilb well, he hasn’t skip’d or quit, so that’s good
23:52 ether neilb: how are you going to do the allocations for next month? will you pick randomly from each bucket of ranked distributions?
23:52 ether (that is, allocate all the 7's first, then 6's, etc?)
23:53 neilb I’ll pick the people who’ve been nice/good first, and allocate them the dists I’ve put stars against, then just spray the rest around :-)
23:53 vairav joined #pr-challenge
23:53 ether the top 200 dists goes into rank 4; if there are 200 participants would that mean that no rank-3 dists get allocated for February?
23:54 ether I guess it would go farther down than that, if you only allocate one per author
23:54 neilb Well, not quite: fizackly!
23:54 ether heh
23:54 ether or, to put it another way: I have two dists that are ranked 5 - can I assume that one of those will be handed out?
23:54 neilb I have an ordered list of the dists, by score. I work through the people who need dists, but then I also keep track of the max-assignments-per-author
23:54 neilb yes, you can
23:55 ether ok! gets me thinking in advance
23:55 ether one is widely-used and in disrepair; the other needs a Any::Moose->Moo conversion
23:55 ether so very different :)
23:55 neilb I’ll re-run my crawler just before doing the allocation, to get up-to-date dta
23:56 ether unless you modify the algorithm again, of course.. :)
23:56 ether right
23:56 neilb well, one will be assigned in feb and one in march, unless something changes ...
23:56 * ether still has lots of questions about the scoring
23:56 ether some of my dists rank high and I can't figure out why; others rank very low but deserve a +1 or +2
23:56 * neilb still has lots of plans for the scoring :-)
23:56 neilb you remember you can +1 your dists?
23:57 ether I'd rather -1 the ones that I wouldn't wish upon my worst enemy :)
23:57 neilb mark them with x_deprecated — I ignore those :-)
23:57 ether lol
23:58 ether x_skip_me_please_neilb => 1

| Channels | #pr-challenge index | Today | | Search | Google Search | Plain-Text | summary