ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
<Raito_Bezarius> maybe the build API produces PE
<mikdusan> `zig build --verbose --verbose-link`
<Raito_Bezarius> /nix/store/qq22kqs0rmyc13wa6syxn3cqlynbvi71-zig-0.7.1/bin/zig build-exe /home/raito/dev/projects/ens/a0/src/kernel/main.zig /home/raito/dev/projects/ens/a0/src/kernel/arch/x86/platform.s /home/raito/dev/projects/ens/a0/src/kernel/arch/x86/vmem.s /home/raito/dev/projects/ens/a0/src/kernel/arch/x86/gdt.s --verbose-link --cache-dir /home/raito/dev/projects/ens/a0/zig-cache --global-cache-dir
<Raito_Bezarius> /home/raito/.cache/zig --name BootX64 -target x86_64-uefi --enable-cache
<Raito_Bezarius> sorry for the long lines
<mikdusan> oh geez I apologize, it was creating different named files
<Raito_Bezarius> no worries :)
<mikdusan> when gdb loads the .efi, what "file type" does it identify?
<Raito_Bezarius> pei iirc
<Raito_Bezarius> pretty sure it was pei-x86-64
<mikdusan> so that's a remote attach error. I don't have win experience. what is hosting the debug executable?
<Raito_Bezarius> qemu
<Raito_Bezarius> or I misunderstood your question
<mikdusan> so qemu then would have to serve according to gdb remote protocol right?
<Raito_Bezarius> correct
<Raito_Bezarius> either this
<Raito_Bezarius> either it's OVMF's gdbstub
<Raito_Bezarius> because I didn't boot any operating system yet
<Raito_Bezarius> I'm still in UEFI boot phase
<mikdusan> so here is a blurb about that attach error:
<mikdusan> qGetTIBAddr:thread-id: Fetch address of the Windows OS specific Thread Information Block
<Raito_Bezarius> wut
<Raito_Bezarius> so I guess here gdb is trying to overdetect
<mikdusan> like it doesn't understand this is uefi?
<Raito_Bezarius> I can only see this
<Raito_Bezarius> but everything looks like to assume this works just fine
<mikdusan> decent qemu version?
<Raito_Bezarius> 5.2.0
<Raito_Bezarius> afaik it's the latest stable
<mikdusan> yeah that's latest
<mikdusan> this page talks about a `objcopy --target=pei-x86_64` option maybe worth a shot:
<Raito_Bezarius> let me try
<Raito_Bezarius> invalid bfd target
<Raito_Bezarius> (failure at objcopy)
<Raito_Bezarius> is there a way to perform coercion to bool from u8?
<Raito_Bezarius> @bitCast ?
<Raito_Bezarius> ah maybe @truncate
<Raito_Bezarius> hm not really
<g-w1> @boolToInt(b)
<g-w1> you can then upcast that to u8
<Raito_Bezarius> I wanted the inverse
<Raito_Bezarius> u8 → bool
<Raito_Bezarius> but I guess this is just "!= 0"
cole-h has quit [Ping timeout: 265 seconds]
dimenus has quit [Quit: WeeChat 3.1]
brzg has joined #zig
<g-w1> ah yeah
nvmd has quit [Quit: Later nerds.]
mattnite has joined #zig
brzg has quit [Quit: leaving]
<mattnite> hey I'm getting a segfault when I try to run zig cc on a hello world C program. I haven't dug into it yet but it's coming from linkWithLLD, anyone see this before?
<g-w1> what zig version?
<mattnite> master
<mattnite> I also forgot to mention that this is a stage 2 build
<g-w1> can you post a backtrace please?
<g-w1> does this happen with downloaded tarball, or only with built from source?
<Raito_Bezarius> does replacing the default panic handler makes assert working out of the box?
<g-w1> assert just calls unreachable, so i should iirc
<mattnite> built from source brb
<Raito_Bezarius> thanks, also: to replace it, should I only expose panic in main.zig?
<g-w1> expose it in the root file of the compilation
<Raito_Bezarius> I have some "const panic = serial.panic;" but it does not seem to be called in my root file of compilation (i.e; main.zig)
<g-w1> pub const
<Raito_Bezarius> good catch, thanks!
<g-w1> how did you build zig?
<mattnite> just following docs with `zig build --prefix $(pwd)/stage2 -Denable-llvm`
<g-w1> read very carefully :D
<g-w1> you are trying to use stage2, but it is not ready yet :P
<g-w1> just a `make` will do and produce a nice `./zig` binary
<mattnite> I'm trying to contribute to stage 2
<g-w1> then zig cc wont work im pretty sure 🤔
<g-w1> what are you trying to contribute
<mattnite> parsing error messages from clang
<g-w1> ah, in this case, you still dont wanna build stage2, stage1 will work :)
<g-w1> thats a really nice feature. it will help me with if done
<g-w1> you can test with `make&&./zig build-exe (NOT cc) test.c`
<g-w1> if you do cc, it will just pass through to clang, i was chatting with andrewrk about this exact thing a few days ago
<g-w1> if it passes through to clang, clang will just do the error messages
<g-w1> it should show this:
<mattnite> yeah out of the contributor friendly tickets it seemed like it would benefit compiler development the most
<mattnite> and that's awesome that I can just use stage 1
<g-w1> it will make the colored error messages not special-case c
<mattnite> thanks for the help, I think that's exactly what I need to get started here
<g-w1> no problem! happy to help
<Raito_Bezarius> hm
<Raito_Bezarius> if I know start & end ptr
<Raito_Bezarius> can I turn it into a []X ?
<Raito_Bezarius> well I could just @ptrCast([]X, start) I guess
<andrewrk> Raito_Bezarius, it's ackward to do that because this accepted proposal has not yet been implemented:
<andrewrk> *awkward
<Raito_Bezarius> I see
<g-w1> Raito_Bezarius: a []X needs a len too
<Raito_Bezarius> yeah so I'm not sure how to do it
<Raito_Bezarius> I have the __debug sections of DWARF
<Raito_Bezarius> and I'd like to feed it into DwarfInfo structure
<Raito_Bezarius> but it eats []const u8
<Raito_Bezarius> and I only have start/end ptrs
<g-w1> i would cast the pointers to ints, subtract them then do const slice: []X = .{ .ptr = start, .len = subtracted }
<g-w1> s/ints/usizes
<andrewrk> start[0..(@ptrToInt(end) - @ptrToInt(start))/@sizeOf(Elem)]
<Raito_Bezarius> oh I didn't know I could built slices like this!
<g-w1> oh wait, you cant use the .{ } syntax, but you can just set it to undefined, then do slice.ptr = ... slice.len = ...
<Raito_Bezarius> yeah just got the error
<Raito_Bezarius> so I ended up using andrewrk's solution :)
<Raito_Bezarius> thanks for the alternative though g-w1 !
<g-w1> i feel like the .{ } syntax should work as slices are just structs 🤔
<g-w1> andrewrk: that stdlib stuff looks sick! Im working on removing frontend zir support right now to address the TODO
<g-w1> should i also delete -femit-zir at the same time, or are you keeping that in as a TODO?
a_chou has joined #zig
<g-w1> wow, stage2 is really coming along
<mattnite> yeah I figured now would be the time to jump in while there's still work to be done
<mattnite> compiler FOMO
<g-w1> exactly i can't let other people steal all those easy TODOs
<andrewrk> mattnite, there's another fun one I forgot to mention: make the C backend lower add,addmul,sub,submul better for signed/unsigned ints
<andrewrk> there are 2 fun problems to solve: 1. implement wrapping integer arithmetic for signed ints in C, and 2. implement non-wrapping (UB) integer arithmetic for unsigned ints in C
<andrewrk> g-w1, mm go ahead and delete it
<g-w1> ok, ill add that to my pr :)
<andrewrk> yagni
<mattnite> hmm that does sound hella fun
<g-w1> yagni means we wont need emit-zir?
<andrewrk> for (2) you would think that you could just use +, -, like normal, and you'd be right, but we can do better, by communicating to the optimizer that wrapping would be UB :D
<mattnite> might jump on that one first since I think it would be a quicker win
<andrewrk> g-w1, yes
<g-w1> ok thanks
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klltkr has joined #zig
klltkr has quit [Client Quit]
<andrewrk> thanks
<g-w1> ahh just looked up yagni, thought it was some slang, but it is actually some programming thing. til
aerona has quit [Quit: Leaving]
teratorn has joined #zig
<andrewrk> :)
<andrewrk> yagni is a programming super power
earnestly has quit [Ping timeout: 265 seconds]
<g-w1> working on private decls rn
<g-w1> its fun to see the tests fail with the correct error
<g-w1> decl.is_pub gets set wrong somewhere
waleee-cl has quit [Quit: Connection closed for inactivity]
<g-w1> ah seems for file scopes it is always false
<g-w1> wait nvm, but something is wrong
a_chou has quit [Remote host closed the connection]
CodeSpelunker has joined #zig
<andrewrk> there are a few instances of // TODO check is_pub
<g-w1> yeah, doing those, getting a panic here: /home/jacob/dev/zig/src/test.zig:203:38: 0x2ebff0 in Case.addError (test) const msg =[1..]; // skip over the space at end of "error: "
<g-w1> see anything wrong with this? &.{"2:25: error: 'print' is private"},
<g-w1> i dont think errors have been tried with multi-file, maybe that is the problem?
<g-w1> ooh, seems like a miscompilation type of thing where it compiles with invalid types
<andrewrk> missing a colon in the front
<andrewrk> can you make the test harness print a better message?
<g-w1> oh interesting, then i guess &[_][]const u8 is not needed
<g-w1> i can update the test harness, yes
<andrewrk> ":2:25: error: ..."
<g-w1> ok, private errors support added
<g-w1> i reabsed on stage2-start getting this? /home/jacob/dev/zig/src/test.zig:622:34: error: missing field: 'namespace_hash'. interestinly only on ./zig build test-stage2, but not on `ninja` 🤔
<g-w1> ahh it has not been tested with the test runner lol
<g-w1> lemme see if i can fix that
<andrewrk> g-w1, just pull again
<g-w1> ooh nice.
CodeSpelunker has quit [Quit: CodeSpelunker]
daex_ has quit [Ping timeout: 240 seconds]
<g-w1> I have private decl pr. I think it is not too anti-dry since it is only repeated 2 times.
daex has joined #zig
<mattnite> andrewrk by optimizer are we talking a zig compiler construct, or whatever C compiler this is fed into?
<andrewrk> whatever C compiler it is fed into
<andrewrk> mainly gcc or clang
<andrewrk> I wish gdb knew about zig methods so I could debug print type names
<andrewrk> mikdusan, it would be nice if we had a way to edit start.zig without breaking the stack trace tests
<andrewrk> right now if any lines get bumped up or down test-stack-traces fails until you update the test case line numbers
sord937 has joined #zig
bitmapper has quit [Quit: Connection closed for inactivity]
v0idifyy has joined #zig
v0idify has quit [Ping timeout: 240 seconds]
Pixeli has joined #zig
Pixeli has quit [Quit: Leaving]
Pixeli has joined #zig
Pixeli has quit [Client Quit]
Pixeli has joined #zig
Pixeli has quit [Ping timeout: 268 seconds]
<mikdusan> yeah let me thing about a solve, maybe change code to only care about source.zig
<andrewrk> real close to start.zig, @import("builtin"), @import("std") working. just need to implement `usingnamespace`
cole-h has joined #zig
spyjetfayed has quit [Quit: Konversation terminated!]
aerona has joined #zig
daex has quit [Ping timeout: 246 seconds]
daex has joined #zig
mmurd has quit [Ping timeout: 240 seconds]
mmurd has joined #zig
motersen has quit [Remote host closed the connection]
motersen has joined #zig
Anzh has quit [Ping timeout: 260 seconds]
mattnite has quit [*.net *.split]
Raito_Bezarius has quit [*.net *.split]
notzmv has quit [*.net *.split]
watzon has quit [*.net *.split]
kwilczynski has quit [*.net *.split]
meinside has quit [*.net *.split]
fcambus has quit [*.net *.split]
r0bby has quit [*.net *.split]
tracernz has quit [*.net *.split]
eddyb[legacy] has quit [*.net *.split]
Biolunar has quit [*.net *.split]
skuzzymiglet has quit [*.net *.split]
dutchie has quit [*.net *.split]
bens has quit [*.net *.split]
M-ou-se has quit [*.net *.split]
Ekho has quit [*.net *.split]
vegai has quit [*.net *.split]
teratorn has quit [*.net *.split]
kurufu has quit [*.net *.split]
commander has quit [*.net *.split]
g-w1 has quit [*.net *.split]
marler8997 has quit [*.net *.split]
drakonis has quit [*.net *.split]
Miaourt has quit [*.net *.split]
Piraty has quit [*.net *.split]
suhashebbar[m] has quit [*.net *.split]
betawaffle has quit [*.net *.split]
Wolf480pl has quit [*.net *.split]
fengb has quit [*.net *.split]
superdump has quit [*.net *.split]
motersen has quit [*.net *.split]
v0idifyy has quit [*.net *.split]
sord937 has quit [*.net *.split]
nycex- has quit [*.net *.split]
euantorano has quit [*.net *.split]
ziguana[m] has quit [*.net *.split]
cepheus has quit [*.net *.split]
Sumera[m] has quit [*.net *.split]
dom96 has quit [*.net *.split]
blueberrypie has quit [*.net *.split]
procnto has quit [*.net *.split]
dingenskirchen has quit [*.net *.split]
shachaf has quit [*.net *.split]
Nazral has quit [*.net *.split]
haliucin1s has quit [*.net *.split]
thaumavorio has quit [*.net *.split]
meatcar has quit [*.net *.split]
redj has quit [*.net *.split]
jjsullivan has quit [*.net *.split]
noam has quit [*.net *.split]
yeti has quit [*.net *.split]
waffle_ethics has quit [*.net *.split]
daurnimator has quit [*.net *.split]
fireglow has quit [*.net *.split]
jmiven has quit [*.net *.split]
oats has quit [*.net *.split]
lanodan has quit [*.net *.split]
mokafolio has quit [*.net *.split]
dok has quit [*.net *.split]
Yardanico has quit [*.net *.split]
jsb has quit [*.net *.split]
kameliya[m] has quit [*.net *.split]
backwhack has quit [*.net *.split]
nickster has quit [*.net *.split]
rowbee has quit [*.net *.split]
siraben has quit [*.net *.split]
drvirgilio has quit [*.net *.split]
signop has quit [*.net *.split]
st4ll11 has quit [*.net *.split]
clee has quit [*.net *.split]
JoshAshby has quit [*.net *.split]
kevinsjoberg has quit [*.net *.split]
Nypsie has quit [*.net *.split]
raggi has quit [*.net *.split]
daex has quit [*.net *.split]
hspak has quit [*.net *.split]
techtirade has quit [*.net *.split]
osa1 has quit [*.net *.split]
ifreund has quit [*.net *.split]
txdv has quit [*.net *.split]
pjz has quit [*.net *.split]
benaiah has quit [*.net *.split]
dongcarl has quit [*.net *.split]
blackpawn has quit [*.net *.split]
detha has quit [*.net *.split]
grive has quit [*.net *.split]
vent has quit [*.net *.split]
companion_cube has quit [*.net *.split]
johnLate has quit [*.net *.split]
Ankhers has quit [*.net *.split]
l1x has quit [*.net *.split]
Cadey has quit [*.net *.split]
CommunistWolf has quit [*.net *.split]
GreaseMonkey has quit [*.net *.split]
tdeo has quit [*.net *.split]
dputtick has quit [*.net *.split]
tcsc has quit [*.net *.split]
larme has quit [*.net *.split]
earl has quit [*.net *.split]
lonjil has quit [*.net *.split]
nikki93 has quit [*.net *.split]
lqd has quit [*.net *.split]
tav has quit [*.net *.split]
cbix has quit [*.net *.split]
idxu has quit [*.net *.split]
rbino has quit [*.net *.split]
flokli has quit [*.net *.split]
urluck has quit [*.net *.split]
mht has quit [*.net *.split]
rom1504 has quit [*.net *.split]
mipri has quit [*.net *.split]
Thalheim has quit [*.net *.split]
yrashk has quit [*.net *.split]
jeregrine has quit [*.net *.split]
mixi has quit [*.net *.split]
leah2 has quit [*.net *.split]
jcmdln has quit [*.net *.split]
leon-p has quit [*.net *.split]
tm-exa_ has quit [*.net *.split]
Stephie has quit [*.net *.split]
casaca has quit [*.net *.split]
Ristovski has quit [*.net *.split]
sjums has quit [*.net *.split]
dreda has quit [*.net *.split]
cole-h has quit [*.net *.split]
Snetry has quit [*.net *.split]
ncon has quit [*.net *.split]
terinjokes has quit [*.net *.split]
isolier has quit [*.net *.split]
amk has quit [*.net *.split]
ave_ has quit [*.net *.split]
wilsonk has quit [*.net *.split]
kragacles has quit [*.net *.split]
nullheroes has quit [*.net *.split]
Nilium has quit [*.net *.split]
mmurd has quit [*.net *.split]
m4r35n357 has quit [*.net *.split]
SimonNa has quit [*.net *.split]
Techcable has quit [*.net *.split]
factormystic has quit [*.net *.split]
lemmi has quit [*.net *.split]
braket has quit [*.net *.split]
Amun_Ra has quit [*.net *.split]
s-ol has quit [*.net *.split]
jaredmm has quit [*.net *.split]
V has quit [*.net *.split]
xentec has quit [*.net *.split]
mikdusan has quit [*.net *.split]
knebulae has quit [*.net *.split]
proteusguy has quit [*.net *.split]
halbeno has quit [*.net *.split]
adsr has quit [*.net *.split]
[RMS] has quit [*.net *.split]
mschwaig has quit [*.net *.split]
jicksaw has quit [*.net *.split]
cow-orker has quit [*.net *.split]
nore has quit [*.net *.split]
rinfo has quit [*.net *.split]
via has quit [*.net *.split]
Witcher01 has quit [*.net *.split]
sh4rm4^bnc has quit [*.net *.split]
m6w6 has quit [*.net *.split]
chivay has quit [*.net *.split]
lohengrin has quit [*.net *.split]
doublej41 has quit [*.net *.split]
DarkUranium has quit [*.net *.split]
crimson_penguin has quit [*.net *.split]
AtomToast has quit [*.net *.split]
ugla has quit [*.net *.split]
kshlm has quit [*.net *.split]
blackbeard420 has quit [*.net *.split]
mgxm has quit [*.net *.split]
letoram has quit [*.net *.split]
leibniz[m] has quit [*.net *.split]
rtpg has quit [*.net *.split]
Flaminator has quit [*.net *.split]
sm2n has quit [*.net *.split]
plumm has quit [*.net *.split]
semarie has quit [*.net *.split]
gracefu has quit [*.net *.split]
andrewrk has quit [*.net *.split]
linuxgemini has quit [*.net *.split]
neptunepink has quit [*.net *.split]
ShockTohp has quit [*.net *.split]
so_ has quit [*.net *.split]
aerona has quit [*.net *.split]
racoon has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
lunamn has quit [*.net *.split]
di-wu has quit [*.net *.split]
kushalp has quit [*.net *.split]
Snektron has quit [*.net *.split]
stilbruch has quit [*.net *.split]
mjsir911 has quit [*.net *.split]
Tharro has quit [*.net *.split]
tughi has quit [*.net *.split]
justin_smith has quit [*.net *.split]
cCCCCcccccCCc has quit [*.net *.split]
pafmaf[m] has quit [Ping timeout: 276 seconds]
bitonic has quit [Ping timeout: 276 seconds]
mmurd has joined #zig
xentec has joined #zig
m4r35n357 has joined #zig
tm-exa has joined #zig
nycex- has joined #zig
motersen has joined #zig
sord937 has joined #zig
v0idifyy has joined #zig
eddyb[legacy] has joined #zig
betawaffle has joined #zig
rtpg has joined #zig
eddyb[legacy] has quit [Excess Flood]
betawaffle has quit [Excess Flood]
eddyb[legacy] has joined #zig
betawaffle has joined #zig
r0bby has joined #zig
kwilczynski has joined #zig
rtpg has joined #zig
betawaffle has joined #zig
eddyb[legacy] has joined #zig
eddyb[legacy] has quit [Changing host]
betawaffle has quit [Changing host]
rtpg has quit [Changing host]
plumm has joined #zig
tnorth_ has joined #zig
FireFox317_ has joined #zig
FireFox317_ has quit [Client Quit]
kshlm has joined #zig
ugla has joined #zig
cepheus has joined #zig
ziguana[m] has joined #zig
bitonic has joined #zig
leibniz[m] has joined #zig
siraben has joined #zig
kameliya[m] has joined #zig
pafmaf[m] has joined #zig
Sumera[m] has joined #zig
suhashebbar[m] has joined #zig
superdump has joined #zig
fengb has joined #zig
Snektron has joined #zig
AtomToast has joined #zig
watzon has joined #zig
m6w6 has joined #zig
lohengrin has joined #zig
sh4rm4^bnc has joined #zig
chivay has joined #zig
DarkUranium has joined #zig
crimson_penguin has joined #zig
doublej41 has joined #zig
earnestly has joined #zig
klltkr has joined #zig
m4r35n357 has quit [Ping timeout: 240 seconds]
m4r35n357 has joined #zig
retropikzel has joined #zig
Anzh has joined #zig
waleee-cl has joined #zig
Pixeli has joined #zig
bndbsh has joined #zig
pretty_dumm_guy has joined #zig
Pixeli has quit [Ping timeout: 240 seconds]
paulgrmn has joined #zig
Anzh has quit [Ping timeout: 240 seconds]
Anzh has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anzh has quit [Read error: Connection reset by peer]
Anzh has joined #zig
Anzh has quit [Ping timeout: 265 seconds]
m4r35n357 has quit [Ping timeout: 252 seconds]
m4r35n357 has joined #zig
jaens[m] has joined #zig
mattnite has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
Akuli has joined #zig
dyeplexer has joined #zig
<Raito_Bezarius> given x and a mask, is there an easy way to do something like bool(x & mask) which is the bitwise and which returns true if all(a[i] & b[i]) and false otherwise?
tnorth_ has quit [Ping timeout: 260 seconds]
waleee-cl has joined #zig
<ShockTohp> do a[] and b[] contain distinc x's and masks or are you trying to get if x == mask bitwise?
<Raito_Bezarius> I'm trying to do in C "(x & mask) ? then : else" where x and mask are the same length
<fengb> `if ((x & mask) != 0) success else failure`
<Raito_Bezarius> alright
<Raito_Bezarius> thanks!
Pixeli has joined #zig
hiato has joined #zig
TheLemonMan has joined #zig
hiato has left #zig ["Killed buffer"]
hiato has joined #zig
<andrewrk> mikdusan, I really appreciate your follow up work regarding llvm bugs
<mikdusan> no problemo! an aside, I'm overhauling stack_traces to reduce chronic update requirements
<andrewrk> wonderful
<TheLemonMan> speaking of llvm bugs there's a bit of confusion wrt #6408, there's a mixup with #8106
<mikdusan> yeah I apologize for really confusing 6408. tried to clean it up as best as possible
<TheLemonMan> and I can't reproduce #8429 with llc (nor clang)
<g-w1> andrewrk: you merged the branch, does this mean that you got usingnamespace?
<andrewrk> g-w1, no, I just wanted to merge master
<g-w1> ah nice :)
<mikdusan> TheLemonMan: with assert enabled?
<andrewrk> TheLemonMan, I believe that was rc4, debug build
<TheLemonMan> yup
notzmv has joined #zig
<mikdusan> afk for bit
<TheLemonMan> are you able to trigger that with llc?
Anzh has joined #zig
<mikdusan> nope.
<TheLemonMan> :O
<andrewrk> lemme try
<g-w1> andrewrk: was removing the : after error and bolding the message on purpose?
<andrewrk> the ":" no, but the bolding is, check stage1's errors
<g-w1> ok, ill check
<g-w1> ah i see, I think its fine to remove the :
<andrewrk> nah we want to match the format because it's a recognized format that third tooling will parse
<andrewrk> *third party
<g-w1> ah yeah, like vim make mode and emacs compilation mode
<g-w1> ill make a fixup pr then
<andrewrk> i got it
<g-w1> also, i think theres some sort of deadlock by merging the 2 branches :(
<g-w1> pub fn main() void {} <- zig build-exe test.zig -fno-LLVM
<g-w1> const held = stderr_mutex.acquire();
<g-w1> in std.debug.print
<g-w1> yeah its stuck in __lll_lock_wait
<andrewrk> is it in "plain =>" ?
<andrewrk> fixed
<g-w1> oh thats actually cool that it works like that
<g-w1> it didn't prevent a bug in this case, but could have
<andrewrk> TheLemonMan, I wasn't able to get it to repro with llc but we are hitting it in zig_llvm.cpp
<andrewrk> I wonder what clang is doing that llc is not
<andrewrk> mm maybe the cpu features
<g-w1> you forgot a try stderr.print and i think you probably want to reset the tty bold before going to ttyconf.setColor(stderr, color);
<andrewrk> huh did I forget to build?
<andrewrk> whoops
<g-w1> unless error: is supposed to be bold
<TheLemonMan> hmm, try adding `-debug-pass=Arguments` to the clang invocation, that'll dump the set of optimization passes it uses
<andrewrk> bold and color are exclusive, but also if you look closely the color is also bold
<g-w1> ok, interesting
<andrewrk> TheLemonMan, does llc accept -target-feature args somehow?
LewisGaul has joined #zig
<TheLemonMan> andrewrk, -mattr
<andrewrk> TheLemonMan, sorry I can't get llc to repro it
<andrewrk> TheLemonMan, idk why you can't repro it, the assertion trips in valgrind without any UB happening
<andrewrk> are you suuuuuuure assertions are enabled? :)
<TheLemonMan> yeah, it's the usual debug build :(
<andrewrk> very strange. we need scooby doo & the gang
<mikdusan> fyi llc takes -mtriple, is that equiv to clang's -target ?
<mikdusan> but yeah second time I've seen llc not quite in sync with reproducing things
tdeo has joined #zig
<g-w1> andrewrk: there is another case of decl.is_pub being set wrong, std.builtin is private, and in gdb it says decl.is_pub is false, ill try to debug this :)
<TheLemonMan> well, somebody is already on that, let's move on
<andrewrk> g-w1, thanks. I'm working on usingnamespace
<TheLemonMan> I have a patch for the mips problem with lld but it's definitely not release material
<andrewrk> ah bummer
<TheLemonMan> and it's not really a lld regression, our test bins became bigger in between releases and started triggering this problem
<andrewrk> ahh I see
tdeo has quit [Remote host closed the connection]
<TheLemonMan> ELF linkers are all fun and games until you start supporting MIPS heh
<g-w1> whats so bad about mips?
<mikdusan> bigger is probably what #6408 is about too. I think our std.zig passed a threshold
<TheLemonMan> g-w1, it's full of quirks and slightly different ways of doing the same thing
<g-w1> interesting
<mikdusan> mips, mipsel, mips64, mips64el, oh my. and speaking of archs, el=endian_little except when ppc64le then it's le=little_endian
hiato has quit [Quit: rcirc on GNU Emacs 27.1]
Pixeli has quit [Ping timeout: 240 seconds]
<TheLemonMan> there's also the -eb/-be pair of suffixes
<mikdusan> yeah thanks for piling on :P
<mikdusan> amd wtf was intel thinking making `ia64` mean itanium. they did it just so we couldn't have a nice ia32 vs ia64
<mikdusan> s/amd/and/
<TheLemonMan> that's because AMD introduced x86_64 while Intel was developing Itanium
<TheLemonMan> rip Itanium (and PA-RISC)
<mikdusan> gawd I remember $20K hppa workstation days. and c-front based c++ compiler. just no!
hiato has joined #zig
tdeo has joined #zig
dyeplexer has quit [Remote host closed the connection]
<g-w1> now --watch is actually becoming useful! I think we might need some aliases, for example u for update and <CR> to do the previous command as it is annoying to re-type
nvmd has joined #zig
aerona has joined #zig
<andrewrk> sounds good :)
<andrewrk> the ultimate flex is going to be IDE integration with --watch
Anzh has quit [Ping timeout: 260 seconds]
<g-w1> it seems to me that --watch regressed with the recent stuff too
<g-w1> ill make an issue with a repro
cole-h has joined #zig
<g-w1> ok it was a 1 line fix:
<jeregrine> is there a issue or thread I should be following on mac arm support in zig?
<jeregrine> I know i can build from source but a tool I want to use (zigler in elixir) uses release build zips.
<andrewrk> jeregrine, it's pretty well supported, so just look for issues labeled "os-macos" or "arch-aarch64"
<jeregrine> k I will probably need to update the tool to let me build from source or let me use the "system" version of it.
<andrewrk> ah right mikdusan did you have a plan for getting the aarch64-macos builds to the download page?
<mikdusan> andrewrk: there was a weird thing about our scripts for sending json and uploading 2 copies, 1 with seemingly bogus name so I need to pick your brain. but yeah, the tarball is being produced already so shouldn't be too much to put it on
<mikdusan> i have to run out for an appointment will ping you when i get back
<andrewrk> cheers
<jeregrine> nice!
<g-w1> ok, got a repro for the watch issue: . I have a feeling it will be solved with usingnamespace, though not sure
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<andrewrk> g-w1, it might be nice to submit such an issue in the form of a new test case
<andrewrk> our stage2 test cases express updates
<andrewrk> this terminal dump is kind of hard to read
<g-w1> ah yeah sorry, ill add a test case ;)
<g-w1> can cases @import("std") yet?
<g-w1> i can try to add that to the test harness if not
<g-w1> in the meantime i updated the terminal dump to be a little more readable
blackpawn has joined #zig
<g-w1> ahh adding a failing test case wasn't hard, added that to the issue
<g-w1> i think this exact error will go away with usingnamespace, but the idea will stay
Anzh has joined #zig
<g-w1> does deleteDecl need to delete the decls it references too? im not that antiquated with this part of the compiler
Nhanderu has joined #zig
hiato has quit [Remote host closed the connection]
<andrewrk> g-w1, not yet, I'm trying to add the very first passing test case that does @import("std")
<andrewrk> no, deleteDecl deletes only 1 decl, however it will populate deletion_set as appropriate for any dependencies
<andrewrk> grep for deletion_set and read all the surrounding comments for more context :)
<g-w1> ok, thanks
<andrewrk> note that there are only 2 callsites to deleteDecl
sord937 has quit [Quit: sord937]
bitmapper has joined #zig
Nhanderu has quit [Ping timeout: 240 seconds]
LewisGaul has quit [Quit: Connection closed]
Anzh has quit [Read error: Connection reset by peer]
Anzh has joined #zig
Anzh has quit [Read error: Connection reset by peer]
Anzh has joined #zig
xackus has joined #zig
Anzh has quit [Read error: Connection reset by peer]
Anzh has joined #zig
Akuli has quit [Quit: Leaving]
<andrewrk> I bit off a lot to chew today, let's see if I can handle it
<g-w1> what did you do besides the usingnamespace?
<andrewrk> proper outdated file detection on update (of all files in the entire compilation), fixing the mixups between Scope.File and Scope.Container, making the main entry point be std.zig not the root source file (this is correct and is what stage1 does), implement usingnamespace
<andrewrk> these things are all related
<andrewrk> uh and adding support for other files to compile error test cases in the test harness (e.g. "foo.zig:1:5: note: declared here")
<g-w1> ah yea, they are all related in subtle ways. i assume the first one will fix the bug I found.
<Raito_Bezarius> given a value v: u32, if I want to get a [4]u8, can I just do @bitCast ?
<fengb> If you want native endian bytes, yeah that's fine
<Raito_Bezarius> also, I'm wondering where does Zig writes the metadata for the PE files ; I think some fields are wrong with respect to UEFI specs (e.g. architecture, etc.)
paulgrmn_ has joined #zig
paulgrmn has quit [Ping timeout: 240 seconds]
<andrewrk> that would be in LLD
<Raito_Bezarius> so it's a linking phase?
<Raito_Bezarius> it's at*
<andrewrk> yeah that's where the PE metadata is written
<Raito_Bezarius> alright, thank you!
bndbsh has quit [Quit: Connection closed for inactivity]
<Raito_Bezarius> if I do something like this:
<Raito_Bezarius> var glyph: [*]const u8 = (@bitCast([8]u8, @as(u64, 0xb9a5b9817e000000)))[0..];
<Raito_Bezarius> if I read beyond the actual size glyph, I can get UB right?
paulgrmn_ has quit [Ping timeout: 268 seconds]
<andrewrk> right. that particular construct is going to become a compile error according to the latest spec (no taking address of temporary like that)
<andrewrk> but same idea if you stuffed it into a const and then used &
<fengb> I can't tell if this is a bug. I'm trying to add support for powerpc and inside `posixCallMainAndExit`, there's a store ($SP+4) but no decrements
<fengb> So it's clobbering argv[0]
<fengb> Do I need to manually decrement the stackpointer?