ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
wilsonk has joined #zig
wilsonk has quit [Ping timeout: 245 seconds]
<scientes> what are these magical numbers in uint32_t zig_llvm_fn_key_hash(ZigLLVMFnKey x) {
<scientes> return (uint32_t)(x.data.bit_reverse.bit_count) * (uint32_t)2621398431;
wilsonk has joined #zig
SimonNa has joined #zig
<andrewrk> scientes, literally random
<scientes> ok, i found the thing that was crashing llvm
<scientes> the builtin patch it ready i think
<scientes> let the test suite run
<scientes> I still want to do those implicit casts, but it requires some deeper changes to ir.cpp
<mikdusan> is there available (to a zig program at runtime) the install location of zig executable?
<andrewrk> mikdusan, is this in the context of zig build?
<scientes> mikdusan, on linux you can look at the symlink at /proc/self/exe
<mikdusan> in context of a test. i’ve had to write a tiny exe for dependency tokenizer so it can be run by a zig testing harness. ie: spawn, feed and read output. but i don’t really want to rely on someone’s PATH to find the test exe.
<mikdusan> right now i have it landing in same bin as zig… but **only** it was built with cmake option to enable it.
<mikdusan> scientes: i’m in the “test” and arg0 is a very long zig-cache name.
<andrewrk> mikdusan, why do you need the zig executable in a unit test?
<mikdusan> dep_tok is written for stage1 .cpp
<andrewrk> stage1 .cpp? are you working on a patch for zig?
<andrewrk> oh this is for dep file parsing
<mikdusan> issue 2046. nothing big. but it’s different i suppose.
<andrewrk> you're solving it in userland?
<andrewrk> that's... actually reasonable
<andrewrk> it can piggy back on https://github.com/ziglang/zig/issues/1964
<andrewrk> mikdusan, I'm happy to help. I still don't quite understand exactly what you're trying to do
<mikdusan> andrewrk: i’m working on providing more context. i’ll do a work-in-progress pr soon.
<mikdusan> andrewrk: comment at bottom with how i’m currently adding tests for the tokenizer. https://github.com/mikdusan/zig/commit/35cc01b02d13ce277b27406ef9391f17381df756
scientes has quit [Ping timeout: 255 seconds]
return0e has joined #zig
<hryx> Working on a fix for that fmt regression! whoops *x_x*
<mikdusan> 👍
<hryx> hey what's up mikdusan
<mikdusan> just hacking away at a pr. bit by bit.
<hryx> which one?
<mikdusan> 2046
<hryx> nice. I've actually been curious about that one because I dunno what "dep file" is referring to
<mikdusan> zig-cache invokes clang. clang generates like makefile “fragments” .
<hryx> ah, I see
<mikdusan> and zig reads them in, and adds those dependency relationships (.c to many .h files) and uses that along with zig-index to be real clever about rebuilding.
<mikdusan> unfortunately the .d is actually mean to be “make” or “nmake” compatible. we don’t need that, we just need the file names. so have to parse that archiac and somewhat unreliable output.
<hryx> are you able to implement "just enough" to get those file names? Or is that pretty much writing a fully functional parser
<hryx> I slightly dread the idea of writing a Makefile parser - even though it seems like a simple format I would not be shocked if there are ambiguities or gotchas
<mikdusan> i wrote a tokenizer/parser handling a more complicated kind of .d output (because clang forced me to do that for technical reasons).
<mikdusan> all it does is take TARGET: PREQREQ… and tokenize. but it has to handle spaces, various escapes, line continuations, etc.
<hryx> oh yeah, I saw that discussion about escapes
<mikdusan> here’s the mind blowing part. made me laugh:
<mikdusan> there are 2 output formats. one is easier to tokenize.
<mikdusan> it uses nmake/jom style quotes around file names. and it’s illegal to have inner/escaped quotes. so pretty straight forward.
<mikdusan> so when turned on, clang emits that only for PREREQ filenames. the TARGET filename on LHS is still make/compatible.
<mikdusan> so i have to write a tokenizer for the make/compatible way no matter what.
<hryx> you mean there are two different string quoting formats on the same line?
<mikdusan> exactly.
<mikdusan> so in default format it would do this.
<hryx> wow COOL feature
<mikdusan> fo$$o.o: fo$$o.c
<mikdusan> that’s make/compatible.
<mikdusan> we turn on nmake/jom for quoting and here’s the output:
<mikdusan> fo$$.o: “fo$o.c”
<mikdusan> lol
<hryx> :<
<hryx> as they say...
<hryx> "edge cases matter"
<hryx> thank you for your service (°_°)7
<hryx> ok, fmt buggo is fixo
<mikdusan> do you use vi as your primary editor?
<hryx> Nej
<hryx> I'd love to become fluent at vim but have not yet had the commitment to learning
<mikdusan> i was just going to ask something about vi and fmt . but that’s ok
hio has joined #zig
<hryx> Not to be a human Hacker News aggregator, but did anyone see Steve Klabnik's (of the Rust team) thoughts on "Free vs. Open Source"?
<hryx> I don't really like reading blogs, but he seems to be a good writer -- at least enough to convince me that the public concept of open source is still evolving
<andrewrk> hryx, it made sense to me. I was disappointed he didn't have a proposed solution to the problem he outlined
<hryx> ha, same... I totally thought he was building up to some proposal, and I was like "ooooh"
<hryx> but then kind of bwamp, trombone
<andrewrk> I'm going to bed. good night
<hryx> bye bye
return0e has quit [Ping timeout: 255 seconds]
return0e has joined #zig
xvilka has joined #zig
<xvilka> hi! I see https://github.com/ziglang/zig/projects/2 is not changed for a long time, was there any progress regarding that?
scientes has joined #zig
scientes has quit [Ping timeout: 268 seconds]
neceve has joined #zig
wilsonk has quit [Ping timeout: 255 seconds]
tdc has quit [Ping timeout: 245 seconds]
tankf33der has joined #zig
Dennis_ has joined #zig
<tankf33der> o/
<tankf33der> zig-git, now i got this error.
tdc has joined #zig
tdc has quit [Remote host closed the connection]
tdc has joined #zig
mixi has quit [Remote host closed the connection]
mixi has joined #zig
scientes has joined #zig
gonzus has joined #zig
scientes has quit [Read error: Connection reset by peer]
scientes has joined #zig
bheads_ has joined #zig
bheads has quit [Ping timeout: 250 seconds]
gonzus has quit [Ping timeout: 256 seconds]
scientes has quit [Read error: Connection reset by peer]
shawn_ has joined #zig
shawn_ has quit [Read error: Connection reset by peer]
<andrewrk> xvilka, hi. progress on stage2 is paused until a few things in stage1 are implemented
scientes has joined #zig
<andrewrk> tankf33der, I'm looking at it now
<tankf33der> ok
<andrewrk> tankf33der, it works if you add exe.linkSystemLibrary("c"); but that's strange that it's needed
<tankf33der> checking.
<andrewrk> apparently inttypes.h depends on libc?
<tankf33der> unknown.
<andrewrk> tankf33der, here are all the changes needed: https://clbin.com/YMmzs
<tankf33der> thanks.
<andrewrk> the `null` change would be unnecessary after https://github.com/ziglang/zig/issues/1967 is done
scientes has quit [Ping timeout: 245 seconds]
<tankf33der> works.
<tankf33der> andrewrk: i'm expecting zigmonoc bin for execution created in ".". Now its somewhere inside cache.
<andrewrk> tankf33der, yes, you can add a run step, or you can make `install` the default step
<andrewrk> or you can exe.setOutputDir
<tankf33der> ok
<tankf33der> and where i can find all this without you ?
<andrewrk> I think in general I'm going to experiment with making `install` the default step
<tankf33der> works.
<andrewrk> tankf33der, you would have to read the source of std/build.zig. or you can wait until https://github.com/ziglang/zig/issues/1519 is done
<tankf33der> i see. ok
Zaab1t has joined #zig
adam12 has left #zig ["WeeChat 2.3"]
hg has joined #zig
neceve has quit [Ping timeout: 245 seconds]
neceve has joined #zig
Dennis_ has quit [Ping timeout: 256 seconds]
Sahnvour has joined #zig
Ichorio has joined #zig
neceve has quit [Ping timeout: 246 seconds]
neceve has joined #zig
wilsonk|2 has joined #zig
wilsonk has joined #zig
wilsonk|2 has quit [Ping timeout: 250 seconds]
wootehfoot has joined #zig
<mikdusan> andrewrk: re: global zig-cache; is it normal and expected that it will accumulate { compiler_rt.o, builtin.zig } for each unique zig (zig id?)
<andrewrk> mikdusan, here is some more detail: https://github.com/ziglang/zig/pull/2038
<andrewrk> see the part about cache evicting
<mikdusan> thank u
develonepi3 has quit [Quit: Leaving]
tdc has quit [Quit: Leaving]
Zaab1t has quit [Quit: bye bye friends]
jjido has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
<andrewrk> live coding starting now
<hg> :D
hg has quit [Quit: WeeChat 2.4]
Sahnvour has quit [Read error: Connection reset by peer]
fsateler_ has joined #zig
fsateler has quit [Ping timeout: 245 seconds]
Ichorio has quit [Ping timeout: 255 seconds]
jjido has quit [Quit: Connection closed for inactivity]
jjido has joined #zig
_whitelogger has joined #zig