Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-02-15

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

All times shown according to UTC.

Time Nick Message
00:16 Molaf_ joined #pdl
02:43 jberger_ joined #pdl
15:12 Molaf__ joined #pdl
17:47 drrho joined #pdl
19:43 rindolf joined #pdl
20:07 jberger_ joined #pdl
20:07 jberger_ run4flat, ick! look at this! https://github.com/PDLPorters/pdl/blob/master/Doc/Doc.pm#L607
20:08 jberger_ is that pre qr support!
20:08 jberger_ ??
20:10 jberger_ IMO that should be removed ASAP
20:10 jberger_ use qr instead
20:11 run4flat Sure! Go for it!
20:12 run4flat replace here: https://github.com/PDLPorters/pdl/blob/master/Doc/Doc.pm#L583
20:12 run4flat oh, that's the only placd
20:12 run4flat oh, that's the only place
20:13 run4flat as it's actually documented as taking a string, we would need to preserve that behavior
20:13 run4flat but it would be good to change line 583 to only operate if $pattern is not already a regex ref
20:14 run4flat then we'd have to run back through the modules/scripts that call this and update them
20:14 run4flat curious, how did you come across this?
20:14 run4flat were you looking through piddlebot's source?
20:15 jberger_ it should take a regex-y string
20:15 run4flat on a nearly separate note, my recent dev release of PDL::Parallel::threads is doing well on the testers
20:15 run4flat except for 64 bit machines with long-double support: http://www.cpantesters.org/cpan/report/e5645908-7636-11e2-b68b-cf62270fb964
20:15 jberger_ and if you need things like case insensitivity you should do it properly
20:16 * run4flat looks again
20:16 jberger_ (?i) for example
20:16 run4flat right...
20:16 jberger_ but better to use a qr regex
20:16 run4flat yes, I completely agree with that
20:16 run4flat the only thing I'm not sure about is how to deprecate the old behavior
20:17 run4flat by "deprecate" I mean "remove the trailing /i on the current regex usage"
20:17 jberger_ do you think anything but this uses PDL::Doc->search
20:17 jberger_ ?
20:17 jberger_ grep.cpan.me
20:17 * run4flat check's Maggie's Makefile.PL code
20:18 run4flat Hmm, did anybody notice that I completely answered Craig's question completely?
20:18 run4flat completely completely?
20:19 * run4flat chuckles
20:19 rindolf Hi all.
20:19 run4flat hello rindolf
20:19 jberger_ I had misunderstood the question
20:19 jberger_ rindolf, o/
20:19 rindolf run4flat: what's up?
20:20 rindolf jberger_: what's up?
20:20 run4flat not much
20:20 jberger_ run4flat, you were definitely right
20:20 run4flat joel and I are discussing the inner workings of PDL::Doc
20:20 run4flat and how it's stupid and old and crufty
20:20 run4flat because it was written before Perl had qr//
20:20 jberger_ it really is unbelievable
20:20 run4flat Unbelievable?
20:20 jberger_ and before it had Pod::Parser btw
20:20 run4flat haha
20:20 run4flat c'mon, that's a stretch. It's totally believable
20:21 run4flat once upon a time Perl didn't differentiate between strings and regexes
20:21 run4flat now it does
20:21 jberger_ I know that in my head, but my eyes still can't believe what they see!
20:21 run4flat you've only worked with Modern Perl code then
20:21 run4flat remember, PDL went into development slump for a number of years
20:22 run4flat lots of code, very few devs
20:22 jberger_ the best thing about qr regexes is that they stringify to string which will properly interpolate into a regex
20:22 jberger_ hmmmm, makes me wonder
20:23 run4flat that also makes *me* wonder
20:23 run4flat what if you pass a *regex* to the search method?
20:23 jberger_ THATS THE PROBLEM
20:23 run4flat let's find out!
20:23 run4flat liddle_piddle_bot, whereis FFT
20:23 jberger_ oops
20:23 run4flat argh
20:24 run4flat whereis FFT
20:24 liddle_piddle_bot run4flat: Found FFT in  (http://pdl.sourceforge.net/PDLdocs/.html#FFT), PDL::FFT (http://pdl.sourceforge.net/PDLdocs/FFT.html#FFT)
20:24 run4flat ha
20:24 run4flat gotta change that
20:24 run4flat should point to pdlporters.github.com, right jberger_?
20:24 run4flat :-)
20:24 jberger_ http://grep.cpan.me/?q=PDL%3A%3ADoc
20:24 run4flat ok, now let's tinker with piddlebot's code
20:25 * run4flat tinkers
20:25 run4flat ok, hopefully liddle doesn't break
20:25 run4flat whereis FFT
20:25 liddle_piddle_bot run4flat: Could not find FFT.
20:25 run4flat oops
20:25 run4flat whereis FFT
20:25 liddle_piddle_bot run4flat: Found FFT in  (http://pdl.sourceforge.net/PDLdocs/.html#FFT)
20:27 run4flat ok, no surprise: that link doesn't work
20:27 run4flat try again
20:27 run4flat whereis FFT
20:27 liddle_piddle_bot run4flat: Found FFT in
20:28 run4flat whereis FFT
20:28 liddle_piddle_bot run4flat: Found FFT in []
20:44 jberger_ https://gist.github.com/jberger/4963400
20:44 jberger_ it has a string eval
20:44 jberger_ how much do we care?
20:46 jberger_ btw I invited mst here to look at the problem, since he happened to be hanging out in #mojo
20:46 jberger_ he seems like he would know if there is an artful way of dealing with this
21:00 jberger_ run4flat, ok look now
21:00 run4flat sorry, $boss swung by
21:00 run4flat now, wherer were we?
21:01 jberger_ https://gist.github.com/jberger/4963400
21:01 run4flat thanks
21:01 run4flat no string evals without Safe.pm
21:02 run4flat in a previous life, piddlebot had string evals
21:02 run4flat and it always had me a bit worried
21:02 run4flat then my harddrive burned
21:02 run4flat but not because of piddlebot
21:03 run4flat jberger, there's nothing wrong with JUST SENDING A REGEX to the method
21:03 run4flat :-D
21:04 run4flat so we don't need to run the eval
21:04 run4flat :-)
21:04 jberger_ thats what I was going to do, but you wanted a deprecation path
21:04 run4flat but that's my point
21:04 run4flat we don't need to touch the code at all to pass it qr
21:04 run4flat the only problem is that it forces case insensitivity
21:05 jberger_ not just case
21:05 run4flat but that can be addressed gracefully
21:05 jberger_ there are other flags
21:05 run4flat no?
21:05 run4flat oh, I only saw the /i
21:05 jberger_ and it tries to handle m!! etc
21:05 run4flat whereis FFT
21:05 liddle_piddle_bot run4flat: Found FFT in File, /home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm, Ref, Module: FFTs for PDL
21:06 run4flat hmm, that's not quite right
21:06 jberger_ it can't possibly handle m{}
21:06 run4flat sorry, I'm messing with piddlebot as we speak
21:06 jberger_ it tries to parse out the flags and dies on an unknown flag!
21:06 run4flat and piddlebot (liddle_piddle_bot) live-reloads its code when it detects a change
21:07 run4flat no no
21:07 run4flat if you say, $pdldoc->search(qr/some-thing/, ['Name']), it Just Works
21:07 run4flat because Perl properly stringifies qr/some-thing/
21:08 jberger_ thats not what I'm saying
21:09 run4flat left #pdl
21:09 run4flat joined #pdl
21:10 run4flat joined #pdl
21:10 run4flat Im so sorry, my irc chat client did something exceedingly stupid and I couldn't see the channel anymore
21:10 run4flat but I couldn't join it
21:10 run4flat I left off with jberger_ saying "that's not what I'm saying"
21:11 jberger_ thats all thats been said
21:11 run4flat oh, ok
21:11 jberger_ I was coming up with my example
21:11 run4flat k
21:11 jberger_ perl -MPDL::Doc::Perldl -MData::Dumper -E 'print Dumper $PDL::onlinedoc->search( q{m/slice/i}, "Name")'
21:11 jberger_ allowed
21:12 jberger_ perl -MPDL::Doc::Perldl -MData::Dumper -E 'print Dumper $PDL::onlinedoc->search( q{m/slice/u}, "Name")'
21:12 jberger_ dies
21:12 run4flat ok, that's a bug
21:13 run4flat unless I'm confused about the modifiers that can be applied to a regex
21:13 jberger_ right, do you want to remove the ability to send a regex like m//flags
21:13 run4flat no, why would we do that?
21:13 jberger_ https://github.com/PDLPorters/pdl/blob/master/Doc/Doc.pm#L615
21:13 run4flat it might break old code
21:13 run4flat and it doesn't hurt to leave it in there
21:14 jberger_ but it dies on a valid regex
21:14 run4flat sure, so we can update the code
21:14 run4flat actually, screw it
21:14 run4flat leave it as is
21:14 run4flat and simply change the docs
21:15 run4flat tell people to send qr// objects instead
21:15 run4flat but leave this in for back-compat
21:15 run4flat do you see my point?
21:17 jberger_ I do
21:17 jberger_ but with a real deprecation path, perhaps eventually you can remove it
21:17 jberger_ http://grep.cpan.me/?q=PDL%3A%3ADoc
21:17 jberger_ this is all the cpan modules that use PDL::Doc
21:17 run4flat yes, with that I agree
21:18 jberger_ we can inform them (I haven't looked to see if they do the odd thing)
21:18 run4flat they don't
21:18 run4flat I'm familiar with all of these
21:18 run4flat they should be fine
21:19 run4flat we'll have to tell Azawawi, but he'll probably roll-out an update with no trouble
21:19 run4flat and Maggie and I use scantree in our code
21:19 run4flat my concern is for any code that's in the dark, written 10 years ago
21:19 jberger_ i guess all-in-all its better to leave it in
21:19 run4flat we don't need to break it here
21:19 jberger_ but what an eyesore
21:20 run4flat we could add a deprecation warning, leave it in for five years, and pull it out in 2018. :-)
21:20 jberger_ if we need 5 years then do it now
21:20 run4flat I think that'll be adequate
21:20 run4flat no, I mean add the deprecation warning saying, "this will break starting in 2018"
21:20 run4flat Oh
21:20 run4flat I see your point
21:20 run4flat ha!
21:21 * run4flat shakes fist at RedHat
21:21 run4flat whereis FFT
21:21 liddle_piddle_bot run4flat: Found FFT in File: /home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm, Ref: Module: FFTs for PDL
21:21 run4flat whereis FFT
21:21 liddle_piddle_bot run4flat: Found FFT in File: '/home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm', Ref: 'Module: FFTs for PDL'
21:22 * run4flat thinks he has it now
21:26 run4flat whereis fft
21:26 liddle_piddle_bot run4flat: Found fft in File: '/home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm', Module: 'PDL::FFT', Ref: 'Complex FFT of the "real" and "imag" arrays [inplace].', Usage: 'fft($real,$imag);', File: '/home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm', Module: 'PDL::FFT', Ref: 'Inverse of one-dimensional realfft routine [inplace].', Usage: 'realifft($real);
21:27 run4flat whereis fft
21:27 liddle_piddle_bot run4flat: Found fft in File: '/home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm', Module: 'PDL::FFT', Ref: 'Complex FFT of the "real" and "imag" arrays [inplace].', Usage: 'fft($real,$imag);'|File: '/home/visitors/dcmertens/perl5/lib/perl5/i686-linux-gnu-thread-multi/PDL/FFT.pm', Module: 'PDL::FFT', Ref: 'Inverse of one-dimensional realfft routine [inplace].', Usage: 'realifft($real);'
21:27 run4flat ok
21:27 run4flat whereis pp_def
21:27 liddle_piddle_bot run4flat: Could not find pp_def.
21:33 run4flat whereis fft
21:33 liddle_piddle_bot run4flat: Found fft in PDL::FFT (http://pdl.sourceforge.net/PDLdocs/FFTm.html#fft), PDL::FFT (http://pdl.sourceforge.net/PDLdocs/FFTm.html#fft), PDL::FFT (http://pdl.sourceforge.net/PDLdocs/FFTm.html#fft), PDL::FFT (http://pdl.sourceforge.net/PDLdocs/FFTm.html#fft)
21:34 run4flat no, that's not right
21:40 run4flat whereis PP
21:40 run4flat oops
21:41 liddle_piddle_bot joined #pdl
21:41 run4flat whereis PP
21:41 run4flat liddle_piddle_bot, hello!
21:41 liddle_piddle_bot run4flat: Found PP in PDL::PP-Inline.pod (http://pdl.sourceforge.net/PDLdocs/PP-Inlineod.html)
21:42 run4flat whereis PP
21:42 liddle_piddle_bot run4flat: Found PP in PDL::PP-Inline.pod (http://pdl.sourceforge.net/PDLdocs/PP-Inline.html)
21:42 run4flat whereis stats
21:42 liddle_piddle_bot run4flat: Found stats in PDL::Primitive (http://pdl.sourceforge.net/PDLdocs/Primitive.html#stats)
21:44 run4flat whereis stats
21:44 liddle_piddle_bot run4flat: Found stats in PDL::Primitive (pdlporters.github.com/?docs=PDL::Primitive)
21:44 run4flat whereis stats
21:44 liddle_piddle_bot run4flat: Found stats in PDL::Primitive (http://pdlporters.github.com/?docs=PDL::Primitive)
21:44 run4flat whereis fastraw
21:44 liddle_piddle_bot run4flat: Could not find fastraw.
21:45 run4flat whereis flexraw
21:45 liddle_piddle_bot run4flat: Could not find flexraw.
21:45 run4flat whereis flexraw
21:45 liddle_piddle_bot run4flat: Could not find flexraw.
21:45 run4flat whereis stats
21:45 liddle_piddle_bot run4flat: Found stats in PDL::Primitive (http://pdl.sourceforge.net/PDLdocs/Primitive.html#stats)
21:45 run4flat ok
21:45 run4flat sorry everyboyd
21:46 run4flat I'm done configuring piddlebot now
21:46 run4flat :-)
21:46 run4flat jberger_, I changed piddlebot to pass qr/stuff/
21:46 run4flat instead of "m/stuff/"
21:47 run4flat I suggest you file your idea away and we bring it back up after the release of 2.4.12
21:49 jberger_ ok
21:49 jberger_ I tried playing with Safe
21:49 jberger_ I couldn't make it work
21:49 jberger_ but then again, as I understand there is an art to it
21:49 run4flat I recommend against that. I once proposed a string eval for pdl-from-string
21:50 run4flat in fact, I implemented it initially with a string eval
21:50 run4flat and it made a number of people upset
21:50 jberger_ I was hoping that permit_only('qr') would work and leave it relatively safe
21:51 opkick joined #pdl
21:51 opkick [pdl01] run4flat pushed 8 new commits to master: http://git.io/28EP6Q
21:51 opkick pdl/master 8be911e Chris Marshall: Must use latest Filter::Simple...
21:51 opkick pdl/master 06ba255 Chris Marshall: Add $PDL::NiceSlice::debug_filter option...
21:51 opkick pdl/master 305dda3 Chris Marshall: Update VERSION to 2.4.11_010 for more development
21:51 opkick left #pdl
21:51 jberger_ the only other true deprecation path (on that emits a sane warning) would be to do it for all strings passed
21:51 jberger_ however, its probably totally fine to use 'string'
21:51 jberger_ its just 'm/string/flags'
22:04 run4flat argh, not cross-platform: https://github.com/PDLPorters/pdl/commit/c1532ad1790d7d0bab8fa1591eb0f42dc504f819#L0R818
22:19 jberger https://github.com/PDLPorters/pdl/commit/c1532ad1790d7d0bab8fa1591eb0f42dc504f819#L0R822
22:19 jberger what is that?
22:19 run4flat runs through all modules with .pm or .pod
22:20 run4flat but, why scan through all of @INC here? https://github.com/PDLPorters/pdl/commit/c1532ad1790d7d0bab8fa1591eb0f42dc504f819#L0R819
22:21 run4flat Why not just say "for my $dir (@INC) {" instead of this? https://github.com/PDLPorters/pdl/commit/c1532ad1790d7d0bab8fa1591eb0f42dc504f819#L0R801
22:32 jberger oh you know what messed me up, I always put the my inline with the for

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