Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-01-21

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

All times shown according to UTC.

Time Nick Message
00:12 Molaf_ joined #pdl
01:00 Molaf__ joined #pdl
03:36 sivoais joined #pdl
06:08 vividsnow joined #pdl
06:35 opkick joined #pdl
06:35 opkick [pdl01] run4flat pushed 8 new commits to master: http://git.io/4ePXIg
06:35 opkick pdl/master 9573052 Chris Marshall: Tweak PDL::howbig pod so apropos sizeof will find it
06:35 opkick pdl/master 373eda5 Chris Marshall: make t/gd_oo_tests.t TODO to debug...
06:35 opkick pdl/master 411e40b Chris Marshall: Add -glut option to perldl pod (now works for non-MSwin platforms)
06:35 opkick left #pdl
09:05 rindolf joined #pdl
09:36 sivoais_ joined #pdl
12:33 vividsnow joined #pdl
12:43 rindolf joined #pdl
13:12 chm joined #pdl
14:00 vividsnow joined #pdl
15:07 chm hi
15:41 chm ping
15:43 run4flat chm, hello
15:43 run4flat I just arrived! Talk about timing!
15:44 run4flat btw, 'tis best to ping a specific user. That's more likely to make their IRC program flash at them. :-)
15:56 vividsnow joined #pdl
15:57 run4flat greetings, vividsnow. Looks like I missed a lot of conversation. I'm still catching up.
15:59 liddle_piddle_bot joined #pdl
16:01 run4flat Bender1, trust chm
16:01 Bender1 OK, run4flat
16:01 run4flat Bender2, trust chm
16:01 Bender2 OK, run4flat
16:01 run4flat Alright, there we go
16:02 jberger run4flat, I got him yesterday, did the benders not remember?
16:02 run4flat I noticed, apparently not
16:02 run4flat Bender1, Bender1, trust lungching
16:02 run4flat darn
16:02 jberger Bender1, trust jberger
16:02 Bender1 jberger, I already trust jberger
16:02 run4flat Bender1, trust lungching
16:02 Bender1 run4flat, I already trust lungching
16:02 run4flat anybody else want ops?
16:06 run4flat vividsnow, ops?
16:06 jberger they're going fast ... who want's 'em? ... you there! ... ops! getcher ops!
16:06 run4flat chm, I'm looking at the histogram issue that you inquired about
16:06 run4flat I can't seem to reproduce it
16:07 run4flat do you have the code handy that created the erroneous binning?
16:08 run4flat jberger, did you see this? http://blogs.perl.org/users/ovid/2013/0​1/be-careful-with-state-variables.html
16:08 run4flat curious, given that you're pretty keen on state variables. :-)
16:09 * jberger looks
16:09 jberger run4flat, did you beat me to the blogosphere this morning? a rarity I think
16:10 run4flat well, I was about to get started on my blog about plotting temperature forecasts
16:10 run4flat naturally, I let myself get distracted reading the front page before I write anything. :-)
16:11 jberger ick, actually it looks like a problem with Roles
16:12 jberger or something
16:12 jberger I do use that idiom in Mojolicious
16:12 jberger actually Mojolicious uses that idiom a fair amount internally
16:12 run4flat it's a problem with any function that gets copied with  *func = \&other::func
16:12 jberger I wonder how well it works in multiple instances
16:13 run4flat at least, I'm pretty sure that's the case
16:13 jberger thats what it looks like
16:14 jberger yeah, the second example (the gist) makes a pretty clear case
16:15 jberger keeping state in a file-scoped lexical has always had this problem
16:15 run4flat yep
16:16 jberger you can do this correctly by closing over a new lexical though
16:16 run4flat hmmm...
16:17 run4flat I would do it by creating a function that curries such a closure
16:17 jberger yeah
16:18 run4flat here: https://gist.github.com/4587135
16:19 run4flat but that would require that your role manager or exporter know about your function builder
16:19 run4flat which it probably does not
16:19 jberger which is, I'm sure, how they build accessors
16:19 jberger but not good for methods
16:20 jberger ok, well good to know
16:20 jberger actually I mostly preach state for looping state
16:20 jberger but I was starting to use the stateful method more often, so I will keep an eye open for this
16:23 sivoais joined #pdl
16:41 Mithaldu run4flat: *globref = sub { my $state_var; sub { \$state_var } }->();
16:41 Mithaldu :D
16:41 run4flat Mithaldu, brilliant
16:41 run4flat now just make it an lvalue. :-)
16:42 run4flat Suddenly we have sigil-less variables! :-D
16:42 Mithaldu you have an evil mind
16:42 run4flat thanks!
16:43 rindolf joined #pdl
16:44 jberger hahaha
16:47 run4flat jberger, do you know how to insert gists in entries on blogs.perl.org?
16:47 run4flat I've seen it done but I don't know how to do ti
16:47 run4flat *it
16:47 jberger yeah
16:48 jberger wait 1
16:48 run4flat k
16:48 jberger on the left, there is an "embed" snippet
16:48 jberger copy and paste that into the blog entry
16:49 jberger also on b.p.o make sure you are editing in an HTML friendly mode
16:49 jberger such as markdown
16:49 run4flat ok, thanks
16:49 run4flat jberger++
16:51 rindolf Hi all.
16:52 jberger o/
16:52 jberger run4flat, I don't see your gist? did you make a private?
16:52 jberger I do that accidentally sometimes
16:53 run4flat not made yet. :-)
16:54 jberger oh ok
16:55 run4flat https://gist.github.com/4587417
16:56 run4flat I reordered things and burried the web retrieval at the bottom
16:56 run4flat cool though it is, it's not central to the discussion
16:56 jberger indeed
16:57 jberger still searching rolling meadows IL eh?
17:00 run4flat ha, that's just the default
17:00 run4flat I'll probably change it to Meigs field or something :-)
17:02 run4flat O'Hare: 60656
17:05 jberger Meigs? you mean the park that Daley built?
17:06 jberger (ballsiest move ever!)
17:09 jberger http://en.wikipedia.org/wiki/Mei​gs_Field#Demolition_and_closure
17:12 run4flat yeah, that one
17:51 chm hi again
17:54 run4flat greetings, chm
17:56 chm hi run4flat
17:56 chm I'm trying to generate the hist problem on my home system.  Script e.g. soon.
17:57 run4flat great, thanks
17:58 shadowpaste "chm" at 217.168.150.38 pasted "example showing hist_plot problem" (14 lines) at http://paste.scsys.co.uk/224773
17:59 chm I get the same problem at home with cygwin/win7 and perl v5.14.2
17:59 * run4flat checks
17:59 run4flat haha, scalar vs list context
18:00 run4flat I didn't load the right data when I tried
18:01 chm sorry, I should have been more specific---but the name of the file was the two pdls
18:01 run4flat no, it's due to my inexperience with rcols
18:01 run4flat I thought I'd get a 2xn piddle
18:02 run4flat are the bins irregular?
18:02 * run4flat opens the text file
18:02 chm BTW, very cool idea with the lvalue sub glob.  I wonder if that might lead to a better technique to subclass PDL
18:02 chm Yes, the bins are irregular but hist_plot just takes the locations and counts
18:03 run4flat hmm...
18:03 chm (admittedly this is a bit of an edge case pathology...)
18:03 run4flat You are correct, it expects x/y values
18:03 run4flat that's very odd
18:03 chm still, it definitely failed the DWIM test.  :-)
18:03 run4flat I would have expected it to draw everything at the proper location with a bin width of 2
18:04 run4flat no, sory
18:04 run4flat not 2
18:04 run4flat 14
18:04 run4flat since that's the distance from the first to the second
18:04 run4flat ok, let me dig into the code
18:05 chm Since minmax of $bin is 235 to 496, the limits in the plot are way off
18:05 run4flat ha, yeah
18:06 run4flat the problem is that get_bin_edges assumes linear linear spacing
18:06 run4flat though the way it gets its linear spacing is pretty dumb, obviusly
18:06 chm I suggest linear spacing would only be valid for the one-arg form of hist_plot
18:06 chm No guarantees if the user provides their own bin locs
18:07 run4flat I punted on this one
18:07 run4flat It's nearly impossible for me to properly guess the spacing if it's no linear
18:07 run4flat so if it's not linear, you can't use hist_plot
18:08 chm Then I guess it would need to be a documented restriction.
18:08 run4flat the user should invoke plot() and specify binEdges in the ppair::Histogram plot type
18:08 run4flat yeah.
18:08 * run4flat feels sheepish
18:08 run4flat there's a lot of stuff like that which needs to be documented
18:08 run4flat but the point of the super-simple interface is to give you just enough experience to jump into using the plot() command
18:08 run4flat :-)
18:09 run4flat looks like you've hit that point.
18:09 chm Yes, I have to admit that I would *really* like to have a demo and tutorial for the PDL Prima stuff
18:09 run4flat yeah, I know
18:09 chm Not just the super simple stuff.  Some things that are a pain in the Simple interface
18:09 run4flat tuits, tuits, my kingdom for more tuits
18:09 chm - how to title the plot or label axes
18:09 chm - how to set the axes
18:09 chm - how to do more than one plot on a set of axes
18:10 chm - it doesn't help that there is no pdldoc docs for this at all
18:10 chm - I'm not sure where everything is even documented
18:10 run4flat Thanks Chris, this is helpful and will give me a set of items to target for the pending tutorial
18:11 run4flat would you like me to explain these to you now?
18:11 chm - lots of the docs refer to things like ds: for types but there should be POD for all
18:11 chm so users don't have to struggle to figure out _how_ to do something of interest
18:11 chm Probably more efficient if you write it up.  I'm in the process of trying
18:12 run4flat oh, I will certainly write it up
18:12 run4flat but would you like me to answer your questions right now as well
18:12 run4flat ?
18:12 chm to finish up the perldl -glut support for win32 (which is a huge pain---thanks Bill)
18:12 run4flat Ideally, the documentation in PDL::Graphics::Prima::Simple is supposed to be an on-ramp, but looking at it recently I feel it doesn't do that job very well.
18:13 chm Sure, that would help.  I may not be able to be as interactive since I'm working laundry... at the moment
18:13 run4flat haha, ok
18:13 run4flat give me a couple of minutes, I'm about to post a blog with some of this
18:13 chm Quick tips for the above would be a *huge* help for me
18:14 run4flat well, that's what IRC is for! :-D
18:14 vividsnow joined #pdl
18:14 chm I'm still trying to recover from the fact that PGPLOT doesn't quite work on win7/cygwin and betweeen PDL::Graphics::Prima and PDL::Graphics::Gnuplot I still can't do everything I used to be able to do...
18:15 run4flat man, that sucks. Is it due to lack of win7 support for PGPLOT?
18:19 chm Probably a minor problem with the x11 driver but with PGPLOT not being open source, I don't want to spend time fixing it.  If anything I would rather try PLplot again...
18:20 chm PGPLOT is so old it could easily be a change in the assumptions of X11 apps or even a bug in cygwin X11
18:20 run4flat well, hopefully I can get Prima working and documented well enough to make that unnecessary. :-)
18:21 chm One thing Prima is missing is fast image display using Prima::OpenGL rather than perl objects for pixels.
18:21 chm I would like to rewrite imag2d in PDL::Graphics2D so that it is GUI toolkit agnostic.  A Prima based version would be very nice.
18:21 run4flat yeah. Actually, they don't render pixels. They *draw* *rectangles* which is ridiculously slow
18:22 run4flat yeah, I agree
18:22 run4flat I think that Craig and I should work on PDL::Graphics2D support for all of this stuff
18:22 run4flat so that we can present a unified interface for everything that matters
18:24 chm While I've got you on-line, are there any things you would like to finish for PDL-2.4.12 in Feb.  Any more major changes need to be done in the next 2 weeks for time to test/verify?
18:24 chm Thanks also for pushing the new Docs work back to sf.net
18:25 run4flat yeah, I decided to get it done last night
18:25 run4flat I can think of a zillion things to do, but nothing's urgent
18:25 run4flat except the Prima tutorial
18:26 chm and a Prima demo
18:26 run4flat that's what I mean
18:26 run4flat *meant
18:26 chm bonus points for updating any existing demos requiring PGPLOT to use Prima instead
18:26 chm I think a tutorial is needed as well but not connected to the CPAN release date.
18:28 run4flat check it out, new blog post: http://blogs.perl.org/
18:28 run4flat http://blogs.perl.org/users/david_​mertens/2013/01/viewing-your-weath​er-forecast-without-a-browser.html
18:28 chm If it makes you feel any better, the learning curve for Gnuplot is steep as well and it is even slower than Prima for images (as in the machine locks up on win32)
18:28 run4flat chm, some of that material applies to our discussion
18:28 run4flat wow
18:28 run4flat so we all suck together! :-D
18:29 chm imag2d is *very* fast but not full featured  :-)
18:29 run4flat chm, install the latest PDL::Graphics::Prima form cpan (uploaded last night) and read through the blog post
18:29 run4flat plot() no longer forks
18:29 run4flat and you can manipulate the plot object
18:29 run4flat as demonstrated in the blog
18:30 run4flat darn it all, my friends are heading out to lunch
18:30 run4flat I'll be back in 30 or 40 minutes
18:30 run4flat sorry to leave in the middle of the conversation
18:31 chm Took a look and the list context info was completely missed by me.  What about setting/modifying plot axis ranges?
18:32 chm taking pause as well, o/
18:50 vividsnow joined #pdl
18:58 chm run4flat couldn't build PDL::Graphics::Prima because PGP::ReadLine is missing, sent error output via email
19:06 run4flat chm, thanks
19:07 run4flat Weird, I don't remember making that mandatory...
19:07 * run4flat checks the code
19:07 run4flat OH!
19:07 run4flat darn manifest files
19:08 run4flat argh
19:08 run4flat that means that anybody who reads that post and installs PGP will not be able to run it
19:15 chm Don't worry, it doesn't pass tests so the damage should be contained
19:15 run4flat yeah, this is the problem with developing on a machine where you already installed said module
19:15 run4flat :-(
19:16 run4flat well, if you want to get the latest system (with the context-sensitive plot() commands)
19:16 run4flat you can install it from git
19:23 chm ok, will try later
19:23 run4flat sure.
19:23 run4flat however, we can still go over the sorts of things you want to discuss using the old interface
19:24 run4flat so let me know when you're ready to go through your ideas
19:31 chm ok, back later, cu
19:31 run4flat o/
19:33 rindolf joined #pdl
19:34 run4flat Bender1, trust rindolf
19:34 Bender1 run4flat, I already trust rindolf
19:34 run4flat that you're being slow!
19:34 run4flat Bender1, bad robot!
19:34 run4flat awe
19:34 rindolf Hi all.
19:34 run4flat hello, rindolf
19:34 rindolf run4flat: what's up?
19:34 run4flat not much
19:35 run4flat officially a holiday, so I'm making it a slow day at work
19:35 run4flat and a fun day on #pdl
19:35 run4flat :-)
19:55 vividsnow joined #pdl
20:20 run4flat chm, I just realized that the axis label method had no documentation!
20:20 run4flat I am sorry!
20:20 run4flat that must have been infuriating.
20:20 run4flat Fixed. It'll hit CPAN with the next release, which will likely come in the next few hours.
20:26 Mithaldu and geometry mathematics is a go: https://dl.dropbox.com/u/10190786/geometry.png
20:26 Mithaldu soon i'll need pdl for matrix ops :)
20:27 run4flat sweet
20:27 run4flat holy crap, that looks beautiful!
20:27 run4flat Mithaldu, very nice!
20:27 Mithaldu (it runs like shit, mainly because i run the noise three times :P)
20:28 Mithaldu but thanks, i'm glad someone else likes it :D
20:33 run4flat :)
20:39 * Mithaldu makes another video because this shit is trippy
20:45 jberger run4flat, I did learn quite a bit from the blog post
20:45 jberger good work
20:45 run4flat thanks!
20:45 run4flat it took me more than an hour to write, though
20:45 run4flat :-)
20:46 jberger also FYI, the `use Mojo::Base -strict` == `use strict; use warnings; use v5.10; use utf8;`
20:46 run4flat I figured
20:46 jberger so you can just remove it if you want to put strict and warnings at the top
20:46 run4flat but since I moved it below, I didn't think it would be in effect for the earlier code
20:46 run4flat oh, that's *all* it does?
20:46 jberger yep
20:47 run4flat ha
20:47 run4flat ok, maybe I should just remove that from the gist
20:47 jberger thats why I said it
20:47 jberger Mojo::Base is like parent
20:48 jberger except that it also imports those strictures/features
20:48 run4flat cool. Fixed
20:48 jberger but when you aren't a subclass you can still get the imports by doing -strict
20:48 jberger its great consistency throughout the system them
20:48 run4flat gists are really handy!
20:48 jberger "editable pastebin"++
20:49 run4flat yep
20:49 jberger a few versions ago sri added utf8 to the import list
20:49 Mithaldu yo, jberger: just saw your post on the template thing on so
20:49 jberger added it one place, goes into all the files
20:49 jberger Mithaldu, which one?
20:49 Mithaldu i'm not the downvoter, but if you care i can tell you one thing that's quite borked about mojo templates
20:49 jberger ok
20:49 Mithaldu run4flat: https://dl.dropbox.com/u/101​90786/your_perl_on_drugs.avi
20:49 Mithaldu jberger: too much logic in yo templates
20:50 jberger I always forget that chromium/linux can't stream avi
20:50 * jberger turns to wget
20:50 Mithaldu heh
20:50 * run4flat is enlightened, and looks for the "Save As" menu option
20:51 jberger Mithaldu, using them directly that may be true
20:51 jberger using them in .ep templates (integrated with mojolicious) you don't need to as much
20:51 Mithaldu i'm not sure what you're talking about
20:51 jberger but yeah, thats only when using them with mojolicious
20:51 Mithaldu let me clarify, because i haven't used them myself
20:51 Mithaldu they allow you to write practically any perl in the template, correct?
20:52 jberger the controller can localize variables to the template before passing it to the controller
20:52 jberger you can, but you don't have to in that case
20:52 Mithaldu no see
20:52 Mithaldu with templates the can is a problem
20:52 * jberger looks for example
20:53 vividsnow_ joined #pdl
20:53 Mithaldu i can tell you from experience that software becomes worse the more freedom its template system allows
20:53 * run4flat shrugs
20:54 run4flat Anybody doing top-level production should probably use Template::Toolkit
20:54 vividsnow_ kool demo )
20:54 run4flat for a scientist like me, gimme the perl-in-template
20:54 Mithaldu simply because at some point someone will run perl in your template and then you get a nigh-useless stacktrace
20:54 Mithaldu run4flat: actually, TT sucks hard too :P
20:54 jberger Mithaldu, enough rope to hang yourself
20:54 run4flat oh, ok
20:54 Mithaldu Text::Xslate is the best one at the moment
20:55 Mithaldu much faster and much more useful errors
20:55 Mithaldu (as in, the errors are actually useful, as opposed to the entirely useless ones from TT)
20:55 run4flat oh, cool
20:55 vividsnow_ or Template::Semantic for complete abstraction )
20:55 jberger Mojo::Template does quite well converting the template to a sub, line numbers work and the messages are straight from perl
20:56 Mithaldu vividsnow: yeah, i mean to try that one out
20:56 Mithaldu it's very reminiscent of HTML::Zoom
20:56 run4flat I care not
20:56 run4flat I use Mojolicious because my friends use it
20:56 run4flat that the templating system is in Perl is of little consequence to me
20:57 run4flat I know what I'm writing and I write clean enough code for my uses
20:57 jberger Mithaldu, the best thing I can show is from the simple demo: http://mojolicio.us/perldoc/Mojo​licious/Lite#Stash_and_templates
20:57 jberger the only "perl" I really use in my templates is looping
20:57 jberger that way I don't have to learn some other system
20:58 jberger your model can handle most of it, then the controller localizes variables to the template
20:58 Mithaldu run4flat: that's because you don't write perl in a team :P
20:59 Mithaldu trust me, you start caring about all kinds of things when other people leave you things to debug
20:59 jberger but yeah, if you are looking for something that prevents others from doing stupid stuff, yeah, you might want something more strict than Mojo::Template
20:59 run4flat I know how to write team code, thank you very much. :-)
20:59 run4flat I'm just nota web developer
20:59 run4flat I'm a computational scientist
20:59 Mithaldu that then
20:59 run4flat and if you think I don't know about debugging other people's code, then you don't know what  I do with my spare time with PDL
21:00 run4flat so extra safety harnesses for web development are not important to me
21:02 jberger Mithaldu, its a cool video, is it just a test or does it represent something?
21:03 jberger kinda looks like neural pathways until the whole thing expands
21:03 Mithaldu run4flat: good job, you deadlocked my brain
21:03 Mithaldu jberger: it's a work in progress
21:03 Mithaldu i'm working out how to do things
21:03 Mithaldu have been hacking on opengl.pm to modernize it
21:03 jberger its very pretty, and I'm all for 3d animated stuff from Perl
21:04 Mithaldu and pdl helps me do some matrix stuff
21:04 Mithaldu and yeah
21:04 Mithaldu i like how the pattern in the ball kind of carves itself out of it
21:04 Mithaldu i'm gonna need to play with that in the future
21:07 run4flat yeah, it's really cool. :-)
21:07 Mithaldu the funny thing is
21:07 Mithaldu that "effect" is literally just me winding down the rendering quality
21:08 run4flat haha
21:08 run4flat that's pretty awesome
21:10 jberger nice, fun hack
21:11 run4flat Ah man, I just learned that the Term::ReadLine sub-classes don't actually inherit from Term::ReadLine
21:12 run4flat so you can't say eval{ $obj->isa('Term::ReadLine')} and get the right answer
21:12 run4flat you have to hit ref($obj) with a regex
21:12 run4flat how cludgy
21:12 jberger No, you read $ENV{PERL_RL} don't you?
21:13 run4flat I am checking if a specific value fed to my import method is, in fact, a term readline object
21:13 jberger oh, hmmmm
21:13 run4flat is there a way to get my hands on *the* T::RL object?
21:14 vividsnow another pdl/pogl powered animation: http://vimeo.com/52511645 )
21:16 jberger run4flat, you got me on that one?
21:16 Mithaldu vividsnow: haha, that reminds me of screen savers from when i was young :D
21:16 run4flat vividsnow, nice, though it seems to run fast in parts
21:16 run4flat jberger, I can't find anything either
21:16 run4flat that's OK, the pdl shell stores the readline in $PERLDL::TERM
21:17 run4flat so I know how to get it for my uses
21:17 run4flat Still, it make me feel like I'm doing hackie inheritance checks that I would have written five years ago
21:18 run4flat before I learned about eval{ $ref->isa('whatever') }
21:18 jberger ReadLine is one of those kind of old hacky things though I think
21:18 Mithaldu vividsnow: so how is that generated? :)
21:18 run4flat yes, but now they're trying to make it somewhat less hacky
21:18 run4flat ah well
21:23 vividsnow Mithaldu: it's rotating morphing 3d loop with equal spaces between points in some states )
21:24 Mithaldu ah, more cpu than gpu math then :)
21:29 vividsnow cpu for generating intermediate states and everything else is in vertex/fragment shaders
21:30 Mithaldu vertex shaders?
21:30 Mithaldu neat
21:30 Mithaldu is the code online? id' like to look at it later :)
21:46 vividsnow unfortunately, it's bound to framework (which is under development), but code parts of this animation looks like: https://gist.github.com/ae6b4eb17015f8749173
21:52 run4flat I'm off
21:52 run4flat o/
21:55 vividsnow o/

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