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/
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<scientes> pub const arch = Arch{ .aarch64 = Arch.Arm64.v8 };
<scientes> this is weird
<scientes> I guess this came from llvm
scientes has quit [Ping timeout: 250 seconds]
hio has quit [Quit: Connection closed for inactivity]
scientes has joined #zig
darithorn has quit [Remote host closed the connection]
scientes has quit [Ping timeout: 250 seconds]
hio has joined #zig
wilsonk has quit [Ping timeout: 268 seconds]
wilsonk has joined #zig
_whitelogger has joined #zig
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #zig
develonepi3 has quit [Remote host closed the connection]
wilsonk has quit [Ping timeout: 250 seconds]
wilsonk has joined #zig
return0e_ has quit [Ping timeout: 255 seconds]
return0e has joined #zig
gunnarahlberg has joined #zig
gunnarahlberg has quit [Read error: Connection reset by peer]
gunnarahlberg has joined #zig
gunnarahlberg has quit [Ping timeout: 246 seconds]
jjido has joined #zig
_whitelogger has joined #zig
_whitelogger has joined #zig
return0e has quit [Read error: Connection reset by peer]
return0e_ has joined #zig
_whitelogger has joined #zig
wootehfoot has joined #zig
_whitelogger has joined #zig
Barabas has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 246 seconds]
MajorLag is now known as tgschultz
_whitelogger has joined #zig
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ichorio has joined #zig
jjido has joined #zig
hio has quit [Quit: Connection closed for inactivity]
hio has joined #zig
develonepi3 has joined #zig
SimonNa has joined #zig
<gamester> So I've been working on implementing a kind of "ECS" system that learns from Overwatch and the new stuff Unity is doing, as their approaches are super flexible, simple, and performant at the same time. Definitely the way to go for most code. On top of this Unity is working on something they call the Burst compiler which automatically SIMDifies their ECS code, they say it's already as good as ISPC. This is super interesting and it makes me hope
<gamester> that I can do something similar at some point by parsing Zig code (using the standard library) and auto converting it to @Vector code. How this will work and how difficult it will be I have no clue at this point as I have yet to think about it. A pipe dream perhaps, or perhaps not!
dd10 has joined #zig
<gamester> This would all be directed from tags/comments in the source code which hint to the Zig-to-@vector transpiler on what to do
knebulae has joined #zig
dd10 has quit [Quit: Page closed]
<gamester> andrewrk: Could this kind of thing happen in zig? https://pastebin.com/raw/YXPBXJcX - I assume slices are immune from it
<gamester> oops I forgot it's saturday, you might be away :)
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 240 seconds]
MajorLag has quit [Ping timeout: 245 seconds]
<gamester> andrewrk: Will there be a way to utilize llvm math intrinsics? sqrt, cos, sin, etc
wootehfoot has quit [Read error: Connection reset by peer]
Ichorio has quit [Read error: Connection reset by peer]
Ichorio has joined #zig
Barabas has quit [Ping timeout: 256 seconds]
MajorLag has joined #zig
MajorLag has quit [Ping timeout: 255 seconds]
MajorLag has joined #zig
MajorLag is now known as tgschultz
a_chou has joined #zig
a_chou has quit [Quit: a_chou]
<andrewrk> I don't think auto converting to use @Vector makes sense. we should work on manually expressing things using vectors
wootehfoot has joined #zig
<gamester> andrewrk: Well, the Unity Burst compiler is aware of Unity's job system, ECS architecture, containers, and memory layout (not exactly sure what they mean). It's a very specific thing. They need an entire compiler because C# is not powerful enough to let them use a c# to c# transpiler and of course when you've generated code it's always a question on how you combine that with the rest of your codebase especially if you intend it to replace other
<gamester> code. With Burst they can automatically convert job kernels (that look like very simple c# code) into extremely fast AOSOA code (for example).
<gamester> In this specific case of using an ECS architecture throughout your engine and game's codebase, I think a solution like this makes sense. In general I agree with you.
dd10 has joined #zig
<gamester> andrewrk: Sorry everything's a bit vague still. I wasn't (and still am not) aware of the full details of Unity Burst so I just wrote about the SIMD stuff. I suspect that custom code gen might be worth it, I have some vague ideas about going further than Unity by generating multiple versions of job kernels to optimize some data layout stuff
<andrewrk> I think this has to do with Just-In-Time vs Ahead Of Time compilation
<andrewrk> as far as I'm aware, Unity using JIT, and zig is AOT
<gamester> No, this is about having a compiler that's aware of the details of Unity. (https://www.youtube.com/watch?v=NF6kcNS6U80)
<gamester> they're trying to get away from a general purpose compiler
<gamester> AOT is only part of it
dd10 has quit [Ping timeout: 256 seconds]
reductum has joined #zig
<gamester> One thing I can do to simplify SIMD programming is making the allocation for all arrays a multiple of the maximum vector length. I wonder if SIMD programmers generally prefer that or if they duplicate their code to handle less data than the vector length
<gamester> oh or always do a masked load and store
darithorn has joined #zig
reductum has quit [Quit: WeeChat 2.4]
scientes has joined #zig
darithorn has quit [Remote host closed the connection]
Barabas has joined #zig
<Barabas> I think vectorizing existing code is the wrong way to go about it.
<Barabas> It's better to be explicit about it. Either by writing explicit SSE code or by writing kernels like in graphics apis and ISPC.
<scientes> yes, auto-vectorization rarely works well
<scientes> look at how bag gcc's -O3 is
<scientes> *bad
Barabas has quit [Ping timeout: 256 seconds]
jjido has joined #zig
Ichorio has quit [Ping timeout: 250 seconds]
_whitelogger has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dewf has joined #zig
scientes has quit [Remote host closed the connection]
scientes has joined #zig
dewf has quit [Quit: Leaving]