ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
wootehfoot has quit [Read error: Connection reset by peer]
scientes has joined #zig
scientes has quit [Remote host closed the connection]
scientes has joined #zig
aiwakura has quit [Quit: The Lounge - https://thelounge.github.io]
_whitelogger has joined #zig
scientes has quit [Ping timeout: 246 seconds]
a_chou has joined #zig
a_chou has quit [Client Quit]
darithorn has quit [Remote host closed the connection]
knebulae has joined #zig
_whitelogger has joined #zig
dewf has joined #zig
Zaab1t has joined #zig
_whitelogger has joined #zig
Ichorio has joined #zig
_whitelogger has joined #zig
jjido has joined #zig
dewf has quit [Quit: Leaving]
fsateler has joined #zig
fsateler_ has quit [Ping timeout: 246 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Barabas has joined #zig
<Barabas> Is there an easy/elegant way to make a (comptime) loop over all the possible enum values of a specific enum type?
hio has joined #zig
wootehfoot has joined #zig
<gamester> Barabas: I'm not used to comptime things but this works: https://pastebin.com/raw/jQrXceMx
<Barabas> Cool, thanks!
<gamester> Barabas: as you can see there is some redundancy between @typeinfo and other @ functions, later you'll probably use std.meta which just uses @typeInfo: https://github.com/ziglang/zig/issues/1104
<gamester> will just use* - std.meta does not exist yet, I think
<gamester> or at least I think it's not finished
<Barabas> ok
<Barabas> the fields.value is a bit weird, as I expected it to return ... oh well maybe it makes sense. At first I thought it would be of the enum type, but it's a usize.
<Barabas> or sorry, comptime_int
<gamester> you can get the tag type like this: @typeInfo(your_enum).Enum.tag_type
<gamester> also take a look at std.meta, it seems there's good stuff in there
tankf33der has joined #zig
develonepi3 has joined #zig
Ichorio has quit [Ping timeout: 245 seconds]
diltsman has quit [Ping timeout: 256 seconds]
scientes has joined #zig
darithorn has joined #zig
<Barabas> How do you make a field of a (tagged) union active?
<Barabas> I tried doing
<Barabas> my_union.Field = undefined;
<Barabas> but there it complains that it accesses an inactive field :(
<hio> I think you have to reinitialize the whole thing
<hio> my_union = union { .Field = 3 }
<Barabas> Hm... ok, yes that seems to work.
_whitelogger has joined #zig
scientes has quit [Ping timeout: 245 seconds]
darithorn_ has joined #zig
darithorn_ has quit [Read error: Connection reset by peer]
darithorn_ has joined #zig
darithorn has quit [Ping timeout: 250 seconds]
Zaab1t has quit [Quit: bye bye friends]
darithorn__ has joined #zig
darithorn_ has quit [Ping timeout: 250 seconds]
jjido has joined #zig
darithorn_ has joined #zig
darithorn__ has quit [Ping timeout: 250 seconds]
darithorn__ has joined #zig
darithorn_ has quit [Ping timeout: 244 seconds]
Ichorio has joined #zig
<gamester> andrewrk, strange error: https://pastebin.com/raw/rWchzfqV
tankf33der has left #zig [#zig]
<andrewrk> I probably boke it in e40245570
Akuli has joined #zig
Zaab1t has joined #zig
Zaab1t has quit [Quit: bye bye friends]
<mikdusan> my new favourite error: return error.WIP;
darithorn_ has joined #zig
darithorn__ has quit [Ping timeout: 250 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
<andrewrk> mikdusan, nice- I'm also a fan of @panic("TODO")
darithorn_ has quit [Read error: Connection reset by peer]
darithorn_ has joined #zig
darithorn_ has quit [Read error: Connection reset by peer]
darithorn_ has joined #zig
Akuli has quit [Quit: Leaving]
vramana has quit [Quit: Connection closed for inactivity]
Ichorio has quit [Ping timeout: 245 seconds]
dewf has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<daurnimator> mikdusan: I prefer NYI
<daurnimator> WIP suggests you'll actually come back to it later ;)
<daurnimator> though @panic("NYI") is probably better: it doesn't mess up error signatures...... though maybe that's a good thing: if a function has NYI in it's error set you know it isn't ready to use yet....
<daurnimator> though I more often deal with scenarios where I'm *not allowed to throw*, so the @panic is preferable
Barabas has quit [Ping timeout: 256 seconds]