<BitPuffin>
But a possible workaround I see is to disable support for tracelog
knebulae has joined #zig
<BitPuffin>
Are there any known issues with calling c libraries that use va_list or something?
<andrewrk>
BitPuffin, zig doesn't (yet? ever?) have any compiler warnings/errors for C printf - they would have to be hard coded
<andrewrk>
you'll want to carefully double check that your % and your args agree with each other
<SamTebbs33>
There was a discussion in a GitHub ticket about c libraries and va_list, I'll see if I can dig it out
<SamTebbs33>
I can't guarantee it will have anything of value though
<andrewrk>
does a debugger give any clues? valgrind?
Akuli has joined #zig
FireFox317 has joined #zig
<FireFox317>
Hey guys, if I want to add code to a PR that is already merged should I add a new PR or can I reuse the merged PR somehow?
<andrewrk>
FireFox317, new PR
<FireFox317>
I already created the new PR btw
<FireFox317>
Okay thankyou!
<andrewrk>
I'll have a look in a couple hours. I'm going to be a bit quiet on the issue tracker for a while as I focus on https://github.com/ziglang/zig/pull/2602
<FireFox317>
andrewrk: I would like to work a bit on the compiler, is there any particular issue that I can focus on or should I just pick on in the contributer list?
<SamTebbs33>
Look out for issues labeled with "contributor friendly"
<FireFox317_>
Uhm, could someone with some git/github knowledge help me out? Somehow I ended up referencing some issues (i.e. #2046 and #514). I'm not sure if everybody sees this or if it is just me, but I would like to fix it somehow. `timonkruiper` is my github name. Should I just delete my fork and re-fork it, (still have a waiting PR tho), so that maybe doesn't work. Any help is appreciated
<andrewrk>
FireFox317_, what's the problem?
<FireFox317_>
Well, if you look at those issues mentioned, it shows that I reference them in my own fork (at the bottom of the issue). Maybe I only see this, then there is no problem, but it shouldn't be there.
<andrewrk>
FireFox317_, don't sweat it, it's just a little bit of noise that people will have no problem ignoring. you can edit your github comments
<FireFox317_>
andrewrk: Hmm okay. I somehow rebased my own copy and it added my name to some commits. I think that is why it is showing up as a reference in the main repo
<andrewrk>
are you talking about #2621?
<BitPuffin>
Hmm is there a repo somewhere with example of compiling C sources with zig
<FireFox317_>
andrewrk: Well, it happened when I added that PR yes. But just to be clear, at the bottom of #2046 do you see the reference to my fork? Because that is a mistake from me
<mrkishi>
we do. whenever you reference an issue in a commit message anywhere on github, it'll create a mention on the issue.
<andrewrk>
FireFox317_, yes I see it. don't sweat it
<BitPuffin>
hmm
<BitPuffin>
how do I define C symbol
<donpdonp>
has anyone done a writeup on building an osx .App/ from zig? especially tips like what to link to in the build.zig and what support files are needed in the .App/ folder
<BitPuffin>
ahh I guess I can just pass it to the addCSourceFile derp
<andrewrk>
BitPuffin, oh you meant -D args? yeah
<BitPuffin>
yup
<andrewrk>
alright I'm gonna go quiet now, need to focus on my core lang changes. will be on later
wilsonk has quit [Ping timeout: 245 seconds]
<BitPuffin>
Hmm okay so I am now building raylib in zig
<BitPuffin>
and now it works. Hooray....?
wilsonk has joined #zig
lunamn has quit [Quit: leaving]
<BitPuffin>
if it is the glibc thing you mentioned, then I guess it makes sense if it works now that I build it with zig, cuz it's gonna link to the same one
<FireFox317_>
I got rid of the references by deleting my fork and re-forking it :) Apparantly there were so called 'dangling' commits in my fork.
avoidr has quit [Quit: leaving]
wootehfoot has joined #zig
DesDeux has joined #zig
<BitPuffin>
arrk, how do I add a file so that it can be imported directly without relative path in the build system
<BitPuffin>
not command line
Zaab1t has joined #zig
<BitPuffin>
tried using linkLibrary but norp
<BitPuffin>
addPackagePath maybe
Zaab1t has quit [Quit: bye bye friends]
porky11 has quit [Ping timeout: 248 seconds]
<DesDeux>
Hello, maybe someone can help, i've trying to import raylib headers with "const c = @cImport(@cInclude("raylib.h"));", but get "error: declaration shadows primitive type 'bool' pub const bool = extern enum {" . Tried solving this with including stdbool.h "@cInclude("stdbool.h");", wich results in ldd errors "lld: error: undefined symbol: ..." where ... is functions wich i've tried to call from raylib.h.
<SamTebbs33>
But if I step through those lines in the function within GDB, the fields in the entry struct never change, what am I doing wrong?
avoidr has joined #zig
<SamTebbs33>
I also tried assigning by dereferencing the pointer first but had no luck `(entry.*).four_megabyte_pages = true;`
DesDeux has quit [Quit: Leaving]
<mikdusan1>
you might try a code reduction because i assure you, assigning to pointer.field works :)
<SamTebbs33>
Yeah I imagined that it should work >.<
<SamTebbs33>
I allocated the main struct with allocator.alignedAlloc, if that makes a difference :p :D
Ichorio has joined #zig
<SamTebbs33>
Is that the correct way of getting a pointer to directory.entries[page] though?
<SamTebbs33>
var entry: *DirectoryEntry = &dir.entries[page];
<emekankurumeh[m]>
i think `++` should work on all strings at comptime
<emekankurumeh[m]>
but that might lead to abuse though
<halosghost>
… what would ++ even do on a string?
<halosghost>
increment a pointer?
<emekankurumeh[m]>
what do you mean?
<halosghost>
are you talking about C-style pre/postfix ++ operator?
<emekankurumeh[m]>
`++` in zig is array concatenation
<emekankurumeh[m]>
there are no increment operators in zig other than `+=`
<halosghost>
ahhhh
<halosghost>
I misunderstood
<halosghost>
fair enough
shodan45 has joined #zig
SamTebbs33 has quit [Quit: Lost terminal]
wootehfoot has quit [Read error: Connection reset by peer]
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 245 seconds]
MajorLag is now known as tgschultz
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 248 seconds]
MajorLag is now known as tgschultz
halosghost has quit [Quit: WeeChat 2.4]
companion_cube has joined #zig
porky11 has quit [Quit: Leaving]
Ichorio has quit [Ping timeout: 248 seconds]
<wilsonk>
mq32: did you figure out how to get LTO working with C++ and a zig object?
<wilsonk>
if not, then you can do it by outputting all the code as LLVM bitcode and then use LTO across the entire link (at least that is the way I have done it in the past with a different LLVM-based language and clang++ bitcode)
<emekankurumeh[m]>
hmm, i thought zig already did lto
hio has quit [Quit: Connection closed for inactivity]