Functional Programming Strategies

Subscribe
Archives
January 20, 2025

Codata and Monads, meet the Terminal

Hello!

Last email I let you know about a terminal library I was working on, and I said it was motivated by material for the book. Since then I've written up that material, which you can read as a blog post. The post goes through the process of designing a DSL for terminal interaction. It shows how to build the DSL from codata and the state monad, and highlights how composition and reasoning motivate the design. I think it's pretty neat, but let me know what you think!

I've also created a new theme for the Terminus documentation. This reminded me how much I enjoy creating web sites. It's not something I would want to do full time, but I am definitely happy to still have an occasional excuse to write some HTML and CSS. This design was also my first use of the popover API, which replaces many uses of Javascript. The web platform continues to impress

Working on the theme is also first time I've been really impressed with LLMs. My CSS is pretty rusty, so I asked a LLM (I used both Claude and ChatGPT) to help me. I must admit I was a bit shocked when it generated fully working code first time. (When I later tried to refine the design it made a few errors.) I can see the use of LLMs as a collaborative tool when working on tasks that have a fairly common skillset. (I'm not very happy with the intellectual property aspect of LLMs. In general our societies don't do an equitable job of credit allocation, but that's a different discussion.)

Next up is tagless final proper, for which I'm thinking of using a UI toolkit as an example. I'm giving a talk on tagless final at Scalar in Poland so that's motivation to get it written!

Back to work for me. Until next time!

Noel

Don't miss what's next. Subscribe to Functional Programming Strategies:
Powered by Buttondown, the easiest way to start and grow your newsletter.