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/
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #zig
<Raito_Bezarius> hm
<Raito_Bezarius> I now have an ELF with *only* debug symbols and no code :D
sm2n has quit [Excess Flood]
sm2n has joined #zig
<g-w1> lol
<Raito_Bezarius> is there something specific regarding entrypoints when using custom os.system in the root of my source file?
<Raito_Bezarius> hm maybe I need a linker script
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
xackus has quit [Ping timeout: 240 seconds]
cole-h has quit [Ping timeout: 268 seconds]
pfg_ has joined #zig
cole-h has joined #zig
leon-p has quit [Quit: leaving]
<pfg_> is there any way to specify -isysroot with zig? I'm trying to build an ios app but it needs `-framework UIKit` which needs `-isysroot $(xcrun --sdk iphonesimulator --show-sdk-path)` otherwise it's not found.
arkurious has quit [Quit: Leaving]
earnestly has quit [Ping timeout: 240 seconds]
<pfg_> `has_sysroot` seems to automatically use `-isysroot $system_sdk_path` instead of it being possible to specify a custom sysroot
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
mikdusan has joined #zig
sm2n_ has quit [Read error: Connection reset by peer]
sm2n has joined #zig
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
hiljusti has quit [Ping timeout: 260 seconds]
sm2n_ has quit [Ping timeout: 252 seconds]
sm2n has joined #zig
sm2n has quit [Ping timeout: 252 seconds]
gpanders has quit [Quit: ZNC - https://znc.in]
gpanders has joined #zig
Kingreil has quit [Quit: Kingreil]
gpanders has quit [Quit: ZNC - https://znc.in]
eyepatchOwl has joined #zig
<eyepatchOwl> How do I coerce a slice to a C string? e.g. https://zig.godbolt.org/z/5hTfP563s fn opendir(path: [*c]const u8) void {}
<eyepatchOwl> var p: []const u8 = "abc";
<eyepatchOwl> export fn f() void {
<eyepatchOwl> opendir(p);
<eyepatchOwl> }
gpanders has joined #zig
<g-w1> p.ptr, also please use a pastebin next time
<eyepatchOwl> I haven't found anyting in std.c, std.cstr, or std.mem. I intended for godbolt to be the pastebin, but wanted to save a click.
<eyepatchOwl> Sorry about the spam, also getting used to a new client.
<g-w1> clbin.com works from the cli, also p.ptr ;)
<eyepatchOwl> p.ptr works. Thanks!
zenkuro has quit [Ping timeout: 252 seconds]
zenkuro has joined #zig
ur5us_ has quit [Ping timeout: 268 seconds]
sm2n has joined #zig
ur5us_ has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
ur5us__ has joined #zig
ur5us_ has quit [Ping timeout: 250 seconds]
novakane has joined #zig
factormystic has quit [Read error: Connection reset by peer]
factormystic has joined #zig
ur5us__ has quit [Ping timeout: 252 seconds]
marler8997 has joined #zig
pfg_ has quit [Quit: Leaving]
<marler8997> I've got a weird discrepancy on win32 between the size of a struct
<marler8997> in zig, if it's "packed" it's 18 bytes, which is the correct size based on both what C++ says and the fact that it only works at runtime if it's 18 bytes. But when I mark it as "extern struct", it's 20 bytes
<marler8997> I'm generating all win32 structs using "extern struct". I'm not sure if this is an exception, or if they're all actually supposed to be packed?
<daurnimator> marler8997: zig @sizeOf is not the actual size; it's how large it would be in an array. more like `max(@realSize(), @alignOf())`
<marler8997> using "extern struct" changes the layout in such a way that windows does not recognize it, it's only when I use "packed" that it accepts it
<marler8997> the WAVEFORMATEX struct is the 3rd parameter, when I use "extern struct" I get error 32 (WAVEERR_BADFORMAT)
<marler8997> oh interesting, when I copy the struct definition to my local file in C++, the sizeof goes to 20! So the header must be using some sort of alignment directives somewhere
<marler8997> I don't really see any alignment directives around it...weird
<marler8997> wow, I can copy the entire header and it still shows sizeof is 20! there's something really wonky going on here
<marler8997> found it, there's a "#pragma pack(1)" in mmsystem.h around the location where it include mmeapi.h...wow
sord937 has joined #zig
a_chou has joined #zig
<marler8997> fyi, I realized the metadata does include a "packing size". So I'm translating a packing size of 1 to "packed". Not sure what to do about 2/4 byte packings...?
cole-h has quit [Ping timeout: 252 seconds]
a_chou has quit [Quit: a_chou]
jokoon has joined #zig
elerch has joined #zig
<ikskuh> ifreund: can i somehow pass a normal shell script to nix-shell?
Bernstein has joined #zig
eyepatchOwl has quit [Remote host closed the connection]
recalloc has quit [Ping timeout: 265 seconds]
recalloc has joined #zig
<ikskuh> ah, i figured. thanks for the shell.nix file :)
sm2n has quit [Ping timeout: 240 seconds]
sm2n has joined #zig
tefter has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
sm2n_ has joined #zig
sm2n has quit [Ping timeout: 240 seconds]
earnestly has joined #zig
sm2n_ has quit [Read error: Connection reset by peer]
sm2n has joined #zig
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
sm2n_ has quit [Remote host closed the connection]
sm2n has joined #zig
novakane has quit [Quit: WeeChat 3.1]
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
novakane has joined #zig
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
jokoon2 has joined #zig
jokoon has quit [Ping timeout: 260 seconds]
sm2n_ has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
ur5us__ has joined #zig
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
knebulae has quit [Read error: Connection reset by peer]
[wtf] has joined #zig
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
<ifreund> no problem :)
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
earl has quit [Ping timeout: 250 seconds]
txdv has quit [Ping timeout: 260 seconds]
earl has joined #zig
sm2n has joined #zig
sm2n_ has quit [Ping timeout: 260 seconds]
<ikskuh> i maybe should start using nix...
<ikskuh> but learning another language?
<dutchie> the nix language is very small
<dutchie> the main issue in my experience is that the "standard library" isn't very well documented
txdv has joined #zig
<ifreund> yeah, nix docs suck in general in my experience
mokafolio has quit [Quit: Bye Bye!]
sm2n has quit [Remote host closed the connection]
<ifreund> I don't think I'll ever use nixos, it doesn't really appeal to my sensibilities, but using nix on void linux for some select projects works pretty well
sm2n has joined #zig
mokafolio has joined #zig
cow-orker has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
sm2n has quit [Remote host closed the connection]
earl has quit [Ping timeout: 250 seconds]
sm2n has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
zenkuro has quit [Ping timeout: 246 seconds]
sm2n has quit [Excess Flood]
sm2n has joined #zig
zenkuro has joined #zig
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
earl has joined #zig
leon-p has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
ur5us__ has quit [Ping timeout: 240 seconds]
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
mokafolio has quit [Quit: Bye Bye!]
mokafolio has joined #zig
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
arkurious has joined #zig
jokoon2 has quit [Ping timeout: 260 seconds]
sm2n_ has joined #zig
sm2n has quit [Ping timeout: 240 seconds]
sm2n_ has quit [Remote host closed the connection]
sm2n has joined #zig
sm2n has quit [Excess Flood]
sm2n has joined #zig
waleee-cl has joined #zig
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
jokoon2 has joined #zig
tefter has quit [Ping timeout: 246 seconds]
xackus has joined #zig
tefter has joined #zig
knebulae has joined #zig
sm2n_ has joined #zig
sm2n has quit [Read error: Connection reset by peer]
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
sm2n has joined #zig
sm2n_ has quit [Ping timeout: 252 seconds]
sm2n has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
sm2n_ has quit [Remote host closed the connection]
sm2n has joined #zig
gracefu has joined #zig
gracefu_ has quit [Ping timeout: 268 seconds]
Kingreil has joined #zig
sm2n_ has joined #zig
sm2n has quit [Ping timeout: 260 seconds]
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
Snektron has quit [Ping timeout: 245 seconds]
AtomToast has quit [Ping timeout: 245 seconds]
ugla has quit [Ping timeout: 245 seconds]
siraben has quit [Ping timeout: 245 seconds]
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
earl has quit [Ping timeout: 245 seconds]
Snektron has joined #zig
ugla has joined #zig
bitmapper has joined #zig
rtpg has quit [Ping timeout: 250 seconds]
earl has joined #zig
novakane has quit [Quit: WeeChat 3.1]
betawaffle has quit [Ping timeout: 260 seconds]
TheLemonMan has joined #zig
siraben has joined #zig
AtomToast has joined #zig
rtpg has joined #zig
betawaffle has joined #zig
rtpg has quit [Ping timeout: 252 seconds]
betawaffle has quit [Max SendQ exceeded]
betawaffle has joined #zig
sm2n_ has quit [Read error: Connection reset by peer]
sm2n_ has joined #zig
rtpg has joined #zig
marler8997 has quit [Read error: Connection reset by peer]
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
adsr has quit [Ping timeout: 265 seconds]
<koakuma> TheLemonMan, re: lld, that's great, thanks so much! What did you do to make it link?
<TheLemonMan> I had to implement all the missing relocation types
patwid has quit [Read error: Connection reset by peer]
linuxgemini1 has joined #zig
patwid has joined #zig
<TheLemonMan> then got sidetracked into upstreaming some LLVM patch in order to write some test cases
adsr has joined #zig
pingiun has quit [Quit: Bye!]
pingiun has joined #zig
dongcarl7 has joined #zig
sm2n has joined #zig
sm2n_ has quit [Ping timeout: 240 seconds]
dongcarl has quit [Quit: Ping timeout (120 seconds)]
linuxgemini has quit [Quit: Ping timeout (120 seconds)]
kragacles has quit [Remote host closed the connection]
vent has quit [Quit: ZNC - http://znc.in]
rbino has quit [Remote host closed the connection]
linuxgemini1 is now known as linuxgemini
dongcarl7 is now known as dongcarl
<koakuma> Ah, that's... awesome
cCCCCcccccCCc has quit [Ping timeout: 240 seconds]
leon-p has quit [Quit: Lost terminal]
casaca has quit [Ping timeout: 265 seconds]
kragacles has joined #zig
sm2n has quit [Ping timeout: 252 seconds]
sm2n has joined #zig
novakane has joined #zig
[wtf] has left #zig [#zig]
leon-p has joined #zig
sm2n_ has joined #zig
sm2n has quit [Ping timeout: 252 seconds]
sm2n_ has quit [Remote host closed the connection]
sm2n_ has joined #zig
sm2n has joined #zig
sm2n_ has quit [Ping timeout: 252 seconds]
sm2n has quit [Ping timeout: 240 seconds]
riba has joined #zig
sm2n has joined #zig
riba has quit [Ping timeout: 252 seconds]
marler8997 has joined #zig
<marler8997> I had an idea to do with std.log. What do people think about adding a way to namespace the log scopes with the package they come from?
cole-h has joined #zig
<ifreund> marler8997: as in an automatic way to do that? You can already do it pretty easily manually afaik
<marler8997> ifreund, I just made this issue: https://github.com/ziglang/zig/issues/8812
<marler8997> ifreund, are you saying there's already a way to get the package name from log scopes?
<ifreund> marler8997: no, but when writing a package you can put all of your logging in a scope with the same name as your package, and I would consider this good practice
<marler8997> yeah I would agree
<ifreund> the whole point of having scopes in the API was so that you can filter out logging from dependencies
<ifreund> or, at least having them implemented the way they are with an enum literal
<ifreund> and you're right that we currently do rely on package authors being well behaved and using a scope unique to their package and not polluting the default scope
<ifreund> but I'm not convinced we need to introduce more complexity to address that problem
<marler8997> I see std.log not only being used to differentiate packages, but also contain sub-categories within the same package
<marler8997> if we didn't need subcategories, we could simplify std.log.scoped to only contain the package name and nothing else
<ifreund> very true, we do this in stage2
<ifreund> do we even have a way to get the package name at comptime yet?
<marler8997> not that I know of, and doing so could pose problems
<ifreund> I think you need to rework that issue into a proposal for such a bulitin...
<marler8997> because I'm not sure if Zig assumes that a package will compile the same way depending on if it's package name changes
<marler8997> my proposal for optional build.zig dependencies ran into this issue as well
<marler8997> and my idea was to provide the package name, but make it known only at runtime
<ifreund> I think this area has not received enough attention yet, but will once we self host and shift the focus towards the build system/package manager
<marler8997> yeah, and yes the proposal is incomplete. I created it for now to document the concept and we might need to wait a bit before we know what the implementation will look like (i.e. how do we get the package name?)
<ifreund> I think knowing what the implementation would look like is required in order to decide if it is desireable or not
a_chou has joined #zig
<marler8997> andrewrk, what is your thoughts on having the package name affect compilation? Do we do that today? Should we allow that?
casaca has joined #zig
<TheLemonMan> marler8997, can you still reproduce #5476?
<marler8997> TheLemonMan, yup, looks like it's still there
<marler8997> ifreund, if we allow the package name to affect compilation, the solution should be trivial, I think an enum with all the package names would be nice. If we dont' allow it to affect compilation, it might be quite difficult, I can't think of a solution atm
<TheLemonMan> can you dump header and debug_dir contents?
Techcable has quit [Quit: ZNC - https://znc.in]
Techcable has joined #zig
<marler8997> you want a tar file or something?
<TheLemonMan> gah, this is definitely the worst time to buy a new laptop, can't find (m)any with AMD's Zen3
<TheLemonMan> a pastebin is enough
<marler8997> here's all the files: https://pastebin.com/Fh8GyEt0 which one's did you want?
<TheLemonMan> oh I just need the field values, add a debug.print in coff.zig like you did in the ticket description
<marler8997> oh gotcha
sm2n has quit [Quit: Leaving]
<xackus> mobile zen 3 is still pretty new
sm2n has joined #zig
<marler8997> thread 24444 panic: debug virt 241608 header virt 225280 ptr 219136
<TheLemonMan> hm? that calculation does not overflow
<TheLemonMan> xackus, yep, I wonder when it'll hit the market as I'm getting tired of this laptop being slow
<marler8997> here's a run with printing the file_offset:
<marler8997> thread 23144 panic: debug virt 241704 header virt 225280 ptr 219648 file_offset=236072
<xackus> who knows with covid logistic problems
<marler8997> looks like it's not overflowing...
<xackus> and shortages
novakane has quit [Quit: WeeChat 3.1]
<xackus> but some will probably be available within a couple of months
lanodan has quit [Quit: WeeChat 3.0]
novakane has joined #zig
pretty_dumm_guy has joined #zig
<marler8997> TheLemonMan, I think there's a mistake in my logic to detect the virtual address overflow
<marler8997> instead of: if (debug_dir.virtual_address < header.virtual_address + header.pointer_to_raw_data)
<marler8997> should be: if (debug_dir.virtual_address < header.virtual_address)
<marler8997> when I fix it, I no longer hit that condition, so problem may be elsewhere
<marler8997> oh wait, you know what
<marler8997> maybe the issue isn't happening
<marler8997> I just saw the stack trace but I needed to look at the 2nd stack trace
<xackus> 5900X is now almost at msrp where i live
<marler8997> I'm not getting this instead: Unable to dump stack trace: FileNotFound
<marler8997> so I'm not sure if I can confirm whether or not the integer overflow would occur if this FileNotFound error did not occur
a_chou has quit [Quit: a_chou]
sm2n has quit [Remote host closed the connection]
sm2n has joined #zig
<TheLemonMan> no more overflow then
<ikskuh> something killed my program (stack smashing detected)
<ikskuh> any hints on how to fix that?
<mikdusan> are you using any .ptr from slices, and manipulating it?
<ikskuh> errm
<ikskuh> yeah
<mikdusan> I ran into that error and it could be a million things, but in my case I was doing something naughty with .ptr
<ikskuh> hm
<ikskuh> i changed the zig version :D
<ikskuh> no code changes whatsoever
<ikskuh> "worked yesterday, recompiled zig, now it doesn't" :D
<mikdusan> (.ptr/.len that is)
bitmapper has quit [Quit: Connection closed for inactivity]
<TheLemonMan> valgrind may be helpful here
<ikskuh> nix is the culprit
<ikskuh> i compiled zig in a nix shell
<ikskuh> and linked clang dynamically
<ikskuh> and zig now links against the nix dynamic linker
<TheLemonMan> bleh, I hate nix
<ikskuh> looks like i have to build llvm12 ...
_aaron_ has joined #zig
recalloc has quit [Ping timeout: 252 seconds]
lanodan has joined #zig
recalloc has joined #zig
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #zig
<ifreund> ikskuh: nah, just link zig statically to llvm
<ifreund> pass -DZIG_STATIC_LLVM to cmake
<ifreund> er, -DZIG_STATIC_LLVM=on
<ikskuh> okay, let's test…
<marler8997> TheLemonMan, I can't confirm or deny whether overflow is still occuring becase of the FileNotFound error
<andrewrk> marler8997, status quo is the package name is not observable except as a way to use `@import`. what did you have in mind?
<ifreund> ikskuh: as for zig linking against the nix dynamic linker, on my system at least it's just a symlink to my /usr/lib64/ld-linux-x86_64.so.2
<marler8997> andrewrk, this issue: https://github.com/ziglang/zig/issues/8812
<marler8997> also might need something like that for my build proposal
<marler8997> but in that case the value could be known at runtime only
<andrewrk> marler8997, I think this is related to another issue that isn't solved yet, which is wanting to set different optimization modes (-O) per package
<ikskuh> ifreund: my zig installation now is fucked :(
<ikskuh> zig init-exe && zig build run
<ikskuh> fails
<ifreund> ikskuh: and what does ldd zig say?
<marler8997> andrewrk, if a package is included multiple times with different names in the same compilation, is it compiled the exact same way?
<ifreund> build zig with static llvm and nix works fine for me
<ikskuh> hm
<ikskuh> didn't do it for me, which distro are you on? void?
<ifreund> yeah void
<ikskuh> hm, i'm on arch
<ikskuh> no idea why it fails
<ifreund> could be related to arch being on glibc 2.33 while void is still on 2.32 currently
<ifreund> how does it fail? any output?
<ikskuh> > version `GLIBC_2.33' not found (required by /tmp/zig-out/bin/tmp)
<ikskuh> this was *one* error
<ikskuh> the other one was
<ikskuh> *** stack smashing detected ***: terminated
<ikskuh> and when cross-compiling for musl with "-Dtarget=x86_64-linux"
<ikskuh> i got a horrible stack trace
<ifreund> ikskuh: yeah, that sounds like it's caused by the glibc version mismatch between nix and the rest of your system
jokoon has joined #zig
jokoon2 has quit [Ping timeout: 260 seconds]
pretty_dumm_guy has quit [Ping timeout: 240 seconds]
Akuli has joined #zig
jokoon has quit [Client Quit]
<ikskuh> yeah
<ikskuh> i've rolled back to the master from website
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #zig
sm2n has quit [Remote host closed the connection]
<TheLemonMan> ifreund, I'm not a fan of adding extra commas out of the blue, after all the lines are broken by the comment and not by the comma
Bernstein has quit [Remote host closed the connection]
<ifreund> TheLemonMan: My priority is that the behavior is consistent with all the other comma separated lists where we use a trailing comma to indicate that they should be broken over multiple lines
<ifreund> inserting a comma if comments or multiline strings force the list across multiple lines but there is no trailing comma in the original source is the status quo
<ifreund> If you'd like to propose changing that I'd recommend doing that in an issue
<TheLemonMan> nah, I'll close the PR, no time to fight the system
<andrewrk> btw I'm building a fresh docker image for drone CI in hopes it resolves the issue
<ifreund> nice
<andrewrk> all these computers need more babysitting than 2 year olds
<ifreund> andrewrk: I got zlib cross compiling in zig-bootstrap, but we need to link it in zig's cmake and I'm far from a cmake expert
<andrewrk> ifreund, what we need for libz.a to go into the correct prefix and then everything should just work
<andrewrk> the -DCMAKE_PREFIX_PATH
<andrewrk> (in the lib/ dir of course)
<ifreund> that's what I thought, but zig's current cmake fails to add that to the linker line for the final binary
<ifreund> it does "just work" for the llvm builds
<andrewrk> ah I see. think we need to hard code it
<andrewrk> zig has no way to know it needs to put libz.a on the linker line otherwise
<ifreund> this is what I did to make the build pass, but I'm sure there's a more proper way: https://github.com/ziglang/zig-bootstrap/pull/58/commits/8b4fa2f25527879ee409db377385834d8e08344b
<andrewrk> the only improvement I can see there is to add it to target_link_libraries rather than set(EXE_LDFLAGS
<ifreund> I think we need to only do this if statically linking llvm though as it's a transitive dependency
<ifreund> but I don't know how to capture that in an if statement. We already have some code that adds -lz for specific targets if statically linking llvm
<ifreund> but for zig bootstrap we don't set ZIG_STATIC or ZIG_STATIC_LLVM so I'm not sure what to check
<andrewrk> you can just patch it in, I'll make it cleaner when doing a future update
<ifreund> alright cool, I think we need to patch the upstream cmake as well since I realized that the master builds for the website are built using the ci scripts
<andrewrk> ah so when I rebuild the ci tarballs with your changes, it will require libz static lib on the linker line, yeah?
<andrewrk> that's fine, I'm prepared to deal with that
<andrewrk> probably will just be -DZIG_LLVM_NEEDS_LIBZ=ON
<andrewrk> there's no way to find out this information, it has to be provided by the user
<ifreund> yeah that's right
<ifreund> I guess that explains why I couldn't find a way if there really is none :D
<andrewrk> C/C++ dependencies are a mess
<andrewrk> looks like the drone ci is fixed
<ifreund> nice :)
<ikskuh> can someone help me to find the source of https://bpa.st/H3GQ ?
<ikskuh> the call stack is a bit small
<ifreund> I don't think wasm has fds?
<ifreund> perhaps you need to override the default panic handler
<ikskuh> ifreund: i did that already
<ikskuh> it look slike it comes from std.debug.panic
<andrewrk> ikskuh, I have an idea to make this easier with a flag, but haven't tried to implement it yet. in the meantime the trick I use is to delete stuff until the "foo not found" compile errors become useful
<ikskuh> :D
<ifreund> ikskuh: did you maken your root.panic override pub?
<andrewrk> ironically this is exactly the situation the "referenced here" errors are supposed to help with, but in your moment of need they are failing you
<ikskuh> ifreund: ack.
<ikskuh> i did all the obvious stuff already :)
<ikskuh> andrewrk: thanks, that was a good hint
<ikskuh> my pub log() is the culprit
<ikskuh> Writer().print
<ikskuh> ah, no
<ikskuh> std.heap.GeneralPurposeAllocator
<ifreund> ah the stack trace printing?
<ikskuh> yep
<ikskuh> andrewrk: can i disable stack trace printing?
<andrewrk> yes. which stack trace are you referring to?
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<ikskuh> the one in the GPA, i don't know which one exactly
<ikskuh> HA
<ikskuh> got it
<andrewrk> you don't need hacks, you can just do what you want. GPA supports disabling stack traces, also you could just not call the function that does leak checking
<ikskuh> but i want leak checking *grin*
<ikskuh> the core problem here imho is that stack trace format *assumes* it goes to stdout
<ikskuh> and thus uses the detectTtyConfig
<ikskuh> so if i am on a linux and write a stack trace to a file, it will horribly fail and writes escape codes into my file
<andrewrk> why won't the tty detection work in that case?
<ikskuh> because tty_config is determined from std.io.getStdErr()
<g-w1> the stack trace doesn't print to stderr?
<ikskuh> nope
<ikskuh> no stack trace on wasm ;)
<ikskuh> *stderr
<g-w1> ah i see, so it should do it by the target then
[wtf] has joined #zig
<ikskuh> yep, when i write a stack trace to a file, it contains escape codes
dmgk has quit [Quit: ZNC - https://znc.in]
dmgk has joined #zig
<mikdusan> but supportsAnsiEscapeCodes() returns false when .wasi
<ikskuh> i use .freestanding ;)
mikdusan has quit [Quit: WeeChat 3.0.1]
<ikskuh> mikdusan: this would also just be a hacky workaround
ur5us__ has joined #zig
stilbruch has quit [Quit: goodbye]
stilbruch has joined #zig
hiljusti has joined #zig
ur5us__ has quit [Ping timeout: 245 seconds]
zenkuro has quit [Ping timeout: 252 seconds]
<ifreund> Q/bu3
<ikskuh> ifreund: wanna change the password?
<ikskuh> hm, what would be a appropiate strategy for fixing the escape code thingy?
<ifreund> ikskuh: that was a fumbled /buffer 3 since I alread had typed a Q here for some reason :P
<ikskuh> :D
bitmapper has joined #zig
pretty_dumm_guy has joined #zig
<ikskuh> huh
<ikskuh> > GPA supports disabling stack traces, also you could just not call the function that does leak checking
<ikskuh> this didn't work, the code is still referenced
<ikskuh> also: if i want a resettable GPA, should i back it by a arena allocator?
<ikskuh> or does gpa.deinit() free unfreed data?
[wtf] has quit [Quit: [wtf]]
<andrewrk> gpa cannot support freeing leaked memory because it is designed to work in release modes as well, in which case it does not track leaked memory
<ikskuh> okay
<ikskuh> so i'm using a backing allocator with arena backing
<ikskuh> hm, disabling safety solves the problem
hiljusti has quit [Ping timeout: 260 seconds]
<ifreund> andrewrk: the zig-bootstrap zlib PR should be ready to go whenever you get around to updating CI tarballs :)
<andrewrk> thanks!
<ifreund> time to take a look at the system libc linking default thing
novakane has quit [Quit: WeeChat 3.1]
<ifreund> that was easy :)
<g-w1> tysm
<ifreund> no problem, I prefer to fix things I personally broke if possible :D
<g-w1> same
_aaron_ has quit [Quit: Leaving]
ur5us__ has joined #zig
ur5us__ has quit [Remote host closed the connection]
ur5us__ has joined #zig
nvmd has joined #zig
sord937 has quit [Quit: sord937]
tefter has quit [Remote host closed the connection]
tefter has joined #zig
nvmd has quit [Quit: Later nerds.]
Akuli has quit [Quit: Leaving]
hiljusti has joined #zig
<Raito_Bezarius> var user_stack = [_]u64{0} ** 1024;
<Raito_Bezarius> why is it valid?
<Raito_Bezarius> invalid*
<g-w1> please say the error
<Raito_Bezarius> ahem none
<Raito_Bezarius> the zig fmt has an old invalid error
<Raito_Bezarius> like missing semicolon
<Raito_Bezarius> but compiling this works just fine…
<g-w1> what zig version?
<Raito_Bezarius> ~0.8
<Raito_Bezarius> the ~ is because I'm using a precise commit
<Raito_Bezarius> but it's not due to zig
<Raito_Bezarius> it was vim plugin bug
<g-w1> works for me on master
<g-w1> ah
<g-w1> echo 'var user_stack = [_]u64{0} ** 1024;' | zig fmt --stdin worked
<Raito_Bezarius> yes it was an invalid syntax at some point $t_0
<Raito_Bezarius> and then the error stuck and made me believe it was invalid syntax at $t_0 + Δ
<Raito_Bezarius> but it was remnants of $t_0
hiljusti has quit [Ping timeout: 260 seconds]
<Raito_Bezarius> can it be normal that Zig do not generate any valid instruction in the binary for a certain addr?
<Raito_Bezarius> I have some user_fn doing some stuff, when I take its ptr at runtime, it gives me some addr α, I know how much I need to adjust to know the runtime addresses as I have my image base β
<Raito_Bezarius> so I check with objdump the binary at α + β
<Raito_Bezarius> and see it does not exist in the binary, but at the runtime, something writes into it
<Raito_Bezarius> some invalid code btw
hiljusti has joined #zig
<Raito_Bezarius> it goes from 0x0 → 0xd8a0 (binary is loaded by UEFI) → 0x63e88a0 (something happens??)
<Raito_Bezarius> I would _at least_ expect that I can disassemble user_fn in the binary by looking for the addr
<Raito_Bezarius> but it does not look like it exist at all
leon-p has quit [Quit: leaving]
<Raito_Bezarius> gdb shows it exist at some point but it is absolutely not an infinite loop, it is some garbage written by something else
<Raito_Bezarius> depending on what I put in user_fn, I'm either getting an #UD either getting an #GP
<noam> andrewrk: I'll look into resurrecting the SPU II backend soonish - I'll be happy to keep maintaining it indefinitely
<andrewrk> noam, sounds good, no rush
pretty_dumm_guy has quit [Quit: WeeChat 3.2-dev]
nathanael has quit [Remote host closed the connection]
nathanael has joined #zig
earnestly has quit [Ping timeout: 252 seconds]