wootehfoot has quit [Read error: Connection reset by peer]
gazler has joined #zig
gazler_ has quit [Read error: Connection reset by peer]
mmkarakaya has joined #zig
kbd has joined #zig
leon-p has quit [Quit: leaving]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
notzmv has quit [Ping timeout: 246 seconds]
v0idify has quit [Remote host closed the connection]
v0idify has joined #zig
kbd has joined #zig
kbd has quit [Client Quit]
jukan has joined #zig
jukan has quit [Ping timeout: 240 seconds]
kbd has joined #zig
jukan has joined #zig
bitmapper has quit [Quit: Connection closed for inactivity]
cole-h has quit [Ping timeout: 256 seconds]
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
evbo has quit [Ping timeout: 256 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
jukan has quit [Ping timeout: 240 seconds]
maier has joined #zig
kbd has joined #zig
jukan has joined #zig
jukan has quit [Ping timeout: 265 seconds]
leon-p has joined #zig
semarie has quit [Ping timeout: 246 seconds]
semarie has joined #zig
frett27_ has joined #zig
jukan has joined #zig
jukan has quit [Ping timeout: 240 seconds]
maier has quit [Ping timeout: 260 seconds]
maier has joined #zig
xackus has joined #zig
wootehfoot has joined #zig
<frett27_>
hi, a small question, i working for a zig sample to use the cimgui, when importing the cimgui.h file, using @cImport , it does not compile https://pastebin.com/JjyVKnRy , any orientation on this will be helpfull for me
<ifreund>
and yeah it looks like there's c++ in the header you're using :/
<frett27_>
ifreund: yes, i know this, but they reimplement the c definition in zig
<frett27_>
and is sticked to windows
<frett27_>
ifreund: from your perspective (better experience), do you think fixing the cimgui header is better, or make a native binding generator for zig ? (as they does it for c )?
<ifreund>
native bindings will always be better than what @cImport() can provide
<ifreund>
but they are usually more work as well
<frett27_>
i had no experience in binding C++ to zig, any informations, projects or pointer ? is it also an option ?
<frett27_>
ifreund: ho my, i'll looked at Zig-Imgui, the bindings are generated, i was messed up by the files in the repo
<frett27_>
ifreund: 'll dig into it
<frett27_>
ifreund: thank's for you attention
<ifreund>
no problem!
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
jukan has joined #zig
jukan has quit [Ping timeout: 272 seconds]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xackus has quit [Ping timeout: 264 seconds]
maier has quit [Ping timeout: 256 seconds]
maier has joined #zig
maier has quit [Client Quit]
leah2 has quit [Ping timeout: 260 seconds]
sacredbirdman has joined #zig
<sacredbirdman>
Hi, I have some trouble wrapping my head around this.. I have a multidimensional array declared like: var cmlen: [M_DIM][M_DIM][M_DIM]u32 = undefined;
<sacredbirdman>
I have two questions.. how is this allocated.. should I be allocating the memory myself or is this sane code (say when M_DIM is 16)
<sacredbirdman>
and what's the best way to initialize the whole thing to zero?
<ikskuh>
heya sacredbirdman
<ikskuh>
the memory is allocated automatically
<ikskuh>
it's just a value like "var foo: u32 = undefined;"
<ikskuh>
but bigger
<ikskuh>
so it will be on the stack
<ikskuh>
if it's a local variable
<ifreund>
std.mem.zeros() to init to zero easily
<ikskuh>
or in the static memory if it's a global variable
leah2 has joined #zig
<ikskuh>
var cmlen = std.mem.zeroes([M_DIM][M_DIM][M_DIM]u32);
<sacredbirdman>
thanks, that looks good :)
<ikskuh>
std.mem.zeroes is really convenient
<ifreund>
hmm, I think we need non-exhaustive tagged unions
<ifreund>
or can you already do that by setting the enum manually?
<ikskuh>
hm, good question
<ifreund>
looks like you can use a non-exhaustive enum to define a tagged union but it doesn't force you to handle the else branch when switching on the union
<ifreund>
so yeah, we need that
<ifreund>
cause currently zig-wayland isn't properly forward-compatible because of this
sacredbirdman has quit [Ping timeout: 248 seconds]
notzmv has joined #zig
Kiori has joined #zig
Kiori has quit [Remote host closed the connection]
Kiori has joined #zig
Kiori has quit [Remote host closed the connection]
xackus has joined #zig
Akuli has joined #zig
notzmv has quit [Ping timeout: 240 seconds]
HarryHaaren has joined #zig
<HarryHaaren>
hey folks, anybody used Zig CC mode for cross-compile using Meson build system?
<g-w1>
rebase with master is usually the best way or have someone close and re-open it
jukan has quit [Ping timeout: 256 seconds]
kbd has joined #zig
hristo has quit [Quit: hristo]
kbd has quit [Client Quit]
leah2 has quit [Ping timeout: 244 seconds]
<Akuli>
i have pushed empty commits to trigger ci in the past
<Akuli>
git commit --allow-empty
leah2 has joined #zig
bitmapper has joined #zig
Piraty has joined #zig
<HarryHaaren>
hey all - I just downloaded latest Zig master tarball, but there's no README on how to install/use. I know I can use "inplace", but I'm attempting to have Meson (build system) pick up the Zig install, so want the zig binary in /usr/local/bin.
<HarryHaaren>
TLDR: Is there a "proper" way to install Zig from master-tarball?
<HarryHaaren>
(temp workaround identified, use absolute path to Zig, leaving the zig lib/* data in place)
<ifreund>
HarryHaaren: the lib folder just needs to stay in the same place relative to the binary
<ifreund>
so put it in /usr/local/lib if your binary is in /usr/local/bin
<HarryHaaren>
ifreund: thanks again!
<ifreund>
I prefer ~/.local myself though for such things
<ifreund>
no problem!
<HarryHaaren>
yeah good point - i tend to abuse /local a bit, but ~/.local is a better idea
waleee-cl has joined #zig
evbo has joined #zig
squeek502 has quit [Ping timeout: 246 seconds]
jukan has joined #zig
jukan has quit [Ping timeout: 240 seconds]
wjlroe has quit [Quit: Connection closed for inactivity]
hristo has joined #zig
isolier0 has joined #zig
isolier has quit [Ping timeout: 272 seconds]
isolier0 is now known as isolier
<andrewrk>
welcome HarryHaaren! I have a fond memory of meeting you and chatting with you at the VLC conference many years ago in Dublin :)
mikdusan has quit [Quit: WeeChat 2.5]
<HarryHaaren>
hey andrewrk, you've a good memory, yes indeed, it was good fun
<HarryHaaren>
Working on using ZigCC for some static x86_64 to arm64 cross-compilation, so far making progress
ur5us has joined #zig
<HarryHaaren>
with Meson build system - you merged some feature support 5 days ago - nice nice, that's confirmed working here
<HarryHaaren>
will report back in a bit how i'm getting on with the rest of it
* HarryHaaren
away for the evening, late-ish in IE now, so catch ya another time!
HarryHaaren has quit [Quit: WeeChat 2.9]
<andrewrk>
see ya
xackus has quit [Ping timeout: 240 seconds]
frett27 has joined #zig
frett27_ has quit [Ping timeout: 272 seconds]
bitmapper has quit [Quit: Connection closed for inactivity]
<g-w1>
hmm I dont know, but for the linker, ld.lld is only elf. check main.zig:2897 for the others
ur5us has joined #zig
mmkarakaya has quit [Quit: Connection closed]
<motiejus>
thanks. I can't find it there easily, but don't need it for xz (another time). have a good day
hnOsmium0001 has joined #zig
<andrewrk>
motiejus, for ar you can do `zig build-lib` and for `as` you can do `zig build-obj`
<andrewrk>
for as you can also use `zig cc`
<motiejus>
thanks!
jukan has joined #zig
<motiejus>
Another question: is `zig cc` a long-term feature, or something you added "temporarily" until you have a self hosted compiler? I am contemplating to create a bazel clang toolchain on top of `zig cc`, but not sure about its plans/longevity
<motiejus>
Will it be useful/necessary for zig itself post v1?
<andrewrk>
motiejus, long term feature that will always be available when llvm extensions are enabled
<daurnimator>
`zig build-lib` isn't 100% compatible with ar... maybe we should have a `zig ar` for compat reasons?