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/
<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
<andrewrk> libc, compiler-rt, libcxx, libcxxabi, etc
mixi has joined #zig
<motiejus> Ok, makes sense. So cc-the-compiler is linked in to the zig binary?
sord937 has joined #zig
<andrewrk> yes
cole-h has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
cole-h has quit [Ping timeout: 264 seconds]
sord937 has quit [Ping timeout: 268 seconds]
sord937 has joined #zig
lanodan has quit [Quit: WeeChat 2.9]
earnestly has joined #zig
Xatenev has quit [Ping timeout: 256 seconds]
proteusguy has quit [Ping timeout: 264 seconds]
lanodan has joined #zig
proteusguy has joined #zig
dch_ is now known as dch
Patrice_ has joined #zig
Xatenev has joined #zig
Tharro has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
Tharro has joined #zig
leon-p has joined #zig
mgxm has quit [Quit: ....]
mgxm has joined #zig
Xatenev has quit [Ping timeout: 240 seconds]
Patrice_ has quit [Ping timeout: 264 seconds]
mmohammadi9812 has quit [Ping timeout: 265 seconds]
mmohammadi9812 has joined #zig
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #zig
donniewest1 has joined #zig
midgard has quit [Read error: Connection reset by peer]
midgard has joined #zig
<g-w1> is it the plan to make stage2 output textual asm?
<g-w1> will it decompile the object file? or just have a text asm backend?
<g-w1> s/decompile/dissassemble
<mikdusan> hmm... for std.fmt, to print an error do we still just use empty braces? `print("oops: {}", .{ error.Whatever });`
sord937 has quit [Quit: sord937]
sord937 has joined #zig
<mikdusan> yup
koakuma has quit [Read error: Connection reset by peer]
waleee-cl has joined #zig
data-man has joined #zig
data-man has quit [Client Quit]
<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.
<g-w1> yes
<g-w1> marler8997, not sure if you saw this, but it is needed to make zigup work https://github.com/marler8997/ziget/pull/4
DonnieWest has joined #zig
mmohammadi9812 has quit [Remote host closed the connection]
mmohammadi9812 has joined #zig
a_chou has joined #zig
ifreund1 has joined #zig
ifreund1 has quit [Client Quit]
ifreund1 has joined #zig
ifreund2 has joined #zig
ifreund has quit [Read error: Connection reset by peer]
ifreund1 has quit [Ping timeout: 258 seconds]
a_chou has quit [Remote host closed the connection]
a_chou has joined #zig
ifreund2 is now known as ifreund
mmohammadi9812 has quit [Ping timeout: 264 seconds]
<marler8997> g-w1, thanks for the reminder, there's so many notifications on github I don't always see these
<g-w1> np
<fengb> Maybe I should stop watching zig. Too much spam :P
mmohammadi9812 has joined #zig
DonnieWest has left #zig ["User left"]
Akuli has joined #zig
jukan has joined #zig
<Gliptic> you could hide join/left in your client
hnOsmium0001 has joined #zig
<ifreund> I think he's talking about watching the github repo
<Gliptic> ah
<Gliptic> well, activity is good!
cole-h has joined #zig
iceball has quit [Quit: WeeChat 3.0]
bsrd has joined #zig
<andrewrk> g-w1, I have no plan for textual asm output so far, it's really low on my priority list personally
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #zig
Patrice_ has joined #zig
<g-w1> ok, I guess I can always use a dissassembler
<ifreund> what is your use-case?
<g-w1> using an external assembler and linker if I dont wanna write a new linker backend. seemed easier to me than using an object file
a_chou has quit [Ping timeout: 256 seconds]
<ikskuh> andrewrk, g-w1: i don't think zig should have an assembler renderer
<ikskuh> there are enough really good disassemblers out there
<ikskuh> just emit an object file and disassemble it with nasm or objdump
<g-w1> ok makes sense
nvmd has joined #zig
a_chou has joined #zig
sord937 has quit [Remote host closed the connection]
sord937 has joined #zig
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #zig
ur5us_ has joined #zig
osa1_ is now known as osa1
ur5us has joined #zig
ur5us_ has quit [Ping timeout: 264 seconds]
sord937 has quit [Quit: sord937]
Patrice_ has quit [Ping timeout: 258 seconds]
ed_t has joined #zig
<ed_t> how do you use @import for local includes?
<ikskuh> you mean files?
<ikskuh> @import("file.zig")
<ed_t> I am trying to use a terminal package call zbox
<ed_t> which is in ../zig/zbox/src which has box.zig util.zig prim.zig
<ikskuh> how do you compile your project? "zig build" or zig build-exe"?
<ed_t> in ../zig
<ed_t> and use build-exe life/life.zig
<ikskuh> ah
<ikskuh> you can add a package for that
<ed_t> how?
<ed_t> is there an examples someplace?
zags has joined #zig
<ikskuh> zig build-exe --pkg-begin zbox ../zig/zbox/src/main.zig --pkg-end life/life.zig
<ikskuh> and you can then use @import("zbox")
<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
<andrewrk> ikskuh, isn't it pretty far along at this point? https://github.com/ziglang/zig/blob/master/test/run_translated_c.zig
<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…
<mmurd> (Off-topic, but I'm grumbly about it)
riba has joined #zig
zags has quit [Quit: leaving]
donniewest1 has quit [Quit: WeeChat 3.0.1]
belgin has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
jukan_ has joined #zig
jukan has quit [Ping timeout: 265 seconds]
<belgin> hello
<belgin> andrew's zig thing doesn't compile
<belgin> zig vulkan window*
<belgin> i tried with master and with 0.7.1
<belgin> different errors
<belgin> here is the link in case you don't know https://github.com/andrewrk/zig-window
riba has quit [Ping timeout: 256 seconds]
<andrewrk> I'll look into it later; got quite a few other tasks piling up first
<belgin> of course. thank you
<andrewrk> thanks for letting me know
mmohammadi9812 has quit [Ping timeout: 240 seconds]
<mmurd> Is there something like switch for runtime statements? In particular, I'm looking for a shorthand "in comptime known list of numbers"
mmohammadi9812 has joined #zig
<ifreund> I don't think I understand the question, switch works at runtime and supports ranges of numbers
<mmurd> Yeah, you're right. I must be doing something else stupid.
belgin has quit [Remote host closed the connection]