ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<unique_id>
I really like doing "if (comptime expr)" instead of "if (expr)" to highlight the comptness of the branching when the if statement isn't top-level. It's awesome that I can just do that.
<unique_id>
The branching is unecessary though. I have a field in a struct that's sometimes the void type, so I comptime branch to skip setting it, but I might just let the compiler remove the code instead! void is really cool
kristate has joined #zig
kristate has quit [Remote host closed the connection]
<scientes>
unique_id, I agree, its like #ifdef HAVE_EXPR
kristate has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
JinShil has joined #zig
kristate has quit [Remote host closed the connection]
kristate has joined #zig
<scientes>
how do i zero-initialize something?
<scientes>
*a struct
<scientes>
is there a shortcut?
<scientes>
nvm
andrewrk has joined #zig
kristate has quit [Ping timeout: 244 seconds]
kristate has joined #zig
<kristate>
scientes: var s: myStruct = undefined;
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Quit: pdmer]
davr0s has joined #zig
kristate has quit [Remote host closed the connection]
pdmer has joined #zig
zolk3ri has joined #zig
pdmer has quit [Quit: pdmer]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
kristate has joined #zig
kristate has quit [Ping timeout: 244 seconds]
JinShil has quit [Quit: Leaving]
Tobba has quit [Remote host closed the connection]
pdmer has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdmer has quit [Quit: pdmer]
davr0s has joined #zig
pdmer has joined #zig
mahmutov has quit [Ping timeout: 244 seconds]
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Quit: pdmer]
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Client Quit]
pdmer has joined #zig
pdmer has quit [Quit: pdmer]
<unique_id>
kristate: that does not zero initialize the struct. It doesn't initialize it to anything.
pdmer has joined #zig
<unique_id>
scientes: I know you said nvm but just in case... You'll have to do "= undefined" and then @memset(...) or maybe there's some std function as well.
noonien has quit [Quit: Connection closed for inactivity]
pdmer has joined #zig
hooo has left #zig [#zig]
pdmer has quit [Client Quit]
zolk3ri has quit [Remote host closed the connection]
pdmer has joined #zig
pdmer has quit [Quit: pdmer]
kristate has joined #zig
kristate has quit [Remote host closed the connection]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<unique_id>
andrewrk: Do you not want to start with OpenGL and then you or others can port later to vulkan? It seems like vulkan could be an enormous distraction and could also cause streaming problems. Even with validation layers you could have issues with your system becoming unresponsive / it being difficult to shut down your program. Vulkan is also so low level that it might not make sense for 99% of the apps to write directly in vulkan.
<unique_id>
Take a look at https://github.com/floooh/sokol - It supports metal and d3d11 but not d3d12 and vulkan yet. You could think of Vulkan as requiring half the driver to be in your application but it hardly makes sense to repeat that work for each application
<unique_id>
so something like sokol might be ideal in the future