October Update 2021
13 October 2021

It has been a while so I feel like I should write an update. There is nothing of interest here unless you are following the not so exciting world of me.

Work has been really busy which has mean longer hours. While tiring it is not too bad. First I have a job which is nice and second I am paid overtime. What isn't great is it gets in the way of me wanting to do tech stuff in the evenings. My brain is a little tired out :(

Rather than beat myself up about it I am just going with the flow for a while, if my brain is suddenly interesting in something and motivated well lets do that. No forcing work on longer term projects. I expect this to continue for the next few months.

So the answer to the question "What have I been up to?" is really random stuff.

I wrote a lexer in Rust and then promptly rewrote in python. It's a lexer to the Tiger language in appel's Modern compiler design book. Obviously not so modern now the book is fairly ancient. I haven't come across a modern equivalent to that book.

I rewrote in python thinking I would use the match statement that has been introduced in python 3.10. I started using it but ended up with dictionary in place of match. The code turned out to be quite a bit shorter than my Rust implementation.

On reflection the reason is I took different approaches. Rust was done using a bit match expression while python code size reduction was I used a dictionary and a very small bit generic bit of code. I know python is slow so wanted to force a much as possible into the C world. Rust I knew was fast making using a dictionary a slower option.

There was nothing stopping me writing the equivalent python code in Rust, it just isn't really idiomatic. Then I am not an expert to say what is idiomatic.

I found it interesting that I arrived at two different solutions due to what is easy to say in each language along with my bias for wanting to pick a fast-ish solution.

I realised I am not that motivated to do compiler work in either language. My brain knowing I am currently happy with anything suggested Haskell. I have a book on Haskell that I have not really worked through properly.

I am also continuing to learn WebGPU, very slowly and am thinking about starting a small project in MacroQuad well restarting the platform game I was fiddling with.

This is too many things to make good progress on any single one of them. I know this but at least the next month I am taking a ~Happy go lucky~ attitude on this. Once work settles I will refocus my brain and work on some goals.