Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-03-15

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

All times shown according to UTC.

Time Nick Message
00:22 MeierM joined #pdl
01:03 _vicash_ joined #pdl
03:06 _vicash_ joined #pdl
03:07 _vicash_ hello ?
03:57 _vicash_ joined #pdl
04:59 Meiermann joined #pdl
10:52 MeierM joined #pdl
13:33 _vicash_ joined #pdl
14:47 _vicash_ joined #pdl
14:48 run4flat _vicash_, sorry, I leave my IRC on when I leave work
14:49 run4flat so I wasn't around when you asked that
14:49 run4flat Presently, there is no SquareWave plot type
14:50 _vicash_ run4flat: that's ok.. i tried to play with the PDL object to create a sort of square wave but it doesnt work as well for large PDLs ..
14:50 run4flat have no fear, though, it is easy to create what you want
14:50 _vicash_ i hope your tips can help me out
14:50 run4flat sure
14:50 run4flat so let's suppose you want to plot data [0.5 1.0 0.75 1.25]
14:50 run4flat and we'll plot those sequentially
14:51 _vicash_ yes
14:51 run4flat in that case, we would expect y=0.5 for 0 < x < 1
14:51 run4flat y = 1.0 for 1 < x < 2
14:51 run4flat etc
14:51 run4flat I'm not sure if this is quite what you want
14:51 run4flat but it'll suffice for illustration
14:52 _vicash_ actually my data is arbitrary reals
14:52 run4flat sure, but this'll work for illustration
14:52 _vicash_ such as interest rates which change once every day say.
14:53 run4flat so we draw the following lines: (0, 0.5) -> (1, 0.5) -> (1, 1.0) -> (2, 1.0) -> (2, 0.75) -> (3, 0.75) -> (4, 0.75) -> (4, 1.25) -> (5, 1.25)
14:54 _vicash_ yes
14:54 run4flat You can do this with a regular line plot
14:54 run4flat all you need to do is prepare the x and y values
14:54 _vicash_ yes i thought that too. and i tried using some PDL magic to convert an array into something liek the one you have described
14:55 _vicash_ but i wasnt successful as my PDL knowledge is only 3 days old
14:55 run4flat oh! quite new!
14:55 run4flat Sure, let me make sure I have the exact syntax as I want it
14:55 run4flat I'll work something out and get back to you in a min
14:55 _vicash_ yes.. been building the UI for a week and plotting for the last 2 days only
14:55 _vicash_ thanks
14:55 run4flat :-)
14:57 run4flat pdldoc rotate
14:58 run4flat hmmm
14:58 * run4flat is searching for a function
15:00 run4flat ok, so here's what I'd do to generate the ys:
15:00 run4flat $y_init = pdl q[0.5 1.0 0.75 1.25]
15:00 run4flat $y = $y_init->dummy(0, 2)->flat
15:00 run4flat Generating the xs is a little more tricky, but not too bad
15:01 run4flat $x_init = $y_init->sequence
15:01 run4flat $x = $x_init->dummy(0, 2)->flat->rotate(-1)->copy
15:01 run4flat $x(-1) .= $y_init->nelem
15:01 run4flat that incantation should give you the following:
15:02 run4flat p $y: [0.5 0.5 1 1 0.75 0.75 1.25 1.25]
15:02 run4flat p $x: [0 1 1 2 2 3 3 4]
15:04 run4flat _vicash_, two questions: 1) can you reproduce that, and 2) did you follow that
15:04 run4flat I expect 1 to be yes, and 2 to be no. :-)
15:04 _vicash_ awesome
15:05 _vicash_ i followed the rotate part which i was trying to use last night
15:05 _vicash_ the dummy() function.. what does that do
15:05 run4flat good question
15:05 run4flat suppose you have a piddle with shape (20)
15:05 run4flat i.e. $piddle = sequence(20)
15:05 run4flat now, $piddle->dummy(0, 3) will create a piddle with shape (3, 20)
15:06 _vicash_ ok
15:07 run4flat the interesting part is that each column of the resulting piddle is actually a shadow of the original
15:07 run4flat so if you say $piddle2 = $piddle->dummy(0, 3)
15:07 run4flat and print, you get three columns running from 0 through 19
15:07 _vicash_ yes i see that in the pdl2 interpreter.. awesome
15:07 run4flat if you then change a value in $piddle, i.e. $piddle(5) .= -4
15:07 _vicash_ this is what i was missing
15:08 run4flat it should change in each column
15:08 * run4flat double-checks
15:08 run4flat yep
15:09 run4flat now, a slightly less magical way to do this would be direct calculation and assignment
15:09 run4flat $y = zeroes($y_init->nelem * 2)
15:09 run4flat $y(0:-2:2) .= $y_init
15:10 run4flat $y(1:-1:2) .- $y_init
15:10 run4flat $x = $y->zeroes
15:10 run4flat $x(0:-2:2) .= $y_init->sequence
15:10 run4flat $x(1:-1:2) .- $y_init->sequence + 1
15:10 run4flat that might be easier to grok later
15:11 _vicash_ when i do $x(-1) .= $y_init->nelem what am i doing really ? just modifying the last entry to the number of elements in y ?
15:12 run4flat yes
15:12 run4flat exactly that
15:12 * run4flat just noticed we don't have any benders
15:13 _vicash_ ok cool..
15:14 _vicash_ this makes total sense.. the dummy() part was what i was missing and that is the missing link i was having trouble with
15:14 run4flat cool
15:14 run4flat I'm glad it makes sense
15:14 run4flat it was a complete mystery to me when I first encountered it
15:14 run4flat :-)
15:14 _vicash_ esp since it is called dummy()
15:15 _vicash_ they should have called it morph or something like that.. or dup
15:15 run4flat I think it comes from the mathematical notion of "dummy" indices
15:15 _vicash_ ok
15:15 run4flat which are used in tensor mathematics
15:16 run4flat but, that doesn't make it the best choice for that name. :-)
15:16 _vicash_ makes sense
15:16 _vicash_ so what if the X axis were a series of timestamp values
15:16 _vicash_ in that scenario not much will change either.. except the last element
15:17 run4flat right
15:17 _vicash_ because it will be the end of hte X-axis
15:17 run4flat and then how you handle the last element depends on what makes sense for you time series
15:17 _vicash_ ok
15:17 run4flat right
15:17 _vicash_ yea that i can do..
15:17 run4flat cool
15:17 _vicash_ i was struggling with another problem yesterday which crashed my X-server repeatedly
15:17 run4flat oh!
15:17 run4flat what was that?
15:17 _vicash_ i was implementing MouseMove on the plot
15:18 run4flat hmmmm
15:18 run4flat that shouldn't give trouble
15:18 _vicash_ so when i hover the mouse over the plot line it should show the (x,y) points
15:18 run4flat hmm, I wonder if one of my recent changes messed that up
15:19 _vicash_ so i inserted a widget and painted on it using text_out . but if i moved the mouse fast from one spot to another it tried painting in various locations really fast and crashes the X-server sometimes
15:19 run4flat ha!
15:20 _vicash_ i think this feature will be needed in various line plots and it makes sense for PDL::Graphics::Prima to provide it as an option
15:20 _vicash_ Gnuplot provides it by default
15:20 run4flat the stepwise plot type?
15:20 _vicash_ no. the mouse-over
15:20 run4flat oh, that
15:20 run4flat Perhaps
15:20 _vicash_ step-wise plot is line-plot with an array so i think that's ok.. i wanted to learn how to do it right
15:21 run4flat oh, I just had an idea!
15:21 run4flat I could add "Show mouse (x, y) location" to the right-click menu option
15:21 _vicash_ but that would be 2 clicks
15:21 run4flat and make it a boolean switch in the plot object
15:21 _vicash_ ok
15:21 run4flat so you can set it on creation
15:22 run4flat then, when you move the mouse, it would show the location
15:22 _vicash_ yes.. but how do u modify the cursor to show the x,y every time it pauses at a location
15:22 run4flat lemme make a paste for that
15:22 _vicash_ ok… so then the onMouseMove call wont be necessary
15:22 _vicash_ ok
15:23 run4flat for now, though, we'll implement it with the onMouseMove
15:23 run4flat until I've added it as a generic feature
15:26 _vicash_ ok..
15:26 run4flat oh, hmm, I implemented this in a really interesting way...
15:27 shadowpaste "run4flat" at 217.168.150.38 pasted "Basic onMouseMove to show location" (21 lines) at http://paste.scsys.co.uk/235297
15:28 run4flat that may, or may not, be the best implementation
15:28 _vicash_ ok
15:29 _vicash_ that does solve the problem for now.. i was trying to draw the widget at the cursor location and make it move with the cursor
15:29 run4flat yeah, in the very least, you'd want to use a sprintf
15:29 run4flat ooooh
15:29 run4flat you were trying to show the location underneath the mouse
15:29 run4flat ?
15:29 _vicash_ yea
15:30 run4flat for that, I'd use a combined onMouseMove and onPaint, then
15:30 _vicash_ that's why the excessive painting was crashing the X-server i think
15:30 run4flat mmmm, I don't know
15:30 _vicash_ i used hte begin_paint- end_paint combination
15:30 run4flat You can click and drag smoothly
15:30 run4flat so I can't imagine this would have overloaded it
15:31 _vicash_ true.. i might have been doing something wrong
15:31 run4flat could you paste the callback code you used?
15:31 run4flat I'm curious
15:31 _vicash_ i reverted my code.. but i can paste it as i remember it
15:32 run4flat sure
15:37 run4flat Don't sweat it if you don't have it. But if you do manage to stress the X-server, let me know
15:37 shadowpaste "_vicash_" at 217.168.150.38 pasted "onMouseMove code crashes X" (32 lines) at http://paste.scsys.co.uk/235300
15:38 run4flat ha, perfect
15:38 _vicash_ yea I used onMouseEnter to create the label widget and then used onMouseMove to paint on it
15:38 _vicash_ i think i forgot a semi-colon while typing the paste
15:39 run4flat that's ok
15:41 run4flat brb
15:59 * run4flat is back and trying to get his X-server to break
16:01 _vicash_ i was using Vnc to access the system though.. the Vncserver crashed..
16:02 _vicash_ so maybe that was the problem rather than anything else
16:02 run4flat btw, I never noticed ownerBackColor; very handy
16:02 _vicash_ but do u think i should paint twice ? as in self->repaint as well or just use a label and update text in the label
16:02 run4flat I've had to hack around that ignorance a number of times
16:02 run4flat no
16:02 run4flat I don't think you should paint at all
16:02 run4flat I think you should use a label instead
16:02 _vicash_ ok
16:02 _vicash_ i will try that and see if i can reproduce the problem
16:03 run4flat ok
16:03 _vicash_ the other thing is that my data sets are about 100K points
16:03 run4flat I'll work on my end and paste a working example of what I think would be best
16:03 _vicash_ ok
16:03 run4flat 100K is a lot
16:03 _vicash_ i know .. but that is real world scenario
16:03 run4flat yeah. :-)
16:03 _vicash_ 3 hrs of financial data at milli second level is that many points
16:04 _vicash_ that's probably why Gnuplot was crashing.. but Prima::Plot is awesome.. smooth and everything.. just what i wanted
16:04 _vicash_ sometimes better than the C# plotting libraries out there which are the best but only for Windows
16:04 run4flat can it handle the 100K points?
16:04 run4flat that's impressive
16:05 run4flat I knew it was really fast when I first got started
16:05 _vicash_ yes.. i load 2 sets of 100K points in the same frame
16:05 run4flat but I've added a lot of features since my initial work, and I wasn't sure if it would get bogged down
16:05 run4flat wow
16:05 run4flat :-)
16:05 _vicash_ it takes 6 seconds to load from a CSV
16:05 _vicash_ but i had to print the CSV such that the time was a double rather than a string
16:05 _vicash_ if it was a string and the added DateTime parsing shot up the load time to 300 seconds
16:05 run4flat hmm
16:06 _vicash_ so i dumped as doubles
16:06 run4flat you're usually working with different data all the time, right?
16:06 _vicash_ and load time was 6 seconds for plotting 4 tabs on a Notebook
16:06 run4flat if you were working  with the same data, I would use PDL::IO::FlexRaw
16:06 _vicash_ hmm
16:06 run4flat load the csv once, convert to FlexRaw
16:06 run4flat then mem map the data back
16:06 _vicash_ well the data is different as different days have different data
16:07 run4flat yeah, that's what I figured
16:07 run4flat but if you load the same CSV data a lot, you should consider writing a script to convert to a raw format
16:07 run4flat just a thought
16:07 _vicash_ even if i reopen the same day settings the data might be different sligtly since the model will generate some of the data based on existing data
16:07 _vicash_ yes i agree
16:07 _vicash_ i will look into that
16:08 _vicash_ in fact if it reduces load times from 6 sec to under 1 sec i might get the C++ data generation program itself to dump a FlexRaw
16:08 run4flat it's super easy
16:08 run4flat just have it write the binary data out to a file
16:08 run4flat and have it build the header file indicating the type and the number of entries
16:08 _vicash_ either way  6 seconds is acceptable as long as the application has good features
16:09 run4flat well, something worth considering and coming back to later, maybe
16:09 _vicash_ yes definitely.. right now we are loading only 3 hrs of data
16:09 _vicash_ if we start doing 6 then exponentially time taken will increase
16:09 _vicash_ FlexRaw will help there
16:10 run4flat yeah, FlexRaw is your friend then, especially since the data coming from C++ is binary to begin with
16:10 run4flat ok, back to demo hacking
16:10 _vicash_ alright. i willl try your suggestions for both the square wave and the onMouseMove.. and see if it works as expected
16:10 _vicash_ will get back to you on it.
16:10 run4flat cool
16:10 run4flat check back in a few minutes
16:10 _vicash_ sure
16:10 run4flat I should have an onMouseMove working by then
16:15 run4flat Hmm, I must mistyped my nick for shadowpaste
16:16 run4flat _vicash_: http://paste.scsys.co.uk/235305
16:17 run4flat btw, the origin is offset by one pixel so that the scroll wheel works
16:19 _vicash_ nice
16:19 _vicash_ thanks.. does the "hms" part work for gmtime() as well ? it is a method of DateTime() object
16:19 run4flat That comes in from Time::Piece
16:20 run4flat otherwise, gmtime just returns some list of numbers, I think
16:20 _vicash_ right
16:20 run4flat Time::Piece is a core module that makes localtime() and gmtime() return objects
16:21 run4flat http://perldoc.perl.org/Time/Piece.html
16:21 _vicash_ i looked into this for parsing faster strings but Time::Piece's strptime did not support nano/micro second parsing
16:21 run4flat ooooh
16:21 run4flat ok
16:22 run4flat so that won't generally work, then
16:22 _vicash_ it is much faster than DateTime for regular times but since my case is different it doesnt work..
16:22 run4flat I remember you had mentioned it
16:22 _vicash_ yea but i get the gist
16:22 _vicash_ thanks a lot for all the help
16:22 run4flat n/p
16:22 run4flat I'm glad you're asking
16:22 run4flat it makes it fun for me.
16:22 run4flat :-)
16:22 _vicash_ :)
16:22 _vicash_ how many users of PDL::Graphics::Prima are really there ?
16:22 run4flat Well, there's me
16:23 run4flat I think that jberger uses it sometimes
16:23 run4flat and I think that Chris Marhsall uses it sometimes
16:23 run4flat ...
16:23 run4flat and that may be it
16:23 _vicash_ i have used many plotting libraries over the years in both Windows and Linux land.. for financial plotting Windows is definitely king.. and since I dont do Java.. on Linux i am constrained to plplot and gnuplot.. Prima::Plot has so far been superb in quality
16:23 run4flat Diab Jerius also mentioned some interest
16:23 * run4flat bows
16:23 run4flat thanks, _vicash_
16:24 run4flat Whatever has been implemented I have tried to implement well
16:24 run4flat but that's why there are so many holes in the implementation
16:24 _vicash_ yea.. in fact i was using R for doing my work but the lack of interactivity in the plots was a show stopper
16:24 run4flat :-)
16:24 _vicash_ that's ok.. pretty much i will be one heavy user over this whole year
16:24 _vicash_ so u might get lots of new requests and patches from me
16:25 _vicash_ or not if everything already works as expected
16:25 run4flat that is perfectly fine
16:25 run4flat I take a lot of pride in this project, so if you can find ways to improve it, I'm all ears
16:25 run4flat it might take me a while to implement if it's a big feature
16:25 _vicash_ yea .. the next step for me in the coming week is using Finance::TA which is a technical analysis library in C wrapped in Perl on the PDL plots
16:26 run4flat cool
16:26 run4flat let me know how that goes
16:26 _vicash_ yea sure.. i am not going to ask for big features.. i might hack on it myself and send u a pull request.. then u can mod them if u want
16:26 run4flat also, let me know if you need to wrap those functions in PDL methods
16:26 run4flat I have a lot of experience wrapping C functions in PDL methods
16:26 _vicash_ yes. i might ping you on that.. those functions take double[] arrays in C and i need to pass them PDLs ..
16:26 run4flat yeah, perfect. Just let me know
16:27 _vicash_ cool..
16:27 run4flat I'll be busy all next week
16:27 run4flat at a Physics conference
16:27 _vicash_ sounds good
16:27 _vicash_ which one ?
16:27 run4flat the American Physical Society's March Meeting
16:27 run4flat It's in Baltimore this year
16:27 _vicash_ ok.. what area of Physics do u work in ? r u doing PhD ?
16:28 run4flat I'm a postdoc; just landed a position next year as a Visiting Asst. Prof
16:28 run4flat I study complex systems
16:28 run4flat spontaneous synchronization, specifically
16:28 run4flat though right now I do crazy heuristic time series analysis
16:29 _vicash_ sounds great
16:29 * run4flat digs up a good YouTube
16:29 _vicash_ congrats on the Ass Prof position
16:29 run4flat thanks!
16:29 run4flat :-)
16:29 _vicash_ i run my own company.. Selective Intellect http://www.selectiveintellect.com
16:29 run4flat http://www.youtube.com/watch?v=kqFc4wriBvE
16:30 run4flat oh, sweet
16:30 run4flat very cool
16:30 _vicash_ i do HPC and reverse engineering work on contract.. i used to work in finance but now it is just a hobby.. so this project is a hobby project for myself..
16:31 run4flat oh, I see. Nice.
16:31 run4flat Do you do anything with GPU computing?
16:31 _vicash_ i am working on building a trading system to make money for myself.. there is a big ethical hole in the finance industry.. they play with others money but not their own
16:31 run4flat haha, right
16:31 _vicash_ yes i do.. i have written a library called Wisecracker on github
16:32 run4flat yeah, I see that on the web page
16:32 _vicash_ even though it is marketed as something u can use to break MD5's it is really a task distribution thing .. it can be used for Monte Carlo analysis too
16:32 _vicash_ it merges MPI + OpenCL and so u can have many machines wiht 1 GPU or many Amazon GPU VMs and run the same program on it
16:32 run4flat wow, that's awesome
16:32 _vicash_ u can run it on a mixture of AMD + NVIDIA GPUs + Intel CPUs..
16:33 run4flat I've written CUDA stuff, but only to run on my own video card
16:33 run4flat that's pretty cool
16:33 _vicash_ yea i am not rich despite being "CEO" of my company.. so i use old systems with 140$ GPU cards
16:33 run4flat haha, yeah
16:33 _vicash_ hence i needed something that would work on all kinds of shit systems
16:34 run4flat I wonder if it's cheaper to buy a bunch of cheap video cards and tie them together with MPI, or just buy on high-powered video card
16:34 * run4flat ponders
16:34 _vicash_ well it depends on your problem
16:34 _vicash_ and budget
16:34 _vicash_ there is this Hashcat guy who has a 25-GPU system
16:34 run4flat right, the sort of data you have
16:35 _vicash_ that cost him 25K or 50K $
16:35 _vicash_ if u have that much money that's great but in 2 years that system will become slow
16:35 _vicash_ then what will u do ? u have sunk 50K into it
16:35 run4flat right
16:35 _vicash_ on the other hand writing better software that can adapt to newer systems is a better investment
16:35 * run4flat nods
16:36 _vicash_ again depends on problem at hand… but yea..  i prefer the software approach which can be lower cost..
16:36 _vicash_ i am not for the Java methods of throw more hardware at the problem
16:39 run4flat oh, hey, I was just playing with the mouse label example
16:39 run4flat turns out there's a bug
16:39 run4flat if you move your mouse up and to the left, the label gets the focus, and therefore it stays put
16:39 _vicash_ ok
16:40 run4flat not really a big deal
16:40 run4flat ah well. :-)
16:40 run4flat at any rate, I agree, smart software pays off
16:41 run4flat no sense spending lots of money many times when you can put in the effort once
16:42 _vicash_ yea...
16:43 run4flat anyway, back to work
16:43 run4flat fun chatting, and let me know if you have questions about the PDL bindings
16:44 run4flat I'll try to implement the mouse labeling, I have ideas now
16:44 run4flat o/
16:46 _vicash_ sure thank you.
17:05 run4flat _vicash_, I was just looking over the README and realized I needed to update my copyright notices
17:05 run4flat and, I figured I could add the appropriate copyright for your contributiosn
17:05 run4flat I wanted to check with you before doing so
17:18 Bender2 joined #pdl
17:19 Bender1 joined #pdl
18:15 _vicash_ joined #pdl
18:16 jberger_atwork joined #pdl
18:17 jberger_atwork run4flat, _vicash_, you would get better performance, and perhaps a more consistent inferface, if the mouse x,y position were attached to a fixed position, say the bottom right of the plot
18:18 jberger_atwork many plotting engines do this, perhaps putting it in a notification well along the bottom
18:18 _vicash_ run4flat: yes please feel free to assume the code submitted by me under whatever copyright PDL-Graphics-Prima is in..
18:19 _vicash_ jberger_atwork: yes that was my other option in case the label following the pointer fails.
18:20 _vicash_ however, if you have a 27" monitor and the label is in the corner it becomes a neck exercise :) i have a 19" monitor but my user has a 27" one.. just hypothetical
18:21 _vicash_ i agree with the consistent interface idea.. very "Apple".. users will get used to it anyway
18:22 jberger_atwork _vicash_: yeah, that makes sense, but as you can see, unless you come up with a new "mouse pointer + output" drawable object, you stress the drawing engine doing this
18:23 jberger_atwork I would say that in the graphics world, having the mouse-over information being detached from the mouse isn't uncommon
18:24 jberger_atwork perhaps a second window object could be opened which is just a little notification pane
18:24 jberger_atwork then you could place this where you want to view it, but it doesn't have to redraw on every mouse move, just update
18:24 jberger_atwork anyway, thats my $0.02
18:25 _vicash_ perhaps that is a good idea.. i think the corner bucket for drawing the label works fine.. especially if you have data sets like mine which have points > 100K in number.. if drawing a label forces repainting of the plot that is high CPU usage for a plotting app
18:28 _vicash_ eventually i will need to do real-time plotting by feeding the plot with additional data.. i guess that will also need some insights from you
18:29 _vicash_ run4flat: just saw the youtube video. how is that even happening !!!
18:34 jberger_atwork _vicash_: because the table can move, the differential forces acting between different metronomes (mediated by the table) eventually cause the syncronization
18:35 _vicash_ interestng
18:38 run4flat _vicash_, you're also seeing the effect of nonlinear coupling in action
18:38 run4flat if the coupling were linear, you would get waves of synch -> nonsynch
18:38 run4flat but the nonlinear coupling means that once they lock, they remain locked
18:38 jberger_atwork run4flat: true, I should have mentioned that
18:39 _vicash_ is this theory applicable to spring devices (simple harmonic motion) like metronomes only ?
18:39 _vicash_ or can i use this in something else that is mechanical
18:39 _vicash_ or non-mechanical
18:40 jberger_atwork _vicash_: SHO is easiest to model, but in principle all interacting systems will couple to each other somehow
18:40 jberger_atwork its tuning them to reinforce or lock-in or whatever that can be (impractically) hard
18:40 run4flat *but* sho won't synchronize like this
18:40 jberger_atwork * systems of SHOs
18:41 jberger_atwork mediated by some coupling
18:41 run4flat right
18:41 run4flat shos coupled elastically won't do this
18:41 run4flat but shos coupling nonlinearly can do this
18:42 * jberger_atwork wishes he understood more about non-linear interaction :-P
18:42 _vicash_ but what is a real world application of this synchronization
18:42 run4flat instead of saying that the effect of one oscillator on the other is directly proportional to the distance between them
18:42 run4flat you say that they are dependent in some nonlinear fashion, like the sine of the difference of their cycle positions
18:43 * jberger_atwork was joking clearly
18:44 run4flat _vicash_, think neurons
18:44 _vicash_ interesting
18:44 * run4flat steps away for a moment
18:45 _vicash_ can i apply this theory to neural networks then ? or i guess if multiple systems are interconnected this already applies
18:48 run4flat mm, not really
18:49 run4flat the theory behind the metronomes really only works for oscillatory systems
18:49 run4flat real neurons are... oh what's it called...
18:49 run4flat pulse-coupled oscillators
18:49 run4flat neural networks, in the AI sense, are little state machines that don't have any intrinsic cycling
18:49 run4flat they just have update moves for each time step
18:50 run4flat Now... if you have a system in which your neural network exhibited oscillatory behavior, and you fed the output of many such oscillatory neural networks into the inputs of others, and back, then you'd have something
18:50 _vicash_ ok
20:07 _vicash_ run4flat: i am using plotType where I want the lines to be dots or dashes.. I am trying ppair::Lines(color => cl::Green, lineStyles => lp::DotDot) but it doesnt work
20:08 run4flat _vicash_, I think lineStyle is the wrong term
20:08 run4flat I do that all the time
20:09 _vicash_ yes. it is
20:09 run4flat try linePattern
20:09 _vicash_ linePattern
20:09 run4flat I wish it were a synonym. I do that, too
20:09 _vicash_ you might want to update the POD docs in the PlotType.pm file :)
20:09 * run4flat realizes he can make it a synonym in PDL::Grpahics::Prima
20:09 run4flat oh!
20:09 _vicash_ that's where i got it from
20:09 run4flat it's in the docs?!
20:09 run4flat oops
20:09 _vicash_ yes
20:09 run4flat fixing now
20:09 run4flat which one?
20:09 _vicash_ thanks
20:10 run4flat PlotType?
20:10 _vicash_ lib/PDL/Graphics/Prima/PlotType.pm line 136
20:10 run4flat thanks
20:11 run4flat fixed on github
20:11 run4flat _vicash_++
20:12 _vicash_ thanks
20:13 _vicash_ is there a way to show a legend/key on the plot or do I have to create that using a widget
20:13 run4flat unfortunately, there is no legend support
20:13 run4flat using a widget would probably be the easiest
20:13 run4flat and is how I will likely implement it, some day
20:14 _vicash_ ok.. if i end up needing it i will implement it as a boolean (legend => 1) in your plot library and send u a pull request
20:14 run4flat ... ok... :-)
20:15 run4flat we should chat about it before you get too far
20:15 run4flat because I anticipate a number of tricky problems
20:15 _vicash_ can i have a label follow a line ? as in if i have multiple square waves plotted on a plot
20:15 _vicash_ sure.. i will do that..
20:15 run4flat can you clarify that last question?
20:15 _vicash_ i use different colors for say 4 square waves on a plot
20:15 run4flat hmmm
20:15 run4flat you should learn about annotations
20:16 _vicash_ but if i want to plot 6 waves in one plot . it is tough to remember
20:16 _vicash_ yes .. is that already there ?
20:16 run4flat some facilities are available for making this not a pain
20:17 run4flat https://metacpan.org/module/PDL::Graphic​s::Prima::PlotType#Annotation-Plot-Types
20:17 _vicash_ thakns
20:17 run4flat that discusses annotations, which are their own plot type / dataset
20:17 _vicash_ nice
20:17 run4flat this allows you to specify with fairly high precision where to draw rectangles, lines, and text
20:17 run4flat There are ways to PDL-thread across different positions
20:17 run4flat but not different strings
20:18 run4flat this is probably a bit under-documented
20:18 run4flat so ask questions where it doesn't make sense
20:19 _vicash_ ok i will. i think this should suffice for me.. pnote::Text … let me try it out quickly on my app..
20:19 run4flat cool
20:27 _vicash_ run4flat: is there a way to extract the location of the line being plotted and using that in the annotation ?
20:28 run4flat hmmm
20:28 run4flat no
20:28 run4flat I'm open to the idea, but I'm not sure how to do it
20:28 _vicash_ once a line gets drawn does a callback/event get invoked ?
20:29 run4flat not for individual segments
20:29 run4flat I suppose I could add a facility for such a callback, but the draw time would really blow up
20:29 _vicash_ let's say for the whole line plot itself
20:29 _vicash_ not for each segment
20:30 run4flat not yet...
20:30 _vicash_ so if i plot 6 waves in one plot, then after all the 6 are plotted i get a completion routine that is invoked. there i can extract locations and annotate each curve with text by adding an annotation
20:31 run4flat so, after each individual line, it invokes your callback?
20:32 run4flat hmm
20:32 run4flat it seems like that could be specified in the ppair::Lines constructor, right?
20:33 run4flat something like ppair::Lines(postDraw => sub {} )
20:33 _vicash_ either after each line or after all the lines.. either way is fine… am going thru the documentation to see if it exists in some form
20:33 _vicash_ yes something like that
20:34 _vicash_ let's say that doesnt exist today and you dont want to add it.. how do I extract the screen coordinates of the line that is plotted in a plot widget.. assuming i have the widget handle
20:34 run4flat that's not possible at the moment
20:34 _vicash_ ok
20:34 run4flat the only way to do that is take the data you have and run it through axis->reals_to_pixels
20:35 run4flat or reals_to_relatives
20:35 run4flat but you'd have to process the data by hand
20:35 run4flat I mean, if the widget tracked all drawn pixel locations, it would get bogged down really quickly
20:35 _vicash_ yes agreed..
20:36 _vicash_ my plot is quite heavy on data too so doing reals_to_pixels on all the data is not very useful
20:36 run4flat no, but doing reals_to_pixels on, say, the average x position is easy
20:36 run4flat because it's just one point
20:36 _vicash_ ok
20:37 _vicash_ that makes sense
20:37 run4flat and then finding the index at which said average x occurs is also easy using PDL's vsearch
20:38 run4flat now, something you could do is find the offset of the maximum y
20:38 _vicash_ actually this is useful.. i can  do this
20:38 run4flat and then place the annotation above where that occurs
20:38 run4flat liddle_piddle_bot help
20:38 _vicash_ well i am trying to plot at either the beginning of the line or the end of it.. so that's easy
20:38 run4flat hmm
20:39 run4flat ok... now what is liddle_piddle_bot doing?
20:39 run4flat help vsearch
20:39 liddle_piddle_bot run4flat: http://pdl.perl.org/?docs=vs​earch&amp;title=PDL::vsearch
20:39 run4flat no, that's useless
20:40 run4flat help Ufunc
20:40 liddle_piddle_bot run4flat: http://pdl.perl.org/?docs=​Ufunc&amp;title=PDL::Ufunc
20:41 run4flat _vicash_, as you're labeling near the beginning of the line, this may not be helpful. Nonetheless, consider maximum_ind and related: http://pdl.perl.org/?docs=Ufunc&​amp;title=PDL::Ufunc#maximum_ind
20:41 _vicash_ ok will do. thanks for the help
20:42 _vicash_ i think i can do this now as i already have the data before plotting so i can just plot based on relative position using reals_to_pixels
20:42 run4flat ok, great
20:45 _vicash_ run4flat: thanks. i am going to sign off for the day.. but i will be online later. i appreciate your help a lot.
20:45 run4flat glad I could help
20:45 run4flat I will be on intermitently for the next 8+ days
20:45 run4flat feel free to send email if you have questions
20:45 run4flat and I don't seem to be responding
20:46 _vicash_ sure. i will if i need serious help… mostly my current problems are solved with the label on mouse-move.. the square wave i have already implemented and i am implementing the annotations
20:47 _vicash_ the next 2 steps will be integrating wtih the C library and real-time plotting
20:47 run4flat awesome
20:47 _vicash_ so if i were to do real-time plotting would it be just better if i just re-plot every 1 second with newer data ?
20:47 run4flat yeah
20:48 _vicash_ or is that very inefficient..
20:48 run4flat at the moment, I achieve it by creating a new dataSet object
20:48 run4flat and overwriting the old one
20:48 _vicash_ can i make the plot scroll towards the right as time progresses too ?
20:48 run4flat you can make it sing and dance if you want. :-)
20:48 _vicash_ haha
20:48 run4flat but yes
20:48 run4flat scrolling is no trouble
20:49 jberger_atwork run4flat: it looks like you have a fan!
20:49 run4flat I have some code where I do exactly that
20:49 jberger_atwork I'm not used to having to read so much backlog on #pdl
20:49 run4flat if you're doing scrolling line plotting, though, it will likely be much more efficient to calculate the xbounds on your own
20:49 * run4flat chuckles
20:50 run4flat jberger_atwork, I have a collaborator. :-)
20:50 jberger_atwork indeed
20:50 run4flat *additional collaborator, that is
20:50 jberger_atwork and I'm glad you do
20:50 run4flat _vicash_, when do you think you'll start the scrolling stuff?
20:50 run4flat I can probably send a code snippet over the weekend
20:50 _vicash_ not before Monday
20:51 jberger_atwork real-world use of a library is always useful to improve a tool like PGPrima
20:51 _vicash_ if u have a code snippet in the examples/ folder i can look at that
20:51 run4flat oh, yeah, that'd be better
20:51 run4flat I'll add one over the weekend
20:51 _vicash_ so far that's how i have found answers for most of my questions
20:51 _vicash_ cool, sounds great
20:51 run4flat haha
20:51 run4flat I'm glad they've proven so useful
20:53 _vicash_ when the whole app is ready by end of next week hopefully, i will mail you some images of it so u can see what i have made
20:53 run4flat _vicash_, that would be fantastic
20:53 run4flat :-)
20:54 _vicash_ yea that is my target goal so that my user can start using it and i can move on to other parts of the project
20:54 run4flat ok, well, then we have a deadline. :-)
20:55 _vicash_ run4flat, jberger_atwork, alright.. have a good weekend guys and thanks for the tips
20:56 run4flat jberger_atwork, I have a real user! And he's using it in a GUI application! :-D
21:20 jberger_atwork :-)
21:21 jberger_atwork run4flat: question
21:21 run4flat go for it
21:21 jberger_atwork I'm updating the perl4science site
21:21 run4flat ok
21:21 jberger_atwork I see you added some notes on parallelization
21:21 * run4flat vaguely recalls this
21:21 jberger_atwork from what you understand is MCE more fork-y or more thread-y
21:21 run4flat do you need me to double-check those notes?
21:21 jberger_atwork so I can add it
21:22 jberger_atwork sure
21:22 run4flat can you remind me how to pull that repo?
21:22 run4flat I can't find my local copy
21:22 jberger_atwork https://github.com/perl4science/per​l4science.github.com/commit/aa38a57​be386af22fa2c8ca02c59977e26a00622
21:22 run4flat thanks
21:22 jberger_atwork just look there I will make the changes
21:23 run4flat yeah, those look fine
21:23 run4flat we should add Mario's thing
21:23 run4flat MCE
21:23 jberger_atwork thats why I'm asking
21:23 run4flat yeah, he's deserved it
21:23 jberger_atwork which category does it fall into
21:23 run4flat we can remove it later
21:24 run4flat general parallel stuff
21:24 run4flat it can use both forks and threads
21:24 run4flat sorry, to clarify, we can remove it later (quietly) if we decide that it no longer belongs
21:25 jberger_atwork well, I think what we might do is make an examples section
21:25 jberger_atwork in which MCE can be shown in a scientific context
21:25 jberger_atwork but for now, this is fine
21:25 run4flat oh, hmm
21:26 run4flat we don't have a generic Parallel part
21:26 run4flat I'd put an entry for it under both fork-based and thread-based, then
21:26 run4flat and, some day, I'll actually add my own SIMD module
21:26 run4flat as it's pretty neat, and extremely simple
21:27 run4flat and, you know, good for science... I think...
21:27 run4flat :-)
21:49 jberger_atwork http://perl4science.github.com/software/
21:50 * run4flat checks
21:51 run4flat looks good
21:51 run4flat thanks for updating it
21:53 jberger_atwork aero posted a few new links, so I thought it was time to add some stuff
21:53 run4flat yeah, good call
21:53 jberger_atwork if you think of any others let me know
21:53 run4flat yes, I will
21:54 run4flat I think that at some point, I may send out an email to the list to get their feedback on the plotting library
21:54 run4flat btw, the hard copy output is getting quite nice
21:54 jberger_atwork and of course our "blog" section remains empty
21:54 run4flat and matching the on-screen very, very closely
21:54 run4flat yeah, I no
21:54 run4flat now
21:54 run4flat know
21:54 jberger_atwork yeah, I was impressed with the png output
21:54 run4flat I feel bad for not writing baout it
21:54 run4flat thanks!
21:54 run4flat getting the postscript output correct has been a bit harder
21:54 run4flat but I think I've figured out all the niggles
21:55 run4flat in latest git, not yet on CPAN
21:55 jberger_atwork can it make svg yet?
21:55 run4flat nope
21:55 jberger_atwork hmmmm, then I guess you need ps
21:55 run4flat yeah
21:55 jberger_atwork some vector format
21:55 run4flat users will want ps
21:55 run4flat no matter what
21:55 jberger_atwork they want a vector format
21:55 run4flat but ps doesn't work with UTF8
21:55 run4flat so it's a dead-end ultimately
21:55 jberger_atwork you can make ps from svg
21:55 run4flat sure
21:55 run4flat but I can't make svg yet. :-)
21:56 jberger_atwork yeah
21:56 jberger_atwork I'm just sayin'
21:56 run4flat It'll get there, but getting sub-canvas support working is actually a higher priority
21:56 run4flat then multiplots will Just Work
21:56 run4flat and figure insets will Just Work
21:56 run4flat and I've spent some time on that today
21:56 jberger_atwork I'm just spending your tuits
21:56 jberger_atwork insets would be cool
21:56 run4flat the sub-canvas stuff is a pet of mine
22:01 jberger_atwork run4flat: are we interested in getting Travis working for PDL
22:01 jberger_atwork ?
22:01 * run4flat shrugs
22:01 run4flat maybe
22:01 run4flat sure
22:01 jberger_atwork it was a lifesaver for me for Galileo this morning
22:02 run4flat I am much more interested in having a PDL smoker that also runs PDL::Stats et al
22:02 jberger_atwork yeah
22:02 run4flat but Chris just sent out that email
22:02 run4flat to Barbie
22:02 jberger_atwork but PDL::Stats could be on travis too if it was on github
22:02 jberger_atwork :-)
22:02 run4flat but it couldn't pull in smoke-me branches, now could it?
22:02 jberger_atwork oh, but not versus the newest PDL in git
22:02 run4flat and test itself against said smoke-mes
22:02 run4flat right
22:03 jberger_atwork perhaps
22:03 run4flat then again, maybe I'm letting the perfect be the enemy of the good
22:05 jberger_atwork http://about.travis-ci.org/docs/user/build-confi​guration/#Define-custom-build-lifecycle-commands
22:07 jberger_atwork "before_install is commonly used to update git repository submodules and do similar tasks that need to be performed before dependencies are installed."
22:08 run4flat cool
22:08 run4flat so, could we pull in PDL::Stats into PDL's testing environment, then, and test it against PDL?
22:09 run4flat Or, could we put a listener on a Travis ci for PDL::Stats that ran on every update of PDL?
22:09 jberger_atwork we could do something I believe
22:10 jberger_atwork but look at the cool info you get:
22:10 jberger_atwork https://travis-ci.org/jberger/Galileo
22:10 jberger_atwork oh and a new feature is ... wait for it ... automatic testing of pull requests!
22:11 jberger_atwork cause pull requests needed to be cooler
22:11 jberger_atwork :-)
22:11 run4flat wow
22:11 run4flat that would be FREAKING AMAZING
22:11 * jberger_atwork moves to my other box
22:11 run4flat because then, we could move to a pull-request approach for PDL and get smoke testing for free
22:12 * run4flat shakes head in amazement
22:12 run4flat how does this run against multiple perls?
22:12 run4flat that's fantastic
22:12 jberger o/
22:13 jberger it just does
22:13 * run4flat waves at jberger
22:13 jberger you like that
22:13 jberger ?
22:13 run4flat pull request testing
22:13 run4flat yes
22:14 jberger oh and it does multiple perls via perlbrew
22:14 run4flat oh, yeah, multiple perls
22:14 run4flat that too
22:14 run4flat yes, all amazing
22:33 run4flat alright, I'm outa here
22:33 run4flat o/
22:57 Meiermann joined #pdl

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