RSSAmplifier

Blog

Solomon's Blog

functional programming, permaculture, math

blog.cofree.coffeeRSS feed ↗13 posts

Latest posts

Servant Auth Roles

I wanted a nice way to create a roles system on top of servant-auth. This post walks through the design and implementation process. The end result is quite similar to OCharle's Who Authorized These Ghosts. You can see the final result here.

Chat Bots Revisited

It has been a long while since my last post on chat bots; quite a bit longer then I intended to be honest. I would like to summarize here where the project has gotten as I think it has some cool ideas worth documenting.

Lensy Moore

How far can we get leveraging the lens library in Haskell to model Moore Machines and Wiring Diagrams?

Lean For Haskell Developers

Last updated 2024-03-03

How To Design A Chat Bot

I'm working on a library for designing highly composable protocol agnostic chat bots. The design is based on Mealy machines and heavily leverages Haskell's profunctor machinery. I want to walk through the early stages of the design process and how you might arrive at such an architecture.

Happy and Alex Part 2: MVP

In my last post I gave a brief introduction to Happy and parser generators. In this post I will continue the story with Happy's counterpart Alex.

Happy and Alex Part 1: Don't Worry Be Happy

When I was first learning Haskell it was emphasized to me via blog posts, books, and conversations how wonderful Haskell is for language design. One of the major points in favor of this was parser combinators.

How Free Monads Yield Extensible Effects

The Free monad gives you a Monad for any Functor. The Free monad can also be used to construct extensible effect systems. I never understood why Free why this was the case. It turns out it is deeply connected to their ability to yield monads for functors.

That One Cool Reader Trick

If you are writing an interpreter, odds are you will want to bind variables. If you are binding variables, there is a decent chance you will want to locally scope your variables.

A Brief Intro to Monad Transformers

A few friends have recently asked about literature introducing Monad Transformers. The best introduction I have found was in Haskell Programming From First Principles. If you don't have, or want to purchase, this book, then here is a brief explanation with examples.

Finally Modular Arithmetic

Fin _ is one of those data types that makes you take a step back and question how much you really understand typed functional programming.

Bounded Space Automata

After reading Chris Penner's blog post on Conway's Game Of Life Using Representable and Comonads, I decided to implement a similar solution for the 1 dimensional automata Rule 110. Being such a simple algorithm I thought the implementation would be trivial. However, it turns out that working with arbitarily bounded spaces in the Store Comonad requires a clever use of dependent types to apply…

Hello World

Its October 2020, COVID-19 has wreaked havoc across the globe, the US is deeply divided along partisan lines, the environment is in collapse, the government is in a seemingly endless consitutional crisis, and I've decided to start blogging! What a time to be alive.