ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
Ichorio has quit [Ping timeout: 240 seconds]
<testuser678>
What is the correct way to access a field on an optional pointer to a c struct (?*struct_foobar)? I've tried accessing it directly, dereferencing, and dereferencing after checking for null
<andrewrk>
hi n3t
<andrewrk>
testuser678, struct_foobar.?.*
<andrewrk>
this asserts that it is not null, then dereferences it
<andrewrk>
I can advise better if you show me some code
<testuser678>
Note that the gist doesn't reflect exactly what you said, but I tried that also - the error I'm getting is `error: type 'struct_nfq_q_handle' does not support field access`
<daurnimator>
testuser678: I think you have a pointer to a pointer there
<daurnimator>
or maybe not.
<andrewrk>
testuser678, build with --verbose-cimport and have a look at the warnings. or `zig translate-c foo.h --verbose-cimport` where `foo.h` has #include <libnetfilter_queue/libnetfilter_queue.h> in it
<andrewrk>
have a look at the warnings as well as the outputted zig code
<andrewrk>
I'm guessing it says "downgraded struct_nfq_q_handle to opaque type because XYZ"
<testuser678>
Awesome, I'll check it out
<testuser678>
Thanks all
<testuser678>
I don't see that error message, but `pub const struct_nfq_q_handle = @OpaqueType();` is there
marmotini_ has joined #zig
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
hooo has quit [Quit: Connection closed for inactivity]
<daurnimator>
testuser678: what about nfq_q_handle itself?
darithorn has quit [Quit: Leaving]
<daurnimator>
Tried locally and I see: `pub const nfq_q_handle = struct_nfq_q_handle`
<daurnimator>
andrewrk: --verbose-cimport doesn't seem to do anything
<daurnimator>
testuser678: uh wait
<daurnimator>
testuser678: looking at the header. it *is* opaque
<daurnimator>
testuser678: your link goes to the private definition
emekoi has quit [Ping timeout: 250 seconds]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
<testuser678>
daurnimator: Ah, whoops. I've only used wrappers around netfilter_queue in higher-level languages before and I think they made that info available
<testuser678>
Thank you for pointing that out, it just clicked for me
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
allan0 has joined #zig
reductum has joined #zig
reductum has quit [Client Quit]
forgot-password has joined #zig
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 246 seconds]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #zig
kristate has joined #zig
hooo has joined #zig
redfreeman has joined #zig
<redfreeman>
@andrewrk is connectfree.co.jp hiring zig programmers? the website redirect to home page, and shows nothing
redfreeman is now known as red_freeman
<kristate>
red_freeman: yes, we are hiring
redfreeman has joined #zig
redfreeman has left #zig [#zig]
redfreeman has joined #zig
redfreeman has left #zig [#zig]
redfreeman has joined #zig
<redfreeman>
kristate: do you have a jd or something?
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
<kristate>
jd = job description?
<redfreeman>
yes,sir
red_freeman has quit [Quit: Page closed]
<kristate>
we can take the conversation off irc if you are serious, but mainly supporting the language. We have a number of internal projects that are written in Zig and keeping Zig healthy is very important
<kristate>
I want to make sure that key developers are well paid
<redfreeman>
yes, I am interested,
<kristate>
cool, please shoot me an email: kt@connectfree.co.jp thanks
<redfreeman>
ok
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
steveno has joined #zig
kristate has quit [Remote host closed the connection]
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
steveno has quit [Ping timeout: 250 seconds]
kristate has joined #zig
<redfreeman>
kristate: I have sent you an email, my address is fancycode@gmail.com
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
steveno has joined #zig
halosghost has joined #zig
marmotini_ has quit [Quit: Leaving]
Ichorio has joined #zig
steveno has quit [Ping timeout: 260 seconds]
steveno has joined #zig
forgot-password has quit [Quit: leaving]
kristate has quit [Remote host closed the connection]
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
redfreeman has quit [Remote host closed the connection]
steveno has quit [Ping timeout: 250 seconds]
wootehfoot has joined #zig
redfreeman has joined #zig
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
meheleventyone has joined #zig
redfreeman has quit [Remote host closed the connection]
redfreeman has joined #zig
Zaab1t has joined #zig
forgot-password has joined #zig
steveno has joined #zig
meheleventyone has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
meheleventyone has joined #zig
meheleventyone has quit [Client Quit]
wootehfoot has quit [Read error: Connection reset by peer]
redfreeman has quit [Remote host closed the connection]
return0e has quit [Remote host closed the connection]
<testuser678>
Is `zig fmt` not available on master? Or is it part of the self-hosted compiler (zig2?)
<andrewrk>
testuser678, the latter - it's part of self-hosted only at the moment
<testuser678>
How far along is the self-hosted compiler? Is it viable to switch over for a side project or does it still have many rough edges
<andrewrk>
it's not viable at all, you can't use it for anything but `zig fmt`
<testuser678>
andrewrk: cool, thanks
<andrewrk>
there are some core language features to nail down before progressing further on self-hosted, I think
<testuser678>
makes sense
<testuser678>
Is the community mostly on here and github?
<andrewrk>
as is, the self-hosted compiler was a test bed for async/await/coroutines features of the language. it served that purpose very well as I am now rewriting that aspect of zig with new knowledge