I will now provide the categorical foundation of the Haskell implementation from the previous post. A PDF version that contains both parts is also available. The Para Construction There’s been ...
Introduction Neural networks are an example of composable systems, so it’s no surprise that they can be modeled in category theory, which is the ultimate science of composition. Moreover, the c...
https://bartoszmilewski.com/2024/03/22/neural-networks-pre-lenses-and-triple-tambara-modules/
I always believed that the main problems in designing a programming language were resource management and concurrency–and the two are related. If you can track ownership of resources, you can b...
https://bartoszmilewski.com/2024/02/07/linear-lenses-in-haskell/
There is an exercise in Saunders Mac Lane’s “Categories for the Working Mathematician” that was a lesson in humility for me. Despite several hints provided by Mac Lane, all my attempts to s...
https://bartoszmilewski.com/2023/09/19/exercise-in-coherence/
This post is based on the talk I gave at Functional Conf 2022. There is a video recording of this talk. Disclaimers Data types may contain secret information. Some of it can be extracted, some is...
https://bartoszmilewski.com/2022/04/05/teaching-optics-through-conspiracy-theories/
A PDF version of this post is available on github. Abstract Co-presheaf optic is a new kind of optic that generalizes the polynomial lens. Its distinguishing feature is that it’s not based on t...
From the outside it might seem like physics and mathematics are a match made in heaven. In practice, it feels more like physicists are given a very short blanket made of math, and when they stret...
https://bartoszmilewski.com/2021/12/20/symmetries-and-redundancies/
A PDF of this post is available on github. Motivation In this post I’ll be looking at a subcategory of that consists of polynomial functors in which the fibration is done over one fixed set : T...
https://bartoszmilewski.com/2021/12/10/profunctor-representation-of-a-polynomial-lens/
Lenses and, more general, optics are an example of hard-core category theory that has immediate application in programming. While working on polynomial lenses, I had a vague idea how they could b...
https://bartoszmilewski.com/2021/12/09/polynomial-lens-in-idris/
A PDF of this post is available on github Motivation Lenses seem to pop up in most unexpected places. Recently a new type of lens showed up as a set of morphisms between polynomial functors. This...