ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
SimonNa has quit [Quit: Leaving]
hasen_judy has quit [Remote host closed the connection]
jfo has joined #zig
jfo has quit [Ping timeout: 265 seconds]
davr0s has joined #zig
SimonNa has joined #zig
cenomla has quit [Quit: cenomla]
hasen_judy has joined #zig
jfo has joined #zig
hasen_judy has quit [Ping timeout: 265 seconds]
jfo has quit [Ping timeout: 255 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
davr0s has joined #zig
davr0s has quit [Client Quit]
<MajorLag_>
Wooo, more comptime compiler asserts...
<andrewrk>
MajorLag_, are you referring to the latest commit?
<andrewrk>
that was a regression
<andrewrk>
look at the code diff, haha
<MajorLag_>
No, I'm a few commits behind yet. I broke something having to do with a comptime closure and a comptime created empty struct, I think. Windows, so debugging is limited. Have to find a minimal case.
steveno_ has quit [Quit: Leaving]
<MajorLag_>
Ok, this is a bit weird. It looks like, if you use the '%' operator with a comptime var... under some circumstances I haven't entirely worked out yet, it throws an unreachable. I think it has to do with the "use @mod or @rem" error, but it actually works depending on context.
<MajorLag_>
Ok, specifically, the comptime var seems to have to be a float, and the other operand an int.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Quit: Leaving.]
<andrewrk>
nice!
<MajorLag_>
andrewrk: re: #760, what use is specifying an empty instance of a struct as a return type? Or do I misunderstand what is meant by `A{}`?
<andrewrk>
MajorLag_, even if it's not useful, it can still make parsing ambiguous and that's still a problem
<andrewrk>
one more consideration: if we change struct declaration / instantiation syntax, then if, while, for, switch, etc can drop the required parens
<andrewrk>
(and it solves #760)
<MajorLag_>
I guess I'm not getting why it can't error in that case. I mean, what does: fn() A{.x = 1} {...}; even mean? It seems fine to consider the first {} as the fn body and error because it doesn't return and/or there's no `;` between it and the code block or whatever.
<andrewrk>
MajorLag_, it's an error, but it's a confusing syntax error
defenestrator has quit [Ping timeout: 260 seconds]