ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
hoppetosse has quit [Ping timeout: 240 seconds]
jfo has quit [Ping timeout: 240 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jfo has joined #zig
jfo has quit [Ping timeout: 240 seconds]
jfo has joined #zig
jfo has quit [Ping timeout: 252 seconds]
jfo has joined #zig
jfo has quit [Ping timeout: 256 seconds]
cenomla has joined #zig
jfo has joined #zig
jfo has quit [Ping timeout: 246 seconds]
<jacobdufault>
andrewrk: Adding all top-level symbols to the resolve queue causes a bunch of compile errors
<jacobdufault>
I've pushed the latest code
<andrewrk>
that is expected
<andrewrk>
zig code is allowed to depend on lazy analysis, and so it does, and so if you do this you get errors
<andrewrk>
but this should still provide useful output for cquery
<jacobdufault>
Hmm, I wonder if it is possible to have diagnostics and metadata in the same compile pass?
<jacobdufault>
It'd be really unfortunate if two separate invocations were required
<andrewrk>
one is stderr, one is stdout
<andrewrk>
one thing I plan to do is have something where you can do a "multibuild" - specify multiple possible values for compile time variables such as the target OS
<jacobdufault>
FYI: error reporting will exit the compiler
<andrewrk>
you can modify report_errors_and_maybe_exit
<andrewrk>
if we're outputting json we can have both
<andrewrk>
a "multibuild" would create multiple builds simultaneously, for example, linux & windows. the shared work would be shared and cross-referenced. so we would know if you get an error in code only in 1 target
<jacobdufault>
I was doing so. I may need to clean up some other asserts as well, ie, do_code_gen
<jacobdufault>
multibuild sounds like a perfect solution
<andrewrk>
plus then you get your cquery data and generated docs for all the declarations, not just the ones for that target
<andrewrk>
and if you get any compile errors that occur in all builds, you can report it instead of letting it slip by lazy evaluation
<andrewrk>
oh and that gives us errors for "unused function" and "unused variable"
<andrewrk>
which are currently not possible
<jacobdufault>
does do_code_gen affect AST/types?
<andrewrk>
no
<jacobdufault>
nice, since it seems to break in non-trivial ways when resolving all top-level decls. I'm going to disable it for json output mode
<andrewrk>
we can revisit when multibuild is a thing
<jacobdufault>
btw: would you prefer a name other than json? maybe `zig metadata foo.zig`?
<andrewrk>
I'm ok with either
<andrewrk>
I suppose metadata is more descriptive
<jacobdufault>
I'll switch it to metadata then
<jacobdufault>
or, maybe `index`
<andrewrk>
I'd rather not have "index" because I think it will conflict with some of the planned caching nomenclature
<jacobdufault>
sg
jfo has joined #zig
jfo has quit [Ping timeout: 240 seconds]
jdufault has joined #zig
jfo has joined #zig
jfo has quit [Ping timeout: 240 seconds]
cenomla has quit [Quit: cenomla]
Tobba has quit [Read error: Connection reset by peer]
<GitHub187>
[zig] AndreaOrru pushed 1 new commit to master: https://git.io/vxTQT
<GitHub187>
zig/master 7ac4403 Andrea Orru: Compiler error when taking @offsetOf of void struct member...
jfo has joined #zig
jfo has quit [Ping timeout: 252 seconds]
<GitHub176>
[zig] AndreaOrru pushed 1 new commit to master: https://git.io/vxT7M
<GitHub176>
zig/master c828c23 Andrea Orru: Tests for zero-bit field compiler error
<GitHub83>
zig/master efebb6d Andrew Kelley: fix tests broken by previous commit
jfo has joined #zig
jfo has quit [Ping timeout: 246 seconds]
jdufault has quit [Ping timeout: 260 seconds]
jjido has joined #zig
return0e has quit [Remote host closed the connection]
<GitHub63>
[zig] tiehuis opened pull request #833: Add addIncludeDir to TestStep + fix build template (master...issue-794) https://git.io/vxkUE
return0e has joined #zig
return0e_ has joined #zig
return0e has quit [Read error: Connection reset by peer]
return0e_ has quit [Ping timeout: 264 seconds]
hoppetosse has joined #zig
return0e has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
hoppetosse has quit [Ping timeout: 264 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Hejsil has joined #zig
hoppetosse has joined #zig
arBmind has joined #zig
Hejsil has quit [Quit: Page closed]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hoppetosse has quit [Ping timeout: 256 seconds]
Hejsil has joined #zig
hoppetosse has joined #zig
clownpriest has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]
jjido has quit [Ping timeout: 264 seconds]
hoppetosse has joined #zig
hopppetosse has joined #zig
hoppetosse has quit [Ping timeout: 248 seconds]
hoppetosse has joined #zig
hopppetosse has quit [Ping timeout: 264 seconds]
Hejsil has quit [Quit: Page closed]
steveno_ has joined #zig
arBmind has quit [Read error: Connection reset by peer]
davr0s has joined #zig
arBmind has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hejsil has joined #zig
gazatu has joined #zig
<gazatu>
dunno how this works but i have 1 question
<andrewrk>
hi gazatu
<gazatu>
yo
<gazatu>
how do i link against a library (for example libuv) on windows?
<andrewrk>
--library uv
<andrewrk>
there are plans for a package manager for C libraries, but that's not done yet. so you'll have to do the work of acquiring the .lib and .h files
<gazatu>
oh so that's the problem. i need a .lib file and not a .dll
<gazatu>
thanks that's all i needed to know :D
<andrewrk>
gazatu, you can link dynamically against libuv if you wish
<andrewrk>
then you will end up with a .dll dependency
<gazatu>
mhhh but then i get a bunch of these "lld: error: duplicate symbol: __imp_GetConsoleMode in ./lib\libuv-1.dll and in kernel32.dll"
<gazatu>
i'll just try with a .lib file if that works better
<andrewrk>
I'll have to try that on my windows laptop when I get home. maybe there's something I can fix
<gazatu>
:ok_hand:
gazatu has quit [Quit: Page closed]
steveno_ has quit [Remote host closed the connection]
hoppetosse has quit [Remote host closed the connection]
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 264 seconds]
gazatu has joined #zig
<gazatu>
yo i have 1 more question :)
<gazatu>
am i able to use extern fn's when linking against a .lib file?
<andrewrk>
gazatu, btw, I have a work-in-progress proof-of-concept using zig's new async/await features to build a nonblocking tcp server
<andrewrk>
the zig std library will soon compete with libuv
<andrewrk>
yes you are able to use extern functions
<andrewrk>
let me know if you run into a problem
<gazatu>
well i guess im too stupid to make this work then :/ might try a pure zig solution then
<andrewrk>
gazatu, it's probably a flaw in zig
<andrewrk>
it might require some patience on your end, but I'm sure we can get it sorted
<andrewrk>
Hejsil, what would you expect p to be? I get the same value (4) with or without the comptime stuff
<Hejsil>
Should't p be 10? Since it's an inline loop and i is used to inline the loop 10 times
<andrewrk>
it's inlined 5 times because you break out of the loop after 5 iterations
<Hejsil>
But t is only know at runtime
<andrewrk>
oh!
<Hejsil>
Maybe the variable names where bad, lol
<ltr_>
how is async/await thing going to work?, i would be able to tune the thread pool?
<andrewrk>
Hejsil, I think this is a missing compile error - the loop is inlined, and therefore control statements such as break and continue which apply to the inlined loop must be compile time known
<Hejsil>
That make sense
<andrewrk>
ltr_, yes, the thread pool, if any, would all be in userland
<andrewrk>
I'll hopefully have a proof of concept within the next week
<andrewrk>
Hejsil, ah, yes I believe so
<andrewrk>
this is an important bug, but we're releasing 0.2.0 tomorrow, so we're gonna have some known bugs
<andrewrk>
"no bugs allowed in releases" doesn't start until 1.0.0
<Hejsil>
Np, now I know exactly what to avoid in my inline loops
isd has joined #zig
hoppetosse has joined #zig
arBmind has quit [Quit: Leaving.]
gazatu has quit [Quit: Page closed]
Hejsil has quit [Read error: Connection reset by peer]
<jfo>
hey all, I've been working on a long post describing a small project in zig that I hopw will provide some rudimentary insight into the language for curious folks. Any feedback is appreciated, the draft is here: https://github.com/jfo/weblog/blob/master/content/post/how-zig-do.md and if you have any thoughts please either drop them in here or email me at jeffowler@gmail.com .
jfo has quit [Quit: WeeChat 1.9.1]
arBmind has joined #zig
zesterer has joined #zig
zesterer has quit [Quit: zesterer]
<aiwakura>
oh wow jfo, that's beautiful! I'm gonna go through it tonight
steveno_ has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
isd has quit [Quit: Leaving.]
<aiwakura>
seems like the `==` operator is not defined for instances of union(enum), or structs for that matter
<aiwakura>
is that by design or is it something we could add support for?
Tobba has joined #zig
cenomla has joined #zig
<MajorLag>
jfo, I think it is worth mentioning that things like bounds and overflow checking only happen in debug and release-safe modes (or when you turn them on with @setRuntimeSaftey).