ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
v1zix has quit [Ping timeout: 256 seconds]
porky11 has quit [Ping timeout: 268 seconds]
wilsonk has quit [Read error: No route to host]
<benjikun>
andrewrk: Whatcha workin on?
<andrewrk>
benjikun, proof of concept of making zig's stack traces work in freestanding mode
<benjikun>
I see, neat
steveno has joined #zig
steveno has quit [Quit: Leaving]
reductum has joined #zig
reductum has quit [Quit: WeeChat 2.3]
wilsonk has joined #zig
tiehuis has joined #zig
<tiehuis>
found the separate loop initializers tripped me up in the advent of code solution today
<tiehuis>
accidently put the inner `var j: usize = 0` on the outer level which stumped me for 5 minutes
<andrewrk>
interesting
<IntoxicatedHippo>
I think allowing a third expression on while loops so they act like C style for loops would be useful.
<tiehuis>
was thinking it'd be helpful for todays question
<reductum>
Yeah I'm wading through just parsing everything. I've never gotten much practice parsing things, so I'm pretty slow at it, even with simple input like this.
<reductum>
Good practice, though!
<reductum>
Zig's `test` feature is just lovely.
<andrewrk>
tiehuis, your code is just magnificent
<andrewrk>
makes me question my decision to parse the input text line by line
<andrewrk>
I didn't even figure out how to get the ** feature to work, and I &@#*&@in coded it!
<tiehuis>
thanks, yeah unfortunately parsing manually is pretty ugly
IntoxicatedHippo has quit [Remote host closed the connection]
IntoxicatedHippo has joined #zig
<reductum>
Hmmm. I'm getting a compile-time error message for a situation that looks equivalent to an example from the 0.3.0 docs.
<reductum>
var rects = []Rect{Rect.ini(0, 0, 0, 0)} ** 1000;
<reductum>
Where Rect.init just returns a Rect struct.
<j`ey>
all these advent solutions may push zig over the number of repositories to get zig to have syntax hilighting on github
<reductum>
j`ey: I think it already happened. Github approved it.
<j`ey>
ah cool
<j`ey>
reductum: btw you might want to look at @embedFile
<reductum>
Yeah I just found out about that today! It's super cool. I decided to just paste the array into the source, though, to keep everything self contained.
<reductum>
Looking forward to reading everyone else's solutions tomorrow and learning how to do things properly in zig.
<reductum>
It's 03:00 here. G'night, all
reductum has quit [Quit: WeeChat 2.3]
Hejsil has quit [Ping timeout: 256 seconds]
_whitelogger has joined #zig
wootehfoot has joined #zig
forgot-password has joined #zig
forgot-password has quit [Ping timeout: 250 seconds]
<sjums>
Dear zig users. Today I made my first struct and also got a much better understanding of iterators. Today was a good day! 🙏
<j`ey>
sjums: you should give andrewrk the code that you had the weird behaviour with
<sjums>
I haven't looked into it, but I have a hunch that I might have freed some memory and kept reading from it
<sjums>
Am on mobile, so can't throw code bits around right now :)
<j`ey>
ah, that might cause a problem :P
<sjums>
I initialized an arrraylist in a function, followed by a 'defer list.deinit()' and then returned the list to user later in my code
<sjums>
I guess that creates problems 😇
<j`ey>
sounds like it
porky11 has joined #zig
steveno has joined #zig
moo has joined #zig
wootehfoot has quit [Ping timeout: 250 seconds]
forgot-password has joined #zig
<sjums>
how do I initialize a [2][26]u8 array to 0's ?