ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
cantsin has quit [Remote host closed the connection]
mnoronha has joined #zig
nodist has joined #zig
nodist has quit [Quit: Leaving]
redj has quit [*.net *.split]
dpk has quit [*.net *.split]
dpk has joined #zig
<scientes> is there a way to tell if you are running in a co-routine, or on the main thread?
<scientes> Thorn, someone got it to compile for avr https://github.com/ziglang/zig/issues/1373
<scientes> Thorn, it should work for any arch that llvm supports
<scientes> Thorn, and there is a OS written in Zig https://github.com/AndreaOrru/zen
<andrewrk> scientes, that's probably a code smell
<andrewrk> can you explain your use case?
<scientes> I'm trying to write a go-like async-io, where read adds to a epoll (or equiv.) list
<scientes> and then resumes when the fd is ready to be read
<scientes> but i can do it without that
<scientes> *without knowing if thread is a co-routine
shodan45 has quit [*.net *.split]
adrusi has quit [*.net *.split]
tracernz has quit [*.net *.split]
strmpnk has quit [*.net *.split]
dpk has quit [*.net *.split]
ryanmtate has quit [*.net *.split]
odc has quit [*.net *.split]
SimonNa has quit [*.net *.split]
Thalheim has quit [*.net *.split]
commander has quit [*.net *.split]
meowray has quit [*.net *.split]
walac has quit [*.net *.split]
mahmudov has quit [*.net *.split]
wilsonk has quit [*.net *.split]
unique_id has quit [*.net *.split]
benaiah has quit [*.net *.split]
beetcoin has quit [*.net *.split]
Dirkson has quit [*.net *.split]
karlguy has quit [*.net *.split]
c15ade4 has quit [*.net *.split]
edr has quit [*.net *.split]
minus has quit [*.net *.split]
so has quit [*.net *.split]
bodie_ has quit [*.net *.split]
meena has quit [*.net *.split]
utzig has quit [*.net *.split]
aiwakura has quit [*.net *.split]
mnoronha has quit [*.net *.split]
qazo has quit [*.net *.split]
andrewrk has quit [*.net *.split]
tyler569 has quit [*.net *.split]
ltr_ has quit [*.net *.split]
Guest29528 has quit [*.net *.split]
monteslu has quit [*.net *.split]
bwb` has quit [*.net *.split]
tobbez has quit [*.net *.split]
MajorLag has quit [*.net *.split]
m6w6 has quit [*.net *.split]
rom1504 has quit [*.net *.split]
lqd has quit [*.net *.split]
Vinski has quit [*.net *.split]
profan has quit [*.net *.split]
s455wang has quit [*.net *.split]
crimson_penguin has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
cgag has quit [*.net *.split]
diginet has quit [*.net *.split]
wink_ has quit [*.net *.split]
<scientes> I can use duck typing
walac has joined #zig
beetcoin has joined #zig
rom1504 has joined #zig
_whitelogger has joined #zig
kristate has joined #zig
reductum has joined #zig
kristate has quit [Remote host closed the connection]
_whitelogger has joined #zig
_whitelogger has joined #zig
kristate has joined #zig
mnoronha has quit [Ping timeout: 252 seconds]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 244 seconds]
kristate has joined #zig
reductum has quit [Quit: WeeChat 2.2]
Thorn__ has joined #zig
Thorn has quit [Ping timeout: 276 seconds]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
davr0s has joined #zig
qazo has quit [Read error: Connection reset by peer]
return0e has joined #zig
qazo has joined #zig
kristate has joined #zig
qazo has quit [Read error: Connection reset by peer]
qazo has joined #zig
kristate has quit [Ping timeout: 264 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Thorn__ is now known as Thorn
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
SimonNa has quit [Remote host closed the connection]
SimonNa has joined #zig
ircuser has joined #zig
ircuser has left #zig [#zig]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qazo has quit [Read error: Connection reset by peer]
qazo_ has joined #zig
qazo_ has quit [Client Quit]
bheads has joined #zig
noonien has joined #zig
return0e has quit [Remote host closed the connection]
return0e has joined #zig
davr0s has joined #zig
<wink_> I've created zig-benchmark: https://github.com/winksaville/zig-benchmark comments suggestions welcome!
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<andrewrk> wink_, volatile doesn't block optimization
<andrewrk> in order to prevent optimizations from ruining your benchmark, you have to output the data that you calculated
<andrewrk> doing a volatile store of data is a form of output though
<wink_> Not sure what you mean by "you have to output the data that you calculated" but volatile does remove some optimizations, because if I use constants the add operatoin will be, correctly hoisted outside the loop, where as using volatile I see loads and stores.
<wink_> I found that I need to look at the assmebly output so I can see what's actually being measured.
<andrewrk> volatile makes loads and stores considered to have side effects, but that's all it does
<andrewrk> the optimizer is free to do anything as long as all the volatile operations are preserved and in the same order
kristate has joined #zig
SimonNa has quit [Read error: Connection reset by peer]
SimonN has joined #zig
<wink_> yep, which is why I looked at the assembly output to verify the loads and stores were inside the loop. Of course the loop has been unwound to 8 times and the upper 64 bits of the r: u128 isn't stored until after the loop :)
<wink_> I've updated the test to do u128 add and README.md to include how to generate the asm as well as having the asm loop.
hoppetosse has joined #zig
unique_id has joined #zig
mnoronha has joined #zig
hoppetosse has quit [Ping timeout: 244 seconds]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
kristate has quit [Ping timeout: 264 seconds]
<MajorLag> andrewrk, I'm not sure what can be done about it, but comparing two tagged unions for equality is especially nasty. Getting the active tag of each is simple enough, but using that to get and compare the value rquires an inline for over the typeInfo UnionFields comparing the tag values. Anything else I've tried has lead to `unable to evaluate constant expression`.
<andrewrk> I noticed this the other day
<andrewrk> we can open an issue to track our discontent even if we don't have a proposal yet
<MajorLag> problem is, the error isn't wrong. without the comparison between the fields taking place inside the inline loop, it can't work. Only thing I've come up with is to abstract the nastiness and use some kind of callback to a generic function, but that takes more lines of code to set up than you end up abstracting away.
mnoronha has quit [Ping timeout: 244 seconds]
mnoronha has joined #zig
bheads has quit [Ping timeout: 244 seconds]
hoppetosse has joined #zig
mnoronha has quit [Ping timeout: 264 seconds]
mnoronha has joined #zig
mnoronha has quit [Ping timeout: 268 seconds]