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> I see, thanks!
jukan_ has quit [Read error: Connection reset by peer]
jukan has joined #zig
ur5us has joined #zig
<FireFox317> andrewrk, did you also see this btw? regarding the optional support you added yesterday. No need to rusth, just wanted to let you know that :) goodnight! https://github.com/ziglang/zig/pull/7741#issuecomment-762727230
leon-p has quit [Quit: leaving]
<andrewrk> FireFox317, saw that! is this PR blocking on anything now?
<andrewrk> err was there something you were wanting me to do other than merge it? :)
remby has joined #zig
<FireFox317> andrewrk, yes the test does not pass. it doesn't get pass semantic analysis (which is not part of this PR).
<FireFox317> in other words incorrect ZIR is generated
<FireFox317> which is what im trying to explain in that comment on the PR (https://github.com/ziglang/zig/pull/7741#issuecomment-762727230)
<remby> is ZIR stable?
<andrewrk> no
<andrewrk> FireFox317, ok I'll take a look at it, after the other thing. good night!
ur5us has quit [Ping timeout: 264 seconds]
gazler_ has joined #zig
gazler has quit [Read error: Connection reset by peer]
xackus_ has joined #zig
fputs has joined #zig
nickster has quit [Quit: The Lounge - https://thelounge.chat]
ifreund has quit [Ping timeout: 256 seconds]
ifreund has joined #zig
nickster has joined #zig
daurnimator has quit [Quit: WeeChat 2.9]
fputs has quit [Read error: Connection reset by peer]
daurnimator has joined #zig
FireFox317 has quit [Ping timeout: 246 seconds]
cole-h has quit [Ping timeout: 265 seconds]
ur5us has joined #zig
kbd_ has joined #zig
kbd has quit [Ping timeout: 260 seconds]
fraktor has joined #zig
jukan_ has joined #zig
jukan has quit [Ping timeout: 246 seconds]
marler8997 has joined #zig
fputs has joined #zig
rocket_man has joined #zig
xackus has joined #zig
ur5us_ has joined #zig
xackus_ has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 264 seconds]
remby has quit [Quit: Konversation terminated!]
jukan_ has quit [Ping timeout: 256 seconds]
fputs has quit [Quit: Leaving]
a_chou has joined #zig
<rocket_man> well it took me an hour but I got advent of code day 2 working :)
<rocket_man> the first half at least
<rocket_man> is there a way to XOR booleans? `./solution.zig:35:37: error: invalid operands to binary expression: 'bool' and 'bool'`
<rocket_man> oh it's just != lol
a_chou has quit [Quit: a_chou]
jukan has joined #zig
<rocket_man> how do I create an ArrayList from an iterator? just `while(iter.next()) |elem| list.append(elem)`?
jukan has quit [Ping timeout: 272 seconds]
hnOsmium0001 has joined #zig
<rocket_man> what does this error mean? `./solution.zig:30:3: error: unable to evaluate constant expression`
<rocket_man> it's pointing to the `for` in a for loop
<rocket_man> I'm iterating over a constant array
fraktor has quit [Quit: WeeChat 3.0]
<rocket_man> apparently I had to annotate the types more
triteraflops has joined #zig
rzezeski has left #zig [#zig]
triteraflops has quit [Read error: Connection reset by peer]
rocket_man has quit [Quit: WeeChat 2.8]
_whitelogger has joined #zig
jukan has joined #zig
ur5us_ has quit [Ping timeout: 256 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
<andrewrk> Ristovski, your patch made it through the CI system and is now available on the download page :)
cole-h has joined #zig
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #zig
Ashpool has quit [Remote host closed the connection]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
sord937 has joined #zig
tnorth has joined #zig
midgard_ has quit [Ping timeout: 260 seconds]
midgard has joined #zig
hch has quit [Ping timeout: 256 seconds]
hch has joined #zig
cole-h_ has joined #zig
leon-p has joined #zig
cole-h has quit [Ping timeout: 256 seconds]
tines9_ has quit [Ping timeout: 256 seconds]
tines9 has joined #zig
jukan has quit [Ping timeout: 272 seconds]
kameliya[m] has quit [Quit: issued !quit command]
xackus has quit [Quit: Leaving]
xackus has joined #zig
kameliya[m] has joined #zig
xentec_ has joined #zig
nore has quit [Ping timeout: 240 seconds]
cCCCCcccccCCc has quit [Ping timeout: 240 seconds]
xentec has quit [Ping timeout: 240 seconds]
nore has joined #zig
jukan has joined #zig
kameliya[m] has quit [Quit: authenticating]
kameliya[m] has joined #zig
jukan has quit [Ping timeout: 256 seconds]
jokoon has joined #zig
leon-p has quit [Remote host closed the connection]
xentec_ is now known as xentec
jukan has joined #zig
jukan has quit [Ping timeout: 240 seconds]
heitzmann[m] has left #zig ["User left"]
leon-p has joined #zig
v0idify has quit [Remote host closed the connection]
v0idify has joined #zig
frett27_ has joined #zig
jukan has joined #zig
jukan has quit [Ping timeout: 256 seconds]
cole-h_ has quit [Ping timeout: 265 seconds]
frett27_ has quit [Ping timeout: 272 seconds]
nickster has quit [Quit: The Lounge - https://thelounge.chat]
endragor has joined #zig
endragor has quit [Remote host closed the connection]
nickster has joined #zig
jukan has joined #zig
jukan has quit [Ping timeout: 256 seconds]
donniewest has joined #zig
Akuli has joined #zig
xackus has quit [Ping timeout: 256 seconds]
waleee-cl has joined #zig
jukan has joined #zig
jukan has quit [Ping timeout: 246 seconds]
jukan has joined #zig
jukan has quit [Ping timeout: 240 seconds]
Xatenev has joined #zig
jukan has joined #zig
uael has joined #zig
ifreund1 has joined #zig
ifreund has quit [Disconnected by services]
ifreund1 is now known as ifreund
jukan has quit [Ping timeout: 265 seconds]
ifreund has quit [Read error: Connection reset by peer]
ifreund has joined #zig
Xatenev has quit [Quit: Leaving]
jmiven has quit [Quit: reboot]
remby has joined #zig
jmiven has joined #zig
nvmd has quit [Ping timeout: 246 seconds]
tnorth has quit [Ping timeout: 260 seconds]
jukan has joined #zig
nvmd has joined #zig
nvmd has quit [Ping timeout: 246 seconds]
nvmd has joined #zig
uael has quit [Quit: Ping timeout (120 seconds)]
nvmd has quit [Ping timeout: 246 seconds]
nvmd has joined #zig
nvmd has quit [Read error: Connection reset by peer]
nvmd has joined #zig
kbd_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
marijnfs has joined #zig
seedofonan has joined #zig
nvmd has quit [Ping timeout: 272 seconds]
kbd has joined #zig
<seedofonan> I'm trying to build trunk under windows, following zig/wiki/Building-Zig-on-Windows using zig+llvm+lld+clang-x86_64-windows-gnu-0.7.0+8076894d8. To what should " --override-lib-dir" point? If I point it to zig trunk's "lib" subfolder, I immediately get 'std.target.WindowsVersion' has no field named 'win10_20h1'. Any help appreciated :-)
<Gliptic> I don't remember setting --override-lib-dir
<seedofonan> So ... do you have a reason to think that someone added that to the web page incorrectly?
<Gliptic> I built it the other day, let me check
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
<Gliptic> ah, I was using option 2
<ifreund> seedofonan: I believe that tarball has grown out of date with zig's master branch and needs to be updated
<ifreund> I'm not sure on details though, I don't use windows myself
<Gliptic> I can confirm that option 2 worked as of a few days ago anyway
<seedofonan> Okay, gracias:-)  I'll try Option 2
marijnfs has quit [Read error: Connection reset by peer]
marijnfs_ has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
seedofonan has quit [Quit: Connection closed]
jukan has quit [Ping timeout: 264 seconds]
<andrewrk> ah my bad for not automating this dev kit thing. I'll update it manually now
jokoon has quit [Read error: Connection reset by peer]
ur5us_ has joined #zig
remby has left #zig ["rcirc on GNU Emacs 27.1"]
nkoz has joined #zig
nkoz has quit [Client Quit]
kbd has joined #zig
amk has quit [Remote host closed the connection]
amk has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cole-h_ has joined #zig
kbd has joined #zig
jjido has joined #zig
LanceThePants has joined #zig
<marijnfs_> how does undefined work, can I see runtime if something is undefined?
donniewest1 has joined #zig
amk has quit [Ping timeout: 256 seconds]
ifreund has quit [Ping timeout: 256 seconds]
sawzall has quit [Read error: Connection reset by peer]
donniewest has quit [Ping timeout: 256 seconds]
amk has joined #zig
<g-w1> if you are in debug mode it will be 0xaaaaaa, in release it just doesn't set the memory for optimisation
ifreund has joined #zig
<marijnfs_> Ok thanks, so basically not runtime
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<marijnfs_> Is there an easy way to zero initialize memory?
<marijnfs_> ah wait, std.mem.zeroes isn't it
<g-w1> yes
<marijnfs_> that's not too bad
<marijnfs_> i'm getting used to this language
<ifreund> you shouldn't need to zero-init stuff very often in zig unless you're talking to C APIs that require it
<marijnfs_> yeah i'm doing some routing with [32]u8 id's
<marijnfs_> so I should initialise them properly
Akuli has quit [Remote host closed the connection]
<ifreund> for arrays I would just do const foo = [1]u8{0} ** 32;
<marijnfs_> how does this work both comptime and runtime?
<ifreund> or probably var
<marijnfs_> ifreund: how is that better?
<g-w1> it should work at runtime, but not yet
Akuli has joined #zig
<ifreund> marijnfs_: less magic than a function call IMO
<marijnfs_> I rather have zeroes(MyTypeAndNoCrazySyntax)
<marijnfs_> shouldn't be a function call, it's comptime right?
<marijnfs_> var nearest_ID: ID = std.mem.zeroes(ID);
<ifreund> a comptime function call if you like
<marijnfs_> that's pretty readable
<ifreund> It's really just a matter of preference
<marijnfs_> true
<marijnfs_> but yours has 6 special characters
<ifreund> yeah, kinda annoying to type
<marijnfs_> your fingers go all over the keyboard
<marijnfs_> but maybe tab9 can complete it
<ifreund> now that depends on your keyboard :P
<marijnfs_> I'm doing good ol' qwerty US
<marijnfs_> maybe you have a fancy keyboard with light linear switches
<ifreund> the only real advantage is that it is much more flexible than std.mem.zeros
<ifreund> marijnfs_: how'd you guess? I've got a corne with light, linear, low-profile switches
<marijnfs_> cause it's the best
kbd has joined #zig
<marijnfs_> I have it at work, here still some kinda clicky
<marijnfs_> not low profile though, how is that?
<ifreund> very comfy after some adjustment, less movement seems to be nice for my hands too
<marijnfs_> I should try
<marijnfs_> you wrote the compositor?
<marijnfs_> are you using it?
<ifreund> yuuup, been daily driving it for months now :)
<marijnfs_> i gotta try it some time
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<marijnfs_> sadly need ubuntu for work
<g-w1> it works on ubuntu ...?
<marijnfs_> then
<ifreund> might be a pain to build wlroots on ubuntu depending on how out of date everything is
<marijnfs_> touche
<ifreund> if you have wlroots 0.12.0 from the system package manager it should be easy though
<marijnfs_> libwlroots5/focal,now 0.10.0-2 amd64
<marijnfs_> as i said
<marijnfs_> ubuntu
<ifreund> yup, about what I expected :P
<ifreund> that's not years out of date though, building wlroots from soruce probably wouldn't be too painful
hnOsmium0001 has joined #zig
<marijnfs_> yeah thats no problem i guess
<marijnfs_> it isn't a c library?
<marijnfs_> can zig buidl it
<g-w1> maybe since we just got meson support, but I doubt it
<marijnfs_> I'm doing some serialization, how does a [32]u8 show up when using typeInfo?
<marijnfs_> I want to distinquish between an allocated []u8, and a known size [32]u8
<ifreund> [32]u8 is an array
<ifreund> []u8 is a slice and is under .Pointer in TypeInfo
<marijnfs_> so that shows up as .Array
jukan has joined #zig
jukan has quit [Ping timeout: 256 seconds]
kbd has joined #zig
cole-h_ is now known as cole-h
Akuli has quit [Quit: Leaving]
<andrewrk> windows dev kit updated. it's slightly more automated now, but still a bit manual
tane has joined #zig
<tane> howdy
sord937 has quit [Quit: sord937]
jukan has joined #zig
<tane> is it just me or is reading zig code kinda hard when trying to determine whether something is actually performed during comptime or runtime, e.g. switches or which portions of inline for/while?
<ifreund> does it matter?
<tane> sure
<ifreund> for performance maybe, for semantics it shouldn't if the code compiles
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<tane> in other words: yes it is hard
<ifreund> I personally don't find it hard no
<ifreund> though I have a fair bit of experience with zig at this point
<tane> sure, I guess there are enough people who claim that C++ isn't hard either :)
<ifreund> well you have the same thing in C/C++, the compiler may partially evaluate some things at compile time
<ifreund> in zig it's just more powerful
<tane> indeed, although in C++ with foo<bar> and in D with foo!bar you know what portions are definitely evaluated during comp time
<tane> but I see your point, partially
<tane> still not sure whether I like it, I'll see :)
<ifreund> I believe the not-yet-existent zig spec will say that if the compiler can evaluate something at comptime, it will
<ifreund> there are also some things such as types as first class values that only work at comptime of course, so they provide a pretty big clue
<tane> yes, which may require the reader to jump to arbitrary code positions to determine that
<tane> anyway, it's a decision; the property that the semantics should be the same is certainly a plus
<ifreund> I really don't think you need to know whether some part of your code is evaluated at comptime or not for most use cases
<jjido> No you shouldn't
<ifreund> only possibly when doing optimization work
<ifreund> in which case your profilier should be guiding you as to what is expensive at runtime
dbohdan has left #zig [#zig]
<pjz> you need to know what's comptime when you're trying to use a library that has a comptime arg, so you know what's possible to pass in there (eg. runtime vals not allowed)
<ifreund> I agree, you need to have a general understanding of what is possible at comptime to be able to get your zig code to compile
donniewest1 has quit [Quit: WeeChat 3.0]
Wolf480pl has quit [Quit: ZNC disconnected]
Wolf480pl has joined #zig
mht has quit [Ping timeout: 240 seconds]
Snetry has quit [Quit: left Freenode]
Snetry has joined #zig
mht has joined #zig
tane has quit [Quit: Leaving]
marijnfs_ has quit [Ping timeout: 264 seconds]
marijnfs_ has joined #zig
<marijnfs_> i need to convert a [32]u8 to a *c_void
<marijnfs_> but I can't just take the address of it since it's passed as an argument
<marijnfs_> would discard const, can I get around this?
<ifreund> well, you can tell zig to get out of your way with @ptrToInt()/@intToPtr() if you're sure that the C code won't mutate it
<ifreund> you could also potentiall pass the array by pointer instead of by valuee
<marijnfs_> ah, what also works is var tmp = t
<marijnfs_> and use &tmp instead of &t
<ifreund> indeed, that's probably the safest option
<ifreund> though that is semantically a copy that I don't know if llvm will be able to get rid of or not
<ifreund> I'm probably prematurely optimizing again :/
ur5us_ has quit [Ping timeout: 264 seconds]
<marijnfs_> yeah i wondered that too
<marijnfs_> hope it gets optimized
marijnfs_ has quit [Quit: WeeChat 2.8]