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/
<andrewrk> mikdusan, your help has been really valuable in the llvm12 branch. really appreciate it. if you're looking for another one, we're seeing some trouble executing the wasm32-wasi behavior tests with wasmtime
<andrewrk> aaaand damn, just hit a mips regression
<mikdusan> I'll take a peek. first I have a reduction I'll add for #8130
<mikdusan> oh interesting. I created the reduction on master as baseline for no error. llc reduction.ll yields no error, then,
<mikdusan> same thing on llvm12 and we get error, but in an interesting twist,
<mikdusan> llvm12's llc against master's reduction.ll (the one that doesn't error)... and it still errors.
<mikdusan> so look very much like upstream right now
<v0idifyy> wouldn't it be good to have extensions for zig for some very specific features that should be avoided in the main spec?
kbd has joined #zig
techtirade has quit [Quit: ZNC 1.8.2 - https://znc.in]
techtirade has joined #zig
vazub[m] has quit [Ping timeout: 240 seconds]
ifreund_ has quit [Ping timeout: 244 seconds]
tjammer[m] has quit [Ping timeout: 244 seconds]
posixlix has quit [Ping timeout: 244 seconds]
bitonic has quit [Ping timeout: 240 seconds]
vazub[m] has joined #zig
tjammer[m] has joined #zig
ifreund_ has joined #zig
posixlix has joined #zig
bitonic has joined #zig
COLE-H is now known as cole-h
<mikdusan> not cool: rustup and the 2nd warning it gives me: "Warning: Detected OS X platform older than 10.13"
<mikdusan> lies
<andrewrk> v0idifyy, that's the plan for the C integration features
decentpenguin has quit [Ping timeout: 264 seconds]
decentpenguin has joined #zig
<mikdusan> andrewrk: re: wasm32-wasi is there an issue open? and did we have success on master with wasmtime and behavior tests
<mikdusan> ie: assuming this is an llvm12 thing
<andrewrk> I didn't open an issue yet. the repro is `./zig test ../test/stage1/behavior.zig -target wasm32-wasi --test-cmd wasmtime --test-cmd-bin -I ../test`
<andrewrk> yes it's an llvm12 thing. the above command passes all tests on master, and on llvm12 branch `Error: failed to run main module...` followed by some more stderr
<mikdusan> --test-cmd run
<andrewrk> hm?
<mikdusan> wasmtime has a sub-command. don't you need `--test-cmd wasmtime --test-cmd run --test-cmd-bin`
<mikdusan> anyways I'll look into it. just adding a worktree :)
<andrewrk> can you paste the full alternate command you are suggesting?
<mikdusan> just getting into it; this is what I have:
<mikdusan> `zig test test/stage1/behavior.zig -target wasm32-wasi --test-cmd wasmtime --test-cmd run --test-cmd-bin`
<andrewrk> why do we need the run parameter?
<mikdusan> SUBCOMMANDS:
<mikdusan> config Controls Wasmtime configuration settings
<mikdusan> help Prints this message or the help of the given subcommand(s)
<mikdusan> run Runs a WebAssembly module
<mikdusan> wasm2obj Translates a WebAssembly module to native object file
<mikdusan> wast Runs a WebAssembly test script file
<mikdusan> wasmtime
<andrewrk> it also says > If a subcommand is not provided, the `run` subcommand will be used
<mikdusan> slap.
<mikdusan> ok I have enough to go on. thx
<andrewrk> thank you!
leah2 has quit [Ping timeout: 260 seconds]
leah2 has joined #zig
filpAM has quit [Ping timeout: 245 seconds]
brzg has joined #zig
tjammer[m] has quit [*.net *.split]
vazub[m] has quit [*.net *.split]
Biolunar has quit [*.net *.split]
kushalp has quit [*.net *.split]
r0bby has quit [*.net *.split]
larme has quit [*.net *.split]
vazub[m] has joined #zig
kushalp has joined #zig
tjammer[m] has joined #zig
Biolunar has joined #zig
r0bby has joined #zig
larme has joined #zig
r0bby has quit [Ping timeout: 258 seconds]
<mikdusan> heh #8131 is somehow related to @reduce too
<andrewrk> huh. I did not expect that
r0bby has joined #zig
<mikdusan> just a guess, but llvm12 is having difficulty deciding how to gen machine code for @llvm reduce builtins
<andrewrk> we could try commenting out the behavior test cases that have @reduce in it
<mikdusan> for us seemingly manifesting only with floats. (reduction uses f16 but f32 yields same result)
<mikdusan> and @llvm reduce dropped the "experimental" and was mentioned "ready" in their 12.0 release notes
<andrewrk> oh the irony
<andrewrk> ok so another release blocker to file then
<mikdusan> * The ``llvm.experimental.vector.reduce`` family of intrinsics have been renamed
<mikdusan> to drop the "experimental" from the name, reflecting their now fully supported
<mikdusan> status in the IR.
* mikdusan bets money somehow the rename caused this
<mikdusan> I guess you could file. It's easier for them to narrow down -- two different backends using instructions or functions it shouldn't be
notzmv has joined #zig
<mikdusan> I think soon when stage2 is ready, we'll be able to add some performant tests that don't re-spawn zig. tests against -femit-llvm-ir and validate target triple (and data layout), and the like. -femit-ir or -femit-zir . command-line arg tests (without exec). cpu-features tests. should be exciting :)
brzg has quit [Quit: leaving]
<mikdusan> 1 million tests/s is the goal :P
<mikdusan> on a single core
<mikdusan> (too much? sorry)
<mikdusan> btw for the last 3 days I've prettty much just been using zig built against llvm+release+assertions for everything on llvm12 and it performs quite nicely
<mikdusan> and have llvm+debug on standby if needed
<daurnimator> mikdusan: eh... if we added an test for every instruction.... 5 clock cycles per test seems possible ;)
<andrewrk> mikdusan, yeah we can invest in the test harness, and have the same test suite for stage1/2, with test marked as "passing in stage1 only", "passing in stage2 only", and "passing in both stage1 and stage2". then the test harness can efficiently perform the respective invocations
<mikdusan> andrewrk: re: commenting out @reduce for tests. basically usage is contained in test/stage1/behavior/vector.zig, one big test,
<mikdusan> and we have a callsite in crypto/utils and multi_array uses it. but those do NOT use .Min or .Max which so far (and needs to be float) is where the issue(s) manifest
<andrewrk> mikdusan, https://lists.llvm.org/pipermail/llvm-dev/2021-March/148936.html looks like we have some more time
<mikdusan> nice. it's needed.
nycex- has joined #zig
WilhelmVonWeiner has quit [Ping timeout: 276 seconds]
nycex has quit [Ping timeout: 268 seconds]
earnestly has quit [Ping timeout: 245 seconds]
<mikdusan> andrewrk: #8132
<andrewrk> thanks! I'll report the wasm bug tomorrow and meanwhile I will run the rest of the test suite
<mikdusan> it's a race. let's see how far zig build test gets
<andrewrk> you're running release with asserts?
<mikdusan> no i can't for this because of that debug metainfo issue
<andrewrk> yours will certainly win the race because I'm passing -Denable-qemu -Denable-foreign-glibc=/home/andy/Downloads/glibc/multi-2.32/install/glibcs
<mikdusan> oh heh for sure
<mikdusan> what's your take on #6408 - lemon says it has to do with way zig generates debug info. his comment was in irc inside of last 24 hours
<andrewrk> I need to catch up on that one
<andrewrk> ok so sounds like the next step is figuring out exactly what zig is doing wrong as far as debug info
<andrewrk> oh yeah next regression is mips
<mikdusan> yup got the mips failure
<mikdusan> going to try for a #6408 reduction by creating some code that uses inline for, and these 2 optimization passes: `opt -inline -sroa`
<mikdusan> - Scalar Replacement Of Aggregates
<andrewrk> got a regression on riscv64 too
<mikdusan> big surprise: zig test test/stage1/behavior/vector.zig -target mips-linux-none
<mikdusan> ld.lld: error: undefined symbol: fminf
<mikdusan> bet riscv64 too
<mikdusan> btw mips has fminf,fmin,fmaxf,fmax so appears not just limited to float on that arch
<mikdusan> s/has/has undefined/
<andrewrk> oh! are we just missing this function from c.zig?
<mikdusan> wait wut!
<andrewrk> there are some functions that LLVM assumes are available when doing codegen, such as memcpy, memset, and a bunch of math functions
<mikdusan> that makes sense. llvm is like i can do this for you, and because your cpu doesn't support it, punt to C
<andrewrk> yeah
<andrewrk> ahh I see that's what's going on with wasm
<andrewrk> that is easy to solve
<andrewrk> I'm getting a different failure for riscv64 and mips tho
<andrewrk> I'm getting a different linker error
<andrewrk> the missing math functions is easy, we just need to copy paste some stuff into c.zig
knebulae has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kbd has joined #zig
sord937 has joined #zig
hidayat has joined #zig
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #zig
greeb has joined #zig
greeb has left #zig ["WeeChat 2.9"]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
waleee-cl has quit [Quit: Connection closed for inactivity]
tnorth_ has joined #zig
kenran has joined #zig
xackus__ has joined #zig
cole-h has quit [Ping timeout: 264 seconds]
tnorth_ is now known as tnorth
<tnorth> Hi. Is there a way to see an intermediate representation of the Zig code when the compile time stuff has been interpreted?
bitmapper has quit [Quit: Connection closed for inactivity]
<ikskuh> yes, you can do that
<ikskuh> --verbose-ir
craigo has quit [Ping timeout: 245 seconds]
TheLemonMan has joined #zig
<tnorth> ikskuh: thanks, I get a bunch of stuff and then "TODO more ast renderingthread 107625 panic:Unable to dump stack trace: debug info stripped ".
<ikskuh> huh
<ikskuh> that's a thing i've never seen before
<ikskuh> can you share the code?
<andrewrk> tnorth, are you interested in this for the c++ implementation or the work-in-progress self-hosted compiler?
<andrewrk> there are some tricks you can do to get less output. at this point it's more of a debug tool than anything
<TheLemonMan> yo, got a patch ready for the AArch64 issue
<tnorth> ikskuh: Just a doc example: https://zig.godbolt.org/z/r7j35b . Maybe I'm not running it right: zig run --verbose-ir example.zig
<tnorth> andrewrk: I'm currently using the C++ implementation, but since the self-hosted compiler will eventually come, I'll be interested to try it as well
<ikskuh> tnorth: ah, so it's a bug in the emit-ir?
<mikdusan> yeah stage1 has had a `--verbose-ir` bug where it eventually hits a render bug or not-yet-implemented thing, and crash
<mikdusan> the usual workaround is to reduce the code surface. like don't use test, don't use main, just use an export fn, and redefine global panic function.
zags has joined #zig
earnestly has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
<tnorth> ikskuh: or an incomplete feature. Thanks for the suggestion, mikdusan
knebulae has joined #zig
kchambers has joined #zig
Swahili has joined #zig
zags has quit [Ping timeout: 260 seconds]
zags has joined #zig
haliucinas has quit [Read error: Connection reset by peer]
haliucinas has joined #zig
m4r35n357 has joined #zig
sablib has joined #zig
bitmapper has joined #zig
haliucinas has quit [Read error: Connection reset by peer]
haliucinas has joined #zig
sablib has quit [Read error: Connection reset by peer]
sablib has joined #zig
Swahili has quit [Remote host closed the connection]
xackus__ has quit [Read error: Connection reset by peer]
xackus__ has joined #zig
sablib has quit [Read error: Connection reset by peer]
<tnorth> I want to compare slices, is there a more compact way to do it (cast?) than this: https://zig.godbolt.org/z/bdo78x ?
<ikskuh> structural equal or reference equal?
<ikskuh> expect(std.mem.eql(u5, &foo(), &foo()));
<ikskuh> when you want to test things:
<ikskuh> std.testing.expectEqualSlices
LanceThePants has joined #zig
<tnorth> ikskuh: Didn't know that one, thanks! (I'm looking for the content to compare)
<ikskuh> use std.mem.eql for runtime, std.testing.expectEqualSlices for testing
sawzall has quit [Ping timeout: 245 seconds]
sablib has joined #zig
<dutchie> also, that error isn't really constness, it's because you are passing an array to a function that expects a slice
<tnorth> right
tnorth has quit [Ping timeout: 240 seconds]
zags has quit [Quit: leaving]
kenran has quit [Ping timeout: 245 seconds]
sord937 has quit [Quit: sord937]
xackus__ has quit [Read error: Connection reset by peer]
xackus_ has joined #zig
kbd has joined #zig
knebulae has quit [*.net *.split]
decentpenguin has quit [*.net *.split]
s-ol has quit [*.net *.split]
ed_t has quit [*.net *.split]
qbit has quit [*.net *.split]
Amun_Ra has quit [*.net *.split]
yeti has quit [*.net *.split]
letoram has quit [*.net *.split]
notzmv has quit [Ping timeout: 246 seconds]
hnOsmium0001 has joined #zig
knebulae has joined #zig
ed_t has joined #zig
letoram has joined #zig
yeti has joined #zig
qbit has joined #zig
s-ol has joined #zig
Amun_Ra has joined #zig
decentpenguin has joined #zig
craigo has joined #zig
waleee-cl has joined #zig
Akuli has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kbd has joined #zig
Piraty has quit [Quit: ---]
Piraty has joined #zig
cole-h has joined #zig
kenran has joined #zig
hidayat has quit [Quit: Connection closed]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kenran has quit [Ping timeout: 276 seconds]
gpanders has quit [Remote host closed the connection]
gpanders has joined #zig
notzmv has joined #zig
kbd has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<andrewrk> TheLemonMan, brilliant
TheLemonMan has quit [Ping timeout: 240 seconds]
craigo has quit [Quit: Leaving]
craigo has joined #zig
LewisGaul has joined #zig
LewisGaul has quit [Client Quit]
LewisGaul has joined #zig
kbd has joined #zig
kenran has joined #zig
<braket> everyone focusing on io_mode when talking about Zig async is always so frustrating to see lol
<g-w1> andrewrk: some of my recent pulls had implicit conflicts that just manifested; this should fix https://github.com/ziglang/zig/pull/8138
<andrewrk> g-w1, ah we did almost the same thing at hte same time. can you pull/rebase and check my work?
<g-w1> ok
<andrewrk> I think leaving entry.value is harmless, if a bit silly
<g-w1> hmm, the diff is one line short. i think you are missing one more heres mine: https://clbin.com/5fgAa
<g-w1> ah ok
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
<andrewrk> I'm beginning work on source location reform in stage2
<andrewrk> this is a prereq to reworking zir memory layout
<g-w1> ah, I have a reminder to my self to say that we only need a u32 for a src loc since max file size is 2 gb :)
kchambers has quit [Quit: WeeChat 3.0.1]
sjd has joined #zig
<andrewrk> my plan is to (1) introduce type safety for source locations (2) make source locations inside a Decl relative to the decl's location, so we don't have to re-generate ZIR when a decl is unchanged but moves down in a file due to previous decls and (3) remove source locations from every ZIR instructions in favor of special-case instructions to set source loc
<mikdusan> (3) is interesting
kenran has quit [Quit: leaving]
wootehfoot has joined #zig
wootehfoot has quit [Ping timeout: 264 seconds]
Piraty has quit [*.net *.split]
][_R_][ has quit [*.net *.split]
Ristovski has quit [*.net *.split]
zupss has quit [*.net *.split]
blueberrypie has quit [*.net *.split]
rowbee has quit [*.net *.split]
dddddd has quit [*.net *.split]
talin has quit [*.net *.split]
via has quit [*.net *.split]
stilbruch has quit [*.net *.split]
travv0 has quit [*.net *.split]
nore has quit [*.net *.split]
di-wu has quit [*.net *.split]
ikskuh has quit [*.net *.split]
caolanm has quit [*.net *.split]
][_R_][ has joined #zig
dddddd has joined #zig
rowbee has joined #zig
Piraty has joined #zig
Ristovski has joined #zig
zupss has joined #zig
blueberrypie has joined #zig
talin has joined #zig
via has joined #zig
caolanm has joined #zig
travv0 has joined #zig
di-wu has joined #zig
stilbruch has joined #zig
ikskuh has joined #zig
nore has joined #zig
rowbee has quit [Max SendQ exceeded]
notzmv has quit [Ping timeout: 264 seconds]
rowbee has joined #zig
Akuli has quit [Quit: Leaving]
LewisGaul has quit [Ping timeout: 240 seconds]
LewisGaul has joined #zig
ur5us has joined #zig
TheLemonMan has joined #zig
LewisGaul has quit [Ping timeout: 240 seconds]
ur5us_ has joined #zig
ur5us has quit [Ping timeout: 240 seconds]
M-ou-se has quit [Ping timeout: 260 seconds]
M-ou-se has joined #zig
notzmv has joined #zig
craigo has quit [Ping timeout: 256 seconds]
cole-h_ has joined #zig
Biolunar has quit [Ping timeout: 258 seconds]
Biolunar has joined #zig
cole-h has quit [Ping timeout: 240 seconds]
cole-h_ is now known as cole-h
ur5us_ has quit [Ping timeout: 276 seconds]
xackus_ has quit [Ping timeout: 256 seconds]