Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-05-16

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

All times shown according to UTC.

Time Nick Message
00:14 jberger hmmmm, can't tie @ISA
00:14 jberger perhaps thats a blessing in disguise (HA)
05:06 Meiermann joined #pdl
13:36 gtodd run4flat: ok
13:36 * gtodd was sleeping
13:39 pdurbin gtodd: I wonder if I can get you interested in this: Round tripping the contents of DVN - Google Groups - https://groups.google.com/forum/?fromgroups=#!topic/dataverse-community/07h0Ca-Ai1I
13:39 pdurbin which I started talking about at http://irclog.iq.harvard.edu/dvn/2013-05-16
13:47 gtodd thanks
13:48 gtodd hmmm ->  (18:48:45) run4flat: it involves changing one line in the PDL tarball
14:01 run4flat morning, gtodd, I just got in
14:01 run4flat it doesn't require that you download and unpack the tarball
14:01 run4flat or more precisely, we can run the test in a way that won't require it
14:02 gtodd ok
14:02 * run4flat roots around for the necessary links
14:03 run4flat Download the demo module and put it somewhere: https://github.com/PDLPorters/pdl/blob/master/Demos/Prima.pm
14:03 run4flat call it PrimaDemo.pm and chdir to the directory where it resides
14:14 gtodd ok  ...
14:14 run4flat next, fire up pdl (the shell) in that dir
14:14 run4flat "use PrimaDemo"
14:14 run4flat oh, wait
14:14 run4flat forgot about the fix
14:14 run4flat :-)
14:14 gtodd heheh
14:15 gtodd Bareword found where operator expected at PrimaDemo.pm line 9, near "<title>pdl"
14:15 gtodd (Missing operator before pdl?)
14:15 gtodd haha I used fetch
14:15 run4flat haha
14:15 run4flat sorry
14:15 gtodd PrimaDemo.pm is html
14:15 gtodd just a sec
14:15 run4flat replace line 367 (https://github.com/PDLPorters/pdl/blob/master/Demos/Prima.pm#L367) with this:
14:15 run4flat $window->close();
14:16 run4flat (It's rather amazing that perl made it nine lines inot the HTML before it croaked)
14:18 gtodd hmm OK I still get an error ....  looks the same
14:18 gtodd readline crap out
14:18 gtodd pdl shell exits
14:18 run4flat hmm
14:19 run4flat what is your environment?
14:19 run4flat BSD?
14:19 gtodd wait "time to exit the event loop at /home/gtodd/perl5/lib/perl5/amd64-freebsd/PDL/Demos/Prima.pm line 177, <DATA> line 418"
14:19 gtodd it's using the wrong module?
14:19 run4flat hmm
14:19 run4flat looks like it
14:19 run4flat the demo invocation is probably wrong
14:20 run4flat to invoke it directly, say "PDL::Demos::Prima->run"
14:20 run4flat after having said "use PrimaDemo"
14:20 gtodd ok  ... or I will just swap out the files
14:20 run4flat sure, if you don't mind tinkering with the installed .pm file
14:20 run4flat that would certainly be easier
14:21 gtodd errm or  ... PDL::Demos::PrimaDemo->run"
14:21 run4flat no
14:22 run4flat you need to invoke it from the package
14:22 run4flat which is declared on line 5
14:22 run4flat You could also say "PDL::Demos::Prima::run()"
14:23 run4flat That said, if you modify the module file in your local lib, you can just say "demo prima"
14:25 gtodd ok works ... no crash :-)
14:25 run4flat hurray!
14:25 gtodd yaya simple fix
14:25 run4flat thanks!
14:25 run4flat can you do one more test for me?
14:25 run4flat can you simply run the .pm file as a perl script?
14:25 gtodd I still think my readline is hosed :P
14:25 gtodd ok
14:26 run4flat since the readline module won't have loaded, it won't interact with the system
14:26 run4flat so I want to make sure that the window close still works properly
14:26 gtodd should I run it as root while logged into my bank account?
14:26 run4flat getting the event loop interaction right can be very tricky
14:26 gtodd :-D
14:26 run4flat how else would you think to run it?!?!
14:28 gtodd ok it works ..  the "next" button is grayed out and I have to use my WM to "close window or press q or Q to resume"
14:29 run4flat yep
14:29 gtodd actually  " press q or Q to resume" does not work
14:29 gtodd had to close windows
14:29 run4flat press q or Q when the plot is selected?
14:29 run4flat not from the terminal
14:29 gtodd with mouse or X windestroy shortcut
14:29 gtodd yeah
14:30 gtodd even with prima windows selected
14:30 run4flat the expected behavior is that if one of the plot windows is selected and you hit 'q', it'll work
14:31 run4flat because only the plot windows know how to 'listen' for the key press
14:31 run4flat if you press 'q' from the demo window, it won't work
14:31 run4flat I just wanted to be clear about that one
14:31 gtodd I would not trust my WM  to do ICWMMM (or wahtever the X WM "standard" is)  perfectly
14:31 gtodd I will try again
14:32 run4flat thanks a bunch
14:32 run4flat If it works correctly, I might consider changing the message
14:32 run4flat so it's a bit more obvious where one must press 'q'
14:33 gtodd seems not to work
14:33 run4flat hmmm
14:33 gtodd .. hmm no other WMs on this machine
14:33 run4flat what is your setup?
14:33 run4flat I can try to build a VM and tinker
14:35 gtodd freebsd
14:35 run4flat ok, thanks
14:35 gtodd pumpkin perl :-)
14:35 run4flat :-D
14:35 gtodd freebsd 9.1  pumpkin perl 5.16.2
14:35 gtodd hmm I just noticed that the window does not close on "q"
14:35 run4flat awsome, I'll try to get something going in the next few days
14:35 run4flat no, it's not supposed to close
14:36 gtodd but the "next" button goes from greyed out to live
14:36 run4flat but the "next" button should no longer
14:36 run4flat yeah
14:36 run4flat it's a bit confusing
14:36 gtodd so I end up with the last and the next demo window both on screen
14:36 run4flat but the idea is to let "q" return flow control back to the calling program *without* necessarily closing the window
14:36 run4flat ...
14:36 gtodd which is fine
14:36 gtodd yeah I like that
14:37 run4flat when you hit "Next", I thought it was supposed to clean up the previous windows before popping up the new ones
14:37 run4flat but I can double-check that once I get things set up
14:38 gtodd I think the confusing bit (and it may be my WM or Prima thing handling the focus)
14:38 gtodd is that Q lights up the "next" button but focus stays on the plot image
14:38 gtodd at least when run as a script
14:38 run4flat hmmmm
14:39 run4flat yeah
14:39 run4flat it would be better for the focus to shift back to the previously selected window
14:39 run4flat I'll have to dig around Prima to see if that's possible to get
14:39 * gtodd tries to recall GUI programming terminology ....
14:39 run4flat The issue is that, under most circumstances, the previously selected window is usually the terminal window
14:39 run4flat but in this case, it's the Demo window
14:40 gtodd right like from the modal window to the demo window  NOT back to the pdl shell window
14:40 run4flat ah, but it's not a modal window
14:40 run4flat that would make things a bit easier
14:40 gtodd hehe I said "trying" to remember GUI programming :P
14:41 run4flat oh, right
14:41 gtodd or a step through from the shell like the debugger
14:41 gtodd like stay in shell but have GUI niceness floating about
14:41 * gtodd thinks R  does it that way
14:42 gtodd have to go off and run tuns of plots with R and see how they "feel" ...
14:42 gtodd many of mine are scripted so ...
14:42 run4flat Well, at the moment, the only way to get mouse-manipulable plots and interactive shell is to use Readline. :-/
14:42 run4flat and then, there is no pressing of 'q' to worry about. :-)
14:43 gtodd arrgfh!!! readline!!  :-)
14:43 gtodd actually I guess Prima as a toolkit could develop features that PDL doesn't even use
14:43 run4flat it doesn't have to be Stallman's readline
14:43 run4flat just sayin
14:44 run4flat yes, Prima as a GUI toolkit has *tons* of features PDL doesn't use or need
14:44 run4flat PDL::Graphics::Prima is actually just another *widget* in the Prima toolkit
14:45 gtodd since Prima will take over the perl GUI world and replace wx Tk gtk etc etc and then gradually spread to ruby python go ... Google will release PrimaPhone ... but that's all in the future   PDL can use a PDL  appropriate set of widgets
14:45 run4flat right, right...
14:46 gtodd yeah that .. PDL::Graphics::Prima  might be tailored to how people use graphics from a pdl shell (like ipython  R etc)
14:47 run4flat yep, that's the goal of PDL::Graphics::Prima::Simple, to be a wrapper that makes shell-based interactive plotting easy
14:47 gtodd will rock
14:47 gtodd pretty good even right now
14:47 run4flat For anything more GUIish, though, I've created App::Prima::REPL
14:47 run4flat gtodd, thanks
14:47 gtodd wheee!!!
14:48 run4flat I hope that App::Prima::REPL will, eventually, have an interface that begins to compete with Matlab and R
14:48 gtodd and then there's sivoais's Web::REPL :)
14:48 run4flat or, at least makes Perl feel more comfortable for beginners
14:48 run4flat yeah
14:48 run4flat that's the next step in the evolution, right?
14:48 run4flat :-)
14:48 gtodd run4flat: yeas and potentially much easier to start working with ...
14:48 gtodd at least on unix systems
14:50 gtodd I guess "fat apps" that include the kitchen sink are possible with macs (so you can install everything pythonistas ever invented for math stats science gui in one click) but the last time I installed ipython and a few numpy thingies ... it took a long time !!
14:50 run4flat gtodd, I was hoping to use PAR::Packer for a one-click version of App::Prima::REPL
14:50 run4flat it's on my list
14:51 gtodd I like simple plotting surface ... and "add another surface/format/output with this cpan one liner" etc
14:52 gtodd R  does that well but installing and managing R extensions is a bit of pain compared to perl
14:53 * gtodd imagines PDL easily importing R data and plotting munging and making it "Dance" ... one day
14:55 gtodd nothing against R :-)  I just don't always find it installed and after running a few cpanm commands pdl is ready to go ...
14:58 run4flat :-)
14:58 run4flat The only limitation to making PDL play nice with R, or numpy, is somebody putting in the time to write an interface
14:58 run4flat I've thought about an interface between numpy and PDL, but haven't gone much further than that
15:07 gtodd of course data can come from any text file or whatever I guess what R saves in those .RData files a shell session and the objects created by reading stuff etc
15:08 gtodd whatever they are they are sort of convenient ....  :)
15:08 gtodd run4flat: anyway cheers and thanks for the "fix"   ... I will try to be patient while I wait for a cpan update ;-)
15:09 run4flat it might take the CPAN update a little bit of time
15:09 run4flat PDL doesn't get full releases very often unless it's a major issue
15:09 run4flat and I don't now if this will warrant such a release
15:09 run4flat but, yeah, give it a few months
15:09 run4flat then 3.0 will be out
20:21 estrabd joined #pdl

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