ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
basro has quit [Disconnected by services]
basro_ has joined #zig
basro_ is now known as basro
basro has quit [Disconnected by services]
basro_ has joined #zig
basro_ is now known as basro
basro has quit [Disconnected by services]
basro has joined #zig
<zachcarter> thanks!
rayman22201 has joined #zig
emekoi has quit [Quit: Page closed]
emekoi has joined #zig
basro has quit [Quit: Leaving]
_whitelogger has joined #zig
<MajorLag> daurnimator: If we rename it to KernelAllocator I think we should change the Windows implementation to use VirtualAlloc directly. I've been thinking we should do that anyway actually, but I haven't bothered to check if it makes any real difference. My concern is that using HeapAllocator and large alignments might cause it to commit more memory than is actually required, but I haven't put the work in to check.
<MajorLag> Regarding allocator attributes, I'm not sure what the best way to do that would be. My instict is to say that it should be handled in a trait `pub fn myFunc(allocator: var<trait.hasFn("allocExecutable")>) !void { ... };` or something.
dpk has quit [Ping timeout: 246 seconds]
dpk has joined #zig
xvilka has quit [Ping timeout: 252 seconds]
bilebucket has joined #zig
wilsonk has quit [Ping timeout: 250 seconds]
jjido has joined #zig
bilebucket has quit [Read error: Connection reset by peer]
jjido has quit [Ping timeout: 250 seconds]
bilebucket has joined #zig
jjido has joined #zig
SimonN has quit [Remote host closed the connection]
SimonNa has joined #zig
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
IntoxicatedHippo has joined #zig
<IntoxicatedHippo> Is there a way to create an array from a slice? I have a function that returns [10]u8 and I want to get the value from an ArrayList.
meheleventyone has joined #zig
Ichorio has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<andrewrk> IntoxicatedHippo, https://github.com/ziglang/zig/issues/863
steveno has joined #zig
DutchGh0st has joined #zig
meheleventyone has joined #zig
<DutchGh0st> what leaderboard o you guys have for AoC ?
jjido has quit [Read error: Connection reset by peer]
zachcarter has quit [Ping timeout: 240 seconds]
IntoxicatedHippo has quit [Quit: Leaving]
emekoi has quit [Ping timeout: 246 seconds]
bilebucket has quit [Quit: WeeChat 2.3]
steveno has quit [Ping timeout: 250 seconds]
tobbez has quit [Ping timeout: 264 seconds]
steveno has joined #zig
return0e has quit [Ping timeout: 240 seconds]
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
DutchGh0st has joined #zig
return0e has joined #zig
halosghost has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
steveno_ has joined #zig
steveno has quit [Ping timeout: 250 seconds]
steveno_ has quit [Ping timeout: 244 seconds]
tobbez has joined #zig
steveno_ has joined #zig
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<MajorLag> andrewrk, am I misremembering or was there talk of comptime fields in runtime structs at one point? I can't imagine how that would work, but it's the kind of magic that I suddenly find myself in a position to appreciate.
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
steveno__ has joined #zig
steveno_ has quit [Ping timeout: 268 seconds]
meheleventyone has joined #zig
DutchGh0st has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
steveno__ has quit [Ping timeout: 246 seconds]
<andrewrk> MajorLag, yes that is planned
<andrewrk> it's the thing that will make tuples unnecessary
<MajorLag> andrewrk, is there a link to discussion of it and how it works? May be relevant to #1829
<andrewrk> MajorLag, I'll do a writeup to give it its own issue
<andrewrk> this is the only thing I wrote about it so far: https://github.com/ziglang/zig/issues/208#issuecomment-440504195
<andrewrk> consider that it is harmonious with https://github.com/ziglang/zig/issues/485, which is also accepted
<andrewrk> so you make your field comptime, give it its "default value" which is its only possible value, then omit the field in initialization. then the field is found when using @memberCount etc and can be found by accessing an instance, but is always comptime known
<andrewrk> I really need to get copy elision done
<andrewrk> implementing every other proposal will cause conflicts with the branch unless it's merged
DutchGh0st has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<MajorLag> hmm... ok that isn't precisely what I imagined. What I was thinking was we could retain error set information in a runtime-interface struct in a field that had a comptime value and was only accessible at comptime. Roughly the equivelent of what I mentioned in #764 but with the comptime parameter embedded in the struct (but only for things that care about it at comptime... kinda like a tag).
wilsonk has joined #zig
<MajorLag> I mean, if it is only ever a default value, why not use a `pub const` instead of a field as it only ever changes when the type does?
halosghost has quit [Quit: WeeChat 2.3]
<andrewrk> MajorLag, so that you can iterate over it with comptime reflection. This way you can pass a struct as a `var` parameter and that solves var args
<andrewrk> std.debug.warn("{} {}", .{x, true});
<andrewrk> or better example, passing a type, such as i32
<andrewrk> std.debug.warn("{}", .{i32});
emekoi has joined #zig
<andrewrk> MajorLag, to further clarify, it will be recommended in general to not use this feature for the reason you explained, but it will get implicitly used for "var args" style functions where the function iterates over the fields at comptime
<andrewrk> I think it will be possible to not be aware that this is how it is working under the hood, and it will all still make sense intuitively
<andrewrk> I hope