ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
schme245 has quit [Remote host closed the connection]
kristate has joined #zig
kristate has quit [Ping timeout: 250 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
steveno has joined #zig
darithorn has quit [Remote host closed the connection]
darithorn has joined #zig
kristate has joined #zig
steveno_ has joined #zig
steveno has quit [Ping timeout: 240 seconds]
steveno_ has quit [Quit: Leaving]
kristate has quit [Remote host closed the connection]
noonien has joined #zig
Hejsil has quit [Ping timeout: 256 seconds]
jevinskie has joined #zig
kristate has joined #zig
<emekankurumeh[m]> zig's color on github is really close to rust's.
<andrewrk> indeed
<emekankurumeh[m]> zig is rgb(236, 145, 92) and rust is rgb(222, 165, 132)
darithorn has quit [Quit: Leaving]
schme245 has joined #zig
schme245 has quit [Ping timeout: 246 seconds]
presiden has quit [Ping timeout: 240 seconds]
presiden has joined #zig
noonien has quit [Quit: Connection closed for inactivity]
wilsonk has quit [Read error: No route to host]
wilsonk has joined #zig
Ichorio has joined #zig
presiden has quit [Ping timeout: 245 seconds]
presiden has joined #zig
jevinskie has quit [Ping timeout: 240 seconds]
jevinskie has joined #zig
tiehuis has joined #zig
<tiehuis> emekankurumeh[m]: Some other similar language colors:
<tiehuis> i dont think this matters as much now since the spacer was added between languages
tiehuis has quit [Quit: WeeChat 2.3]
noonien has joined #zig
wootehfoot has joined #zig
peekazig has joined #zig
<peekazig> Hi! I'm not actually using zig because of lack of time but I like to have a look at its progress every once in a while. I also look at nim periodically but I think it's main weakness is the anti-social attitude of its developers. I just wanted to say thank you and kudos to the zig community and specially to @andrewrk for being always nice to everyone.
<wilsonk> peekazig: yep, I agree with your sentiments about the quality of the Zig community, and Andrew also, of course :). (I haven't worked with Nim, though, so I can only comment on this community!)
daurnimator has quit [Ping timeout: 250 seconds]
_whitelogger has joined #zig
daurnimator has joined #zig
Akuli has joined #zig
schme245 has joined #zig
peekazig has quit [Ping timeout: 256 seconds]
<Akuli> a random thought about std/testing.zig: please don't add a method for everything, like python's stdlib unittest module does
<Akuli> unittest has: assertFalse, assertTrue, assertRaises, assertWarns, assertLogs, assertEqual, assertNotEqual, assertAlmostEqual etc
darithorn has joined #zig
<schme245> so, I have a big where the function only returns the correct value if I add `warn("");` as the last statement of the inner loop. if I remove the warn, the value is garbage. only happens with --release-fast. how does one go about debugging a problem like this? :D
<schme245> *so, I have a problem
<schme245> huh, it works on the latest master!
voldyman has joined #zig
voldyman has quit [Client Quit]
<Akuli> given this: const A = union(enum) { Number: u8, None, }; how should i create an "instance" of A.Y? this works, but is it the best style? const a = A{ .None = void{} };
<Akuli> s/A.Y/A.None/
<Akuli> the docs have an example of instantiating what is A.Number in my example, but not how to use the None value
<schme245> on closer inspection, the latest master didn't solve my problem, it just made my reproducible test case pass. the problem in the original code persists :/
<andrewrk> schme245, debugging --release-fast is tricky. there are a lot of approaches
<andrewrk> for starters we can eyeball the assembly, and see if valgrind reports anything
<schme245> my debugging skills for native code are basically non-existant, unfortunately. everything I do with Zig is a learning experience
<schme245> what do you suggest for viewing the assembly?
<andrewrk> this could be quite fun then :)
<andrewrk> is your problematic code open source?
<schme245> I can make it open source if you give me 5 minutes to clean it up :)(
<andrewrk> sounds good
<andrewrk> Akuli, the main point of std.testing functions is to help show why tests failed. You can see how expectEqual would do that because it could, for example, show a string difference in a useful way. I don't see how having both assertFalse and assertTrue would accomplish that goal
<andrewrk> Akuli, you can implicitly cast an enum tag into a union if the payload type is void. const a: A = A.None;
<andrewrk> (or just leave it as the enum value, which will then implicitly cast when you use it)
kristate has quit [Remote host closed the connection]
<Akuli> about std.testing: going with 5 or 10 or 20 different asserter functions will likely result in what happened in python, most people not using the std solution
<Akuli> in python, there are alternatives that give the same amount or more debug information with simpler syntax, but even if there weren't any, i wouldn't want to type something like 'self.assertIsInstance(x, SomeType)' if i can do 'assert isinstance(x, SomeType)' (in python)
<Akuli> and the "alternatives" i mentioned run the code in some special way so that from 'assert isinstance(x, blabla)' they notice that it's a type assertion, and display a descriptive assert fail message accordingly
<andrewrk> it's fine if people want to use assert - they just have to understand that assert invokes undefined behavior in release-fast and release-small modes
<andrewrk> or in tests one can use expect, which panics even in release modes
<Akuli> i'm not saying that a "special assert" (whatever it was called in zig) for tests is bad, i'm saying that 10 or 20 "handy utility functions" that call it is bad
<Akuli> currently zig has 3 of those, which is fine
<schme245> andrewrk, where you able to reproduce the issue?
<andrewrk> schme245, give me a few minutes - I got a response to a question on llvm-dev mailing list and I'm replying
<schme245> no stress! :) I have to run in 10 minutes but I'll be back later this evening
<andrewrk> ok, take care
schme245 has quit [Remote host closed the connection]
schme245 has joined #zig
schme245 has quit [Remote host closed the connection]
<Akuli> i have a script that pulls and compiles the latest zig, it's amazing how much new stuff is added every day! i don't think i have never seen a project that's developed this fast
<Akuli> for just a couple days: 244 files changed, 4210 insertions(+), 3966 deletions(-)
darithorn has quit [Quit: Leaving]
kristate has joined #zig
adrusi has quit [Quit: ZNC 1.7.1 -]
adrusi has joined #zig
kristate has quit [Remote host closed the connection]
adrusi has quit [Quit: ZNC 1.7.2 -]
adrusi has joined #zig
return0e_ has joined #zig
return0e has quit [Ping timeout: 272 seconds]
Akuli has quit [Quit: Leaving]
Ichorio has quit [Ping timeout: 240 seconds]
darithorn has joined #zig
return0e has joined #zig
return0e_ has quit [Ping timeout: 244 seconds]