Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-07-19

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

All times shown according to UTC.

Time Nick Message
00:06 jberger__ joined #pdl
00:41 jberger_ joined #pdl
03:14 jberger__ joined #pdl
03:31 jberger_ joined #pdl
05:56 Meiermann joined #pdl
12:34 jberger__ joined #pdl
12:49 jberger_ joined #pdl
13:34 jberger_ joined #pdl
13:36 jberger__ joined #pdl
14:02 chm joined #pdl
16:30 jberger_ joined #pdl
16:36 jberger_ joined #pdl
16:43 jberger__ joined #pdl
16:56 Mithaldu so, get_dataref gives me a reference to a string with the piddle contents. how do i get a C pointer to that so i can pass it to an XS function?
16:57 drrho joined #pdl
17:00 Mithaldu hm, i guess that's the same
17:06 Mithaldu aHA
17:06 Mithaldu my pdl data is not in the data type i need
17:11 Mithaldu damn, apparently it's not the same after all :(
17:12 Mithaldu so i remain with the question of how i get a pointer to the actual c data, not some kind of scalar
17:12 chm joined #pdl
17:17 chm The value returned by get_dataref is a perl reference to a scalar whos string content is the pdl data.
17:18 chm You use the standard perl api to get a C pointer to that value.
17:19 Mithaldu chm: i never did that before, rurban pointed me at B
17:19 Mithaldu also, how did you know what i was asking here? :P
17:19 chm Try perldoc perlapi for the full list.  The routine you want is SvPV
17:21 chm I try to watch the #pdl logs but can't usual connect during the day.
17:21 Mithaldu ah, i see
17:21 Mithaldu also, to the ticket i opened on sourceforge:
17:21 chm The perldl mailing list is better to let others help out (including me).
17:21 Mithaldu seems the link to the git repo changed from /pogl to /code, but wasn't updated in the dist
17:21 Mithaldu oh dang, mailing lists, i keep forgetting about those
17:22 chm IRC is great but the searchability is *very* poor.
17:23 chm Also, IRC is anonymous so I have no ability to follow up by email even if I wanted to.
17:23 Mithaldu well, you know me :P
17:24 Mithaldu hmm, SvPV doesn't seem to be a perl function
17:24 chm It is a part of the perl api and would be called from C/XS part of your bindings.
17:25 Mithaldu i want to pass piddle data to OpenGL.pm
17:25 chm Also, I don't know who you are, just someone I've seen before.
17:25 Mithaldu sir, i am hurt :|
17:25 Mithaldu <- Christian Walde
17:26 chm Yes, I do know you---just couldn't remember the moniker.  Sorry.
17:26 chm That's what I mean by anonymous...
17:26 Mithaldu haha, it's ok :)
17:27 chm Well, since I'm Mr POGL, I believe it is already possible (at least for the current POGL bindings).
17:27 chm Just use the versions of the routines with _s and pass it the stuff from $pdl->get_dataref
17:29 chm See the code in PDL::Graphics2D for the imag2d routine and you'll see the usage.
17:29 chm Sorry, I usually have to refresh my memory jumping back and forth for projects which
17:29 chm is why it wasn't off the top of my head.
17:30 chm Try perldoc -m PDL::Graphics2D to see the code.
17:30 Mithaldu i want to avoid extra copies
17:30 Mithaldu so i'm trying to make _c work with PDL stuff
17:31 chm The _s doesn't make extra copies.  (I had to fix that when I merged the PDL OpenGL back into POGL).
17:31 chm FYI, the imag2d_update routine is there to avoid extra copies on the PDL side with imag2d
17:32 Mithaldu heh, i actually had the string stuff working before :)
17:32 Mithaldu but then i looked at void * data_s = EL(data, size);
17:32 Mithaldu and went like "wait a minute, there must be a way to skip that"
17:35 chm If the SV passed in is a perl reference, then I assume it is pointing to a packed string value and just return the pointer from that.
17:35 chm Otherwise, the old grow a new copy code is called.
17:36 chm Kind of tricky to follow since I didn't want to break things and just fixed enough for things to work.
17:36 Mithaldu ooh
17:36 Mithaldu so that's a failsave?
17:36 chm I'm hoping some more sigificant cleanup with the OpenGL update I'm working on now.
17:36 Mithaldu looking forward to you breaking ALL my stuff :P
17:37 chm I don't know about a failsafe, it is just supposed to DWIM with a piddle.  :-)
17:37 Mithaldu works for me :)
17:38 Mithaldu (my thoughts tend to go in odd patterns)
17:38 chm On the POGL side, I'm planning to finish the new POGL with OpenGL 2.x+ support to go with the PDL3 release at the end of the Summer.
17:38 Mithaldu that's earlier than i expected
17:39 chm Would you be willing to help out with that?  I'm even planning to try to set up a video chat on my PC so we might actually
17:39 chm collaborate better and more clearly.  mailing list << IRC << live
17:39 Mithaldu i'm not sure with what i can help, but i'm sure as hell willing :D
17:39 Mithaldu also, i've got skype and a decent cam on this laptop :)
17:40 chm It is kind of a push on my end since I would like to spend more time using PDL and POGL rather than
17:41 chm steering the development boat.  It takes a lot of time and seems like a pretty much uphill battle most times.
17:41 Mithaldu well, i'll put it like this: if you can solve the hard problems, i'm more than willing to take care of the busywork :D
17:41 chm After PDL3, I hope things will be in good enough shape that things can go forward without my driving..
17:42 Mithaldu have you read ribasushi's post on dbix::class?
17:42 chm Sounds good, I'll keep you posted.  Thanks
17:42 chm No
17:42 Mithaldu haha, thanks for making it possible for me to do stupid things with perl :D
17:43 Mithaldu http://blogs.perl.org/users/peter_rabbitson​/2013/07/crowdsourcing-self-confidence.html
17:43 Mithaldu might be interesting to read for you
17:43 chm I'm off to lunch.  Catch up more later.  o/
17:43 Mithaldu have fun :)
17:45 Mithaldu that graphics2d link looks useful
23:32 jberger_ joined #pdl

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