Discomfort of the unknown

As part of learning Zig, I've started AOC 2023. Part one of day one took a bit of time, no surprises there. With small mistakes taking up a lot of my time. Embarrassingly a silly syntax mistake in the std.debug.print statement took the most of my time. It's such a struggle for the brain to accept that we are doing something we know how to do (in Go), in a language that we have very little idea about. I'd say Aoc was a good idea, immediately, I had to learn how to setup a Zig project, read files, parse through lines in a file. One of the challenges, that I never considered is that, in Go I know where to look for answers in the documentation. It's something that took me a while to understand a not so obvious pattern in the documentation only noticed after spending a decent amount of time perusing through it. For instance I have no idea where to find the verbs in the print statement, ex: in Go %d will print a base 10 int, and I look up this info here but I have no clue where to find this for Zig. Never mind, as I just found it here. The point is that, I'm still do not understand how to read the Zig docs. Sounds silly, but knowing where to look up info that you don't know is a crucial part of programming. It's something I've want to build familiarity towards.

The other thing I noticed is that there is a lack of examples in the docs. I find this a very useful feature in Go as it gives me an idea of how to interact with the package.

I can feel the discomfort in my brain, as I was solving part one of one. The problem was not that hard, and I could feel my brain saying, we would have been done by now if we had done it in Go. That being said, I found something really interesting in Zig and I absolutely love it. The pattern matching in switch statements. Also, since it's been a while since I've done c and have been relying so heavily on the GC in Go, I've forgotten how to think about memory. So far, I've been avoiding the docs on allocating memory, and avoiding any heap allocations where possible. It's only a matter of time, before I have to look into it though.

One thing that I'm finding quite exciting, is looking forward to a time when I am sort of good at Zig. I probably won't be doing all of the Aoc tasks, but enough to get me comfortable with Zig. Then I'll do some network stuff as it is more relevant to the browser building I intend to do with Zig.

I'm imagining the formation of new neural pathways in my brain when I feel the discomfort of being a beginner again. I'm curious as to how much more comfortable I'll feel with Zig by the weekend and then by the end of next month. Makes the discomfort worthwhile when I occasionally glance at the prize.

Also today is the first day since Sunday (today is Tuesday) that I'm not feeling groggy, I might be getting used to the early wake up times.