waleee-cl has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #zig
muffindrake has quit [Ping timeout: 245 seconds]
muffindrake has joined #zig
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #zig
_whitelogger has joined #zig
_whitelogger has joined #zig
return0e_ has quit [Ping timeout: 245 seconds]
doublex_ has joined #zig
doublex has quit [Ping timeout: 264 seconds]
_whitelogger has joined #zig
FireFox317 has quit [Remote host closed the connection]
_whitelogger has joined #zig
_whitelogger has joined #zig
clktmr has quit [Ping timeout: 252 seconds]
dingenskirchen has quit [Read error: Connection reset by peer]
dingenskirchen1 has joined #zig
dingenskirchen1 is now known as dingenskirchen
wilsonk has quit [Ping timeout: 240 seconds]
return0e_ has joined #zig
wilsonk has joined #zig
<dantix>
why I cannot loop through `StructField`'s at runtime? Is it because it has strings and possibly other data memory for which is allocated during comptime, so it cannot be accessed at runtime?
ftxqxd has joined #zig
dingenskirchen has quit [Read error: Connection reset by peer]
dingenskirchen1 has joined #zig
dingenskirchen1 is now known as dingenskirchen
dantix has quit [Quit: Bye]
return0__ has joined #zig
return0e_ has quit [Ping timeout: 264 seconds]
<daurnimator>
andrewrk: why is the fifo module not in the std docs?
marijnfs__ has quit [Quit: WeeChat 2.6]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
ftxqxd has quit [Ping timeout: 250 seconds]
kenaryn has joined #zig
<mq32>
is the "index" in builtin.StackTrace the "length" of the trace?
<kenaryn>
Hi computer people. According to rumors, a certain pixelherodev would have written an interesting blog entry few days ago, does anyone know its URI (or URL if you do not know the difference) please? I would be happy to read it.
<companion_cube>
bgiannan: what brings you here, btw? :)
<leeward>
This seems like either a bug or a missing feature to me: https://godbolt.org/z/MNEddV Any plans to fix it?
<leeward>
Specifically, "error: switch must handle all possibilities"
<mq32>
leeward: switch must handle all possibilities is a quite sane decision ;)
<leeward>
Yes, but look at the code. It does.
<mq32>
yes, *you* know that
<mq32>
the compiler doesn't
<mq32>
cast your result to u1 and it does
<leeward>
The compiler can know that, too. It knows what "& 0x1" means.
<mq32>
@intCast(u1, byte & 0x1)
<mikdusan>
the _type_ for `bytes & 0x1` is still u8
<leeward>
Sure, and that's fine for that example, but it doesn't work well when I'm masking bits that aren't contiguous.
dingenskirchen has quit [Ping timeout: 276 seconds]
<leeward>
What I'd like to do is "bytes & 0x5" with 4 cases.
<leeward>
I could shift the bits around into a u2, but it's ugly.
<mq32>
mikdusan: do we have a proposal about implicit integer narrowing?
<fengb>
The usual "fix" for that is else => unreachable
<leeward>
Ah, right. I forgot about unreachable.
<mq32>
would be cool to have implicit narrowing when you mask bits away
<fengb>
That also gives you a helpful error in safe builds if it's not true
<leeward>
I agree it would be cool.
<leeward>
It's also a pretty minor feature, so I totally understand if it's not on the list.
kenaryn has joined #zig
dingenskirchen has joined #zig
adamkowalski has quit [Ping timeout: 268 seconds]
<kenaryn>
I noticed an unconsistency with test-related output. When `std.debug.warn();` is called, the compiler print the old `Test [n/n] test "<my_test_name>..."` formula. Otherwise, this kind of feed-back information is silently skipped.
kenaryn has quit [Quit: WeeChat 2.3]
mla has joined #zig
Akuli has joined #zig
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 252 seconds]
return0e_ has quit [Remote host closed the connection]
<andrewrk>
awareness of smaller int range on remainder division and masking is planned and there is an open issue for it
lunamn has joined #zig
frmdstryr has joined #zig
<bgiannan>
companion_cube, i'm rewriting my game in zig
<companion_cube>
ah, legit
<companion_cube>
livin' on the edge
<shakesoda>
i've been debating doing the same, in some future version
blAckEn3d has joined #zig
<blAckEn3d>
Hi. I'm trying to compile a basic X11 program with zig 0.5.0. Almost everything works OK, but I'm not quite sure how to pass a string to a C function. Here's the error message: alex@Binky:/tmp$ ~/Apps/zig-linux-x86_64-0.5.0+4530adbd3/zig build-exe hello.zig -lX11 -lXft -lc -I/usr/include/ -L/usr/lib/x86_64-linux-gnu/ -I/usr/include/freetype2/
<blAckEn3d>
/tmp/hello.zig:43:59: error: expected type '[*c]const c_uint', found '[*]const u8'
<andrewrk>
hi blAckEn3d. you're going to want to use a pastebin-like service to link to a code snippet here
<blAckEn3d>
Hi andrewrk. Apologies for the spam. Will do
<andrewrk>
that function looks like it is expecting something other than UTF-8
<shakesoda>
you likely want XftDrawString8?
<shakesoda>
isn't that the utf-32 variant, you're using?
<blAckEn3d>
Ah, right. Let's see if that works
<blAckEn3d>
That works, thanks :)
<shakesoda>
it might actually have a specific variant for Utf8
<shakesoda>
try XftDrawStringUtf8, also
<shakesoda>
i can't quite make sense of the description of the functions, it sounds like it's always unicode so 8 and utf8 should be the same thing
blAckEn3d has quit [Ping timeout: 264 seconds]
Ichorio_ has joined #zig
dantix has joined #zig
doublex_ has quit [Ping timeout: 240 seconds]
doublex has joined #zig
lunamn has quit [Ping timeout: 268 seconds]
lunamn has joined #zig
ftxqxd has joined #zig
kllr_sbstn has joined #zig
<leeward>
Is there a way to trap runtime bounds checks so I can verify that they're working in a test?
<leeward>
I don't want to verify that the bounds checks themselves work, but I do want to verify the bounds themselves. I suppose I could expectEqual(thing, array.len)
<leeward>
I wonder if it's a bug though. The struct bit in the big long document is a bit light on details.
ftxqxd has quit [Ping timeout: 240 seconds]
Akuli has quit [Quit: Leaving]
<leeward>
21
<leeward>
whoopsie
ftxqxd has joined #zig
<ftxqxd>
Hello! I'm trying to build Zig from source for the first time, but am getting a bunch of clang errors about '<var> may be used uninitialized in this function' when running `make zig`
<andrewrk>
ftxqxd, what version of clang
<ftxqxd>
Looking at the source lines causing the errors, none of the variables seem to actually be uninitialized, so I'm very confused
<ftxqxd>
9.0.0
wink_ has quit [K-Lined]
<andrewrk>
is that the same compiler that built the llvm & clang libraries that zig will link against?
<ftxqxd>
It should be
<ftxqxd>
If I remove -Werror from the CMakeLists.txt it compiles fine
<ftxqxd>
(For context, I'm using the NixOS packages llvmPackages_9.clang-unwrapped and llvmPackages_9.llvm to compile)
<waleee-cl>
ftxqxd: define an overlay instead then?
<ftxqxd>
There's also an unused-result warning/error on src/os.cpp:85, which looks legit
<ftxqxd>
Sorry, src/os.cpp:856
jjido has joined #zig
<marijnfs>
did you build llvm yourself?
<ftxqxd>
No, taken straight from the package manager
<ftxqxd>
Might be the issue, haven't figured out what version of clang it was built with