ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
atk has quit [Quit: Well this is unexpected.]
<cgag> should that work?
atk has joined #zig
clownpriest has quit [Ping timeout: 240 seconds]
clownpriest has joined #zig
return0e has joined #zig
return0xe has quit [Ping timeout: 245 seconds]
clownpriest has quit [Ping timeout: 252 seconds]
clownpriest has joined #zig
clownpriest has quit [Ping timeout: 240 seconds]
clownpriest has joined #zig
clownpriest has quit [Ping timeout: 264 seconds]
clownpriest has joined #zig
kristate has quit [Remote host closed the connection]
clownpriest has quit [Ping timeout: 240 seconds]
kristate has joined #zig
clownpriest has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
clownpriest has quit [Ping timeout: 264 seconds]
clownpriest has joined #zig
clownpri1 has joined #zig
clownpriest has quit [Ping timeout: 264 seconds]
martinium has joined #zig
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
kristate has quit [Remote host closed the connection]
pdmer has quit [Client Quit]
pdmer has joined #zig
kristate has joined #zig
kristate has quit [Remote host closed the connection]
darithorn has joined #zig
pdmer has quit [Quit: pdmer]
davr0s has joined #zig
darithorn has quit [Quit: WeeChat 2.2]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has joined #zig
kristate has quit [Ping timeout: 240 seconds]
allochi has joined #zig
allochi has quit [Client Quit]
martinium has quit [Ping timeout: 245 seconds]
davr0s has joined #zig
allochi has joined #zig
kristate has joined #zig
allochi has quit [Client Quit]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Client Quit]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 264 seconds]
clownpri1 has quit [Read error: Connection reset by peer]
clownpri1 has joined #zig
davr0s has joined #zig
clownpri1 has quit [Ping timeout: 245 seconds]
Barabas has joined #zig
very-mediocre has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
_whitelogger has joined #zig
_whitelogger has joined #zig
Thorn__ has joined #zig
Thorn has quit [Ping timeout: 240 seconds]
Barabas has quit [Ping timeout: 252 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
darithorn has joined #zig
very-mediocre has quit [Ping timeout: 252 seconds]
pdmer has joined #zig
unique_id has joined #zig
pdmer has quit [Quit: pdmer]
martinium has joined #zig
Thorn__ is now known as Thorn
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<andrewrk> cgag, I'll have a look
<andrewrk> it certainly shouldn't assert
<andrewrk> cgag, this might be zig tryign to represent Expr differently since the enum tag can only possibly be one thing
<andrewrk> cgag, yeah, you can work around it by adding a dummy field to Expr
<andrewrk> this is a bug
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cgag> in the real code the Expr type has 4 different tag possibilities, and doesn't assert but instead i end up hitting `access of inactive union field`
<cgag> that's just pruned down as small as i could make it, and i assume closer to the root of whatever's going wrong
<andrewrk> cgag, those are 2 different issues, and I'm not sure that the inactive union field access is a bug
<andrewrk> you have to reassign over the entire union to change the active tag
<andrewrk> can i see the code with that problem?
<cgag> let me see if i can find a smaller way to show it real quick
<andrewrk> cgag, here's an example of changing the active field of a union: https://ziglang.org/documentation/master/#Wrong-Union-Field-Access
davr0s has joined #zig
pdmer has joined #zig
<cgag> i'm pretty sure it's not that, https://github.com/cgag/crafting-interpreters-zig
<cgag> it's kind of a huge mess, but zig test parser.zig will trigger the inactive field access
<andrewrk> I get a 404 for that URL
<andrewrk> is it private?
<cgag> woops, should be public now
pdmer has quit [Client Quit]
pdmer has joined #zig
<unique_id> andrewrk: Is this a bug? https://pastebin.com/raw/AcU2WR91 - and a separate issue, is a cImport that generates a struct with a field like that a bug?
<andrewrk> if it asserts it's a guaranteed bug - I think you're asking if it's supposed to be a compile error or not
<unique_id> no I just thought maybe it's asserting because it hasn't been implemented :)
pdmer has quit [Client Quit]
<unique_id> but then the assert would say that
hoppetosse has joined #zig
<andrewrk> usually I'll try to have the message say "TODO" in it for those cases
<andrewrk> yeah that's supposed to be a compile error - opaque types don't have sizes, so they can't be fields in a struct
<andrewrk> and it's always a bug if translate-c generates code that has compile errors
pdmer has joined #zig
<andrewrk> cgag, ah I see, this should be impossible since you just switched on it
<andrewrk> looks like zig is generating bad data for the global constant test_lit_true_bool
pdmer has quit [Quit: pdmer]
<andrewrk> cgag, this is a nasty bug, my apologies. here's a workaround: https://clbin.com/rdfhw
<andrewrk> this might be https://github.com/ziglang/zig/issues/1381 but I'm going to make a new issue for it just in case
pdmer has joined #zig
martinium has quit [Quit: Leaving]
pdmer has quit [Client Quit]
<andrewrk> unique_id, I gotta run, can I trouble you to file a bug report with your test case?
<cgag> interesting workaround
<cgag> thanks, for making the issue, will take a look at that
<cgag> i need to learn how to use gdb
<andrewrk> it's pretty great
<andrewrk> I highly recommend investing in it
<andrewrk> these "silent wrong data/code" bugs are really high priority
<andrewrk> really appreciate the report
<cgag> i've gotten by with printfs in higher level languages but hitting stuff like this leaves me completely stumped
<andrewrk> yeah it's tough using an early beta language. there are some assumptions you can no longer trust perfectly, such as "the compiler is never wrong"
<andrewrk> my goal is for there to be 0 bugs for the 1.0.0 release
pdmer has joined #zig
<andrewrk> and not just known bugs - we'll use code coverage, fuzzing, and anything else we can think of to surface issues
<cgag> it's fun though, i like that doing these learning projects doubles way to contribute
<cgag> yeah i'm definitely interested to see what fuzzing can do, learning more about that's been on my todo list for a while
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdmer has quit [Quit: pdmer]
hoppetosse has quit [Remote host closed the connection]
_whitelogger has joined #zig
pdmer has joined #zig
pdmer has quit [Quit: pdmer]
pdmer has joined #zig
davr0s has joined #zig
pdmer has quit [Quit: pdmer]
return0e has quit [Ping timeout: 245 seconds]
pdmer has joined #zig
pdmer has quit [Client Quit]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noonien has quit [Quit: Connection closed for inactivity]