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/
squeek502 has quit [Remote host closed the connection]
klltkr has joined #zig
mmohammadi9812 has joined #zig
xentec has joined #zig
klltkr has quit [Remote host closed the connection]
frmdstryr has quit [Ping timeout: 260 seconds]
frmdstryr has joined #zig
geert_ has joined #zig
a92 has quit [Quit: Leaving]
geert_ has quit [Ping timeout: 264 seconds]
geert_ has joined #zig
CmdrCrisp has quit [Ping timeout: 260 seconds]
stripedpajamas has joined #zig
geert_ has quit [Ping timeout: 272 seconds]
maxrazer has quit [Quit: Leaving]
<daurnimator> is `@hasDecl(root, start_sym_name)@hasDecl(root, start_sym_name)` broken now or am I doing it wrong? https://zig.godbolt.org/z/Yq6xa4
<daurnimator> oops pasted twice
<g-w1> I am getting a build error for the self hosted compiler in cache.zig ./src/Cache.zig:38:64: error: container 'std.crypto.siphash.SipHash(u128,1,3)' has no member called 'key_length'
<daurnimator> g-w1: huh. possibly due to the reorganisation of std.crypto?
<g-w1> oh, I was using the wrong version of the compiler, nvm
<g-w1> I think
<daurnimator> yeah looks like you're using a new std lib with an old stage2 checkout
<g-w1> I think other way around.
kiwi_46 has joined #zig
kiwi_46 has quit [Client Quit]
<jabb> so what's going on with this? https://godbolt.org/z/qd7v4b
<jabb> it's segfaulting because of passing "allocator" in Subnode.init
<jabb> removing it and it doesn't segfault
<g-w1> I am confused, init does'nt take self, so does it return a dangling pointer?
karrick has quit [Read error: Connection reset by peer]
<g-w1> *doesn't
r0bby has quit [Read error: Connection reset by peer]
rzezeski has quit [Read error: Connection reset by peer]
kwilczynski has quit [Ping timeout: 260 seconds]
rzezeski has joined #zig
<g-w1> I must be missing something
karrick has joined #zig
r0bby has joined #zig
kwilczynski has joined #zig
<g-w1> ah, it is dynamically allocated.
earnestly has quit [Ping timeout: 258 seconds]
<jabb> yeah
<jabb> it's weird. i would expect this to work, but maybe i'm misunderstanding what it's doing
<jabb> if you move allocator outsite of the call to `create` and do `self.node_.allocator = allocator` it works too
<jabb> so something is going on when passing the comptime anytype struct to create, and then subsequently to zeroInit
<jabb> ooo, sorry, meant the inline for. i also tried it with zeroInit and it didn't work
<jabb> ahh, it's evaluated at comptime when it doesn't exist? looks like that's the case
frmdstryr has quit [Ping timeout: 260 seconds]
mmohammadi9812 has quit [Quit: Quit]
mmohammadi9812 has joined #zig
a_chou has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
a_chou has quit [Remote host closed the connection]
ask6155 has joined #zig
geert_ has joined #zig
stripedpajamas has quit [Quit: sleeping...]
stripedpajamas has joined #zig
kristoff_it1 has quit [Ping timeout: 264 seconds]
mmohammadi9812 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #zig
stripedpajamas has quit [Quit: sleeping...]
ur5us has quit [Ping timeout: 260 seconds]
geert_ has quit [Ping timeout: 258 seconds]
osa1 has joined #zig
<dominikh> when writing bindings for a C library, is there any trick to dealing with memory allocations inside the C library and prevent it from using the libc default allocator?
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
geert_ has joined #zig
ask6155 has left #zig [#zig]
jabb has quit [Quit: WeeChat 2.9]
ur5us has joined #zig
decentpenguin has quit [Read error: Connection reset by peer]
geert_ has quit [Ping timeout: 272 seconds]
decentpenguin has joined #zig
geert_ has joined #zig
squeek502 has joined #zig
_whitelogger has joined #zig
geert_ has quit [Quit: Lost terminal]
x2C25 has quit [Ping timeout: 256 seconds]
cole-h has quit [Ping timeout: 264 seconds]
earnestly has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
tane has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
marnix has quit [Remote host closed the connection]
marnix has joined #zig
mmohammadi9812 has quit [Ping timeout: 246 seconds]
benjamin-l has joined #zig
mmohammadi9812 has joined #zig
ask6155 has joined #zig
ask6155 has left #zig [#zig]
frett27 has joined #zig
osa1 has quit [Quit: osa1]
osa1 has joined #zig
frett27_ has joined #zig
ask6155 has joined #zig
Patrice_ has quit [Ping timeout: 264 seconds]
Kingsquee has quit []
radgeRayden has joined #zig
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
Miaourt7 has joined #zig
Miaourt has quit [Quit: Ping timeout (120 seconds)]
Miaourt7 is now known as Miaourt
aperezdc[m] has left #zig ["User left"]
chivay has quit [Quit: RIP]
chivay has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
hch has joined #zig
kristoff_it1 has joined #zig
ask6155 has left #zig [#zig]
skuzzymiglet has joined #zig
mmohammadi9812 has quit [Quit: Quit]
mmohammadi9812 has joined #zig
ask6155 has joined #zig
frmdstryr has joined #zig
sawzall has quit [Ping timeout: 240 seconds]
sawzall has joined #zig
donniewest has joined #zig
<g-w1> is there an equavelence to `cargo check` for zig where it only runs the semantic analysis
<ifreund> nope
<g-w1> would it be useful to make one, or does the lazy analysis not make it worth it?
<ifreund> maybe in self hosted, but that should already be so fast for incremental builds it shouldn't matter
<ifreund> there are other priorities imo
<g-w1> cool
<tane> will the self-hosted compiler be LLVM free?
<g-w1> yes unless you want llvm!
<tane> what are the implications w.r.t. to performance optimizations, i.e., can we expect a similar level or is that where LLVM comes in?
<tane> -to
<tane> thanks
xackus_ has joined #zig
<ifreund> tane: tldr; llvm free for incremental debug builds, llvm optinal for full optimizations
<tane> yes, everything else would be a rather ambitious adventure :)
<companion_cube> could the release-safe mode also avoid llvm, optionally?
<ifreund> companion_cube: I think a release mode with 80% of llvm's speed without llvm may be a longer term goal
<companion_cube> yeah
<companion_cube> even the equivalent of -O1 makes a world of difference with -O0, and is not that far away from -O2
<ifreund> that's non-essential for zig 1.0 though at least imo, I know others may feel differently
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
<companion_cube> sure, it's an implementation detail as some say :p
osa1_ has joined #zig
osa1_ has quit [Remote host closed the connection]
stripedpajamas has joined #zig
stripedpajamas has quit [Client Quit]
frett27 has quit [Remote host closed the connection]
frett27 has joined #zig
xackus_ has quit [Ping timeout: 260 seconds]
frett27__ has joined #zig
frett27 has quit [Ping timeout: 272 seconds]
cole-h has joined #zig
hnOsmium0001 has joined #zig
osa1 has quit [Remote host closed the connection]
geert_ has joined #zig
LanceThePants has joined #zig
sawzall has quit [Ping timeout: 240 seconds]
skuzzymiglet has quit [Ping timeout: 240 seconds]
<Nypsie[m]> Sorry for the off-topic question. Is there anyone in here who signed up for the plushie, and put their contact details as "IRC"? Please contact me so I actually know who to contact. Would be unfortunately if you miss out due to this.
<betawaffle> there's a plushie?
<Nypsie[m]> I'm in the process of getting some manufactured, based on the amount of people who sign up
<betawaffle> can i see a picture?
<Nypsie[m]> They aren't manufactred yet. But it'll be based on the mascotte, Zero: https://github.com/ziglang/logo/blob/master/zero.svg
tane has quit [Quit: Leaving]
x2C25 has joined #zig
<betawaffle> cute
<ugla> Nypsie: I didn't sign up but would like to, if it's not too late :]
<Nypsie[m]> I'll add you to the list
<ugla> Thanks!
Akuli has joined #zig
CmdrCrisp has joined #zig
tane has joined #zig
waffle_ethics has joined #zig
zippoh has quit [Remote host closed the connection]
zippoh has joined #zig
TheLemonMan has joined #zig
CmdrCrisp has quit [Ping timeout: 260 seconds]
waleee-cl has joined #zig
geert_ has quit [Ping timeout: 240 seconds]
<TheLemonMan> andrewrk, how's the debugging going?
<andrewrk> yo
<andrewrk> I'm waiting on a build where I build zig1.o with the produced zig binary rather than zig0 and I expect that to not show the problem. this would confirm your hypothesis. I'm not sure how to do the objdump thing you suggested
<TheLemonMan> objdump -d <your .o file> |& grep 'fld' or something like that
<TheLemonMan> you could also use gdb/lldb and follow the float formatting code to see where it goes bonkers
<andrewrk> good point
<TheLemonMan> I wonder why none of the interesting bugs show up on hardware I own :(
<andrewrk> assuming that is the problem, let's see what a fix would look like. we could introduce another build step where we rebuild zig1.o with stage1 zig. it's incredibly frustrating how difficult cmake makes such a simple concept
<andrewrk> we could go back to passing -DZIG_EXECUTABLE=foo for macos CI - but that means we would have to update the tarball every time we want to change the language
<TheLemonMan> can you remind me why we're not using the host CC/CXX ?
<andrewrk> I spent all day trying to make that work after llvm 11 was released and this was my solution to create a consistent build environment that we control
<andrewrk> oh it fixed something too. even previously with gcc we were incorrectly building a fully static exe - not even linking libSystem. I was unable to get gcc to do the right thing
<andrewrk> now the macos tarballs are correctly dynamic linking libSystem
<andrewrk> also the CI tarball is an order of magnitude smaller, and doesn't depend on homebrew or gcc
<TheLemonMan> oh I see, cross-platform building is such a mess
<andrewrk> yeah and zig actually makes it pretty nice - but trying to bootstrap can be tricky
<andrewrk> OK I have just confirmed that if I rebuild zig1.o with stage1 zig instead of stage0 it no longer has the translate-c failures
<TheLemonMan> do you still have both the zig1.o files?
<andrewrk> so it does appear to be stage0 giving LLVM incorrect data for "baseline"
<andrewrk> I have the new one only but I can regenerate the old one within ~10 min
<TheLemonMan> you could bindiff the good and the bad one and see what changed
<andrewrk> ok will start that process
<TheLemonMan> isn't it lovely how all those weird issues pop up right before the release period?
<andrewrk> :(
<andrewrk> also I don't know if you heard but my landlord went berzerk last thursday and I have been chased out of my home
<andrewrk> it seems the universe does not want zig 0.7.0
<TheLemonMan> yeah I read the twitter thread, crazy stuff
<andrewrk> the universe can go fuck itself, this release is happening
<TheLemonMan> speaking of release, I finally got the libclang patch merged!
<andrewrk> wow, and 87 LLVM versions earlier than anticipated!
<TheLemonMan> pfft, that's nothing compared to the patches for the SPARC backend
<TheLemonMan> nyaayaya, ping
skuzzymiglet has joined #zig
decentpenguin has quit [Ping timeout: 260 seconds]
<andrewrk> TheLemonMan, I have both object files now
<TheLemonMan> can you send both this way?
<andrewrk> one moment
<andrewrk> stage0 is sending "" for CPU features to llvm. stage1 is sending a full and complete list, leaving nothing up to chance
decentpenguin has joined #zig
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #zig
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #zig
companion_cube has quit [Quit: WeeChat 2.3]
companion_cube has joined #zig
gpanders has quit [Ping timeout: 240 seconds]
jjsullivan has quit [Read error: Connection reset by peer]
jjsullivan has joined #zig
gpanders has joined #zig
waffle_ethics has quit [Ping timeout: 272 seconds]
ur5us has joined #zig
gpanders has quit [Ping timeout: 256 seconds]
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
gpanders has joined #zig
Patrice_ has joined #zig
frett27_ has quit [Ping timeout: 272 seconds]
gpanders has quit [Ping timeout: 258 seconds]
gpanders has joined #zig
gpanders has quit [Ping timeout: 260 seconds]
CmdrCrisp has joined #zig
wootehfoot has joined #zig
marnix has quit [Ping timeout: 240 seconds]
CmdrCrisp has quit [Ping timeout: 260 seconds]
gpanders has joined #zig
marnix has joined #zig
marnix has quit [Ping timeout: 272 seconds]
marnix has joined #zig
marnix has quit [Ping timeout: 272 seconds]
xackus_ has joined #zig
Kingsquee has joined #zig
<TheLemonMan> andrewrk, is --cache off gone for good? the caching system doesn't detect when the zig compiler itself changes and testing new changes is harder than it should be
<TheLemonMan> oh and some part of build.zig is now invoking `git diff` to build the dirty tree hash, can we avoid that? sometimes the generated diff overflows the maximum readable size and I have to go and modify the build.zig by hand
idxu has quit [*.net *.split]
scientes has quit [*.net *.split]
s-ol has quit [*.net *.split]
nore has quit [*.net *.split]
blueberrypie has quit [*.net *.split]
hspak has quit [*.net *.split]
edr has quit [*.net *.split]
s-ol has joined #zig
scientes_ has joined #zig
edr has joined #zig
edr has joined #zig
edr has quit [Changing host]
idxu has joined #zig
hspak has joined #zig
blueberrypie has joined #zig
nore has joined #zig
frmdstryr has quit [Ping timeout: 256 seconds]
hspak has quit [Client Quit]
hspak has joined #zig
mmohammadi9812 has quit [Ping timeout: 240 seconds]
donniewest has quit [Quit: WeeChat 2.9]
frmdstryr has joined #zig
skuzzymiglet has quit [Ping timeout: 260 seconds]
<andrewrk> TheLemonMan, stage1 detects based on `zig version` only now, which has the git commit in it but no dirty changes. I did this thing for `zig build` but didn't even try to convert it to cmake: https://github.com/ziglang/zig/blob/7bc95316982da0da6fd5d935645972fe5464e46e/build.zig#L118-L129
<andrewrk> oh, sorry, responded before I read your second message
<andrewrk> sure we can disable that
<andrewrk> caching is a big topic, I'm having trouble answering the --cache off question quickly. I agree that hacking on the compiler right now is more annoying than necessary due to caching
tane has quit [Quit: Leaving]
Akuli has quit [Quit: Leaving]
<andrewrk> TheLemonMan, FYI here's my current plan for the short term: * fuck with the cmake script to rebuild zig1.o & relink stage1 zig binary before running * move on to other release related stuff
<TheLemonMan> hah good luck with the cmake part
<TheLemonMan> just saw your last update on #6830, I'm confused as well
<TheLemonMan> there's no trace of x87 use, I wonder what the hell is wrong then
<TheLemonMan> ghosts? evil spirits?
<earnestly> Halloween
<TheLemonMan> makes sense
<andrewrk> I feel ok working around it because once https://github.com/ziglang/zig/issues/5246 is done, whatever this mysterious bug is will be deleted and irrelevant
mmohammadi9812 has joined #zig
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<pixelherodev> On that note, I need to get back to work on the header generation tomorrow
<frmdstryr> Stupid question... when I use @breakpoint() and run in the debugger how do I make it continue past the breakpoint? Pressing 'n' just repeats halting forever and 'c' re-enters the trap
<andrewrk> I'm not actually sure. Sometimes @breakpoint() actually confuses debuggers. That might actually be a question to ask in the channel for the debugger you are usingf
<andrewrk> the question is how to go to the next instruction after a trap instruction which was compiled ahead of time into the binary
<pixelherodev> On GDB, I think you can manually "set PC" or something like that?
<pixelherodev> I don't remember the "proper" way to do it :P
CmdrCrisp has joined #zig
isolier1 has joined #zig
isolier has quit [Ping timeout: 272 seconds]
isolier1 is now known as isolier
ur5us has quit [Ping timeout: 260 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
<dominikh> with extern functions, is it possible to specify different names for the external name and how to call it in zig? or should I just write wrapper functions? context is writing idiomatic C bindings