<daurnimator>
andrewrk: hmmm? "The following command exited with error code 3221225477: D:\a\1\s\build\dist\bin\zig.exe test D:\a\1\s\test\stage1\behavior.zig --library c --test-name-prefix behavior-aarch64-linux-musl-Debug-c-multi --cache-dir D:\a\1\s\zig-cache --name test -target aarch64v8_5a-linux-musl --override-lib-dir D:\a\1\s\lib"
<andrewrk>
that's not a particularly helpful error message is it
<andrewrk>
appears to be EXCEPTION_ACCESS_VIOLATION. not sure what that means
<andrewrk>
oh, that's a segfault
<andrewrk>
hmm I thought we had segfault handlers set up for windows
return0e has quit [Ping timeout: 240 seconds]
return0e has joined #zig
Jezza__ has joined #zig
Ichorio_ has quit [Ping timeout: 246 seconds]
doublex_ has joined #zig
doublex has quit [Ping timeout: 250 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
muffindrake1 has joined #zig
muffindrake has quit [Ping timeout: 276 seconds]
mahmudov has quit [Remote host closed the connection]
return0e has quit [Ping timeout: 276 seconds]
return0e has joined #zig
chemist69 has quit [Ping timeout: 250 seconds]
chemist69 has joined #zig
doublex_ has quit [Ping timeout: 268 seconds]
<daurnimator>
andrewrk: still around?
doublex has joined #zig
rjtobin has quit [Ping timeout: 240 seconds]
ltriant_ has quit [Ping timeout: 265 seconds]
achaninja has joined #zig
achaninja has quit [Remote host closed the connection]
mahmudov has joined #zig
_whitelogger has joined #zig
achaninja has joined #zig
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Snektron>
What's the difference between @as and @cast?
return0e_ has joined #zig
return0e has quit [Ping timeout: 240 seconds]
return0e has joined #zig
return0e_ has quit [Ping timeout: 265 seconds]
return0e_ has joined #zig
dingenskirchen has quit [Remote host closed the connection]
<andrewrk>
something that I think will become a common pattern is: fn foo(args: struct {a: i32 = 1, other: enum{enable_thing, disable_thing} = .enable_thing}) void { ... }
<mq32>
is it okay to spice up my code with `// BAH, FOOTGUNS`? :D
<fengb>
Ah okay
<fengb>
I think this might be an indirect symptom but it may be fully addressed with that fix
<fengb>
Geez, this release cycle is fixing everything :D
<mq32>
i thought the same thing right now
<mq32>
0.6 will be a good thing. stability fixes are nice :)
return0e_ has quit [Remote host closed the connection]
return0e has joined #zig
return0e has quit [Remote host closed the connection]
forgot-password has quit [Quit: leaving]
<andrewrk>
the sooner the language is stabilized, the sooner self-hosted can be a thing
<dimenus>
is the anon struct literal syntax planned to land soon?
<dimenus>
I might just shelve this until then
return0e has joined #zig
<andrewrk>
dimenus, it's going so well, I think I can merge it today
return0__ has quit [Ping timeout: 240 seconds]
<andrewrk>
at least the part when there is a result location. the part where it infers a type based on the literal values has some problems to solve
<mq32>
andrewrk: is there a way to query if an async function frame is "finished"/"resumable?"
<andrewrk>
mq32, no, if you need that then you are probably trying to make generators out of async functions, which is a bit of a mismatch for the semantics that async functions provide
<andrewrk>
however, actual generators are a possibility
<fengb>
Heh, I wrote an issue for this for making generators >_>
<mq32>
i can still implement that with a simple "wrapper call" which is fn(finished:*bool) void { actualFunction(); finished.*=true; }
<andrewrk>
the very short summary is that `suspend` and `yield` are fundamentally different concepts, and you might want an async generator
<mq32>
but if i'm right that information *is* in the frame already
<mq32>
nah i was thinking of your async chat demo
<andrewrk>
it is but using it in the way you want to would be a race condition
<mq32>
right now i have no idea how to remove the frame from the set without deleting the frame that is currently running or introducing some kind of "runtime list" with "stuff to delete later"
<andrewrk>
assuming the async function participated in a thread pool event loop
<mq32>
why that?
<andrewrk>
because you're checking if it is resumable or not, but another thread may be in the process of resuming it
<mq32>
ah
<andrewrk>
each `suspend` corresponds to a `resume` that has to be coordinated somehow
<mq32>
"resumable" was the "wrong" thing then
<mq32>
"finished" is the more correct term
<mq32>
so, if it's not possible to resume it anymore
<mq32>
(because then no thread can resume it anyways)
<andrewrk>
with "finished" the question is where should this bit live? if it's inside the frame, that's problematic because maybe the frame's memory is gone when it is finished
<andrewrk>
it could work, but not generally
<andrewrk>
what are you trying to do?
<mq32>
understand async
<mq32>
i should probably read the event loop implementation
<mq32>
i understood the basics of resume/suspend, but not what "await" does in detail
<mq32>
<andrewrk> what are you trying to do?
<mq32>
my though is something like
<mq32>
"spawn 100 async render functions" and await them in the order they finish
<andrewrk>
`await` suspends and gets resumed by the awaitee when it returns
<andrewrk>
if you're awaiting all of them, the order you await them in doesn't matter
<andrewrk>
dimenus, I believe this is actually a bug fix. you're missing const on []VertType
<dimenus>
awesome, thanks
casaca has joined #zig
<andrewrk>
good point though, I should add a compile error test for this
<andrewrk>
mq32, can I (or you) post your video demo to /r/zig?
doublex has quit [Ping timeout: 252 seconds]
doublex has joined #zig
<dimenus>
i'm really digging being able to use anon struct/union literals
<andrewrk>
ha, grabbed the branch already?
<dimenus>
yep, i'm working a basic abstraction layer over vulkan and I want to be able to just pass a description struct
<dimenus>
your branch makes filling that out more 'C' like
<dimenus>
are you planning on deprecating `var foo = Foo { .a = 42 }` as well?
<andrewrk>
yes
<andrewrk>
also planning to fix var args with this (by deleting var args)
<dimenus>
why not just require a type on the LHS then?
<dimenus>
ah, nvm
<dimenus>
because zig can have comptime expressions that can return different types
<dimenus>
so that doesn't make sense
FireFox317 has joined #zig
Akuli has quit [Quit: Leaving]
<FireFox317>
Finally fixed the raspberry pi bootloader issue in clashOS andrewrk :) It was the UART1 that we were using which was causing the problem. I switched to UART0 which fixed the issue, however that one is harder to setup since there has to be some mailbox stuff done before UART0 works XD
<andrewrk>
FireFox317, ah interesting. do you have the framebuffer working on real hardware?
<dimenus>
are you using the latest firmware?
<FireFox317>
andrewrk, Yes! But I just got it working so, don't have a PR yet :)
<FireFox317>
dimenus, you mean the latest firmware that you have to put on the sd card?
<andrewrk>
FireFox317, brilliant. that'll be more time over today and tomorrow to finish up #3652, which I think will make people here happy :)
<dimenus>
FireFox317: yep
<FireFox317>
dimenus, Yes I'm using the latest firmware
<FireFox317>
Damn, the so called mini uart we were using has really small buffers of only 8 symbols, no wonder why it didn't worked
FireFox317 has quit [Remote host closed the connection]
FireFox317 has joined #zig
<frmdstryr>
Does zig have any regex support in the std lib?
<andrewrk>
someday it would be neat to take advantage of comptime for regex, but that's probably too advanced for number of bugs & perf issues comptime currently has