ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
noonien has quit [Quit: Connection closed for inactivity]
darithorn has joined #zig
darithorn has quit [Remote host closed the connection]
<achambe> Just had an idea
<achambe> that json parser by tiehuis
<achambe> I wonder if coroutines would be cleaner than the switch based state machine
<achambe> I guess it would need to wait for the stacksize reflection
Ichorio has joined #zig
tridactyla has quit [Ping timeout: 276 seconds]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjido has joined #zig
jjido has quit [Client Quit]
alexnask has joined #zig
<alexnask> @acahmbe Why would we need the stacksize reflection to use coroutines in that case (the json parser)?
<alexnask> Isn't the only error we need to worry about the allocation failure on the coroutine's state?
<achambe> alexnask: well the current json parser is zero allocation
<alexnask> I assume the coroutine's stack is also allocated by the async allocator
<achambe> yeah, it would work, but it is actually a downgrade
<alexnask> I'm pretty sure it uses an ArrayList to store the values
<alexnask> I agree, I was just wondering why you talked about the stacksize reflection, if I was missing something about LLVM/zig coros
<achambe> Hmm, I was just thinking it was needed to make a fixed size coroutine stack
<achambe> or however it works
<achambe> as a struct
<achambe> meh, im just talking nonsense :)
<alexnask> I'm not too familiar with the coroutine implementation to be honst
<achambe> there are plenty more parsers needed in the future anyway.
<alexnask> I'd have to make sure
<alexnask> I'm pretty sure you would end up with similar codegen, LLVM is really good at optimizing the coros away
<achambe> yeah, I am a bit curious about them, haven't had a chance to see even the C++ coroutines
<alexnask> There are a couple of interesting cppcon videos thawt talk about the C++ coro proposals + some low level implementation details in the LLVM size
<achambe> used for anything big**
<alexnask> in the LLVM side**
<alexnask> Basically the coros get compiled down to state machines anyway, so with inlining + memory allocation elision I'm confident you'd get back something similar to the original state machine
<alexnask> If LLVM can elide the allocator calls, which I'm not sure it can if the allocator is not malloc/free
<GitHub65> [zig] tiehuis pushed 1 new commit to master: https://git.io/vpwKa
<GitHub65> zig/master d7b0299 Marc Tiehuis: Fix bigint multi-limb shift and masks
tiehuis has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tiehuis has quit [Quit: WeeChat 2.1]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexnask has quit [Ping timeout: 264 seconds]
alexnask has joined #zig
davr0s has joined #zig
jjido has joined #zig
Ichorio has quit [Ping timeout: 260 seconds]
jjido has quit [Quit: Textual IRC Client: www.textualapp.com]
noonien has joined #zig
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<alexnask> I'm getting really weird behavior with my ZigList sbo implementation
<alexnask> I suspect some buffer is written to without a resize but this should crash with the current implementation too
<alexnask> Or perhaps we are copying a small buffer then writing to the copy, that should probably work (although it sounds like a bug in the original implementation too, each buffer should own its own memory)
jjido has joined #zig
jjido has quit [Client Quit]
SimonNa has joined #zig
qazo has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<MajorLag> Given that there is no official documentation for the build system, where's the best place to see what my options are? I want to pre-process some files and embed the results (using @embedFile or some other mechanism). Unfortunately I can't just use comptime for this due to the lack of most pointer stuff working in comptime.
qazo has quit [Read error: Connection reset by peer]
qazo has joined #zig
qazo has quit [Ping timeout: 248 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qazo has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
Ichorio has joined #zig
Ichorio has quit [Ping timeout: 264 seconds]