In this post I'd like to look back and mention a few (programming related) things I worked on in 2020.

Blog posts and learning resources

  • 5 new blog posts (including this one :))
  • learn-haskell-blog-generator - I've been thinking about making a project-based tutorial for Haskell for a long time and thought a static blog generator was a good choice for a first project. I've tried doing something new and wrote each tutorial section in it's own commit, building stuff and learning new things as we go.
  • learn-scotty-bulletin-app - A tutorial for basic usage of scotty. I tried to include enough information so that even people without a lot of domain knowledge on the subject will be able to follow and learn.

Streaming

Open-Source Software

I've selected a few notable fun projects:

generic-plate

In February, I started an experiment to see if I could reimplement the uniplate API using GHC Generics instead of Data, and improve on the current performance of uniplate (with Data), and this was the result.

My benchmark showed some functionality can indeed be faster in some cases but I also got worse performance in other cases. Specifically, biplate functions for different on and from types were faster, when on and from are the same it was only a little faster, and monadic variants were significantly worse (2x).

I'd like to give more info regarding why that is, but I didn't continue exploring further.

Bytecode Interpreter Project (name pending)

In April, I started to live stream (mentioned above) building a stack-based virtual machine/bytecode interpreter in C. I managed to implement a few things including heap allocation and a simple garbage collector.

I really enjoy streaming and working on this project, and I'd like to continue it in 2021.

sharelinks

In July, I wanted an easy way to share links between various computers in my local network, so I spent a weekend and built a website program to do that.

An image of sharelinks

So far it works well and I'm satisfied with the result.

sephibot

In October, I started playing D&D with a few friends and we joked about the idea of having a bot to remind us when is the next session, one friend made a telegram bot and I made a discord bot.

An image of sephibot

simple-file-db

Also in October, after realizing that I am building multiple apps that need to save some data but do not actually need a full-fledge database, I created a simple library that can handle saving data to a file without running into data races (I think!).

This probably isn't something you should use unless you're just having fun and in that case knock yourself out.

logi

I've been facinated with the power of Datalog for a long time, and has been thinking about implementing something similar to it myself.

I started to work on logi in October and stopped, but then I picked it back up a couple of weeks ago to make it a little more presentable for this post.

Since Logi is implemented in Haskell, I was easily able to plug it into my discord bot, which also saves its data using simple-file-db. Thus combining three different project into one :)

An image of sephibot

It's been a very fun project and I'm quite happy with the result, but there's still much to do which I might (or might not) do in 2021!

Final notes

There's no denying that 2020 was an extremely tough year. And from the looks of it 2021 will also be extremely challenging. I wish everyone all the best. Stay healthy and safe as much as you can and I hope 2021 will be better!