A fun, I think, thought experiment to avoid concurrency deadlocks by enforcing a fixed, predefined order for acquiring static sets of MVars.
A rambling of thoughts and my experience up till now with text editors.
Haskell's ordered maps are fun tools to have in any arsenal. In this post I give an example on doing dependency resolution quickly using the partially ordered nature of dependency relations, using an extremely contrived example.
HAMT's are cool, Haskell has a ubiquitous one in unordered-containers. But other languages have the even cooler CHAMPs. This post is about optimizing the filter-ish functions in an attempt at a drop-in replacement that uses CHAMPs.
Newtypes are generally useful to avoid parameter-blindness, but can be cumbersome if each type has it's own wrapper. I explore the use of TypeData and phantom types in Haskell as an alternative way to improve type safety and reduce developer errors.
Laziness is underrated. Here I lay out a lazy initialization strategy for managing a pool of resources. It is beneficial to defer initialization to improve performance in scenarios where not all resources are needed simultaneously.
I lay out my journey of revitalizing my long-neglected website, transitioning to using Hakyll. Including styling with Clay, implementing syntax highlighting with Pygments, using KaTeX for mathematical typesetting, and optimizing font usage.
One of the first things functional programmers do is implement a lambda calculus interpreter. This post examines various representation methods, including first-order representations and higher-order abstract syntax (HOAS).
I revisit the topic of polyvariadic functions, building on a previous attempt by introducing type families to create a more streamlined implementation.
This introductory post illustrates the concept of polyvariadic functions, using the example of a function that can sum an arbitrary number of integers or return another function.
I discuss populating a database with generated data, resulting in a simple solution that generates objects sequentially, following a topological sort to ensure dependency preservation.
Briefly explore the concept of catamorphisms in functional programming, primarily focusing on their application to algebraic data types, such as binary trees.
Examine the problem of shuffling a one-dimensional array in a single pass, employing a linked list structure along with reservoir sampling for random selection.