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/
xackus has joined #zig
nephele_ has joined #zig
nephele has quit [Ping timeout: 272 seconds]
nephele_ is now known as nephele
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #zig
xackus has quit [Ping timeout: 258 seconds]
[rg] has joined #zig
rgrant has joined #zig
marnix has joined #zig
[rg] has quit [Disconnected by services]
[rg] has joined #zig
[rg] has left #zig [#zig]
rgrant has quit [Remote host closed the connection]
gert_ has joined #zig
joey152 has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 260 seconds]
st4ll1 has quit [Ping timeout: 240 seconds]
st4ll1 has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
st4ll1 has quit [Ping timeout: 240 seconds]
st4ll1 has joined #zig
<ronsor> is there a way to get a normal `fn` from a `bound fn`?
<ronsor> nevermind. I figured it out.
gert_ has quit [Quit: WeeChat 2.9]
_Vi has joined #zig
cole-h has joined #zig
BoilerOnAsurf has joined #zig
<BoilerOnAsurf> Hi, does anybody know if there is a way to express the desired alignment for a struct? something like "alignas" in C++? I can see that I can specify it when instantiating, but I can't find the syntax for defining it on a type
traviss_ has quit [Remote host closed the connection]
traviss has joined #zig
_Vi has quit [Ping timeout: 272 seconds]
racoon is now known as washbear
marnix has quit [Ping timeout: 256 seconds]
BoilerOnAsurf has quit [Quit: Connection closed]
cole-h has quit [Quit: Goodbye]
rzezeski has quit [Quit: Connection closed for inactivity]
BoilerOnAsurf has joined #zig
cren has joined #zig
BoilerOnAsurf has quit [Remote host closed the connection]
<ifreund> for normal structs I don't think there is a way since the compiler is free to reorder the fields at will, you'd have to specify it when instantiating
st4ll1 has quit [Ping timeout: 240 seconds]
st4ll1 has joined #zig
<wjlroe> Does anyone know if there's anything in the std library for finding out if a file path refers to a directory, file or whatever? I'm catching errors when opening the path and trying to read it, which is very unwealdy right now
<Nypsie[m]> there's stat() on std.fs which you can use to check if a file is a file with .kind == .File, but not aware of anything like that for paths/directories
<Nypsie[m]> Ah, I think same strategy should work on Dir handles as internally it's just a file description, which means you can also call stat() on a Dir struct
<wjlroe> ah, interesting, thanks
heitzmann has quit [Quit: WeeChat 2.9]
st4ll1 has quit [Ping timeout: 256 seconds]
st4ll1 has joined #zig
ifreund[m] is now known as ifreund_
heitzmann has joined #zig
BoilerOnAsurf has joined #zig
<BoilerOnAsurf> ifreund_ even if the compiler reorder them, the alignment constrain won't change for the type. My issue is that If I say that I want a 3 byte struct aligned at 4, i still get the sizeOf of 3 instead of 4, and that's weird as I would expect sizeof to express the distance between two object in an array of item of that type. I can handle it manually,
<BoilerOnAsurf> so I guess is alright.
dddddd has quit [Ping timeout: 264 seconds]
_Vi has joined #zig
cren has quit [Ping timeout: 258 seconds]
dddddd has joined #zig
jprudil has joined #zig
jprudil has quit [Remote host closed the connection]
<ifreund> BoilerOnASurf: the compiler is theoretically also free to e.g. only pass the subset of a struct that is actually used in a function to that function, possibly leaving out fields which would cause greater alignment
<BoilerOnAsurf> ifreund but that won't change the value of ``@sizeOf(@TypeOf(my_parameter))`` as the type is the same
<BoilerOnAsurf> I have a snippet but I'm not sure where is better to ask this question, what if I ask on StackOverflow and post the link here? is that fine or there is a better place?
heitzmann has quit [Quit: The Lounge - https://thelounge.chat]
BoilerOnAsurf has quit [Remote host closed the connection]
waleee-cl has joined #zig
heitzmann has joined #zig
BoilerOnAsurf has joined #zig
factormystic has quit [Ping timeout: 265 seconds]
Amun_Ra has quit [Quit: brb]
Amun_Ra has joined #zig
Akuli has joined #zig
vegai has joined #zig
gpanders has quit [Ping timeout: 240 seconds]
BoilerOnAsurf has quit [Remote host closed the connection]
gpanders has joined #zig
_Vi has quit [Ping timeout: 264 seconds]
rzezeski has joined #zig
wilsonk has quit [Ping timeout: 240 seconds]
wilsonk has joined #zig
wilsonk has quit [Ping timeout: 240 seconds]
wilsonk has joined #zig
leeward has joined #zig
wilsonk has quit [Ping timeout: 246 seconds]
xackus has joined #zig
wilsonk has joined #zig
_Vi has joined #zig
eiro has left #zig ["WeeChat 2.5"]
marnix has joined #zig
KoljaKube has joined #zig
cole-h has joined #zig
KoljaKube has quit [Ping timeout: 244 seconds]
<jaredmm> Code doesn't paste well in IRC, so you'd want to put the code into a pastebin or similar and link it here with the question. Nothing wrong with asking on something like SO and linking it, either.
sawzall has quit [Read error: Connection reset by peer]
ofelas has joined #zig
cole-h has quit [Quit: Goodbye]
xackus has quit [Ping timeout: 258 seconds]
Akuli has quit [Quit: Leaving]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
xackus has joined #zig
marnix has quit [Ping timeout: 256 seconds]
wilsonk has quit [Ping timeout: 240 seconds]
wilsonk has joined #zig
<letoram> watching the andrewrk interview - +1 for vnvnation
aarvay has joined #zig
jasom has joined #zig
_Vi has quit [Ping timeout: 240 seconds]
<jasom> I'm just experimenting with zig networking and ran into this strangeness that someone could perhaps explain: https://gist.github.com/jasom/c371eea48e39e64b39ea8eb7fe047acb all of the families end up printing "Unknown" even though their values look like AF_INET and AF_INET6?
xackus has quit [Ping timeout: 258 seconds]
ur5us has joined #zig
<jasom> If I store the result of the switch in a var, it works as expected *shrug*