ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
hio has quit [Quit: Connection closed for inactivity]
reductum has joined #zig
reductum has quit [Ping timeout: 240 seconds]
reductum has joined #zig
reductum has quit [Ping timeout: 240 seconds]
Zaab1t has joined #zig
<benjikun>
Under implicit cast: arrays in the docs it says `TODO: [N]T to []const T`
<benjikun>
does that mean explaining it is a TODO or implementing it
reductum has joined #zig
<hryx>
benjikun: I think everything marked TODO in the docs means "to be documented", not that it's unimplimented
<benjikun>
yeah that's what I thought
Zaab1t has quit [Quit: bye bye friends]
<andrewrk>
hryx, that's correct
reductum has quit [Quit: WeeChat 2.3]
<redj>
andrewrk: gotta rename that to TODOC ;)
<andrewrk>
redj, clever :)
qazo has joined #zig
<daurnimator>
andrewrk: how goes? :)
<andrewrk>
hi daurnimator
<andrewrk>
made some good progress on copy elision today
<andrewrk>
I almost have an empty file compiling successfully
<andrewrk>
(this is a joke - an empty file uses the default panic handler which calls the debug info parsing code which basically involves a full stress test of the standard library)
<benjikun>
lol
<andrewrk>
good night
<andrewrk>
I will be taking the day off tomorrow for the united states holiday thanksgiving
<benjikun>
night night
<benjikun>
sleep well
<daurnimator>
andrewrk: will be exciting to have copy ellison moved so we can move onto other things :P
<benjikun>
andrewrk: Same, going out to eat with family
<suirad>
is there a shorthand way to go from [*]T to []T without looping manually?
<suirad>
ahh std.mem.toSlice()
<daurnimator>
suirad: you have a null-terminated object?
<daurnimator>
s/object/array/
<suirad>
Yes
<suirad>
Is defering in a loop safe?
<benjikun>
I'm pretty sure it is, are you wanting the defer to be in reference to the loop block?
<benjikun>
just note it will defer each loop iteration
<benjikun>
so depends on what you want
<suirad>
Im parsing strings of arbitrary length and need to allocate temporary []u8. They are only used once and I dont care what happens after they are used.
<suirad>
benjikun: okay, so each loop iteration executes defer lines?
<benjikun>
yep
<benjikun>
the deferred code will run at each loop iteration exit too
<benjikun>
could you not have a buffer outside the loop and reuse it?
<benjikun>
and then just free it after the looping is over
<suirad>
probably. Thats where I was headed next now that I have this test passing
<benjikun>
sounds good
<benjikun>
Just realized if you do a self-referential function call, it segfaults `fn foo() void { foo(); }`
<benjikun>
wonder if having a compiler error for that would be reasonable
<benjikun>
someone recently asked for a consistent way for making segfaults, that's an easy one lol
<benjikun>
dunno maybe this is normal and I'm crazy for thinking a compiler error is reasonable, it happens in C too
<hryx>
nah, it doesn't make you crazy -- if the compiler segfaults, it's a compiler bug
<benjikun>
no I meant it segfaults when running the compiled program
<hryx>
ohhh I see. in debug mode or release?
<benjikun>
debug
<benjikun>
actually what the heck
<benjikun>
it doesn't happen in --release-fast or --release-safe but it happens when you do `zig run test.zig`
<benjikun>
debug mode is the default mode right?
<hryx>
yeah
<hryx>
it might have been optimized away in release-fast
<benjikun>
hmm true
<hryx>
if I recall, the upcoming coroutine refactor will affect recursion in a few ways, possibly including detecting it (not sure)
jjido has joined #zig
<hryx>
either way, it'll surely affect the kind of function in your example
<benjikun>
interesting
<benjikun>
I opened an issue for people to see just in case
<benjikun>
should I close it?
<benjikun>
not sure if it warrants having an issue
<hryx>
it's worth having the issue open I'm sure
<benjikun>
mk good
<benjikun>
How is the docgen stuff coming along?
<hryx>
been very limited during the week due to dayjob, but now it's a holiday :O
<benjikun>
woohoo
jjido has quit [Ping timeout: 260 seconds]
jjido has joined #zig
jjido has quit [Remote host closed the connection]
jjido has joined #zig
porky11 has joined #zig
davr0s has joined #zig
suirad_ has joined #zig
suirad has quit [Ping timeout: 256 seconds]
jjido has quit [Remote host closed the connection]
hio has joined #zig
qazo has quit [Ping timeout: 244 seconds]
errpr has quit [Ping timeout: 252 seconds]
errpr has joined #zig
Sahnvour has joined #zig
qazo has joined #zig
Sahnvour has quit [Remote host closed the connection]
suirad_ has quit [Ping timeout: 256 seconds]
scriptnull has joined #zig
wootehfoot has joined #zig
hio has quit [Quit: Connection closed for inactivity]
suirad has joined #zig
porky11 has quit [Ping timeout: 276 seconds]
scriptnull has quit [Remote host closed the connection]
reductum has joined #zig
scriptnull has joined #zig
scriptnull has quit [Ping timeout: 272 seconds]
porky11 has joined #zig
reductum has quit [Quit: WeeChat 2.3]
aiwakura has quit [Ping timeout: 250 seconds]
aiwakura has joined #zig
porky11 has quit [Quit: Leaving]
wootehfoot has quit [Read error: Connection reset by peer]