cr1901_modern has quit [Read error: Connection reset by peer]
nullheroes has quit [Quit: WeeChat 2.9]
cr1901_modern has joined #zig
oxymoron93 has quit [Quit: Connection closed]
waleee-cl has joined #zig
vegai has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klltkr has joined #zig
xackus has joined #zig
klltkr has quit [Client Quit]
klltkr has joined #zig
xd1le has quit [Remote host closed the connection]
pentlander has joined #zig
pentlander has quit [Remote host closed the connection]
a_chou has joined #zig
traviss_ has joined #zig
traviss has quit [Ping timeout: 240 seconds]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
cole-h has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klltkr has joined #zig
sawzall has quit [Read error: Connection reset by peer]
traviss__ has joined #zig
sawzall has joined #zig
traviss_ has quit [Ping timeout: 240 seconds]
<andrewrk>
klltkr, if you install qemu you should in theory be able to reproduce failures on drone CI
<klltkr>
Ah cool, I'll give that a go
cole-h has quit [Quit: Goodbye]
a_chou has quit [Quit: a_chou]
cole-h has joined #zig
brotein has quit [Remote host closed the connection]
brotein has joined #zig
brotein has quit [Ping timeout: 260 seconds]
st4ll1 has quit [Ping timeout: 264 seconds]
st4ll1 has joined #zig
nullheroes has joined #zig
pangey has quit [Ping timeout: 272 seconds]
pangey has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
st4ll1 has quit [Ping timeout: 256 seconds]
st4ll1 has joined #zig
<ifreund>
wow, that msvc CI build has been chugging along for all of four hours now
<andrewrk>
we're right up against the 6hr limit
<andrewrk>
the good news is that most PRs don't need a windows CI pass
<leeward>
ouch
<leeward>
Is it CPU bound?
cr1901_modern has quit [Quit: Leaving.]
cr1901_modern has joined #zig
drewr has quit [Ping timeout: 240 seconds]
drewr has joined #zig
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
marnix has quit [Ping timeout: 258 seconds]
<KoljaKube>
Using a fluent builder for large C structs in Zig - yay/nay? (Basically I want to know if I'm missing a good/more idiomatic Zig alternative)
<ikskuh>
fluent builder?
<ifreund>
is that the Builder.foo().red(2).green(5).wheels(6) pattern?
<KoljaKube>
const result = SomeStruct.configure().paramA(.OptionX).paramB(.OptionQ).build();
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
<ifreund>
i think the zig pattern is passing an options struct
<ifreund>
see e.g. std.fs.File.OpenFlags
<KoljaKube>
That's an anonymous struct that gets its set fields copied to the result?
* KoljaKube
looks
<ikskuh>
KoljaKube: look at std.mem.zeroInit
<ifreund>
you can set default values for all the fields so that to get a "default" struct you just do Foo(.{});
<KoljaKube>
Yeah, I'm using std.mem.zeroes right now, but builder makes it relatively easy to do the Zig->C type conversions inline
<ikskuh>
zeroes != zeroInit!
<KoljaKube>
zeroInit is what I described two lines above, right?
<ikskuh>
kinda :D
<ikskuh>
it initializes all fields with default value or a zero value and overrides the values given
marnix has joined #zig
<KoljaKube>
Maybe I didn't express myself well, but I think we mean the same thing
<KoljaKube>
I'm still figuring out how to nicely bridge between Zig and C values
<KoljaKube>
Don't want to @ptrCast or @intCast everywhere on initialization
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<KoljaKube>
This stuff is great for finding the not-yet-fleshed-out parts of the compiler btw ;-)
brotein has joined #zig
marnix has quit [Ping timeout: 240 seconds]
brotein has quit [Ping timeout: 240 seconds]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
klltkr has joined #zig
a_chou has joined #zig
<dkibi>
do I see it correctly, that the zig parser is hand built? is there a reason for that?
<andrewrk>
what's the alternative?
<ikskuh>
dkibi: to my experience, everything else will lead to more problems in the end
<companion_cube>
andrewrk: parser generators
<ikskuh>
i'm super-happy atm that i've rewritten a parser and switched from a generated parser to a hand-written one
<dkibi>
aren't parser generators super common? and there is a PEG grammar in the documentation I thought at first that was used
<dkibi>
this is really just curriosity on my side
<ikskuh>
easier to understand, maintain and it's more convenient to recover
<andrewrk>
it's fixed on master? that's news to me
<andrewrk>
--single-threaded event loop not to be confused with std.event.Loop.initSingleThreaded() which still uses threads internally but gives you a single-threaded async/await model to code your application against
<andrewrk>
cr1901_modern, I think your assumption is correct. you may have found a bug
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cr1901_modern>
sweet :D! If I knew what the hell I was doing, then I would make a bug report
<ifreund>
andrewrk: well, it compiles on master and partially works but something fishy is definitely happening
<ifreund>
how do I make it use initSingleThreaded if not by building with --single-threaded?
JX7P has left #zig ["Leaving"]
a_chou has quit [Ping timeout: 265 seconds]
* cr1901_modern
reads pamphlet "So You May Have Found A Bug In Zig. Here's What To Do Next." ^ andrewrk: Should I just make that example smaller, open a bug, and you can tell me whether it's actually a bug?
<andrewrk>
ifreund, that's a great question. I think maybe start.zig is missing a feature that would be handy to get this behavior (by inspecting @import("root") and looking for `i_want_single_threaded_event_loop`)
<ifreund>
yeah it seems that the only option currently is to declare @import("root").event_loop; and write your own custom startup code
<andrewrk>
you can always set it up yourself. the start.zig code for setting up the event loop is not doing much
<ifreund>
I think I'll end up shaving this yak eventually, but not tonight
<ifreund>
single threaded async zig code seems to express what I want my program to do very nicely
a_chou has joined #zig
factormystic has quit [Quit: Ping timeout (120 seconds)]
a_chou has quit [Remote host closed the connection]
factormystic has joined #zig
ur5us has joined #zig
factormystic has quit [Quit: Ping timeout (120 seconds)]