ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<andrewrk> oats, let me try to build a fix to this problem. what's going on is that currently zig assumes that libc is required if you use @cImport
<andrewrk> knebulae, I'm looking at your code. what's the problem?
fsateler has quit [Read error: Connection reset by peer]
fsateler has joined #zig
<andrewrk> mgxm, are Scrt1.o, crti.o crtbegin.o etc not required for freebsd?
emekoi has quit [Ping timeout: 244 seconds]
<knebulae> andrewrk: error: cannot store runtime value in compile time variable
<knebulae> andrewrk: regarding message2
<knebulae> I don't know what else to do to make sure the Ascii2WChar fn runs at compile time.
<knebulae> andrewrk: I gotcha. I think it's easiest to simply put my strings together from the C side right now where wide string literals are as simple as prefixing an L"blah". Just for now though.
<andrewrk> knebulae, on the zig side it could be as easy as prefixing L("blah")
<knebulae> Might be useful for Windows interop.
<andrewrk> oats, I just pushed a commit that should fix your issue
steveno has joined #zig
<oats> andrewrk: you're awesome dude, thanks so much :)
<andrewrk> no problem, let me know if you run into anything else
<andrewrk> 127 / 517 behavior tests passing in copy elision branch
<oats> well, I can't assign to the result of a macro expansion
<oats> but I figured that wouldn't work properly
<andrewrk> oats, you can probably inspect the macro manually and create a roughly equivalent abstraction using functions
<andrewrk> for example, it could be a function that returns a pointer, so you would assign by dereferencing the result
<andrewrk> the fundamental problem here is that, in zig, assignment is assignment. the C macro is trying to violate that, and that's not allowed because we want to be able to look at an assignment and rely on it always being an assignment
<oats> gotcha
steveno_ has joined #zig
steveno has quit [Ping timeout: 250 seconds]
<mgxm> andrewrk: I'm not sure
<mgxm> i'll find out and guarantee this tomorrow
steshaw has quit [Quit: Connection closed for inactivity]
steveno_ has quit [Remote host closed the connection]
_whitelogger has joined #zig
emekoi has joined #zig
<emekoi> can anyone tell me why code randomly allocates different amounts? whenever i run `zig build test` on my code here (https://github.com/emekoi/deque.zig/blob/master/src/index.zig#L2530 i get different outputs for the number of buffers allocated.
<andrewrk> emekoi, looks like you're using threads? that's a source of nondeterminism
<andrewrk> I haven't looked more closely than that
<emekoi> i only have 1 consumer thread though. and with smaller numbers i get consistent results.
_whitelogger has joined #zig
IntoxicatedHippo has joined #zig
<IntoxicatedHippo> RMSbolt now supports Zig for anyone who's interested in that: https://gitlab.com/jgkamat/rmsbolt
return0e_ has joined #zig
return0e has quit [Ping timeout: 268 seconds]
porky11 has joined #zig
Ichorio has joined #zig
return0e has joined #zig
return0e_ has quit [Ping timeout: 272 seconds]
porky11 has quit [Ping timeout: 252 seconds]
porky11 has joined #zig
DutchGh0st has joined #zig
<DutchGh0st> Can you shrink a slice while iterating over it?
<DutchGh0st> like, won't it read past the current slice's contents?
Zaab1t has joined #zig
<IntoxicatedHippo> Do you mean something like `for (x) |_| x = x[0..2];`?
<IntoxicatedHippo> DutchGh0st
<DutchGh0st> yeah for example
<IntoxicatedHippo> I haven't checked this at all and the documentation doesn't seem to say anything about it, but I assume the loop would make a copy of the slices data.
<DutchGh0st> mhh okey...darnish haha
<DutchGh0st> then I guess I'd have to do clever indexing and swapRemove stuff ^^
<IntoxicatedHippo> What are you trying to do?
<DutchGh0st> advent of code day 25
<DutchGh0st> I keep an arraylist of constellations (a constellation is an arraylist of points), and merge the ones together that can merge (manhattendst between a point in 1 constellation is 3 or less than a point in another constellation),
<DutchGh0st> if 2 can merge, I appendSlice() one constellation to the other, and shrinking the one I took the slice from to a size of 0,
<DutchGh0st> but then I end up with empty entry's in the constellations arraylist, which .. is okey, but maybe I can just swap remove them with the last entry of the constellations list
<DutchGh0st> altought its plenty fast currently
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
_whitelogger has joined #zig
Zaabtop has joined #zig
Zaab1t has quit [Ping timeout: 240 seconds]
Zaabtop is now known as Zaab1t
Zaabtop has joined #zig
Zaab1t has quit [Ping timeout: 240 seconds]
Zaabtop is now known as Zaab1t
Zaab1t has quit [Ping timeout: 244 seconds]
IntoxicatedHippo has quit [Ping timeout: 272 seconds]
Zaab1t has joined #zig
belgin has joined #zig
IntoxicatedHippo has joined #zig
<knebulae> andrewrk: have you noticed anything unusual when calling C functions that have varargs? I'm wrapping the Print() uefi call, and while numbers can be passed in the format string and are inlined properly, strings are not (they actually display as though 2 separate Print() calls were made).
<knebulae> andrewrk: here's an example: https://nebulae.online/varargs.png
<knebulae> A better example: https://nebulae.online/varargs2.png
wootehfoot has joined #zig
_whitelogger has joined #zig
rayman22201 has joined #zig
Ichorio has quit [Ping timeout: 246 seconds]
steveno has joined #zig
Zaab1t has quit [Quit: bye bye friends]