ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
isd has joined #zig
<MajorLag> ugh, comptime bugs...
hoppetosse has joined #zig
<MajorLag> ...and it makes no sense. great.
Ichorio has quit [Ping timeout: 256 seconds]
qazo has quit [Ping timeout: 260 seconds]
hoppetosse has quit [Ping timeout: 256 seconds]
steveno_ has joined #zig
steveno_ has quit [Ping timeout: 276 seconds]
steveno_ has joined #zig
Hejsil has quit [Quit: Page closed]
qazo has joined #zig
isd has quit [Quit: Leaving.]
noonien has quit [Quit: Connection closed for inactivity]
qazo has quit [Ping timeout: 264 seconds]
qazo has joined #zig
steveno_ has quit [Quit: Leaving]
qazo has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
<GitHub158> [zig] andrewrk pushed 2 new commits to master: https://git.io/vpYnt
<GitHub158> zig/master c4840d7 Andrew Kelley: add test case for #936
<GitHub158> zig/master 1098545 Andrew Kelley: std.zig.parser: remove unused field
relatingdata has joined #zig
relatingdata has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
davr0s has quit [Client Quit]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
Ichorio has joined #zig
hoppetosse has joined #zig
<alexnask> Can I print a C-style string with std.debug.warn?
<alexnask> Or should I wrap it up in a slice?
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjido has joined #zig
jjido has quit [Client Quit]
<MajorLag> have to wrap it. Std.c_str has a convenience function: `warn("{}\n", c_str.toSliceConst(str));`
<alexnask> Right, I just inited a u8 slice since the function I used returned the size too directly, no need to strlen it
<alexnask> This is so weird, I can get a simple OpenGL window up and going with wglCreateContext but when I use wglCreateContextAttribsARB to get a newer version of OpenGL I get no window
<alexnask> (and the rendering context returned is non-null)
<MajorLag> again, something pointer reform should help with. [*]null const u8 will be known to have a null terminator so fmt can deal with it automatically.
<alexnask> It works now wtf :P
<alexnask> (the modern OpenGL context)
<MajorLag> that's... not supposed to happen?
<MajorLag> threading or driver issue?
<alexnask> I think I forgot to release the dummy window (for the OpenGL loading) DC
<alexnask> (Before destroying it)
<alexnask> Although I don't quite see how it stopped the window from showing up :p
jjido has joined #zig
hoppetosse has quit [Quit: Leaving]
davr0s has joined #zig
<alexnask> What is the recommended way to get a &T out of an array? I would think it is implicitely convertable but it doens't seem to be, I just use &array[0] for now
<MajorLag> array is an array of T or &T?
<alexnask> Array of T
<MajorLag> then &array[index] is correct, as far as I'm aware.
<alexnask> I know it's correct, I would just think 'array' would implicitely convert to a pointer to the first element
<alexnask> Eh, w/e :P
<MajorLag> slices have a .ptr member: &slice[0] == slice.ptr.
<alexnask> I know, arrays don't appear to have one, I guess I could do array[0..].ptr too, it was more of a question about the idiomatic way to do stuff :)
<MajorLag> so I suppose you could make it even worse: array[0..].ptr;
<MajorLag> well slices are structs behind the scenes (check their TypeId), arrays aren't.
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<MajorLag> though they do have a .len pseudo-member, so they could have had a .ptr one too
<alexnask> I think I figured out where all my issues came from
<alexnask> the wgl* functions are stdcallcc rather than extern
<alexnask> Should have checked earlier >.<
<alexnask> Yup, works like a charm now
jjido has joined #zig
<alexnask> @MajorLag All the OpenGL functions are missing "opengl32" and stdcallcc in your package
<alexnask> Editing, will be included in my patch
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MajorLag> all winapi calls are stdcallcc. I guess I missed it because it worked fine on win64 due to stdcallcc being the calling convention anyway.
jjido has joined #zig
<MajorLag> and I think you only have to provide the name if you're not linking to OpenGL32.lib? I recall having some issue around that.
<alexnask> Well the names next to extern make zig export the symbols to .def files
<alexnask> So that we can build a leaner .lib for the library
<alexnask> And actually in my case I need to link with both the generated .lib and the system .lib to have everything work file
<alexnask> I appear to have symbols with underscores in front of them defined in the generated .lib that just jmp to the symbols in the system .lib, not quite sure what is going on with that atm.
steveno_ has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
steveno_ has quit [Remote host closed the connection]
davr0s has joined #zig
davr0s has quit [Client Quit]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adagio1 has joined #zig
steveno_ has joined #zig
steveno_ has quit [Client Quit]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hinst has quit [Read error: Connection reset by peer]
hinst has joined #zig
davr0s has joined #zig
<andrewrk> https://tio.run/##NU29CsIwEN7zFNdMKUheQARHNwcHx9KatBykuXK9VKz47DEB/bbvf8cp5wfFVWAVByc447wQi9GF6vao1JIGGCPMPUbTQrMROngrKNh6riVK0o0YfCkLv6pikezk5SbumsSUkZr@ef@0fTKKN/riQ6AD3ImDa@rhJ@cv
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MajorLag> A zig playground?
davr0s has joined #zig
<andrewrk> yes, made by a third party
<alexnask> Is there any way to make translate-c not process #include's?
<andrewrk> alexnask, can you explain a bit more about your use case?
<alexnask> Sure, I'm currently making some DSound bindings and I would like to only process definitions in dsoud.h and not the rest of the windows headers it includes
<alexnask> I can probably pick out the definitions I need by hand pretty quickly, I'm just wondering if it is possible
<andrewrk> I see
<andrewrk> no there's no way to do that
<alexnask> Ok, good to know, time for cherrypicking!
jjido has joined #zig
chandlore_ has joined #zig
adagio1 has quit [Ping timeout: 256 seconds]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adagio1 has joined #zig
qazo has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
steveno_ has joined #zig
steveno_ has quit [Ping timeout: 265 seconds]
steveno_ has joined #zig
adagio1 has quit [Quit: Leaving.]
adagio1 has joined #zig
adagio1 has quit [Read error: Connection reset by peer]