<andrewrk>
it's a pretty small team and a lot of issues
ur5us_ has joined #zig
WilhelmVonWeiner has joined #zig
nvmd has quit [Quit: Later nerds.]
mikdusan has quit [Quit: WeeChat 2.6]
ur5us has joined #zig
ur5us_ has quit [Ping timeout: 258 seconds]
a_chou has joined #zig
mikdusan has joined #zig
ur5us has quit [Ping timeout: 240 seconds]
cole-h has quit [Ping timeout: 256 seconds]
ur5us has joined #zig
bitmapper has joined #zig
brzg has joined #zig
CommunistWolf has quit [Remote host closed the connection]
CommunistWolf has joined #zig
mixi has quit [Ping timeout: 272 seconds]
brzg has quit [Quit: leaving]
ur5us has quit [Ping timeout: 258 seconds]
ur5us has joined #zig
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #zig
reductum has quit [Quit: WeeChat 3.0]
reductum has joined #zig
v0idify has left #zig ["Leaving"]
jukan has quit [Ping timeout: 246 seconds]
donniewest1 has quit [Quit: WeeChat 3.0.1]
sebonirc has quit [Quit: sebonirc]
<motiejus>
What is the protocol to "claim" the dev hours once donated?
<andrewrk>
ZSF only accepts no-strings-attached donations
gazler has joined #zig
<andrewrk>
did you get a different impression somewhere?
gazler_ has quit [Ping timeout: 240 seconds]
leon-p has quit [Quit: leaving]
a_chou has quit [Remote host closed the connection]
a_chou has joined #zig
a_chou has quit [Client Quit]
xackus has joined #zig
xackus_ has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #zig
ur5us_ has joined #zig
ur5us has quit [Ping timeout: 264 seconds]
ur5us_ has quit [Ping timeout: 264 seconds]
reductum_ has joined #zig
reductum_ has quit [Client Quit]
<motiejus>
I did, purely my fault :) thanks for clarifying
reductum has quit [Quit: WeeChat 3.0]
waleee-cl has quit [Quit: Connection closed for inactivity]
<motiejus>
another question on why zig distribution is so small compared to clang toolchain (35MB vs 380MB), from andrewrk post: "other compilers ship with pre-compiled, target-specific binaries, while Zig ships with source code only <...>" ; looks like there are no clang sources in zig release tarball. How is it so small, really, assuming it's doing on-par what clang toolchain is doing (I know there some things not implemented in zig
<motiejus>
cc, but that shouldn't cause 90% size difference)?
earnestly has quit [Ping timeout: 264 seconds]
Xatenev has joined #zig
<andrewrk>
motiejus, clang sources are not needed for zig cc, only the support libraries
<mikdusan>
to clarify I was just checking why "{s}" works for an errorset value. It's because that type (and many others) completely ignore format spec inside {}. Ignoring invalid specifiers is probably a bad thing.
<zags>
has anyone played around with the idea of making a C to Zig converter? Not perfect, but good enough to make starting points. Would be useful in itself and helpful when learning when coming from C.
<ikskuh>
zags: do you know of "zig translate-c"?
<zags>
i do not
<zags>
the thing exists?
<ikskuh>
yes
<g-w1>
it mostly works! :D
<ikskuh>
it is what drives @cImport
<zags>
holy s... i totally missed that
<ikskuh>
but note that translating c to zig does not work well
<ikskuh>
not at all
<zags>
thanks, will try it out :D
<ikskuh>
int * i;
<ikskuh>
what translate-c does is: [*c]c_int
<zags>
my main need now is functions doing lots of bit fiddling
<ikskuh>
but that's kinda the wrong type
<zags>
like encountering "x ^= y << 27;" right now and I have a hard time finding the Zig idioms, so such a xlation tool would be helpful when learning
<ikskuh>
yeah, translate-c is getting better and better \o/
<andrewrk>
I mean yeah the generated zig looks pretty garbo
<ikskuh>
it's definitly not good to learn zig by translate-cing files :D
<g-w1>
do gotos work? I remember them not working
<ikskuh>
that was my intention
<g-w1>
I guess you could impliment them with a lot of nested blocks
<zags>
looks like zls master doesn't work with zig master btw, error: expected optional type, found '*std.zig.ast.Node'
<ed_t>
ikskuh thanks
<g-w1>
you have to add a .? in there, but I think a git pull will fix it
<g-w1>
use --recursive
<zags>
good lord, translate-c did the trick \o/
<ikskuh>
sweet
sebonirc has joined #zig
<zags>
that said, going from pn = (p_l + 1) & 15; to pn: u64 = ((p_l +% @bitCast(u64, @as(c_int, 1))) & @bitCast(u64, @as(c_int, 15)));
<zags>
is a bit painful
<ikskuh>
yep
<ikskuh>
because c_int
<ikskuh>
you can probably simplify that code a lot
<ikskuh>
pn = (p_l + 1) & 15;
<ikskuh>
or, if it's meant as a 4 bit wrapping operation:
<zags>
yeah i have to through and remove a few hundred casts :D
<ikskuh>
pn = @truncate(u4, p_l) +% 1;
<zags>
yeah i think the point is masking off everything but the lower 4 bits, so either should work?
<ikskuh>
yep
<zags>
thanks!
st4ll11 has quit [Quit: WeeChat 2.9]
a_chou has quit [Quit: a_chou]
nvmd has quit [Quit: Later nerds.]
<ikskuh>
andrewrk: I'm reading the design meeting notes
<ikskuh>
and i noticed:
<ikskuh>
there is no way for a slice to contain *all* adressable memory
<ikskuh>
it's just a quirk and corner case
evbo has quit [Quit: Leaving]
riba has joined #zig
st4ll1 has joined #zig
Akuli has quit [Quit: Leaving]
st4ll1 has quit [Client Quit]
st4ll1 has joined #zig
st4ll1 has quit [Client Quit]
st4ll1 has joined #zig
<mmurd>
Is there a way to pass mcpu to `zig cc`? I know there's a few issues around this, but I'm still confused :)
riba has quit [Ping timeout: 258 seconds]
<andrewrk>
mmurd, zig cc supports -mcpu=foo
<mmurd>
andrewrk, I just pressed up in my command history and it did work... I'm clearly too tired to be working on this :D
<andrewrk>
you gave me a nice scare tho ;)
<mmurd>
Bit frustrated. I wanted to use a bulk api in libgpiod, but it seems to not work. Needed to prove it wasn't me using zig wrong, but the C code has the exact same problem…