forgot-password has quit [Ping timeout: 256 seconds]
<quajzen>
hello all, can someone help me troubleshoot linking a C library? I am trying to link xcb/randr.h but lld is not recognizing some functions, specifically xcb_randr_get_monitors.
cole-h has quit [Ping timeout: 256 seconds]
quajzen has left #zig [#zig]
<shachaf>
randr.h isn't a library you link, it's a header.
<shachaf>
You probably want something like libxcb-randr.so.
nvmd has quit [Quit: Later nerds.]
<shachaf>
Oh, they're gone.
ave_ has quit [Remote host closed the connection]
lunamn has quit [Remote host closed the connection]
linuxgemini has quit [Remote host closed the connection]
linuxgemini has joined #zig
lunamn has joined #zig
ave_ has joined #zig
a92 has quit [Quit: My presence will now cease]
earnestly has quit [Ping timeout: 240 seconds]
mokafolio has quit [Quit: Bye Bye!]
mokafolio has joined #zig
mokafolio has quit [Client Quit]
mokafolio has joined #zig
mokafolio has quit [Client Quit]
ur5us has quit [Ping timeout: 258 seconds]
benjif has quit [Quit: Leaving]
marnix has joined #zig
mokafolio has joined #zig
spiderstew_ has joined #zig
spiderstew has quit [Ping timeout: 272 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
sord937 has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
bitmapper has quit [Quit: Connection closed for inactivity]
cole-h has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
ave_ has quit [Quit: Ping timeout (120 seconds)]
mht has quit [Ping timeout: 256 seconds]
mht has joined #zig
ave_ has joined #zig
alexpana has joined #zig
riba has joined #zig
knebulae has quit [Read error: Connection reset by peer]
knebulae has joined #zig
selby has joined #zig
ur5us has joined #zig
riba has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
isolier has quit [Quit: Ping timeout (120 seconds)]
isolier7 has joined #zig
riba has joined #zig
riba has quit [Ping timeout: 240 seconds]
xackus has joined #zig
knebulae has quit [Quit: Leaving]
knebulae has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
cole-h has quit [Quit: Goodbye]
FireFox317 has joined #zig
riba has joined #zig
forgot-password has joined #zig
dch has joined #zig
l1x has joined #zig
strmpnk has joined #zig
earnestly has joined #zig
nikki93 has joined #zig
dputtick has joined #zig
FireFox317 has quit [Quit: Leaving]
forgot-password has quit [Ping timeout: 264 seconds]
riba has quit [Ping timeout: 240 seconds]
forgot-password has joined #zig
cow-orker has quit [Remote host closed the connection]
spiderstew_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
spiderstew has joined #zig
forgot-password has quit [Ping timeout: 240 seconds]
selby has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
selby has joined #zig
selby has quit [Ping timeout: 240 seconds]
cow-orker has joined #zig
forgot-password has joined #zig
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
forgot-password has quit [Ping timeout: 246 seconds]
forgot-password has joined #zig
forgot-password has quit [Ping timeout: 246 seconds]
forgot-password has joined #zig
forgot-password has quit [Ping timeout: 260 seconds]
swills has quit [Quit: swills]
marnix has quit [Read error: Connection reset by peer]
<dutchie>
or am i getting in a const muddle? it works fine if i make owned_slice non-const.
<scientes>
dutchie, you can't const something and then use it as non-const
<dutchie>
i don't want to use it as non-const, i just want to free it and replace it with something else
<dutchie>
i could just allocate, memcpy and then free, but isn't realloc supposed to be a shortcut for that?
<fengb>
Also you’re reallocing something that isn’t owned: &[0]u8
<fengb>
Hmm... is it guaranteed that reallocing empty slice is just an alloc?
<dutchie>
according to the impl of reallocAdvancedWithRetAddr i have open now, yes
<dutchie>
idk if there is a better way to write "owned empty slice"
<fengb>
It doesn’t exist right now due to zero sized pointers, but some point in the future you can make owned zero slices
<fengb>
So the impl works right now but that may not be guaranteed
<dutchie>
yea, i found #6706
<dutchie>
but i don't see in my original code where i'm trying to modify through a const
<dutchie>
(other than the implicit free)
<fengb>
owned_slice: []const u8,
<dutchie>
that means i can't change the bytes on the other side though, doesn't it? i thought i can change where it's pointing
<dutchie>
if i have `var p: *const u8` i can change what integer it's pointing at. isn't that the same thing i'm doing here with a slice?
forgot-password has joined #zig
<ifreund>
Yeah, I think that realloc should be ignoring the constness like destroy does
<dutchie>
i did wonder if it was a realloc bug, but i thought that was much less likely than me not understanding const properly ;)
Akuli has joined #zig
quajzen has joined #zig
quajzen has left #zig [#zig]
decentpenguin has quit [Ping timeout: 240 seconds]
nvmd has joined #zig
forgot-password has quit [Ping timeout: 240 seconds]
forgot-password has joined #zig
forgot-password has quit [Ping timeout: 256 seconds]
decentpenguin has joined #zig
forgot-password has joined #zig
wootehfoot has joined #zig
bkleiner has quit [Ping timeout: 260 seconds]
bkleiner has joined #zig
forgot-password has quit [Ping timeout: 246 seconds]
st4ll1 has quit [Quit: WeeChat 2.9]
benjif has joined #zig
a_chou has joined #zig
a_chou has quit [Quit: a_chou]
forgot-password has joined #zig
forgot-password has quit [Ping timeout: 246 seconds]
quajzen has joined #zig
forgot-password has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
forgot-password has quit [Ping timeout: 265 seconds]
forgot-password has joined #zig
quajzen has quit [Remote host closed the connection]
forgot-password has quit [Ping timeout: 264 seconds]
ur5us has joined #zig
selby has joined #zig
ur5us_ has joined #zig
ur5us has quit [Ping timeout: 264 seconds]
cole-h has joined #zig
cole-h has quit [Client Quit]
cole-h has joined #zig
<jaredmm>
Is there an active Zig project creating an API agnostic (preferably multithreaded) rendering library supporting D3D12/Vulkan/etc?
<pixelherodev>
There's sokol bindings, I think
<pixelherodev>
Not aware of anything specific, but that doesn't mean there isn't anything
hnOsmium0001 has joined #zig
<jaredmm>
Been trying some of the popular ones with C APIs. The ergonomics of the C interface is usually poorly documented and leaves a lot to be desired. sokol is nice, but it doesn't do D12/Vulkan. Was thinking about contributing to something, but don't know that my knowledge of the different APIs is holistic enough to build an abstraction that isn't terrible by myself.
bastian[m] has joined #zig
selby has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Ping timeout: 246 seconds]
jjsullivan1 has quit [Read error: Connection reset by peer]
<ifreund>
cool, I think your approach of improving the tooling untill the bug can be found/fixed is a great idea by the way
jjsullivan1 has joined #zig
<shachaf>
Missed quajzen again.
sord937 has quit [Quit: sord937]
<ifreund>
hopefully they read the logs :?
ur5us_ has quit [Ping timeout: 260 seconds]
<shachaf>
They did, and sent me a message, and then disappeared.
ur5us_ has joined #zig
Akuli has quit [Quit: Leaving]
ur5us has joined #zig
ur5us_ has quit [Ping timeout: 258 seconds]
selby has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xackus has quit [Ping timeout: 256 seconds]
donniewest has quit [Quit: WeeChat 3.0]
benjif has quit [Quit: Leaving]
seadragon-droid has joined #zig
<seadragon-droid>
dutchie: I'm inclined to agree with you - it seems like realloc should be able to accept slices of const types, provided that it returns a new slice of const types, as well - however, that doesn't seem to be currently supported
<ifreund>
It's just waiting for someone to open a PR to fix it
<seadragon-droid>
point taken, haha
seadragon-droid has quit [Ping timeout: 260 seconds]
leon-p has quit [Quit: leaving]
<fengb>
What's the point of returning a slice of const? It's basically useless unless you invoke the nuclear option
a92 has joined #zig
<pixelherodev>
Probably going to do a stream explaining zyg design and spending some time working on it in about thirty minutes if anyone's interested