Perl 6 - the future is here, just unevenly distributed

IRC log for #pogl, 2017-02-25

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

All times shown according to UTC.

Time Nick Message
12:09 chm joined #pogl
12:09 chm joined #pogl
12:10 chm OpenGL::Modern 0.02_02 is testing well and seeing PASS on darwin.
12:11 chm Plan on at least a 0.03 release this weekend.
12:28 Mithaldu chm: urgh, i kinda want to tell you to reread my email because you misread almost everything
12:29 Mithaldu i'll have an answer to your last mail in a few
12:48 Mithaldu chm: sent
14:58 chm joined #pogl
18:24 Mithaldu chm: sorry, your last email just doesn't make any sense to me, you mix words in ways that maximizes their ambiguity even when i tried to steer you away from that by giving you plenty of text in which they're used in their common context
18:25 Mithaldu worse
18:25 Mithaldu it sometimes looks like you're agreeing when you're actually disagreeing and end up meaning something completely different than what i said
18:27 Mithaldu i also have no idea why you're suddenly alking about c pointers and strings, when we were talking about OpenGL::Array, PDL, C::Pointers (whatever that is), i.e. concrete objects from other dists
18:29 Mithaldu as such, i'll stand by: i'll look at whatever you come up with when it's code, and be grumpy if it uses common-name methods, or isn't documented as slow convenience stuff
18:30 Mithaldu also gonna look at the signatures stuff later on, maybe that'll make sense to me
19:17 chm Mithaldu: I'm sorry you're confused.  I think the problem is you are trying to
19:17 chm rephrase things in a way that was not what I intended.  When I said a role to apply,
19:17 chm that was what I meant.  You're question about which one I meant is meaningless
19:18 chm because all along I have included the entire range of your 1-3 in the last
19:18 chm email.  See my 1-3 for what I was thinking.
19:18 Mithaldu that's what i mean
19:18 chm The one place I expect to have challenges is what to do about
19:18 Mithaldu your 1-3 don't match mine on deeper inspection
19:18 chm optimal performance.  As I mentioned, that won't make sense until
19:19 chm there is an actual implmentation.
19:19 chm Thats what I said, your 1-3 is putting constraints that were not in the original statements.
19:20 chm I'll try to get something quick in a devel branch for better discussion/development.
19:22 Mithaldu your original statements were simply not clear
19:24 Mithaldu also, tbh, i don't see a need for roles in this at all, which makes things a little more confusing as well
19:24 Mithaldu since you're primarily relying on a defined standard it's easy enough to have a class/version check
19:27 Mithaldu anyhow, if there's no interest in adopting a common requirement definition language, code is indeed the most useful thing to come about
19:27 Mithaldu also, you might wanna look at the devel::checklib pr
19:28 Mithaldu getting that to the cpan testers should be useful as it makes it much easier to ignore useless reports of failures
19:28 chm Looking at the PR is on my list for today.
19:29 chm One thing that would help for XS code generation would be to annotated the various
19:30 chm "bad" routines with information about the pointer usage (IN, OUT, INOUT, array/pointer only, fixed size, variable size,...)
19:30 Mithaldu annotate where?
19:36 chm_ joined #pogl
19:37 Mithaldu rather, is there existing annotation?
19:39 chm_ I've started on a paper copy.  A CSV file with the OpenGL function name first followed by the
19:39 chm_ information needed for code generation as columns could work.  The good news is that there
19:40 chm_ appears to be similar naming schemes for parameters so we may be able to cue
19:41 Mithaldu maybe dump the csv file into a separate repo?
19:41 chm_ from that.  Of particular use would be IN, OUT, INOUT, pointer type (array, pointer,...) and whether the size is variable?
19:41 chm_ You could just put them in the signatures folder as well.
19:42 chm_ I'm thinking once we're done, then a cleaned up version could be added to
19:42 chm_ the distribution for reference.
19:42 Mithaldu well, i mainly mean, if you shared the csv file it would give us a better idea of what to do
19:42 Mithaldu then candyangel and i could share some of the work on that
19:42 chm_ BTW, my internet just went out and back which is why the wierd pause in sentence.
19:42 Mithaldu sorry to hear that
19:44 chm_ I would suggest starting with the 1 pointer/array functions first until
19:44 Mithaldu i understand what kind of data you're looking for, but more interesting in that case would then be the formatting you want to see it in
19:44 Mithaldu which is easier gleaned from an existing file as opposed to making it up on my own or from word-by-word description
19:44 Mithaldu so uh
19:45 Mithaldu share your csv please?
19:46 chm_ we get a pattern/process that works.
19:46 Mithaldu that part sounds reasonable
19:47 chm_ I don't have a plan for the csv yet.  I would expect a useful pattern to come out as we start.
19:47 Mithaldu you said you have one though?
19:47 chm_ I'll see about generating some of my first annotations to start things off.
19:48 Mithaldu oh wait
19:48 Mithaldu you mean you have it on paper and could make a csv file
19:48 chm_ For example, consider glVertexAttribPointer, it has 6 arguments and no return.
19:48 Mithaldu sorry, misread it due to the enter in the middle of line thing P
19:50 chm_ The last argument is the pointer value.  Now here is where I have problems not knowing OpenGL
19:51 Mithaldu aye, the only interesting thing is the pointer variable, which is IN|buffer pointer|variable size
19:51 chm_ Is it an input or output?  It looks like this is "just a pointer/offset" and is an input.
19:51 Mithaldu it's described as an array, but in C it's a simple byte buffer whose contents only make sense if parsed based on the other arguments
19:52 chm_ So that routine might have the basic binding with the pointer as a GLvoidPtr type.
19:53 chm_ It actually is a pointer value.
19:53 Mithaldu wtf why is pointer in that one even a pointer
19:53 Mithaldu in practice it's not even a pointer, just a number specifying the offset
19:53 chm_ I think it is because in C you can add pointers so get an offset into a data region.
19:53 Mithaldu here's how i call it in microidium
19:54 Mithaldu https://github.com/wchristian/Microidium/blob/master/lib/Microidium/SDLRole.pm#L449-L453
19:55 Mithaldu all it does is configure the layout for the buffer activated here: https://github.com/wchristian/Microidium/blob/master/lib/Microidium/SDLRole.pm#L435-L437
19:55 chm_ It might make sense to have a typemap for pointer_as_offset and then generate that code.
19:56 chm_ That is the type of information that is needed.  If you collect routines with the same
19:56 Mithaldu "pointer is treated as a byte offset into the buffer object's data store."
19:56 Mithaldu https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glVertexAttribPointer.xhtml
19:56 chm_ patterns together then that will help to implement the code generation.
19:58 chm_ Maybe if you could start with the priority routines in the table of issue #7 we could
19:58 chm_ iterate on the best way to represent the information and, at the same time,
19:59 chm_ be able to get a first cut at all the essential OpenGL functionality for OpenGL::Modern
19:59 Mithaldu can you explain this? https://gist.github.com/wchristian/f1d59fc63c592024b8214564295a3e07#file-gl-c-L3
19:59 Mithaldu specifically the highlighted line
20:00 Mithaldu or this: (GLvoid*) (2 * sizeof(GLfloat))
20:00 chm_ That generates the correctly typed buffer offset as a pointer value
20:01 Mithaldu oh wow, i found documentation that explains it: https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_03
20:01 Mithaldu " in early versions of OpenGL, it was possible to pass a pointer to a C array directly (rather than a buffer object). This is now deprecated, but the glVertexAttribPointer prototype remained unchanged, so we do as if we passed a pointer, but we pass an offset really."
20:01 chm_ That does clarify things.  We could have the perl side of the typedef be an offset
20:02 chm_ with a conversion to the XS with a C pointer value.
20:03 chm_ It looks like  (GLvoid*) (2 * sizeof(GLfloat)) is making a pointer offset for 2 floats.
20:03 chm_ I'm not sure if that is correct C or not.  Probably better to use the BUFFER_OFFSET macro
20:03 chm_ BTW, it is storming here so if I go offline, don't be surprised.
20:04 Mithaldu the OpenGL.pm code for that is funny
20:04 Mithaldu void * pointer
20:04 Mithaldu no modifiction of that in any way, it's just passed straight in
20:04 Mithaldu i guess if you define an xs function as that it automatically makes a pointer to the number passed in
20:05 chm_ Right, the BUFFER_OFFSET macro is to generate the pointer value.
20:05 chm_ The OpenGL bindings assume that the pointer value is correct...so just call directly.
20:05 chm_ That is where the typedef comes in.  It tells the XS code how to map the input to output.
20:06 Mithaldu alright
20:06 Mithaldu well, in any case, that's useful info and i'll make an issue out of it later
20:07 Mithaldu also, i'll probably make it yaml rather than csv
20:07 Mithaldu easy to edit and easy to parse
20:07 Mithaldu yeah, the c code that's generated looks like this:     void *    pointer = INT2PTR(void *,SvIV(ST(5)))
20:11 chm_ In this case, the conversion will do the offset just fine since the value comes from
20:11 chm_ a perl IV which is a number---the offset.
20:12 Mithaldu aye
20:12 Mithaldu the xs preprocessor itself generates the appropiate cast
20:12 chm_ ...based on the typemap information.
20:13 chm_ That is what we're doing, figuring out what the appropriate typemap would be for each usage.
20:13 Mithaldu aha!
20:13 chm_ Once we get them all sorted out, the generate-XS.pl code just uses the correct
20:13 Mithaldu typemap adds exceptions to the perl standard typemap?
20:13 chm_ types and the typemap gives the XS interface.
20:14 chm_ There is a default typemap file.  You can provide your own, add new typemaps.
20:14 Mithaldu yep, that's what i thought
20:14 chm_ I think you can now include them inline in the XS file itself.
20:16 Mithaldu that factoid doesn't seem too relevant to myself at the moment :)
20:19 Mithaldu { glVertexAttribPointer => [ [ qw( IN offset_number variable ) ], ], }
20:19 Mithaldu how do you feel about this as format?
20:19 Mithaldu e.g.
20:20 Mithaldu { <function> => [ <first pointer>, <second pointer>, ... ], }
20:20 Mithaldu with a pointer being:
20:21 Mithaldu [ IN|OUT|INOUT|..., <description of what the pointer is pointing to>|byte buffer|array|..., <size of the thing it's pointing to>|fixed|variable ]
20:21 chm_ Seems reasonable.  I helps to be regular enough to slurp in and manipulate for generate-XS.pl work.
20:22 Mithaldu we can just write it as perl tbh
20:22 Mithaldu the second info thing could get a little freestyle, but you can summarize those later on
20:24 chm_ Parseable as perl hash/structs is nice.
20:24 Mithaldu chm_: got a request
20:24 Mithaldu https://github.com/devel-chm/OpenGL-Modern/issues/45
20:24 Mithaldu can you do that now?
20:25 Mithaldu should be quick and easy
20:26 chm_ If I knew what to do, it would be.  Do you have the hook program?
20:26 Mithaldu just click the link
20:26 Mithaldu it's all stuff you set in the browser
20:26 Mithaldu or maybe go to the settings and make me an admin contributor so i can configure that on my own
20:35 chm_ Mithaldu: I can't see any way to make you an admin contributor
20:35 Mithaldu chm_: let me check
20:36 chm_ Didn't you set up the one for PDL?  Maybe you could send me a crib sheet I could copy?
20:36 Mithaldu mind accepting the invite?
20:37 Mithaldu chm_: ok try going here: https://github.com/devel-chm/OpenGL-Modern/settings/collaboration
20:38 Mithaldu then there's likely a dropdown next to my name you can set to admin
20:38 Mithaldu hm, shit
20:38 Mithaldu there isn't
20:38 Mithaldu guess it needs to be in an org
20:39 Mithaldu i'll make a screenshot gallery you can follow
20:39 chm_ Thanks.  I put some setting in but I don't know if I got all the needed settings.
20:40 Mithaldu oh you did?
20:40 Mithaldu lemme test that
20:41 Mithaldu ok, pushed something
20:41 Mithaldu chm_: make a screenshot of the settings you used?
20:42 Mithaldu chm_: this works for #pdl http://i.imgur.com/CJgE4Rl.png
20:42 Mithaldu you can probably use that and just need to change the channel name to #pogl
20:43 Mithaldu ah, remove the master from the branches field, you can leave that empty
20:43 Mithaldu disable the notice thing, that's a little annoying :)
20:43 Mithaldu ssl isn't necessary
20:43 Mithaldu and colors are a matter of taste
20:44 Mithaldu although i guess you could leave the ssl thing on if that doesn't break it
20:44 chm_ I just made those changes.  I don't like color because I can't control it to be legible.
20:45 Mithaldu fair enough :)
20:45 Mithaldu ok, pushed something
20:45 opkick [OpenGL-Modern] wchristian pushed 1 new commit to asdasdasdglew_acc_test: https://git.io/vyTy9
20:45 opkick OpenGL-Modern/asdasdasdglew_acc_test cadaa27 Christian Walde: dfsgsdfgfdsg
20:45 Mithaldu nice
20:46 opkick [OpenGL-Modern] wchristian deleted asdasdasdglew_acc_test at cadaa27: https://git.io/vyTyH
20:46 Mithaldu disabled colors for the pdl one too
20:51 chm joined #pogl
20:53 opkick [OpenGL-Modern] devel-chm pushed 1 new commit to master: https://git.io/vyTSc
20:53 opkick OpenGL-Modern/master 9dc3b72 Chris Marshall: Update Changes and README.md for CPAN release...
20:53 opkick [OpenGL-Modern] devel-chm tagged OpenGL-Modern-0.02_03 at master: https://git.io/vyTSW
20:53 chm Mithaldu: Yippee!  It looks like it is working...
20:53 Mithaldu excellent :)
20:54 chm I'm pushing 0.02_03 to check out the Devel::CheckLib before a bump to 0.03.
20:54 Mithaldu aye, it should end up looking somewhat like this: http://matrix.cpantesters.org/?dist=OpenGL+0.70
20:54 Mithaldu with the orange stuff being reports you can ignore
20:54 Mithaldu and the yellow/red ones meriting looking into
20:55 chm Well, sort of.  OpenGL::Modern is almost all green.  I expect the yellow will change to orange.
20:56 Mithaldu reports will contain the phrase "OS unsupported" if the libs are missing, but that's required to make CPAN::Reporter DTRT
20:56 Mithaldu yes
20:56 Mithaldu that should be what happens
21:01 chm Mithaldu: Assuming 0.02_03 has nothing wrong, I'll push 0.03 from that later today.
21:02 chm That should be a good point so the official version is as working as possible.
21:02 chm If you have any docs or examples updates for 0.03, now would be the time to get them in.
21:02 Mithaldu that sounds reasonable
21:02 Mithaldu though please edit the changes file a little
21:02 Mithaldu there doesn't need to be these in there:
21:03 Mithaldu - fix implementation of done_glewInit()
21:03 Mithaldu - Fix bad code generated for GLEW_* variable accessors
21:03 Mithaldu you can just combine and condense all those into a 0.03 entry
21:03 chm I'm going to see about spinning off OpenGL::GLUT from OpenGL this evening.
21:03 Mithaldu also let me see if anything else needs being noted
21:04 Mithaldu also that sounds interesting
21:04 chm Once OpenGL::GLUT and OpenGL::Array (includes OpenGL::Matrix and OpenGL::RPN) are spun off
21:04 Mithaldu oh wait no, the done_glewinit thing actually is a change over 0.02, alright then
21:05 chm then there should be no need to use the legacy OpenGL module unless you need the OpenGL stuff.
21:05 Mithaldu not quite sure why this changed:
21:05 Mithaldu -   "dynamic_config" : 1,
21:05 Mithaldu +   "dynamic_config" : 0,
21:05 chm All the rest can be pulled in for OpenGL::Modern to use.
21:05 Mithaldu cool
21:06 Mithaldu i don't think docs need changes as this was all house-keeping stuff
21:07 chm It probably could use some clean up but that would better be done after the "priority" bindings are done.
21:09 chm Catch you later, time for some programming.
21:09 chm o/
21:09 Mithaldu enjoy o/
21:33 opkick [OpenGL-Modern] wchristian force-pushed glew_acc_test from 1b468a8 to ab61cde: https://git.io/vyTHQ
21:33 opkick OpenGL-Modern/glew_acc_test ab61cde Christian Walde: add a test for the recent glew accessor functionality
21:40 chm joined #pogl
21:45 chm_ joined #pogl
22:05 opkick [OpenGL-Modern] devel-chm closed pull request #42: add a test for the recent glew accessor functionality (master...glew_acc_test) https://git.io/vyT7D
22:05 opkick [OpenGL-Modern] devel-chm pushed 1 new commit to master: https://git.io/vyT7y
22:05 opkick OpenGL-Modern/master e3fe7b5 Christian Walde (Mithaldu): add a test for the recent glew accessor functionality (#42)
22:09 opkick [OpenGL-Modern] devel-chm pushed 1 new commit to master: https://git.io/vyT5f
22:09 opkick OpenGL-Modern/master e6f7953 Chris Marshall: Update VERSION and prep for 0.03 release
22:16 opkick [OpenGL-Modern] devel-chm pushed 1 new commit to master: https://git.io/vyT5o
22:16 opkick OpenGL-Modern/master 8b7573d Chris Marshall: Add new test to MANIFEST
22:17 opkick [OpenGL-Modern] devel-chm tagged OpenGL-Modern-0.03 at master: https://git.io/vyT56
22:17 Mithaldu chm: Changes has mixed tabs and spaces
22:17 Mithaldu actually ... *makes issue*
22:18 opkick [OpenGL-Modern] devel-chm pushed 1 new commit to master: https://git.io/vyT5y
22:18 opkick OpenGL-Modern/master 88d0906 Chris Marshall: Update VERSION to 0.03_01 for more development
22:20 opkick [OpenGL-Modern] wchristian deleted glew_acc_test at ab61cde: https://git.io/vyT5x
22:29 chm_ Mithaldu: Thanks, I keep forgetting to add expandtab to my .vimrc
22:29 Mithaldu time to do it :D
22:31 chm_ OpenGL::Modern version 0.03 is out, https://sourceforge.net/p/pogl/mailman/message/35688713/
22:38 Mithaldu nice, testing
22:57 CandyAngel I leave for a while and the channel bursts into life and then there is another release :P
22:58 Mithaldu CandyAngel: at least i got something to do for you now if you're interested
22:58 Mithaldu i mean to make a ticket of it, but it's quickly explained
22:59 CandyAngel Oooo, yay
22:59 CandyAngel What is it?
23:01 Mithaldu CandyAngel: alright, if you feel like it you could also do the issue
23:01 Mithaldu in any case
23:01 Mithaldu look in the repo
23:01 Mithaldu signatures/badp-XS-sigs/
23:01 Mithaldu has a bunch of files
23:02 Mithaldu they sort functions with pointer arguments into groups by how many pointer args they have
23:02 Mithaldu we need to go through all these, and manually inspect the pointer arguments
23:02 Mithaldu by looking at the gl docs on khronos, mainly
23:03 Mithaldu then record the findings about the arguments in a file like this:
23:03 Mithaldu { glVertexAttribPointer => [ [ qw( IN offset_number variable ) ], ], }
23:03 Mithaldu { <function> => [ <first pointer>, <second pointer>, ... ], }
23:03 Mithaldu with a pointer being:
23:03 Mithaldu [ IN|OUT|INOUT|..., <description of what the pointer is pointing to>|byte buffer|array|..., <size of the thing it's pointing to>|fixed|variable ]
23:03 CandyAngel Isn't there an XML with all that information in?
23:03 Mithaldu i.e. a huge hand-edited hash
23:03 Mithaldu make sense to you?
23:04 Mithaldu if you can find it you'd be a hero, but i doubt it
23:04 Mithaldu please have a look :)
23:04 CandyAngel I thought there was when I was looking around FFI and OpenGL
23:05 Mithaldu well, as i said, if you can find it, that'd be great
23:05 CandyAngel https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml
23:05 Mithaldu does this sound reasonable so far though?
23:06 CandyAngel Yep
23:07 Mithaldu nah, that file doesn't contain the info we need
23:07 Mithaldu for the pointer i described above it only says
23:07 Mithaldu
23:07 Mithaldu <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
23:10 Mithaldu i think the issue we make about this should also split the file up into groups of x lines
23:10 Mithaldu i think we can use github's checkmark lists for that usefully
23:10 Mithaldu with one per group for started and done
23:25 CandyAngel Oh, so this is just information about the pointer arguments, not all of them?
23:26 CandyAngel Which you did say, I'm just being slow because I'm trying to do 11 things right now :P
23:37 Mithaldu yep, only the pointers :)
23:43 CandyAngel Oh
23:44 CandyAngel With regards to wrapping all calls with error checking.. it will put Perl at a(nother) disadvantage when benchmarking it against other bindings
23:44 CandyAngel Also.. any thoughts of having a website like POGL1?

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