ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
JinShil has joined #zig
isd has quit [Quit: Leaving.]
<achambe> andrewrk: is the code for your async http server online somewhere?
<andrewrk> achambe, the tcp one is but I didn't finish the http one yet
<GitHub47> [zig] andrewrk closed pull request #970: Fixed extern enums having the wrong size (master...extern-enum-size-fix) https://git.io/vp0ht
<GitHub124> [zig] andrewrk pushed 1 new commit to master: https://git.io/vpaaP
<GitHub124> zig/master aa2586d Jimmi Holst Christensen: Fixed extern enums having the wrong size (#970)...
<andrewrk> alexnask, oh wow, your @typeInfo implementation works with using fields of type `type` and the nested structs even works
<andrewrk> I thought you were blocking on pointer reform
<GitHub79> [zig] andrewrk closed pull request #951: Metaprogramming - @typeInfo [DONE] (master...reflect_reify) https://git.io/vpnmb
<GitHub15> zig/master ec2a3ed Alexandros Naskos: Attempt at adding comptime union field access
<GitHub15> zig/master fb88f5a Alexandros Naskos: @typeInfo with void payloads now works!
<GitHub15> zig/master 7eab623 Alexandros Naskos: One step towards @typeInfo
<GitHub15> [zig] andrewrk pushed 37 new commits to master: https://git.io/vpaVA
<andrewrk> @typeInfo has arrived
<andrewrk> go nuts
<MajorLag> That's some impressive work. I really didn't expect to see that idea implemented so soon.
<GitHub7> [zig] andrewrk closed pull request #981: ArrayList iterator, unifying API of HashMap and its derivatives (master...ArrayIteratorUnifiedSyntax) https://git.io/vp2ZW
<GitHub114> zig/master e907c5c Braedon: Unified API
<GitHub114> [zig] andrewrk pushed 2 new commits to master: https://git.io/vpawn
<GitHub114> zig/master 33fa87a Andrew Kelley: Merge pull request #981 from BraedonWooding/ArrayIteratorUnifiedSyntax...
<andrewrk> neither did I
davr0s has joined #zig
relatingdata has joined #zig
<GitHub124> [zig] tiehuis closed pull request #973: Add json decoder (master...json-decoder) https://git.io/vpugF
<GitHub174> [zig] tiehuis pushed 3 new commits to master: https://git.io/vpaPS
<GitHub174> zig/master ef3111b Marc Tiehuis: Use allocator backed array for json value decoder
<GitHub174> zig/master f174726 Marc Tiehuis: Fix review comments for json decoder
<GitHub174> zig/master 0afc6a9 Marc Tiehuis: Add json decoder...
jjido has joined #zig
relatingdata has quit [Quit: Page closed]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<alexnask> @andrewrk The only thing that kinda blocked me was nullable types, I really hate how I had to abuse @typeOf(undefined)
<alexnask> But that will be fixed eventually
JinShil has quit [Quit: Leaving]
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…]
davr0s has joined #zig
<andrewrk> yeah, and it's actually quite a nice workaround for the time being
<andrewrk> but - agreed - I've started pointer reform branch
<alexnask> @andrewrk Isn't not being able to reassign type variables and have pointers to types/nullable types a separate bug?
<alexnask> I mean, with pointer reform I guess lots and lots of pointer code will change so the bugs will be corrected with it
<alexnask> But they could be fixed in isolation, right?
<andrewrk> the isolated fix is to introduce a separate syntax for address-of and pointer type
<andrewrk> e.g. * for pointer type, & for address-of
<alexnask> Why is that? I fail to see how it's related to being unable to reassign a variable of type 'type'
<alexnask> I know a = b; -> *(&a) = b;
<andrewrk> let me show you some Zig IR
<andrewrk> the & operator - if a is type `type`, modifies the type to be a pointer
<alexnask> Right, so the same IR is generated as for creating a reference type from a
<alexnask> pointer type*
<andrewrk> if a = i32, then @typeOf(&a) == type. if a = i32(1), then @typeOf(a) == &i32
<alexnask> I see, gotcha
<alexnask> I assume something similar happens with ?type behind the scenes
<andrewrk> right. the maybe unwrap operator needs a pointer because you can assign to it, e.g. ??a = 1234;
<andrewrk> wait a minute, I'm getting two things confused
alexnask has quit [Quit: Leaving]
alexnask has joined #zig
<andrewrk> I forget why, but the zig IR instructions for dealing with nullable types need pointer values
<andrewrk> alexnask, oh right. if (nullable_value) |*unwrapped_ref| { ... }
<alexnask> @andrewrk TypeTableEntry* get_maybe_type(CodeGen*, TypeTableEntry*): Assertion `child_type->di_type' failed. is the error when trying to define a struct with a nullable type field
<alexnask> Which probably means 'type' doesn't have a LLVM type attached to it (which makes sense)
<andrewrk> oh maybe there's an additional problem here
<andrewrk> I don't think I've ever tested making a struct that uses types that are not valid at runtime
<alexnask> 'type' works fine if you only use it in a comptime context
<alexnask> seems to work in a runtime context too woops :P
<andrewrk> hmmm. that sounds like a bug
<alexnask> (the field becomes a 0-bit)
<alexnask> Idk it's a pretty weird edgecase
<alexnask> Trying to assign to the field yields 'error: cannot assign to constant' but it can be constructed properly
<alexnask> woops my instance was const
<alexnask> assigning seems to work, so I agree it's a bug for sure :p
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexnask> andrewrk Are there any async code docs/realistic examples?
<alexnask> I assume they work much like C++ coroutines?
<andrewrk> that's a big gap in the docs
<andrewrk> yes they work like c++ coroutines
<andrewrk> did you see the tcp server example?
<andrewrk> it's still W.I.P. but it's the best example right now
<alexnask> I'll take a look at it, thanks
<andrewrk> + look in std/event.zig
<alexnask> I love that struct literal idea
<alexnask> In fact, I think it would be useful to generalize it for all brace-initializers where we know the expected type
<alexnask> (arrays, slices, union, etc.)
<andrewrk> that's what I'm thinking - tuples would implicitly cast to arrays and slices, struct literals would implicitly cast to structs and unions
Hejsil has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ichorio has joined #zig
davr0s has joined #zig
Hejsil has quit [Ping timeout: 260 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noonien has joined #zig
davr0s has joined #zig
alexnask has quit [Quit: Leaving]
<GitHub65> [zig] andrewrk pushed 1 new commit to master: https://git.io/vpVHw
<GitHub65> zig/master 8721eb6 Andrew Kelley: zig fmt: fix tokenization of float literal with exponent
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…]
steveno_ has joined #zig
steveno_ has quit [Quit: Leaving]
davr0s has joined #zig
<GitHub133> [zig] andrewrk pushed 1 new commit to master: https://git.io/vpwkL
<GitHub133> zig/master eef21df Andrew Kelley: zig fmt: same-line comment on comptime expression
<GitHub121> [zig] andrewrk pushed 1 new commit to master: https://git.io/vpwk0
<GitHub121> zig/master 0fc8885 Andrew Kelley: zig fmt: switch with empty body
jjido has joined #zig
Ichorio has quit [Ping timeout: 260 seconds]
Hejsil has joined #zig
<GitHub30> [zig] Hejsil pushed 1 new commit to master: https://git.io/vpwsc
<GitHub30> zig/master 87c0060 Jimmi Holst Christensen: Made container methods that can be const, const
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hejsil has quit [Quit: Page closed]