ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
ryan__ has joined #zig
dimenus has quit [Ping timeout: 248 seconds]
dimenus has joined #zig
ryan__ has quit [Ping timeout: 260 seconds]
ryan__ has joined #zig
dimenus has quit [Ping timeout: 255 seconds]
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 240 seconds]
dimenus has joined #zig
ryan__ has quit [Ping timeout: 276 seconds]
ryan__ has joined #zig
dimenus has quit [Ping timeout: 248 seconds]
dimenus has joined #zig
ryan__ has quit [Ping timeout: 248 seconds]
ryan__ has joined #zig
dimenus has quit [Ping timeout: 276 seconds]
dimenus has joined #zig
ryan__ has quit [Ping timeout: 276 seconds]
ryan__ has joined #zig
dimenus has quit [Ping timeout: 268 seconds]
dimenus has joined #zig
ryan__ has quit [Ping timeout: 276 seconds]
ryan__ has joined #zig
dimenus has quit [Ping timeout: 240 seconds]
ryan__ has quit [Ping timeout: 276 seconds]
arBmind1 has quit [Quit: Leaving.]
arBmind has joined #zig
redj_ has joined #zig
redj has quit [Ping timeout: 240 seconds]
cgag has quit [Ping timeout: 240 seconds]
cgag has joined #zig
<andrewrk> dimenus, it was nice to have some time to work :)
arBmind1 has joined #zig
dimenus has joined #zig
arBmind has quit [Ping timeout: 240 seconds]
<dimenus> andrewrk, i have a PR ready to go to close #619 but my test is a little wonky
<dimenus> the problem is that translate-c outputs all of the defines created by clang, not just the ones defined in our .h file
<dimenus> so the output compare doesn't work as expected
<andrewrk> dimenus, ahh, right. the test harness lets you specify multiple strings to match, and each one must be contained in the output
<dimenus> yep, and all of our expected strings are there - but so are the llvm/clang ones
<andrewrk> that seems fine, no?
<dimenus> i was curious if it's just a different parameter we can pass when getting the ast from clang
<dimenus> the test fails because they aren't though
<dimenus> i spose I could add the llvm/clang ones...
<andrewrk> is your code committed to your fork? I'll take a look
<andrewrk> also I didn't realize we were working on the same file, I hope I didn't clobber your work
<andrewrk> dimenus, if this test passes, it looks great to me. I wouldn't even call it wonky
<dimenus> it doesn't, I can just add the llvm/clang defines w/ a todo
<andrewrk> wait, why are the llvm/clang defines causing an issue?
<andrewrk> can you not put each declaration as a separate arg to cases.add() ?
<dimenus> andrewrk, this is what zig translate-c test.h (the test I created) outputs
<andrewrk> dimenus, looks like the test will pass if you make some of the declarations separate args to cases.add()
<andrewrk> each arg is independently matched against the output
<andrewrk> does it make sense? do you want me to make a diff to show you?
<dimenus> ah, so because I won't get these in one big chunk
<dimenus> it should be broken up
<andrewrk> yes
<dimenus> makes sense
<dimenus> hmm, here is the issue though. in order to test 'glClearUnion' i also need to define the union
<dimenus> and the macros comes after a bunch of other llvm/clang defines
<dimenus> so that part of the test will always fail
<dimenus> since the items in the test aren't independent entities
<andrewrk> dimenus, keep the input exactly the same
<dimenus> ah but break the output into lines
<andrewrk> yeah break it up by definition
<andrewrk> e.g. keep the 6 lines of union_OpenGLProcs together
<dimenus> still failed
<andrewrk> dimenus, is it a newline/tab issue?
<andrewrk> oh, the expected has 2 spaces, the output has 4
<dimenus> yeah i'm using 4 in my editor
<andrewrk> in the paste you linked me, you have the expected output with 2 spaces, and the actual output has 4
<dimenus> how did i do that lol
<dimenus> fail
<GitHub21> [zig] dimenus opened pull request #627: Added support for exporting of C field expressions (master...c-field-expr) https://git.io/vbv1x
<dimenus> andrewrk, my merge from master may be wrong
arBmind has joined #zig
arBmind1 has quit [Ping timeout: 240 seconds]
<andrewrk> merge looks good to me
<dimenus> i fixed it since I last sent that message
<andrewrk> dimenus, one more thing I might suggest doing
<andrewrk> if you try to use, e.g. glClearUnion
<andrewrk> it's a nullable function pointer, so you'd have to do (??glClearUnion)() to call it
<andrewrk> but I think the fact that we define macro to do that, means that we can hide the unwrap
<dimenus> that should get automatically generated, we talked about that before the weekend
<andrewrk> yeah
<andrewrk> see the test "generate inline func for #define global extern fn"
<dimenus> it just ended up more complex and I wanted to talk to you about it first
<andrewrk> yeah that sounds good
<andrewrk> I can help with this
<dimenus> i wanted to understand why keep macros in two separate lists, one for 'macro symbols' and regular macros
<dimenus> right now the field expr macro gets put into the regular macro list
<andrewrk> you're talking about macro_table vs macro_symbols?
<dimenus> correct
<andrewrk> I'll go read the code to remind myself
<andrewrk> macro_symbols is for when macros alias something else
<andrewrk> and macro_table is for completed AstNodes generate from a macro expression
<andrewrk> if you have a more specific question I can try to answer it
<andrewrk> dimenus, I'll have a look at this later tonight if it turns out to be tricky
<andrewrk> nice work btw
<dimenus> so in my mind, this is a macro symbol correct?
<andrewrk> I see the problem
<andrewrk> because right now macro symbols have to be a simple name lookup
<andrewrk> but this would be a field access
<andrewrk> it's a little tricky to get this all hooked up
<dimenus> yep even if you add the name, you can't find it because the field isn't a top level symbol
<andrewrk> we have to change things - instead of "macro symbol" we need something like "macro reference to another declaration"
<andrewrk> and have a way to lookup symbols and field access
<andrewrk> this is very tricky, because we have to be able to follow field access, but we only generated AstNodes and tossed away that information
<andrewrk> it sounds like you understand the problem
<andrewrk> but if it's too annoying or hairy, I'm happy to take the PR from here
<dimenus> i like the challenge, but it may be more time efficient for you handle it since it's a significant change
<dimenus> i'll pick on other lower hanging fruit
<andrewrk> sounds good
cenomla has quit [Quit: cenomla]
cenomla has joined #zig
arBmind has quit [Quit: Leaving.]
arBmind has joined #zig
redj_ is now known as redj
dimenus has quit [Ping timeout: 276 seconds]