ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<GitHub12>
zig/master f0dafd3 scurest: fix typos in std.io (#589)...
PoF6 has quit [Remote host closed the connection]
PoF6 has joined #zig
PoF6 has quit [Remote host closed the connection]
PoF6 has joined #zig
PV has joined #zig
<PV>
Reading about @compileLog: is there a minimal example? No matter what I try I always get compiler complaining with "error: found compile log statement".
<andrewrk>
PV, that's right. it prints your compilation log, and then gives you errors so that you can't leave your compile logs in on accident
<PV>
@andrewrk: now I see it. The intended output is completely invisible next to that highlighted error message. What is the purpose of @compileLog then? I thought it is compile time no-other-side-effects printf, to be able to trace comptime execution.
<andrewrk>
PV, that's correct, that's the purpose
<andrewrk>
if you want to leave compile log statements in the code, you could put them behind a if(foo) where foo is some constant you can change between true/false
<PV>
Ah sooo, now I understand. Could this be made more clear in the documentation? An example with expected output would be handy. About the comptime if(foo): this feels really clumsy. There could be @compileLogOn/@compileLogOff to wrap interested parts of the code.
<andrewrk>
the expected use case for @compileLog is that you use it a couple times to debug something, then you figure out the problem, and remove the @compileLog lines. it's not intended that you normally leave them in the codebase
<andrewrk>
PV, do you have a use case for wanting to leave them in the codebase and have a successful build?
<PV>
For non-trivial comptime these logs may work as hints and, if things go wrong, as starting point for troubleshooting. People use preprocessor tricks to keep their printfs in code, they are quite valuable.
<PV>
The "if (foo)" will end up in "if(my_library_use_compilelogs)" mess.
skooch has left #zig [#zig]
PoF6 is now known as _dev_zero
dimenus_ has quit [Quit: Leaving]
steveno has joined #zig
arBmind has quit [Quit: Leaving.]
steveno has quit [Ping timeout: 250 seconds]
_whitelogger has joined #zig
arBmind has joined #zig
dimenus has joined #zig
<dimenus>
god, ld is so slow.
<dimenus>
generating a debug build of llvm for mingw takes so much longer than windows
<andrewrk>
yeah it's agony
<andrewrk>
it's much faster if you apply pupp's patch
<dimenus>
not zig, the llvm project
<dimenus>
i guess I should just do it on a faster machine
<andrewrk>
yeah, pupp's patch makes the embedded LLD that we have shared instead of static, and it speeds up linking
<dimenus>
yep, i have it saved on my local repo
<andrewrk>
we might do that by default in mingw debug builds?
<andrewrk>
*we might want
<dimenus>
but i'm trying to build a mingw target for the llvm master tree
<andrewrk>
ahhh
<andrewrk>
I see
<dimenus>
and it's taken multiple hours on this machine
<dimenus>
i did not (out of town for most of the weekend), but that sounds great.
<andrewrk>
I sent you an invitation
cenomla has joined #zig
<andrewrk>
good to have you on the team dimenus
<dimenus>
accepted, thank you sir
dimenus has quit [Quit: Leaving]
<andrewrk>
this is the page where you can choose whether you want zig to show up as an organization for you on your github profile: https://github.com/orgs/zig-lang/people