Week two point two

Jul 09, 2022

Week two! I spend a lot less time shaving yaks, which is good. Though I am still trying to get around to a few more improvements there...

This week was both frustrating and satisfying... frustrating because I don't feel like I really completed anything, but satisfying because I managed to get unstuck a few times off really big challenges.

I spent a fair bit of time trying to implement parser combinators and made it quite far, but get stuck on recursive definitions blowing the stack or failing signature checks. I know this is possible, it's a solved problem after all, so I'm going to continue to try and figure that out next week.

More exciting is that I managed to build a simple sine wave program in zig that uses libsoundio to interface directly with the audio hardware on my computer. In the past I've played with audio by building a .wav file and then playing it back, but real time output opens up a lot of possibilities for synthesis and other types of processing. I am hoping this will be one of my major projects next week, and I plan to write about it a lot.

Notably, I was also able to build that in both C and zig using zig. This is one of zig's killer features, and though I had some trouble getting it set up initially (my locally built zig was dynamically linked to my system llvm and needed to be linked statically, for the curious), it basically just worked like magic. Very excited about that!! Thanks to Rippy for unsticking me on that and showing me some pretty excellent C land debugging tricks.

On the negative side, I didn't write any more posts other than this short one here. I have many drafts but I am always fighting my desire to write really long things. I am working on that, perfect is the enemy of the good etc.

Some links from this week:

I've known about this book for a long time but it's always sounded interesting. It came up recently and I decided to put it back on my list.

This concept resonates deeply with my "start where you're at" maxim, but from a teacher's perspective.

Forgive the brevity, I'm on the week three!