Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2015-09-17

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
05:30 jberger joined #pdl
13:16 jberger joined #pdl
15:55 JQKP joined #pdl
15:56 JQKP Hi. I tried cpan PDL::Stats and was told PGPLOT (a dependency) could not be installed. Can someone please help me figure out why not? I don't know where to look.
15:59 JQKP ... or what I can do instead.
16:06 sivoais JQKP: hi!
16:08 sivoais so PGPLOT was added as a strict dep with the latest release although it really doesn't need to be unless you want to use PDL-Stats plotting commands
16:08 sivoais JQKP: do you have cpanm ?
16:08 sivoais cpan-minus
16:08 JQKP yes
16:09 JQKP and no, I have no interest in plotting
16:09 sivoais if you run
16:10 sivoais $ cpanm PDL::Stats@0.70
16:10 sivoais there are no user-facing changes in the releases after that, so it should be fine to install
16:11 JQKP and then I won't be able to plot? (not that I care. just checking.)
16:12 sivoais you won't be able to plot until you can install PGPLOT. Which might be difficult since it requires the pgplot Fortran library
16:12 sivoais PGPLOT.pm (just to be clear)
16:13 sivoais we're working on fixing this issue at <https://github.com/PDLPorters/PDL-Stats/issues/15>
16:13 sivoais I'd make a PR and release myself, but I'm kind of swamped with $WORK right now
16:15 opkick [PDL-Stats] zmughal commented on issue #15: Just FYI: In the mean time, users can use:... http://git.io/vnJWu
16:22 JQKP joined #pdl
16:24 JQKP got klined or something (kidding, but I did get disconnected). Thanks very much for the info, sivoais . Last thing I saw was a bot telling us that zmughal had commented on issue 15. If you told me anything after that, I'd appreciate if you repeated it
16:27 sivoais JQKP: nope, that was all :-) Next time you can check the logs in the /title as well :-D
16:27 JQKP right, forgot about that. sorry
16:28 sivoais no problem!
16:35 jberger that zmughal guy can be really annoying, right sivoais?
16:36 sivoais yeah, always commenting on every issue. And at all these odd hours too! My phone is always buzzing when that happens! :-P
16:45 JQKP joined #pdl
16:49 JQKP ... and I'm back. Quick question that I don't see answered at PDL::QuickStart or in the table of contents of PDL::Indexing ... if I have a one dimensional pdl and wish to add stuff to it (like perl's unshift or push), can I?
16:58 JQKP Hm, reading http://pdl.perl.org/PDLdocs/Core.html , it looks like set $ary, $ary->dim(0), $foo # should work
17:00 sivoais JQKP: you can concatenate PDLs together by creating a new pdl using append, glue, or cat depending on what dimensions you want the result to have
17:01 JQKP thank you; I'll check out those three functions...
17:02 sivoais JQKP: in the future, look into zeroes() in order to make a PDL of the size you expect ahead of time
17:03 JQKP sivoais: does that save processing or save memory (or both)?
17:03 sivoais processing since you don't have to reallocate more memory
17:04 JQKP i see... thanks
17:04 JQKP append looks good. $a = $a->append($b);
17:04 sivoais also, using set() is not recommended if you want speed since it works through a Perl function and only handles a single value at a time
17:05 sivoais yep
17:05 sivoais how are you constructing these values? Maybe with some more info, we can get a more appropriate solution
17:06 sivoais also, fyi, you should avoid using $a, $b variables in Perl. Those are reserved for sort { }. I keep forgetting that myself.
17:07 sivoais Perl allows you to use them, but Perl allows a lot of things! :-P
17:07 JQKP right, I know (about $a and $b). thanks. I was actually using them because the docs for append use them :)
17:07 sivoais well... well..well... that needs to be fixed
17:08 JQKP Right now I have: for (@x) {push @ary, ($x[$_]) x $y[$_] } # and then I convert it to a pdl. But that takes up too much memory -- I want to make the pdl from the start. So I plan to use append
17:12 opkick [pdl] zmughal opened issue #150: documentation: remove use of $a, $b in example code http://git.io/vnJM7
17:13 sivoais so if @x = ( 3 2 1 ) and @y = ( 2 4 2 )
17:13 sivoais you want a pdl
17:13 sivoais $x = [ 3 3 2 2 2 2 1 1 ]
17:14 sivoais right?
17:14 JQKP Exactly. So I guess $ary = null; for (@x) { $ary = $ary->append(pdl (($x[$_]) x $y[$_]) ) } #?
17:17 sivoais that should work. I'll try to see if there is something that can do that natively
17:21 JQKP (er, not for (@x) but for (0 .. @x - 1) of course)
17:25 sivoais JQKP: here you are!
17:25 sivoais $things = pdl( 3,2,1 ); $counts = pdl( 2, 4, 2); rld( $counts, $things )
17:25 sivoais # [3 3 2 2 2 2 1 1]
17:26 sivoais $ pdldoc rld
17:26 sivoais for run-length decode
17:27 JQKP sivoais: cool! thank you
18:55 opkick [pdl] wchristian pushed 1 new commit to longlong-double-fix: http://git.io/vnUrU
18:55 opkick pdl/longlong-double-fix 1001556 Chris Marshall: Fix shape to be indx data type (previously double default)
19:55 opkick [pdl] wchristian force-pushed master from b3cddcd to b26afaa: http://git.io/F_ij-Q
19:55 opkick [pdl] wchristian created sf#396 (+1 new commit): http://git.io/vG7Az
19:55 opkick pdl/sf#396 49771f2 Derek Lamb: Fix sf#396, Module docs can not be found more than once....
20:06 travis-ci PDLPorters/pdl#332 (master - b3cddcd : Derek Lamb): The build has errored.
20:06 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/b26afaaee1b6...b3cddcd57711
20:06 travis-ci Build details : https://travis-ci.org/PDLP​orters/pdl/builds/80896236
20:19 mohawk force push to master?
20:24 mohawk sivoais, you about?
20:30 travis-ci PDLPorters/pdl#333 (master - b26afaa : Derek Lamb): The build passed.
20:30 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/b3cddcd57711...b26afaaee1b6
20:30 travis-ci Build details : https://travis-ci.org/PDLP​orters/pdl/builds/80896640
20:36 opkick [PDL-Stats] mohawk2 pushed 1 new commit to master: http://git.io/vnTkf
20:36 opkick PDL-Stats/master 92ebce8 Ed J: Make PDL::Graphics::PGPLOT and PDL::Slatec recommends, not depends
20:37 opkick [PDL-Stats] mohawk2 closed issue #15: Makefile lists optional PGPLOT as required http://git.io/vGg70
20:37 opkick [PDL-Stats] mohawk2 commented on issue #15: Nice work, @kmx. Implemented in 92ebce8. http://git.io/vnTkV
20:39 JQKP joined #pdl
20:40 JQKP mohawk: So I did " cpanm PDL::Stats@0.70 " to get around that issue. Does this mean I can now " cpanm PDL::Stats " ?
20:40 mohawk not for another short period
20:40 mohawk i've merged it to master but i'm going over the other open issues
20:40 mohawk when i'm satisfied, then i'll make a CPAN release
20:40 JQKP got it
20:41 mohawk i really need to figure out caching of PDL/PDL::Core in the CI
20:41 JQKP Thank you
20:41 mohawk as it is, the build will have to run a full build of the whole of PDL
20:41 JQKP Will the bot in this channel note the new release?
20:42 mohawk JQKP, please bear in mind that you're not missing out on any new functionality, this is all just tweaks
20:42 mohawk it's a webhook integration, and sort of
20:42 JQKP mhm I know, but this way I don't have to remember not to update the module
20:42 mohawk the convention is to tag when one releases
20:42 mohawk so when you see a notification about a tag, it's reasonable to assume that signifies a cpan release
20:43 JQKP okay
20:46 JQKP "but this way I don't have to remember not to update the module" - or to make sure that other users use the same subversion
21:03 travis-ci PDLPorters/PDL-Stats#24 (master - 92ebce8 : Ed J): The build passed.
21:03 travis-ci Change view : https://github.com/PDLPorters/PDL-Stat​s/compare/83bbccd64599...92ebce8bc9dc
21:03 travis-ci Build details : https://travis-ci.org/PDLPort​ers/PDL-Stats/builds/80904178
21:12 mohawk JQKP speaks wisdom
21:36 opkick [PDL-Stats] mohawk2 pushed 4 new commits to master: http://git.io/vnTBh
21:36 opkick PDL-Stats/master d30cb29 kmx: making doc available on metacpan.org (GENERATED subdir)
21:36 opkick PDL-Stats/master 18af805 kmx: make dist now fails if "gsl-config" command not available
21:36 opkick PDL-Stats/master 42429ca Ed J: v.073
21:36 opkick [PDL-Stats] mohawk2 tagged v0.73 at master: http://git.io/vnTRJ
21:38 opkick [PDL-Stats] mohawk2 commented on issue #17: Rebased and merged. Additionally, d0f49a6dfa73b7b4d0d0344970460835f6360b0e renames the `*.pp` files to `*.pd` so `pdlpp_mkgen` can see them. Released as 0.73. http://git.io/vnTRg
21:38 opkick [PDL-Stats] mohawk2 closed pull request #17: making doc available on metacpan.org (GENERATED subdir) (master...master) http://git.io/vZLoC
21:41 JQKP joined #pdl
21:41 mohawk hi JQKP
21:42 mohawk couple of minutes ago i uploaded 0.73
21:42 mohawk you also missed me saying you'd spoken wisdom ;-)
21:42 JQKP hi... no, I was following the log :) and thanks. Just wanted to confirm that that means PDL::Stats is new and improved on CPAN
21:43 mohawk subject to waiting for the indexes, it's definitely new
21:43 mohawk and i'm hoping you'll be able to tell me (and report using cpanm-reporter) whether it's improved!
21:44 JQKP a deep tip of my hat to all you open source contributors... lots of work on behalf of others, at no pay
21:46 mohawk ha ha, thanks
21:46 JQKP (all the tens of thousands of you, I assume you're all reading this. Thank goodness for logs.) And to you, mohawk, who fixed this problem, in particular
21:46 mohawk if you wouldn't mind actually trying v0.73 and telling me whether it worked, that would be helpful
21:46 mohawk i'm fixing a problem that i created, so don't be too effusive ;-)
21:47 mohawk however assuming it all works, this release does also improve the docs visible on metacpan
21:47 mohawk so it's all good
21:48 JQKP 0.73 works as well as 0.70 did, as far as I can see. (That is, I get the same error and still don't know why... but at least it runs)
21:52 mohawk can you use the paste link in /topic to show me the error?
21:54 JQKP It's very short and the channel's not crowded: Invalid n: -5.128500397423
21:55 opkick [pdl] wchristian pushed 1 new commit to longlong-double-fix: http://git.io/vnTg0
21:55 opkick pdl/longlong-double-fix 6f4e728 Chris Marshall: Add start for t/bigmem.t tests...
21:55 mohawk i would need to see what you're doing to get that error
21:56 mohawk indeed, it's conceivable that it's not PDL::Stats's error at all :-)
21:56 JQKP It may be a pbcak. But the code is my employer's, not mine, so I don't think I can paste it
21:57 JQKP I'm using t_test_nev though, for what it's worth.
21:57 mohawk that's fair enough
21:57 mohawk if you're saying PDL::Stats is misbehaving, it ought to be possible to reduce that down to a simple case that also misbehaves
21:57 JQKP Yeah... I can try
21:58 mohawk that would be awesome
21:58 mohawk if you find it after i vanish, you will be very welcome to create a github issue
21:59 opkick [PDL-Stats] shawnlaffan commented on issue #15: Installs cleanly for me.  Thanks for fixing it.  ... http://git.io/vnT2r
22:01 mohawk great
22:02 travis-ci PDLPorters/PDL-Stats#25 (master - d0f49a6 : Ed J): The build passed.
22:02 travis-ci Change view : https://github.com/PDLPorters/PDL-Stat​s/compare/92ebce8bc9dc...d0f49a6dfa73
22:02 travis-ci Build details : https://travis-ci.org/PDLPort​ers/PDL-Stats/builds/80915298
22:09 opkick [PDL-Stats] mohawk2 commented on issue #15: Thanks for the report! http://git.io/vnTwL
22:10 JQKP mohawk: oh, okay, the problem seems to be in Statistics::Distributions (or, again, in my code)
22:15 mohawk i'm glad to hear (i think that) you're narrowing it down
22:16 mohawk if it does turn out to be in PDL::Stats, i (or more likely one of the other contributors) will be pleased to take a deeper look
22:17 JQKP Oh, it appears that t_test_nav returns a nonintegral dof whereas tprob requires it to be integral
22:17 JQKP (tprob from Statistics::Distributions)
22:19 JQKP (Adding in round_rand fixed it.)
22:19 JQKP ^ mohawk
22:20 mohawk ah HA
22:20 mohawk so, all good now?
22:21 JQKP all good now -- though both modules should probably document the format of the dof
22:21 JQKP the... type, I think I mean.
22:21 mohawk i agree
22:22 mohawk want to file an issue with each?
22:22 mohawk (i can only promise to help with my one ;-) )
22:23 JQKP I don't really want to make a CPAN (or Github?) account just for this.
22:24 mohawk hm
22:24 mohawk a github account is a good thing
22:24 mohawk however, i'll just fix it now
22:24 JQKP but hey now you know about it, so at least one of them might get improved on. :)
22:24 JQKP thanks :)
22:25 mohawk i may be being particularly stupid, but i can't find which class t_test_nav is in?
22:26 JQKP t_test_nev
22:26 JQKP PDL::Stats::Basic
22:26 mohawk got it
22:26 mohawk lots of lovely docs: https://metacpan.org/release/ETJ/PDL-Stats-0.73
22:27 mohawk so you're saying t_test_nev requires integers as inputs?
22:28 mohawk wrong, it returns floats
22:28 mohawk whereas tprob requires ints as inputs?
22:28 mohawk seems to me the surprising bit is tprob not giving an error on inputs it doesn't like
22:28 mohawk i'd have thought real numbers would kind of be the default?
22:29 JQKP t_test_nev returns decimal for its second returned value whereas tprob requires integer for its first (which is the corresponding value)
22:30 mohawk ok
22:30 mohawk i'll create an issue as i'm not clear on what needs saying, or how to say it
22:30 JQKP I **think** integer is standard for dof in stats (which means t_test_nev's documentation should be edited), but I have to admit I'm not sure.
22:34 JQKP anyway I have to sign off.... thanks again for your help mohawk, have a good day/night
22:38 mohawk and you
22:38 mohawk if you can come back with a reasonably authoritative source, i'll make a github issue for it
22:47 JQKP joined #pdl
22:49 JQKP okay I'm back just for a second. (I knew I wouldn't sleep tonight without looking this up.) Apparently, mohawk, a t_test_nev generally - meaning not only in this module - returns a noninteger dof. Source: http://stats.stackexchange.com/q/116511
22:49 JQKP So you don't need to edit anything
22:49 JQKP and now - bye
22:50 mohawk jqkp, thanks!

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary