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/
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?
<hryx> Here's the output of `zig build play` on tetris using master: https://hastebin.com/ehufobuqur.txt
Zaab1t has joined #zig
darithorn has quit [Ping timeout: 255 seconds]
wilsonk has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Zaab1t has quit [Quit: bye bye friends]
wilsonk has joined #zig
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> wonderful, thankz
<andrewrk> what libpng version is that?
<andrewrk> I'm pretty sure that parameter is supposed to be a const pointer
<hryx> Let me check real quick
<hryx> /usr/include/libpng/png.h is 1.2.54
<hryx> I'm not sure that's the correct file being referenced
<andrewrk> I'm using libpng-apng-1.6.35
<hryx> I'll try to find that in the package manager
<andrewrk> I'm working to make this problem go away completely
<andrewrk> but it'll take at least another release cycle
<hryx> what exactly is the problem?
<andrewrk> the tetris app depends on system libpng, causing situations like this where we spend effort troubleshooting something that should Just Work
<andrewrk> also, Windows
<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> yep
Zaab1t has joined #zig
wilsonk has quit [Ping timeout: 245 seconds]
wilsonk has joined #zig
companion_cube has joined #zig
<companion_cube> well, lots of people praising or quoting Zig there: https://news.ycombinator.com/item?id=19482669 (quite the flamewar)
<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.
<vegecode> const S = @IntType(false, T.bit_count - @clz(@IntType(false, T.bit_count)(T.bit_count) - 1));
vegecode has quit [Quit: Page closed]
<andrewrk> vegecode, you probably want std.math.Log2Int
<andrewrk> std.math.Log2Int(u32) == u5
companion_cube has left #zig ["WeeChat 2.3"]
desperek has joined #zig
<desperek> hi, how can i for example get docs for fileio?
<desperek> do i have to use the source code?
<andrewrk> desperek, yes, until https://github.com/ziglang/zig/issues/21 is solved
<desperek> oh i see
Zaab1t has quit [Quit: bye bye friends]
jjido has joined #zig
desperek has quit [Quit: mew wew]
very-mediocre has quit [Ping timeout: 256 seconds]
Akuli has quit [Quit: Leaving]
<tgschultz> I should really get around to updating and rewriting my zig implementation of png, then you wouldn't need to rely on libpng.
<andrewrk> inflate/deflate in the standard library would be a good start
halosghost has quit [Quit: WeeChat 2.4]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ichorio has quit [Ping timeout: 246 seconds]
<tgschultz> InflateStream is on my to-do list.
wootehfoot has quit [Read error: Connection reset by peer]
<daurnimator> I sort of disagree
<daurnimator> We should be able to rely on common C libraries like libpng without troubles
<daurnimator> If something as common as libpng causes issues... we're boned when it comes to rarer things