ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
steveno_ has quit [Quit: Leaving]
<aiwakura> related to my previous question: is there a better way, currently, to test for union(enum) equality?
hoppetosse has quit [Ping timeout: 240 seconds]
jdufault has joined #zig
<andrewrk> aiwakura, would you expect it to codegen to the eql function that you have created?
cenomla has quit [Quit: cenomla]
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 248 seconds]
hoppetosse has joined #zig
hoppetosse has quit [Remote host closed the connection]
<aiwakura> andrewrk, yeah - two union(enum) are equivalent if both the enum value and the payload value are the same
<aiwakura> is there an alternative definition?
<andrewrk> yes. for example in the zig compiler the function to test if 2 comptime values are equal is much more nuanced
<andrewrk> the existence of == would only serve to be a footgun
<aiwakura> Can you give me an example of an ambiguous case?
<andrewrk> for example if you have a pointer field, and you want to dereference the pointer to determine equality
<andrewrk> this is the same problem as struct equality
<aiwakura> A pointer is a value - its value is the address
<aiwakura> It seems you don’t want people to think that == performs a deep comparison
<aiwakura> What about a @compare builtin?
<aiwakura> With the same semantic I’m defining in the example
<aiwakura> (No deep comparison)
<andrewrk> we could provide it in the standard library
<andrewrk> with reflection
<aiwakura> So we don’t need to build the switch cases by hand?
<aiwakura> Yeah I like that
<GitHub15> [zig] andrewrk pushed 1 new commit to master: https://git.io/vxLml
<GitHub15> zig/master 50e25f6 Andrew Kelley: add missing docs for setAlignStack builtin
<andrewrk> 0.2.0 release is locked and loaded for tomorrow morning
<andrewrk> hopefully we can get in the news
clebermatheus has joined #zig
clebermatheus[m] has joined #zig
<clebermatheus[m]> Hello
clebermatheus has quit [Ping timeout: 260 seconds]
<dtz> \o/
<aiwakura> yay!
zwhadok_ has joined #zig
<zwhadok_> THIS IS A FREENODE BREAKING NEWS ALERT!! Hitechcg AND opal ARE GOING AT IT RIGHT NOW WITH A LOT OF FIGHTING AND ARGUING WOW YOU DON'T WANT TO MISS THIS!! TYPE /JOIN ## TO SEE THE ACTION...AGAIN TYPE /JOIN ## TO SEE THE ACTION!!
<zwhadok_> clebermatheus[m] jdufault Tobba return0e meena tridactyla DuClare ltr_ _whitelogger lorde_kumamon[m] alandipert commander monteslu aiwakura MajorLag minus l1x walac jacobdufault dtz mal`` ragge m6w6 lqd cgag Vins
zwhadok_ has quit [Client Quit]
<aiwakura> wat
<lorde_kumamon[m]> IRC spam
jdufault1 has joined #zig
jdufault has quit [Ping timeout: 256 seconds]
return0e_ has joined #zig
return0e has quit [Read error: No route to host]
jdufault1 has quit [Ping timeout: 264 seconds]
return0e_ has quit [Ping timeout: 252 seconds]
jfo has joined #zig
<jfo> MajorLag: good point. I've added a not at the end that this is the case linking to andrewrk's og post about the rationale. I've also added a whole section about the error inference, which I think makes a good climax to the post. there's a lot to cover and I've left a lot out I wanted to get to, but I think this is pretty good as a really rudimentary intro! I hope people get something out of it :)
<jfo> also I've called out please join #zig on irc if you have any questions because I guess we can expect to see some support requests incoming post 0.2.0 anyway
<jfo> aiwakura: thanks!
Hejsil has joined #zig
davr0s has joined #zig
arBmind has joined #zig
jfo has quit [Ping timeout: 264 seconds]
_whitelogger_ has joined #zig
<Hejsil> jfo, Nice post. I like your recent addition of the error sets and why they are useful
ltr_ has joined #zig
<Hejsil> But it's missing that 'comptime' flare :)
jfo has joined #zig
jfo has quit [Ping timeout: 264 seconds]
jfo has joined #zig
jfo has quit [Ping timeout: 260 seconds]
jfo has joined #zig
<jfo> Hejsil: I think I'm going to cover that in another post, there's so much ground to cover! but I want to reimplement the seekforward functionality using a stack and then making that generic with comptime. was hoping to get that into this post but it got so long and I ran out of time...
<GitHub119> [zig] andrewrk pushed 1 new commit to master: https://git.io/vxLdN
<GitHub119> zig/master f073923 Andrew Kelley: Release 0.2.0
<jfo> ooooooh snappppp
<jfo> boom
<cgag> just getting set up again after not playing with zig in quite a while, built ok but build.zig test is failing: `0x23ed94 in ??? (build): return error.InvalidArgs;`
<cgag> is that expected at the momentr?
Hejsil has quit [Quit: Page closed]
<andrewrk> cgag, probably not. can you give more context?
<cgag> almost certainly related to this from cmake, i was trying to follow the wiki about building llvm
<cgag> in ~/local, which seemed to go fine, then copied the command from the readme and set -DCMAKE_INSTALL_PREFIX=$HOME/local
<andrewrk> cgag, it looks like a conflict between the llvm you've built and system libs
<andrewrk> what linux distro is this?
<cgag> is there something I need to set somewhere to force it to prefer $home/local
<cgag> fedora 27
<andrewrk> I thought that CMAKE_PREFIX_PATH would do that
return0e has joined #zig
jordyd has joined #zig
<andrewrk> I posted the 0.2.0 release notes to /r/programming. https://www.reddit.com/r/programming/new/
<jordyd> Does Zig use semantic versioning?
<jordyd> For the project itself I mean
<andrewrk> jordyd, yes, starting at 1.0.0
<andrewrk> until then, minor bumps can break everything
<jordyd> Good to know
<jordyd> I like those labelled loops btw
<andrewrk> glad to hear :)
<cgag> Hmm, I had CMAKE_INSTALL_PREFIX set, added CMAKE_PREFIX_PATH=$HOME/local/lib and cmake exits cleanly, but make itself is failing:
<cgag> seems strange that only libclangFrontend is a problem
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Client Quit]
<jordyd> Is there support--or plans for support--for examining the AST programmatically
davr0s has joined #zig
davr0s has quit [Client Quit]
<andrewrk> jordyd, this is intentionally not possible
<andrewrk> so that someone reading zig code can be confident that this is never done in the code they are looking at
davr0s has joined #zig
davr0s has quit [Client Quit]
<jordyd> Well, I don't mean for the purpose of code generation
<jordyd> For a Frama-C-like use case
<andrewrk> oh this is IDE integration type of thing?
<jordyd> For the purpose of static analysis, verification, etc.
<andrewrk> the current plan is to have a language server that provides deep introspection into a compilation, for the purposes of static analysis, IDEs, and things like this
<andrewrk> and it's planned to only implement this in the self hosted compiler, not the c++ compiler
<jordyd> Neat
<jfo> cgag: thanks for your comment and please lmk if anything is unclear to you in how I've written that post
<cgag> will do once I get this libclang nonsense sorted out. Maybe I'll give up on this ~/local stuff and just install libclang where cmake expects it to be
<jfo> good luck
<jordyd> Is there any kind of Doxygen-Like thing?
<andrewrk> this is another thing that will only be in the self hosted compiler
return0e has quit [Ping timeout: 245 seconds]
return0e has joined #zig
arBmind has quit [Quit: Leaving.]
Hejsil has joined #zig
return0e_ has joined #zig
return0e has quit [Ping timeout: 264 seconds]
jfo has quit [Quit: WeeChat 1.9.1]
cenomla has joined #zig
Hejsil has quit [Read error: Connection reset by peer]
btbytes has joined #zig
davr0s has joined #zig
return0e has joined #zig
return0e_ has quit [Read error: Connection reset by peer]
btbytes has quit [Ping timeout: 260 seconds]
steveno_ has joined #zig
steveno_ has quit [Quit: Leaving]
btbytes has joined #zig
btbytes has quit [Client Quit]
return0e has quit [Ping timeout: 264 seconds]
arBmind has joined #zig
return0e has joined #zig
return0e has quit [Ping timeout: 260 seconds]
Hejsil 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
davr0s has quit [Client Quit]
return0e has joined #zig
return0e has quit [Ping timeout: 248 seconds]
cenomla has quit [Quit: cenomla]
davr0s has joined #zig
isd has joined #zig