Life 20th May 2020

int main() {
   puts("A ming voyaging seem");
   puts("appropiate during lock down");

Wow it has been a while. I wonder how people manage to post to a blog every day. Doing it consistently across a span of years. If I could hit a cadence of once a week I would be a happy person. Of course you can schedule posts and perhaps that is something missing from my Emacs/Orgmode/Hugo work flow.

I think you can schedule posts for the future but you still need to actually run Hugo and upload regularly to publish them. Perhaps my work flow is not the best. Maybe some automation is needed. I admit my process is a little manual the only automated part is Netlify will pull from my git repro so publishing is a simple push.

I have had not problems with Netlify, so I recommend you check them out.

I actually stopped writing this to check my work flow. It is actually quite good. When I save my org file containing all posts it auto exports the markdown files. So really a minimal work flow is

  • Write a post
  • Save, Emacs auto exports
  • Git commit and git push.

OK I do actually use Hugo locally to proof read the posts. Not that I am successful there. Maybe I should say I am so out of the habit of blogging that I forget my own workflow!

I digress…

I like Ruby as you may have gathered in the previous post. I finished the Pratt parser in it and then promptly rewrote it in Rust. I like Rust, so I rewrote it in C++. I like C++, err, I know C++ :) Perhaps I should do a rewrite in Emacs lisp?

OK I really like Ruby in the sense of using it for what a dynamically typed language should be used for. I can think of a few project, given infinite time, I would gladly undertake in it.

It doesn’t quite fit what interests me at the moment. If it had a nice way to deploy to the web it would be a great alternative to JavaScript for small prototype games to mess around with late in the evening. I don’t think it does. I am not sure it targets Android that well either.

Excluding JavaScript I get the impression that dynamically typed languages don’t give much thought to deployment.

Rust I like but honestly I am not sure I write complicated enough code at home to benefit from it. I take a hit in productivity and rarely find, for my toy/discovery code, that the added checks it gives help. For larger code bases I view it as a great win and find my coding style in C++ fits the Rust model of doing things. Just in C++ I don’t have to spend an evening figuring out how to create a Map that uses a pointer as a key.

You could certainly argue long term getting used to the language is a hit worth taking and I won’t disagree. I would love to use Rust at work. For now it remains on my I am almost ready to spend more time with it.

So C++, well I know C++ and that helps productivity, plus clion is pretty awesome (as the the Rust plugin for it). I would not say I get great joy from coding in it but it does let me throw around roughly correct code at quite a speed. Given the pile of about ten books, some of which require writing code to learn the ideas, throwing around code is kind of what I want.

I am, at least for a few months, trying to shift my focus away from programming languages and more to ideas/algorithms. I doubt much will come from it but I figure it will be fun.

Implementing the Pratt Parser in 3 different languages is kind of a fun thing to do. Ruby suffered from being the first along with being the only language I had not coded in. Rust came in shorter than the C++ one but most of that was down to having to manually convert enums to strings.

None really showed a big advantage over the others. Probably the biggest bonus is I know have Pratt parsers cemented in my head in a similar way recursive decent parsers are. I don’t think I will ever write a recursive descent parser again. Famous last words, guess what the title of the future post will be.

So where to from here. I think I am going to continue with the C++ implementation.


I have started running again. Mostly as I want to drop a bit of weight, I had forgotten how much I enjoyed it. I am looking forward to get back to a reasonable endurance level and being able to head out for a couple of hours just jogging around.

I have had the urge to do a bit of game programming again. Although if I decide down that route I think I will take a different approach and actually create some graphics and get a few design ideas together before actually writing any code.

864 Words

2020-05-19 23:00 +0000