In this post I'd like to look back and mention a few (programming related) things I did 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.
- Twitch - I started working on a bytecode interpreter and used the opportunity to try streaming on twitch. I quite enjoyed it and would like to continue streaming at some point in 2021.
- Youtube - I uploaded my streams to my youtube account. You can find there:
- Building a bytecode interpreter playlist
- Building a simple static blog generator in Haskell (part 1 only because my computer died right before part 2)
I've selected a few notable fun projects:
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
from types were faster,
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.
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.
So far it works well and I'm satisfied with the result.
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.
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.
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 :)
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!
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!