ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<MajorLag> any chance a bug was introduced recently regarding printing usize? I'm getting some odd results.
<MajorLag> wait, nevermind. They make sense when I pay attention
<MajorLag> ...yeah, it helps to read the right section of code
relatingdata has joined #zig
relatingdata has quit [Ping timeout: 260 seconds]
btbytes has joined #zig
btbytes has quit [Quit: Textual IRC Client: www.textualapp.com]
relatingdata has joined #zig
relatingdata has quit [Quit: Page closed]
heakins has joined #zig
heakins_ has joined #zig
heakins_ has quit [Client Quit]
heakins has quit [Ping timeout: 240 seconds]
qazo has quit [Read error: Connection reset by peer]
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…]
davr0s has joined #zig
return0e_ has quit [Ping timeout: 260 seconds]
<GitHub92> [zig] tiehuis opened pull request #949: Add initial complex-number support (master...complex-math) https://git.io/vpGce
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<alexnask> @andrewrk How is a ConstExpr void value represented?
<alexnask> Say I'm building a ConstUnionValue, I set the tag then want to set the payload, should I just set it to null if the payload type is void?
Dodo has joined #zig
<Dodo> how would I annotate that my function takes a slice?
<Dodo> take like an '[]const T' ?
<alexnask> Yes, if it is a read only slice
<Dodo> well, a Chunks Iterator should only have a read only slice
<Dodo> ChunksMut should have a write-slice
<Dodo> I can still shrink my version of the slice, right?
<alexnask> Right, taking a sub-slice does not modify the elements so it's fine :)
<Dodo> yeahh
<Dodo> is there a .len() method on slices?
<alexnask> a slice is a { ptr: &T, len: usize } struct
<alexnask> So just .len :)
<Dodo> hehe
<Dodo> no method like '.is_empty()' or something?
<alexnask> I don't think so
<Dodo> that would return a bool, true if .len is 0, false otherwise
<alexnask> @typeInfo() works for types with a void payload TypeInfo now! :D
<alexnask> Woop woop
<Dodo> mhhh, and splitting a slice so you get 2 subslices?
<Dodo> any buildin methods for that? or do I need to write my own?
<alexnask> Take a look at std.mem there may be somethings in there
<Dodo> there is split(), but that takes 2 slices
<Dodo> an returns an Iterator, which is not really what Im looking for
<alexnask> Right, I suggest you write your own helpers, they sound pretty trivial
<Dodo> that maybe should just return an array of 2 slices, untill tuples are a thing
<alexnask> probably, yes
<Dodo> [2][]const T <-- array of 2 slices, right?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexnask> Yup
<alexnask> Array of 2 tuples of const T to be exact
<alexnask> 2 slices*
<alexnask> :P
<Dodo> maybe I should just remove Tuple type that Enumerate() uses anyway, it really doesnt work out
<Dodo> mh, Im getting this error: `error: invalid character: '\t' `
<alexnask> Set your editor settings to use tabs instead of spaces
<alexnask> spaces instead of tabs**
<Dodo> guess gvim uses spaces then
<Dodo> and VisualCode just displays them as tabs or whatever
<alexnask> Yes, VSCode surely has a tabs/spaces option too
<alexnask> every editor since 1980 should have one :P
<Dodo> I once read a story that using vim could make you a better programmer, because you'd be forced to write everything by hand
<Dodo> no autocomplete and stuff,
<Dodo> and it would improve your typing speed and such
<alexnask> I've tried vim a couple of times in the past, could never get used to the way it does things
<alexnask> Emacs is much better imho :P
<Dodo> I...have emacs installed I think
<Dodo> but never really got to it yet
<alexnask> "error: unable to evaluate constant expression"
<alexnask> Thanks compiler
<alexnask> :p
<Dodo> allright, Chunks is finished!
<Dodo> now ChunksMut, that should just return []T on each iteration I guess
<Dodo> that'd be a mutable slice , right?
<alexnask> Yes
<alexnask> Nice :)
<Dodo> mhh what else...
<Dodo> Windows!
<alexnask> Do you have a .collect() or similar that consumes the iterator into an array?
<Dodo> &Windows(u32).init(array, 2) should give [1, 2], [2, 3], [3, 4] etc etc
<Dodo> Not yet, was planning on doing that also
<Dodo> but...collecting into an array?
<alexnask> What is the differene between Windows and Chunks?
<Dodo> Chunks do not overlap, Windows does
<alexnask> Right, gotcha
<Dodo> collecting into an array is kind of...dangerous
<alexnask> Well, yes, something like .to_array() would be a better name I guess
<alexnask> It should allocate the array ;)
<alexnask> On the heap
<Dodo> what if the iterator has more items then the len of the array
<alexnask> Right there needs to be some heuristic
<Dodo> what if the array has more space than the iterator
<Dodo> is there a Vector-like type?
<alexnask> The way I would do it is have a stack array of N elements
<alexnask> collect N at a time and move them into the heap allocated array (initially of size N)
<alexnask> reallocate the array for each chunk
<alexnask> There is ArrayList I think yes
<alexnask> Which would do all of this automatically
<Dodo> I mean, if there is a vector-like type, you could just consume the Iterator, calling .push() or .append() for each item
<alexnask> std.array_list
<Dodo> and not care about how the vector re-allocates etc, since you should not have to care about that
<alexnask> Sure
<Dodo> that should just be a function on Iterator, .collect() seems a good name I guess
<alexnask> @andrewrk I'm kinda stuck on @typeInfo, I'm generating a TypeInfo union at compile time, the tag (which is a TypeId) seems to work correctly
<alexnask> But as soon as I set a struct payload
<alexnask> I get an error from 'ir_resolve_const': "unable to evaluate constant expression" when I try to access the payload in a comptime ccontext
<alexnask> Which probably means the field access doesn't get that the whole thing is const.
<alexnask> hmm
<Dodo> error: expression value is ignored <-- mhh
<alexnask> _ = (expr)
<alexnask> You can't ignore any expression value (that includes returned values from functions) excpet for void s
<alexnask> _ = (expr) tells the compiler you don't need the expression
<Dodo> .collect() is a thing now
<alexnask> Nice :)
<alexnask> It's pretty feature complete now
<Dodo> it probably crashes if the allocation on .append() crashes, but well
<alexnask> You can propagate the error
<alexnask> It's really easy, one of the main selling points of zig
<Dodo> and it uses the debug allocator?? not sure if thats a good thing: https://github.com/DutchGhost/Zigerator/blob/master/src/Iterator.zig#L48
<alexnask> You should return !std.ArrayList(T) from collect
<alexnask> then in your while loop 'try list.append(val)'
<alexnask> And boom you get error handling on allocation failure
<Dodo> well, but the user handling the error of a collect() ...that might be weird? because when does that error happen?
<alexnask> You should probably add the allocator as an argument to collect()
<alexnask> What do you mean?
<Dodo> well, doesnt .append() only fail if there's no more RAM?
<alexnask> Probably
<alexnask> but
<alexnask> even if it's rare, the user should be able to catch it
<alexnask> If the user thinks it's not important, they can just "catch unreachable"
<Dodo> so returning an error for each .collect() call, while an error only occurs when there's no more RAM...
<Dodo> mh, fair enough
<alexnask> If their function returns an error union anyway, they can just 'try it.collect()' and they gain all the benefits
<Dodo> the allocator should just be a comptime argument?
<alexnask> It should be a &mem.Allocator (which is an interface much like Iterator(T))
<alexnask> Right, that looks good to me
<Dodo> mh, maybe functions like .max(), .max_by(), .max_by_key() (and also the .min() versions) are also nice to have
<Dodo> but that gives a bit of a problem, since that would only work on types that can use '<' and '>'
<alexnask> That's not much of an issue tbh
<alexnask> Say you have a max function in Iterator(T)
<alexnask> You would just write it like you normally would (using >, <)
<alexnask> And it just will give a compile error for types that don't support it
<Dodo> but the point is, that if I have my own struct, and an Iterator(my_struct) ...
<alexnask> What happens is that when you insantiate an Iterator(T)
<alexnask> Not all functions are generated
<alexnask> Only the ones you call
<alexnask> So if you make an Iterator(my_struct) and never call max
<alexnask> You won't get an error
<Dodo> I cant call those functions, while my_struct maybe holds 2 integers, so it is comparable
<alexnask> If you try to call max on it, that's when the error will kick in
<alexnask> Ah right, I though you were concerned with just the compiler erroring
<alexnask> Well in this case
<alexnask> you can have
<alexnask> max_filed(comptime field_name: []const u8)
<alexnask> field*
<alexnask> And use @field(my_struct, field_name)
<Dodo> nooo Im more concerned about how it's not going to work for types that dont have '<' and '>', while they can be compared in a way
<alexnask> which compiles down to the exact same as "my_struct.<field_name>"
<Dodo> or have all types implement '.lt()', and '.gt()'
<alexnask> Right, this is an option
<Dodo> wasn't there an rfc about being able to provide some kind of implementation of the compare operators for your own types?
<alexnask> You can check @typeId(T) == builtin.TypeId.Int or builtin.TypeId.Float and just use >, <
<alexnask> Otherwise generate code with lt(), gt()
<Dodo> mh, good point
<Dodo> however that would not really work for other buildin types, like arrays
<alexnask> Well, should you really be able to get the max array?
<Dodo> maybe you have an Iterator([10]i32) or something
<alexnask> How is the max array defined? The array with the biggest lenght? The array with the max element?
<alexnask> Imho if you need the maximum element from all arrays
<Dodo> the sum of the elements?..? pff hahaha,
<alexnask> You would probably it.flatten().max()
<Dodo> oh, .sum() !
<alexnask> Where flatten takes Iterator([N]T) and makes Iterator(T)
<Dodo> .flatten() is a better name than .flat_map() yeah
<alexnask> And if you need the max of the sum of the elements, I still think it's clearer for the user to request it
<Dodo> yeahh
<alexnask> By mapping a sum function and then taking the max
<alexnask> Using .lt() and .gt() is fine imho
<alexnask> If the user really wants it to work with an array, let them build a struct around it and define the methods
<Dodo> added a little @TODO, but first I have lunch!
<Dodo> brb!
Dodo is now known as Dodo|lunch
<alexnask> Right, it seems the compiler is unable to access union fields at comptime
<alexnask> So I'll fix that along with @typeInfo I guess :p
Dodo|lunch is now known as Dodo
<Dodo> how many people here work on the compiler? ;o
<alexnask> I just started :)
<alexnask> But I've seen 3-4 contributors up to now
<Dodo> ah allright! cool!
<alexnask> Writing compilers is like crack for me :P
<alexnask> If I start working on a bug I can sink into it so quickly and I just love the concept of writing a program that makes programs
<achambe> Haha, I wrote a c compiler then got burnt out pretty bad
<achambe> not even as complex as zig
<alexnask> The preprocessor is a bitch
<achambe> im appreciative of the work
<achambe> everyone is doing
<achambe> yeah preprocessor sucks
<achambe> My guess is for zig, the comptime interpreter is one of the more annoying things
<achambe> just a guess from reading issues
<alexnask> It's quite complex for sure from my 4-hour or so experience :p
<alexnask> But it's not that bad imho, there are just lots and lots of todos and unhandled cases
<alexnask> e.g. accessing unions at comptime, which I'm currently fixing
<Dodo> mh, I got somewhat interested in metaprogramming lately
<Dodo> but it's difficult to write something that writes code for you
<alexnask> @typeInfo is coming!
<alexnask> Which is a great first step
<Dodo> \o/
<alexnask> With @reify you then will be able to construct types
<alexnask> But arbitrary code is not possible to do
<alexnask> Like you can do in D/Nim
<Dodo> and what about something that in Python is called a decorator?
<alexnask> You can simulate that
<alexnask> By having:
<Dodo> @reify is something like a metaclass in python?
<alexnask> @reify will allow you to take a TypeInfo union and get a type out of it
<alexnask> TypeInfo looks like: http://prntscr.com/j9f8na
<alexnask> With lots and lots more structs
<alexnask> E.g. a struct info: http://prntscr.com/j9f91b
<alexnask> (It's missing method info but it will be added)
<alexnask> Currently I'm working on the inverse, @typeInfo, which takes a type and gives you a TypeInfo
<alexnask> Then I'll proably remove or deprecate all current metaprogramming calls (expect for @typeId, @sizeOf) and add a std.meta package that works on top of @typeInfo
noonien has joined #zig
<Dodo> btw, I wonder if 'O' could be infered here: https://github.com/DutchGhost/Zigerator/blob/master/src/Iterator.zig#L35
<Dodo> accessing 'other' 's T would solve it perhaps
<alexnask> Hmm
<alexnask> You could write a helper function to infer it I think
<alexnask> It would take @typeOf(other)
<alexnask> Remove the pointer, look for an 'it' field with @memberCount etc.
<alexnask> Get the type of the it field
<Dodo> or maybe add an 'Item' field on Iterator, than you should be able to say like 'other.item', right?
<alexnask> Right, then you would need the const Item = T; in Iterator
<alexnask> But you still need to get the iterator type to do IteratorType.Item
<Dodo> mhhhh
<alexnask> Actually, is other supposed to be an Iterator(O)?
<Dodo> yeah
<alexnask> Ok, so you could then do @typeOf(other).Child.Item
<alexnask> So Zip(T, O) -> Zip(T, @typeOf(other).Child.Item)
<ragge> hi! trying to target webassembly, but getting "unreachable" and "Aborted" when compiling: https://pastebin.com/raw/6LLR20pL
<ragge> i'm running the latest ci build of zig
<ragge> any ideas? what am I doing wrong? :-)
<alexnask> Sorry, I can't help you there, never tried the webasm builds
<Dodo> but adding an 'Item' field would increase the size of an Iterator, or would it be optimized out?\
<Dodo> it's only needed for the type-system basically
<alexnask> const Item = T; would not add a field
<alexnask> You can think of it as a comptime field
<Dodo> it's only needed for the type-system basically
<Dodo> woops
lqd has quit []
lqd has joined #zig
tiehuis has joined #zig
<tiehuis> ragge: try using `export fn add` and `zig build-obj` instead
<tiehuis> that will export using the C abi, I haven't really played around with anything other than small snippets in that way
<Dodo> btw, the Range iterator, shouldn't it take just 'start: usize' instead of a comptime?
<Dodo> what if you wanted to create a Range from 2 variables that are known at runtime
<ragge> tiehuis: thanks!
<alexnask> @Dodo Right I have the bad habit of putting everything in comptime :P
<alexnask> Makes more sense to have them as runtime parameters for sure
<GitHub47> zig/master 0501e06 Marc Tiehuis: crypto throughput test now uses os.time module
<GitHub47> [zig] tiehuis pushed 1 new commit to master: https://git.io/vpG9G
<alexnask> Comptime unions work now noice
davr0s has joined #zig
<alexnask> Does anyone know how I'm supposed to make a ConstExpr void value?
monteslu has quit []
monteslu has joined #zig
<alexnask> (In the compiler, I mean)
<tiehuis> not sure sorry
<alexnask> I've got a hunch that an empty struct value would do the trick
<Dodo> https://github.com/DutchGhost/Zigerator/blob/master/src/Iterator.zig#L40 <--- `other` should be of type '&Iterator(Item)' there, right?
rain1 has joined #zig
<alexnask> Right
<Dodo> I should add Fold
<Dodo> mh, I might be doing something weird, but the compiler crashes when I run my tests
<alexnask> Can you send me the code?
<alexnask> Of the narrowed down test case if possible
<Dodo> removing 'var sum = range.sum()' gets rid of the crash
<Dodo> it must be my implementation
<alexnask> Sure, the compiler should never crash though
<alexnask> Can you change the &Iterator(Item) -> &Self?
<Dodo> when I run the tests, I get a crash popup from Windows: "zig.exe has stopped Working"
<alexnask> It's the same thing, although I don't think that would cause a crash
<Dodo> in both .sum() and fold?
<alexnask> yes
<alexnask> Although I'm pretty sure
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexnask> The crash has something to do with the func
tiehuis has quit [Quit: WeeChat 2.1]
<alexnask> You pass add that takes 3 args
<alexnask> and call it with 2 args in fold
<alexnask> What I would do in your case is instead of having an add function
<Dodo> mh, look again at .sum()
<Dodo> that warn never even gets runned
<alexnask> I would have a type function that takes a T and defines an add function that takes 2 T's
<alexnask> Then use .fold(0, AdderStruct(Item).add) or smth
<Dodo> can I define a function inside a function?
<alexnask> Mb, I meant a function that returns a struct that defines a function
<alexnask> Not atm, you can define structs though :P
<Dodo> fine xD
<alexnask> or really, I would just do
<alexnask> self.fold(0, struct { fn add(a: Item, b: Item) Item { return a + b; } }.add)
<Dodo> so that's a hacky way for a closure? xD
<alexnask> Kinda ugly but you can think of it as a function expression syntax (with no captures) :p
<alexnask> Closures are not supported atm
<alexnask> I think the issue is with the argument capture and how that would all work safely
<Dodo> the argument can no longer be used once captured in the closure,
<Dodo> unless you capture by reference
<alexnask> Well, I for one would be ok with C++ style captures
<alexnask> But there's a lot of edgecases and ways to shoot your foot off
<Dodo> mh, I never had that much trouble with closures in Rust
<alexnask> + all allocations need to be explicit, this is a design decision (so you can't just move all your captures to the heap and be done with it like in most other languages)
<Dodo> but hey, that's the point of Rust :3
<alexnask> Right but rust closures rely on the burrow checker
<alexnask> The whole language has strong guarantees about memory so closures profit off of that
<Dodo> \o/
<Dodo> one thing that would also be cool to have is to be able to have an Iterator over slices,
<Dodo> now there is the for loop, but that doesnt work with our Iterators xD
<alexnask> Well you could write a SliceIterator
<alexnask> It sound pretty trivial
<Dodo> how should it be writting?
<Dodo> should it use the Range() Iterator to acces the index?
<Dodo> or should it take a slice, yank out a ptr to the first element, and a ptr to the last element, incrementing the ptr each time?
<alexnask> Both are possible, the second option sounds better to me though
<alexnask> So you can just store 2 pointers (current + end)
<Dodo> or like 'if (self.slice.len == 0) {return null;} var ret = self.slice[0]; self.slice = self.slice[1..]; return ret;'
<alexnask> Right, that's an option too, it's basically the same
<alexnask> If you think about it all you're doing is keeping a stable end pointer and bumping a pointer in front of it
<alexnask> I think it would actually pretty much generate the same code
<Dodo> the last one is less error prone I thing
<Dodo> *think
davr0s has joined #zig
<Dodo> yay, done
<alexnask> :D
<Dodo> maybe I should do a SliceIterMut and SliceIter
<Dodo> where SliceIterMut returns &T, SliceIter &const T
<Dodo> that would avoid copying each item
Dodo2 has joined #zig
Dodo has quit [Quit: Page closed]
Dodo2 is now known as Dodo
<alexnask> wow i'm blind
<Dodo> what happend @alexnask ?
<alexnask> I was passing a pointer to the first field instead of a pointer to the 3rd field
<alexnask> And banging mu head against the wall :p
<alexnask> Noice Pointer @typeInfo up and running!
<Dodo> hehehehe
<Dodo> I one type spent half a day in Python wondering why I got an error that some type was not Iterable...turned out I passed in a tuple, instead of tuple[0]
<Dodo> but yay! :D
<Dodo> "I one type"...err, "I one day"
<alexnask> @andrewrk Hey, could you take a look at https://github.com/zig-lang/zig/compare/master...alexnask:reflect_reify if you have a bit of time?
<alexnask> I just want to know if it's the right way to approach the problem in a general sense, although I think it's probably fine
hooo has joined #zig
<hooo> is string concatenation via '+' planned?
<alexnask> @hooo You can use ++ ;)
<alexnask> It works on any slice
<hooo> cool thanks
<alexnask> No problem, ask away if you have questions
<Dodo> can you index into an &[]T ?
<Dodo> which is a ptr to a slice, right?
<alexnask> I think you'd have to deref it first
<alexnask> (*slice_ptr)[idx]
<Dodo> I was thinking to have .split_at() and .split_at_mut() take a pointer to a slice, and return a [2]&const []T / [2]&[]T so you don't lose the original slice, but still get 2 subslices back
<Dodo> why is this distracted me from my schoolwork ._.
<alexnask> Taking a pointer to a slice seems weird to me
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<alexnask> Why not take the slice by value and return [2][]T ?
<alexnask> schoolwork is for losers, come to the dark side :P (/s)
<alexnask> We have pointers and cookies
<Dodo> hahahaha
<Dodo> why not take the slice by value....well, don't I lose the original slice?
cgag has quit []
cgag has joined #zig
<Dodo> and Im making my life easy, making templates for the next schoolproject
<Dodo> 15 forensic investigations and starting each time all over again, nah, that's not gonna work out
<alexnask> :D
<alexnask> What do you mean you will lose the original slice?
<alexnask> Taking it by value will just copy the ptr+len pair
steveno_ has joined #zig
<Dodo> oh right
<Dodo> Im still used to move semantics
<alexnask> Ah, right
<Dodo> and Im used that I could never take a slice by value, because it was not 'Sized',
<Dodo> at least, in Rust a '[T]' is impossible to pass around, '&[T]' and '&mut [T]' is fine though
<alexnask> Right
hooo has quit [Quit: Page closed]
<Dodo> I wonder, what was the first language to have a 'slice' type?
steveno_ has quit [Ping timeout: 255 seconds]
steveno_ has joined #zig
<MajorLag> Believe it or not, there's a wikipedia article for that. FORTRAN probably.
davr0s has joined #zig
<Dodo> :O
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MajorLag> C was actually kind of an outlier in not passing length information along with array pointers.
Dodo has quit [Ping timeout: 260 seconds]
Ichorio has joined #zig
<andrewrk> achambe, and their title slide says "For Great Justice"
<andrewrk> what did you mean about errdefer vs crashing? are you talking about how handling errors introduces untested code paths whereas crashing eliminates code paths?
<andrewrk> alexnask, yes, for ConstUnionValue the payload is nullptr when the tag type is void
davr0s has joined #zig
<andrewrk> alexnask, for "unable to evaluate constant expression" it helps to use --verbose-ir
<andrewrk> but that's probably too much output, and there are some techniques to get smaller output
<andrewrk> alexnask, oh, you maybe needed to set constexprvalue->special = ConstValSpecialStatic
<andrewrk> alexnask, if you look at test/cases/union.zig you can see comptime union tests
Dodo has joined #zig
<Dodo> how do I copy I directory (recursively) ?
<andrewrk> Dodo, that's a useful utility function we should have in the std lib, which we do not currently have
<andrewrk> alexnask, I'll have a look at your diff!
<Dodo> ah I see
<andrewrk> alexnask, want to go ahead and make this a work in progress pull request, and that way I can add some comments via github?
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cenomla has joined #zig
davr0s has joined #zig
<Dodo> is there some way to annotate something is heap allocated?
steveno_ has quit [Quit: Leaving]
<andrewrk> that's an interesting idea
<andrewrk> that should be comptime known
<andrewrk> Dodo, can you explain more?
<Dodo> uff
<Dodo> a pointer type that is heap allocated?
<andrewrk> I mean, what problem would it solve?
<Dodo> or rather, that points to heap memory
<andrewrk> what are you working on that made you want this feature?
<Dodo> nothing really, just some random thought I had
<Dodo> some languages have like a special type for that, just wondered haha
cenomla has quit [Quit: cenomla]
jjido has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noonien has quit [Quit: Connection closed for inactivity]
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dodo has quit [Quit: Page closed]
<achambe> andrewrk: yaeh thats exactly what I meant about errdefer
<achambe> it helps write more correct cleanup code
<achambe> but often those codepaths are still less tested
<achambe> not suggesting that is something zig should try and fix, just an observation I guess.
Vinski has joined #zig
<andrewrk> achambe, we sort of encourage the path to be handled correctly, by forcing the user to deal with error unions in some way
<alexnask> @andrewrk Sure, I'll go ahead and open a PR in a bit
<alexnask> The "unable to evaluate constan expression" was because ir_analyze_container_field_ptr was not implemented for comptime unions
davr0s has joined #zig
SimonNa has quit [Ping timeout: 245 seconds]
commander has quit [Remote host closed the connection]
SimonNa has joined #zig
<alexnask> @andrewrk Are ConstExpr void values null in general?
<alexnask> Or should they just be an empty ConstExprValue with a type and a special?
<alexnask> Huh is github down or am I having DNS issues?
isd has joined #zig
alexnask_ has joined #zig
alexnask has quit [Ping timeout: 264 seconds]