Posts

  • Dec 23, 2021

    Using template haskell to generate domain types

    It’s advisable to use newtype and create new types, instead of using basic types over and over again. This lets you tell apart FirstName, LastName and FavouriteMusic.

  • Dec 11, 2021

    Relations

    Relations are stored in Relation table. They’re simple tags, linking two people together. Links are one way, so if you want to make two people rivals to each other, there needs to be two rows in Relation table for that.

  • Dec 5, 2021

    Marriage

    Working on the circle of life, I decided to tackle marriages first. It’s as good spot to start as any. I hashed out various different implementations as I wrote down some things that I wanted to capture:

  • Nov 27, 2021

    Circle of life

    I have been writing down some thought and ideas of how I would like to approach one of the major parts of the game: life. Specifically I have been thinking how people born, grow up, form a family and eventually die. It’s lots to tackle and I think will take quite a long time to have even the basic skeleton down. Even figuring out where to start has proven to be somewhat a problem.

  • Jul 26, 2021

    Error reporting

    When I originally wanted a unified error reporting on the server-side, I made one huge type that enumerated all the possible error cases that could be reported: