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/
stripedpajamas has quit [Quit: sleeping...]
Snektron has joined #zig
marijnfs_ has joined #zig
aerona has joined #zig
mikdusan has quit [Ping timeout: 264 seconds]
<marijnfs_> what broker do you europeans use
<marijnfs_> shit wrong channel
stripedpajamas has joined #zig
blinghound has quit [Remote host closed the connection]
stripedpajamas has quit [Quit: sleeping...]
mwgkgk has joined #zig
mwgkgk has left #zig [#zig]
mwgkgk has joined #zig
nephele_ has joined #zig
_Vi has quit [Ping timeout: 260 seconds]
nephele has quit [Ping timeout: 240 seconds]
nephele_ is now known as nephele
waleee-cl has quit [Quit: Connection closed for inactivity]
marijnfs1 has joined #zig
marijnfs has quit [Ping timeout: 256 seconds]
stripedpajamas has joined #zig
gazler_ has joined #zig
gazler has quit [Ping timeout: 264 seconds]
betawaffle has quit [Ping timeout: 246 seconds]
wjlroe has quit [Ping timeout: 240 seconds]
guan has quit [Ping timeout: 272 seconds]
aerona has quit [Read error: Connection reset by peer]
betawaffle has joined #zig
guan has joined #zig
drp_ has quit [Quit: Leaving]
wjlroe has joined #zig
ky0ko_ has joined #zig
marijnfs_ has quit [Quit: Lost terminal]
dddddd has quit [Ping timeout: 258 seconds]
stripedpajamas has quit [Quit: sleeping...]
cole-h has quit [Ping timeout: 240 seconds]
cole-h has joined #zig
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
cole-h has quit [Client Quit]
mwgkgk has quit [Quit: Connection closed for inactivity]
stripedpajamas has joined #zig
ky0ko_ has quit [Remote host closed the connection]
stripedpajamas has quit [Quit: sleeping...]
nikita` has joined #zig
tdc has joined #zig
dermetfan has joined #zig
tdc has quit [Quit: Leaving]
frett27 has joined #zig
Patrice_ has quit [Ping timeout: 246 seconds]
dddddd has joined #zig
dermetfan has quit [Ping timeout: 260 seconds]
st4ll1 has quit [Quit: WeeChat 2.8]
_Vi has joined #zig
greenfork has joined #zig
frett27 has quit [Ping timeout: 265 seconds]
wootehfoot has joined #zig
waleee-cl has joined #zig
riba has joined #zig
riba has quit [Ping timeout: 260 seconds]
riba has joined #zig
dermetfan has joined #zig
dddddd has quit [Ping timeout: 260 seconds]
wootehfoot has quit [Ping timeout: 246 seconds]
wootehfoot has joined #zig
blinghound has joined #zig
<blinghound> error: expected 2 arguments, found 3 try qs.draw_command_data.init(qs.vertex_buffer_objects[0], GL_DRAW_INDIRECT_BUFFER);
<blinghound> the signature for the init function is
<blinghound> pub fn init(id: GLuint, target: GLenum) !MapBuffer(T, size)
<blinghound> does anyone have any idea why it thinks I'm passing 3 arguments in?
<blinghound> qs.vertex_buffer_objects is just a [5]GLuint
<blinghound> ah, unless it's implicitly passing self in
<blinghound> don't worry guys, I was calling the init function as a member function when it was returning a MapBuffer
<blinghound> I'm getting a ?*c_void back from the openGL call glMapBufferRange
<blinghound> is there a way to cast it to a []T if I know the amount of memory that has been allocated?
<ifreund> sure, just declare your slice as undefined then set ptr and len
<blinghound> with @ptrCast, I'm getting error: cast increases pointer alignment
<blinghound> I'll try
<ifreund> oh that's a different issue
<ifreund> you need to @alignCast() c_void as well usually
<ifreund> but you also can't cast it directly to a slice, since a slice is more than just a pointer, you need to cast it to a [*] pointer first
<ifreund> oh i think once you have the [*] ptr you can do `const my_slice = ptr[..length]`
<ifreund> which will turn the [*] ptr into a [] slice
<blinghound> ok so I get the *c_void from the glMapNamedBufferRange call
<blinghound> then I need to cast the *c_void to a [*]T?
<ifreund> yeah, something like @ptrCast([*]T, @alignCast(@alignOf([*]T), void_ptr));
<ifreund> you can also do @intToPtr([*]T, @ptrToInt(void_ptr)); which is a little less verbose
frett27 has joined #zig
xackus_ has joined #zig
<blinghound> @ifreund thanks ifreund, I *think* it's working now
<blinghound> although now I'm getting another issue
<blinghound> how do I format code here?
<ifreund> zig fmt file.zig
<blinghound> ah sorry I mean to send here
<ifreund> oh lol, use a pastebin of some kind, i like https://paste.rs
<ifreund> no zig syntax highlighting yet though
<blinghound> I'm using this struct
<blinghound> but when I try to assign .{ .vertex_count = 4 ...etc };
<blinghound> I'm getting an error: no member named 'vertex_count' in struct ....
<ifreund> sounds strange, could you paste the code where you're doing the assignment?
blinghound has quit [Remote host closed the connection]
dimenus has joined #zig
dimenus has quit [Client Quit]
dimenus has joined #zig
stripedpajamas has joined #zig
wootehfoot has quit [Ping timeout: 264 seconds]
dimenus has quit [Quit: WeeChat 2.8]
<ifreund> is this out of line? https://paste.rs/mbW.png
riba has quit [Ping timeout: 260 seconds]
<THFKA4> i wouldn't personally waste time engaging, but the madman may actually be genuine
<THFKA4> hard to tell with these things sometimes
stripedpajamas has quit [Quit: sleeping...]
<ifreund> heh, looks like they were trolling
wootehfoot has joined #zig
dddddd has joined #zig
_Vi has quit [Ping timeout: 260 seconds]
decentpenguin has joined #zig
wootehfoot has quit [Ping timeout: 265 seconds]
frett27 has quit [Ping timeout: 256 seconds]
frett27 has joined #zig
cole-h has joined #zig
dermetfan has quit [Ping timeout: 260 seconds]
<nerthus> if statement comparing strings, is mem.eql u8 "the way"?
watzon has joined #zig
<watzon> Even during NimConf, they're talking about Zig
<mq32> :D
<mq32> everyone talks about zig!
<mq32> nerthus: yes it is!
r4pr0n has joined #zig
r4pr0n has quit [Quit: r4pr0n]
<mq32> andrewrk on zls: "this is already pretty good"
<mq32> this is an understatement!
Akuli has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
<andrewrk> ifreund, my suggestion is to write your comments for the audience, not the person you are actually replying to. If you feel the point has already been made for an astute reader, you might not need to reply at all
<leeward> watzon: They want to use Zig as a C compiler; amusing.
decentpenguin has quit [Quit: decentpenguin]
marler8997 has joined #zig
<marler8997> I've ported my python zig update tool to zig
st4ll1 has joined #zig
stripedpajamas has joined #zig
<andrewrk> dom96, congrats on what looks like a successful virtual nimconf :)
<andrewrk> looks like some interesting talks
<andrewrk> marler8997, nice, that looks handy. looking at the build setup it makes me want to hurry up and get the package manager done
<marler8997> yeah feel free to use it however you like
stripedpajamas has quit [Quit: stripedpajamas]
<marler8997> andrewrk, if you like I could work on getting an initial http client into the standard lib, based on my ziget library https://github.com/marler8997/ziget
<marler8997> I created it to be very minimal, I think could be a good starting off point
<andrewrk> marler8997, this effort should probably be coordinated with mq32 (https://github.com/MasterQ32/zig-network)
Akuli has quit [Quit: Leaving]
<marler8997> mq32, what's the plan of action for getting an http client into the std lib? I have a minimal http client here that I've been using: https://github.com/marler8997/ziget/tree/master/ziget
slowtype1 has quit [Ping timeout: 256 seconds]
slowtype1 has joined #zig
greenfork has quit [Ping timeout: 256 seconds]
<ifreund> andrewrk: that's a good way to approach things, thanks
<andrewrk> interesting, linux does not give you EISDIR if you open a directory for read-only, and there is no flag to make it give you EISDIR
<leeward> I wonder if it's because reading directories used to give inodes.
<andrewrk> you can pass O_DIRECTORY to make it fail if it's *not* a directory, but you can't pass e.g. O_FILE to make it fail if it is a directory
<leeward> Gotta stat it?
waleee-cl has joined #zig
<leeward> I know it's not true on modern versions of Linux, but on older versions and most other unices you could hexdump a directory and get something useful.
dermetfan has joined #zig
dermetfan has quit [Ping timeout: 272 seconds]
nikita` has quit [Quit: leaving]
xackus_ has quit [Ping timeout: 264 seconds]
Zannzen has quit [Remote host closed the connection]
zannzen[m] has joined #zig
frett27 has quit [Ping timeout: 246 seconds]
slowtype1 has quit [Ping timeout: 260 seconds]
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #zig