ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
porky11 has joined #zig
rayman22201 has quit [Ping timeout: 256 seconds]
porky11 has quit [Quit: Leaving]
Ichorio has quit [Ping timeout: 246 seconds]
reductum has joined #zig
_whitelogger has joined #zig
shachaf has joined #zig
rayman22201 has joined #zig
IntoxicatedHippo has joined #zig
<IntoxicatedHippo>
How do I create an array of function pointers?
<IntoxicatedHippo>
Nevermind, I just realised I was doing `fn (type.type) void` instead of `fn (type) void`
adrusi has quit [Read error: Connection reset by peer]
adrusi has joined #zig
<andrewrk>
emekoi, that could mean that your union's memory got corrupted
<andrewrk>
and you found out when you switched on it
<MajorLag>
andrewrk: it looks like a struct can have a field 'a: fn() void' and an fn 'a(self: *Self) void'. 'self.a()' would seem to call the latter with the former seemingly being inaccessible. That should probably be a compile error, right? I'm about to go to bed but will submit an issue in the morning.
_whitelogger has quit [Ping timeout: 250 seconds]
_whitelogger has joined #zig
emekoi has quit [Ping timeout: 268 seconds]
porky11 has joined #zig
_whitelogger has joined #zig
njd has joined #zig
Ichorio has joined #zig
_whitelogger has joined #zig
porky11 has quit [Ping timeout: 272 seconds]
ross_k has joined #zig
IntoxicatedHippo has quit [Ping timeout: 240 seconds]
<bodie_>
I'm trying to understand the call graph for resolve_struct_type for issue #1832 (https://github.com/ziglang/zig/issues/1832). field->type_entry is nullptr on a recursive type where the struct has an embedded arraylist of itself.
<bodie_>
sorry resolve_struct_alignment not resolve_struct_type
<bodie_>
I guess this happens because the field has a self-referential type which hasn't been fully resolved by this point.
<ross_k>
Might be a dumb question, but how do I do a for loop over a numerical range in zig?
<ross_k>
I see there are ranges for slices: [0..n] and switch statements: 0...n. Is there something like that to use with loops?
ross_k has quit [Quit: Page closed]
Zaab1t has joined #zig
<bodie_>
@andrewrk, is there any plan for supporting C++ libraries as a dependency?
<andrewrk>
bodie_, no, no plans for that. that has language semantic requirements that zig can't do
wootehfoot has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
ross_k has joined #zig
reductum has quit [Quit: WeeChat 2.3]
<andrewrk>
ross_k, use a while loop
<andrewrk>
var i: usize = 0; while (i < 10) : (i += 1) {}
<ross_k>
I see! Thanks.
ross_k has quit [Ping timeout: 256 seconds]
ross_k has joined #zig
ross_k has quit [Ping timeout: 256 seconds]
Zaab1t has quit [Quit: bye bye friends]
porky11 has joined #zig
ross_k has joined #zig
ross_k has quit [Client Quit]
steveno has joined #zig
emekoi has joined #zig
<emekoi>
can we get `and` to work on nullable and boolean types? so you can do `if (true_or_false and maybe_null) |not_null| {}` or `while (true_or_false and maybe_null) |not_null| {}`?
<andrewrk>
emekoi, probably not
<andrewrk>
these are the kind of things where we sacrifice convenience to maintain simplicity
reductum has joined #zig
knebulae has joined #zig
<knebulae>
Are there any suggestions for guidance on producing a UEFI application executable, linked with msvc .lib files (EDK-II)?
<knebulae>
By way of background, these executables are just Win64-PE files with a different subsystem linked against the UEFI libraries rather than MSVCRT.
reductum has quit [Quit: WeeChat 2.3]
<andrewrk>
knebulae, i've never tried that before, but it sounds like a use case we should think about and support
<andrewrk>
knebulae, it might just work. if you don't use --library c then zig does not link against msvcrt
<andrewrk>
we also have -mconsole and -mwindows. which subsystem are you talking about?
steveno has quit [Ping timeout: 250 seconds]
<daurnimator>
andrewrk: interesting that you say that about C++.
<daurnimator>
andrewrk: I was actually thinking of the related problem of using Qt from zig this morning
<daurnimator>
Qt of course requiring a custom two pass C++ compiler...
abeaumont has left #zig ["Using Circe, the loveliest of all IRC clients"]