ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<GitHub84>
[zig] jayschwa opened pull request #1256: Fixed minor documentation errors (master...fix-docs) https://git.io/fNGkn
<GitHub160>
zig/master b7be082 Jimmi HC: -Dskip-release now also skips build example tests
kristate has quit [Remote host closed the connection]
xtreak has quit [Remote host closed the connection]
davr0s has joined #zig
xtreak has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
zolk3ri has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xtreak has quit [Remote host closed the connection]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Ping timeout: 240 seconds]
xtreak has joined #zig
very-mediocre has joined #zig
donlzx has quit [Quit: Leaving]
xtreak has quit [Remote host closed the connection]
<GitHub123>
[zig] Hejsil opened pull request #1258: Allow pointers to any struct in extern/exported declarations (master...extern-ptr-to-everything) https://git.io/fNG5J
<GitHub145>
zig/master fd3a41d Jimmi Holst Christensen: Allow pointers to anything in extern/exported declarations (#1258)...
stratact has joined #zig
qazo has quit [Ping timeout: 252 seconds]
Ichorio has joined #zig
Hejsil has joined #zig
Ichorio has quit [Read error: Connection reset by peer]
Hejsil has quit [Ping timeout: 252 seconds]
Bas_ has joined #zig
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bheads_>
andrewrk, I just got a chance to watch last weeks live stream, good stuff and thanks for doing it! Was the problem that the event pool was not working due to you still calling group.call (and not loop.call) in the arguments loop?
<ofelas>
ok, will try, and release-fast changes behaviour slightly if i sprinkle some warn() here and there
<andrewrk>
that's the unfortunate nature of advanced optimizations
<andrewrk>
ofelas, if you get stuck I'd be happy to look at your project and try to help
<andrewrk>
are you directly porting C code or did you do your implementation sort of from scratch?
<andrewrk>
a trick if you're porting, is to run the C code and the Zig code side by side in gdb and inspect state along the way
<ofelas>
ok, i'll see if i can wrap my head around this, i ported the deflate part of miniz_oxide to zig, so i've been running c, rust and zig
<bheads_>
andrewrk, okay cool. I just went back to my D fiber pool and I see that I did what you did, but the main thread is not a worker in the pool for a differnet reason (its handling a socket based RPC dispatcher and a collection of event timers) so the concept is similar
<andrewrk>
ofelas, one thing to consider, make sure you're using wrapping arithmetic where appropriate
<andrewrk>
it's possible that the tests are not covering wraparound arithmetic - so you're not getting any panics in testing - but in release modes, with optimizations on, llvm assumes that stuff never wraps and then does incorrect codegen
<ofelas>
no floats, mostly unsigned with a few i32 and bitCast thrown in
davr0s has joined #zig
<andrewrk>
bheads_, what did you do with your D fiber code? what was the application?
jjido has quit [Ping timeout: 255 seconds]
Bas__ has joined #zig
Bas_ has quit [Ping timeout: 252 seconds]
Bas__ has quit [Ping timeout: 252 seconds]
Bas_ has joined #zig
jjido has joined #zig
Bas__ has joined #zig
Bas_ has quit [Ping timeout: 252 seconds]
<Bas__>
I was wondering if Zig can take advantage of the asserts when compiling in release-fast
<andrewrk>
Bas__, the asserts are communicated to LLVM in the form of conditional branches to unreachable blocks
<andrewrk>
so the information is there
<Bas__>
Ah cool
<andrewrk>
I haven't done a study on how much LLVM is able to take advantage of this information
<Bas__>
Cause I had an 'assume' macro in my C++ which was an assert in debug and in release an __assume (visual studio) or __builtin_expect (gcc)
<Bas__>
No idea how much it really helped, but I thought it was neat ^^
<andrewrk>
yep. zig's unreachable keyword / assert function at least does that
<andrewrk>
there's also an open issue to bias branches against errors
<Bas__>
yeah cool
<Bas__>
It's funny. Many of the things I did for myself and really like are in Zig ^^
<andrewrk>
:)
<Bas__>
I'm also really happy with integers that don't automagically convert something else.
<andrewrk>
unless it's a guaranteed safe conversion that doesn't change mathematical meaning
very-mediocre has quit [Ping timeout: 252 seconds]
<Bas__>
yeah, but that's fine.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
mahmudov has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zolk3ri has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
zolk3ri has joined #zig
Bas__ has quit [Ping timeout: 252 seconds]
jjido has quit [Ping timeout: 260 seconds]
zolk3ri has quit [Quit: Lost terminal]
jjido has joined #zig
jjido has quit [Remote host closed the connection]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<winksaville>
I was playing around with allocators and tried std.heap.c_allocator and when compiling I get error "lld: error: duplicate symbol: _start". I'm guessing I need to link dynamically but don't know how?
<andrewrk>
winksaville, did you put `--library c` as a command line parameter?
<winksaville>
That did it, txs
geocar has quit [Quit: Connection closed for inactivity]
pancake has quit [Ping timeout: 265 seconds]
edr has quit [Ping timeout: 264 seconds]
<winksaville>
andrewrk: in the docs there are a couple examples of build.zig but I don't see how to add "--library c"?
<winksaville>
That link went to a "Account recovery page" and it says "you risked getting locked out" I didn't risk getting you or me locked out :)
<andrewrk>
in this case I suggest you use private browsing mode
<winksaville>
I seems it was on my side, I tried to go to my github page and got the same message so I "comfirmed", fingers crossed I didn't mess something up :)
<winksaville>
And I can now use your link, txx
<winksaville>
txs
pancake has joined #zig
<winksaville>
andrewrk: do you have a simple example build.zig that adds a "clean" target? Right now I execute like this `zig build --cache-dir build/` and then clean using `rm -rf build/`. That works but maybe you have something simpler?
<andrewrk>
I don't have a recommended solution for that yet
<winksaville>
k, what I've got is good enough for the moment.