fsateler_ has quit [Read error: Connection reset by peer]
fsateler has joined #zig
<hryx>
Sup friendos. Long time no chat! I'm just getting back into zig after a long break and trying to build dbandstra/oxid and andrewrk/tetris, but I'm getting compile errors for both projects, using both 0.3.0 and master. Anyone have a sec to help me troubleshoot?
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
jjido has joined #zig
hio has quit [Quit: Connection closed for inactivity]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #zig
return0e has joined #zig
return0e_ has quit [Ping timeout: 245 seconds]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gamester>
hryx: I just built tetris successfully on master. Make sure your tetris source code is up to date.
<gamester>
(on master)
<gamester>
Oh I said that already, awkward.
return0e_ has joined #zig
return0e has quit [Read error: Connection reset by peer]
marmotini_ has joined #zig
gamester has left #zig ["Leaving"]
return0e has joined #zig
return0e_ has quit [Ping timeout: 250 seconds]
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 246 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 250 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 245 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 246 seconds]
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 245 seconds]
fsateler_ has joined #zig
fsateler has quit [Ping timeout: 245 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 245 seconds]
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 255 seconds]
marmotini_ has joined #zig
marmotini has quit [Ping timeout: 246 seconds]
very-mediocre has joined #zig
bheads has joined #zig
marmotini has joined #zig
marmotini_ has quit [Ping timeout: 255 seconds]
halosghost has joined #zig
marmotini has quit [Ping timeout: 245 seconds]
<hryx>
@gamester shoot, I double-checked -- I have latest master zig and master tetris, but sadly same results. still `error: cast discards const qualifier` in png.zig
<hryx>
awkward indeed .___. what could be wrong
<andrewrk>
a different png.h
<hryx>
@andrewrk I'm not sure I understand?
<andrewrk>
if the png.h is different on your system it could cause this
<hryx>
ah, I have installed libpng via Aptitude so that is possible
<andrewrk>
this is another example of a motivation for zig package manager
<hryx>
I'm on Xenial BTW. Any tips or corrections are welcome
<hryx>
andrewrk: what's the official ticket tracking a package manager feature, for my reference?
<hryx>
Huh, interesting. My trouble here is I don't understand the difference between "system headers" and what I installed via the package mananger
<hryx>
No worries if it's too much to 'splain here on IRC
<andrewrk>
your system package manager installs system headers
<andrewrk>
I'm using "system" to mean "that which exists outside of your zig installation"
<andrewrk>
system stuff is the stuff that is different if you go sit down at someone else's computer with the same zig version
<hryx>
Ok, that makes sense. In case it clarifies, my "system" is Linux Mint, apt, and I'm using snap for zig binaries (though I have also successfully built from master/version tags)
<hryx>
I will read the ticket you linked to get a better context around this issue
Akuli has joined #zig
<andrewrk>
hryx, in summary, until zig package manager is done, you'll have to install a compatible libpng to make the tetris app work
<hryx>
I'll see if I can install the same verion you mentioned (libpng-apng-1.6.35). to be hoped the same version works for dbandstra/oxid
<emekankurumeh[m]>
another way to make this problem go away is to write a png library in zig ;)
<andrewrk>
I hope zig community members are being nice :)
<companion_cube>
seems so
<companion_cube>
I'd say that Zig is gaining ground in people's minds as "the most promising C replacement", or something like that
<companion_cube>
(the post is about rust not being a good C replacement, which I kind of agree with)
Zaab1t has quit [Quit: bye bye friends]
wootehfoot has joined #zig
Zaab1t has joined #zig
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
Ichorio has joined #zig
vegecode has joined #zig
<vegecode>
Hello can someone tell me the best way to get the type with the minimum width that can represent a number? Generic functions that need to do shifting need an integer type with the correct width.
<vegecode>
ie. u32 -> max shifts == 31 -> I need a u5
<vegecode>
The best I can come up with is @IntType(false, T.bit_count - @clz(T.bit_count - 1))
<vegecode>
The best I can come up with is @IntType(false, T.bit_count - @clz(T(T.bit_count) - 1))
<vegecode>
I guess it needs a cast? I'm just wondering if there is an easy way since this seems like a common operation.