The Curious Engineer

All blogs / Functional / PL theory

Bartosz Milewski's Programming Cafe

bartoszmilewski.com

Category Theory, Haskell, Concurrency, C++

Functional / PL theoryHaskellC++ConcurrencyMath

Posts
261 from 24 Jul 2008 to 21 Sep 2026
Posting
monthly (13 in the last year)
Kind
personal blog
Feed
https://bartoszmilewski.com/feed/

2026 13

  1. Tannakian Reconstruction in a Yoneda Equipment
  2. Yoneda Lemma in Double Categories
  3. Profunctor Optics
  4. Tannakian reconstruction
  5. Tambara Equipment
  6. Actegories
  7. Kan Extensions in Double Categories
  8. Kan Extensions in Haskell
  9. Tabulation Tribulations
  10. Bending, Yanking, and Cartesian Squares in Double Categories
  11. Profunctor Equipment in Haskell
  12. Profunctor Equipment
  13. The Axiom of Univalence

2025 10

  1. Modeling Identity Types
  2. Identity Types
  3. Models of (Dependent) Type Theory
  4. (Weak) Factorization Systems
  5. (Weak) Homotopy Equivalences
  6. Fibrations and Cofibrations
  7. Subfunctor Classifier
  8. Subobject Classifier
  9. Understanding Attention in LLMs
  10. Legalizing Comonad Composition

2024 10

  1. Sieves and Sheaves
  2. Covering Sieves
  3. Sheaves as Virtual Objects
  4. Coverages and Sites
  5. Sheaves and Topology
  6. Presheaves and Topology
  7. Topology as a Dietary Choice
  8. Neural Networks, Pre-lenses, and Triple Tambara Modules, Part II
  9. Neural Networks, Pre-Lenses, and Triple Tambara Modules
  10. Linear Lenses in Haskell

2023 1

  1. Exercise in Coherence

2022 1

  1. Teaching optics through conspiracy theories

2021 12

  1. Co-Presheaf Optics
  2. Symmetries and Redundancies
  3. Profunctor Representation of a Polynomial Lens
  4. Polynomial Lens in Idris
  5. PolyLens
  6. Actegories and Lenses
  7. Optics for the Working Mathematician
  8. Dependent Optics
  9. Traversals 3: Existential and Profunctor representations of Traversals
  10. Traversals 2: Profunctors and Tambara Modules
  11. Traversals 1: van Laarhoven and Existentials
  12. Functorio

2020 20

  1. The Fall of the SKI Civilization
  2. Benign Data Races Considered Harmful
  3. Categories for the Working C++ Programmer
  4. Defunctionalization and Freyd’s Theorem
  5. Freyd’s Adjoint Functor Theorem
  6. Weighted Colimits
  7. Monoidal Catamorphisms
  8. Guitar Decomposed: 9. Extension Chords
  9. Guitar Decomposed: 8. Ninth Chords
  10. Guitar Decomposed: 7. Major Seventh Chords
  11. Guitar Decomposed: 6. Dominant Seventh Chords
  12. Guitar Decomposed: 5. Mutating the Third
  13. Guitar Decomposed: 4. The Grand Unification
  14. Guitar Decomposed: 3. Moving Sideways
  15. Guitar Decomposed: 2. Moving Up
  16. Guitar Decomposed: 1. Weird Logic Behind Tuning
  17. On Composability
  18. Terminal Coalgebra as Directed Limit
  19. Initial Algebra as Directed Colimit
  20. Math is your insurance policy

2019 8

  1. Fixed Points and Diagonal Arguments
  2. Fibrations, Cleavages, and Lenses
  3. The Power of Adjunctions
  4. Filtered Colimits
  5. Programming with Universal Constructions
  6. Promonads, Arrows, and Einstein Notation for Profunctors
  7. ACT2019 School: Call for Participation
  8. Metamorphisms

2018 12

  1. Open Season on Hylomorphisms
  2. Keep it Simplex, Stupid!
  3. Trading FunLists at a Bazaar with Yoneda
  4. Recursion Schemes for Higher Algebras
  5. Free Monoid from Free Algebra, Part 2
  6. Free Monoid from Free Algebra, Part 1
  7. Free Monoidal Functors, Categorically!
  8. Life and (Thermal) Death in the Universe
  9. Free Monoidal Profunctors
  10. Free Monoidal Functors
  11. Pointwise Kan Extensions
  12. The Earth is Flat

2017 15

  1. Stalking a Hylomorphism in the Wild
  2. Monads, Monoids, and Categories
  3. Lawvere Theories
  4. Topoi
  5. Profunctor Optics: The Categorical View
  6. Enriched Categories
  7. Kan Extensions
  8. Profunctor Parametricity
  9. Ends and Coends
  10. Algebras for Monads
  11. F-Algebras
  12. Monoids on Steroids
  13. Applicative Functors
  14. I’m a Refugee
  15. Comonads

2016 11

  1. Monads Categorically
  2. Monads and Effects
  3. Monads: Programmer’s Definition
  4. Lenses: Yoneda with Adjunctions
  5. Profunctor Polymorphism
  6. Impoverished Categories
  7. Profunctors as Relations
  8. Free/Forgetful Adjunctions
  9. Adjunctions
  10. The New JDI! Language
  11. Tambara Modules

2015 20

  1. It’s All About Morphisms
  2. Yoneda Embedding
  3. Operads, Type Level Nats, and Tic-Tac-Toe
  4. The Yoneda Lemma
  5. Representable Functors
  6. Free Monoids
  7. From Lenses to Yoneda Embedding
  8. Using Monads in C++ to Solve Constraints: 4. Refactoring
  9. Using Monads in C++ to Solve Constraints: 3. The Tale of Two Monads
  10. Using Monads in C++ to Solve Constraints: 2. The State Monad
  11. Using Monads in C++ to Solve Constraints: 1. The List Monad
  12. Category Theory and Declarative Programming
  13. Limits and Colimits
  14. Natural Transformations
  15. Orange Mazurka
  16. Function Types
  17. Functoriality
  18. Functors
  19. Simple Algebraic Data Types
  20. Products and Coproducts

2014 21

  1. Kleisli Categories
  2. Categories Great and Small
  3. Types and Functions
  4. Formula 1: Go Functional!
  5. Category: The Essence of Composition
  6. Category Theory for Programmers: The Preface
  7. Dealing with Benign Data Races the C++ Way
  8. C++ Ranges are Pure Monadic Goodness
  9. Benign Data Races
  10. How to Get Enriched over Magmas and Monoids
  11. Parametricity: Money for Nothing and Theorems for Free
  12. Natural Transformations and Ends
  13. Exponentials, Currying, and Universal Constructions
  14. The Functional Revolution in C++
  15. Understanding Limits
  16. Understanding Products and Universal Constructions
  17. Getting Lazy with C++
  18. C++17: I See a Monad in Your Future!
  19. You Can’t Make an Algebra without Breaking a Few Eggs
  20. Functional Data Structures in C++: Leftist Heaps
  21. Functors are Containers

2013 15

  1. 2013 in review
  2. Understanding Free Monoids and Universal Constructions
  3. Functional Data Structures and Concurrency in C++
  4. Functional Data Structures in C++: Trees
  5. Functional Data Structures in C++: Lists
  6. Lenses, Stores, and Yoneda
  7. Edward C++Hands
  8. Quantum Homotopy Computer
  9. Basics of Haskell
  10. Understanding F-Algebras
  11. Understanding Yoneda
  12. Beautiful Concurrency
  13. The Tao of Monad
  14. School of Haskell
  15. The Year of Haskell

2012 13

  1. Designing the Haskell IDE
  2. New Approach to Web Programming
  3. Ten Things You Should Know About Haskell Syntax
  4. The Functor Pattern in C++
  5. See my new blog…
  6. The Future of C++ Concurrency and Parallelism
  7. The Downfall of Imperative Programming
  8. Lang.NEXT Trip Report
  9. Badass Hawking
  10. Call Your Headhunter!
  11. The Day the LOLcats Laughed
  12. Virtual Machines: The Traps and The Thin Hypervisor
  13. 2011 in review

2011 30

  1. Virtual Machines: Virtualizing Virtual Memory
  2. Virtual Memory
  3. Supercomputing: An Industry in Need of a Revolution
  4. C++11 Concurrency Series: 9. Condition Variables
  5. Supercomputing in Seattle
  6. C++11 Concurrency Series: 8. Data Races
  7. C++11 Concurrency Tutorial: 7. Mutex, Lock, and Monitor
  8. C++11 Concurrency Series: 6. Map Reduce
  9. Async Tasks in C++11: Not Quite There Yet
  10. C++11 Concurrency Tutorial: 5. Tasks
  11. C++11 Concurrency Tutorial: Part 4
  12. C++11 Concurrency Tutorial: 3. Sharing
  13. C++11 Concurrency Tutorial: Part 2
  14. C++11 Concurrency Tutorial
  15. Data Races at the Processor Level
  16. Boostcon Haskell C++ Videos
  17. Monads in C++
  18. The Language of Concurrency Video
  19. Introduction to Concurrency Webinar
  20. Concurrency Webinar
  21. Boostcon Day 4
  22. Boostcon: Day 3
  23. Boostcon, Day 2
  24. Boostcon: Day 1
  25. Benign Data Races
  26. Monads for the Curious Programmer: Part 3
  27. Monads for the Curious Programmer: Part 2
  28. Monads for the Curious Programmer, Part 1
  29. Using F#: Sequences and Pipelines
  30. 2010 in review

2010 8

  1. Understanding C++ Concepts through Haskell Type Classes
  2. MapReduce and the Build Process
  3. Beyond Locks: Software Transactional Memory
  4. Beyond Locks and Messages: The Future of Concurrent Programming
  5. C++ Concepts: a Postmortem
  6. The Anatomy of Message Passing
  7. Parallel Programming with Hints
  8. Real-Life Threads

2009 26

  1. Unique Objects
  2. Haskell/C++ Video and Slides
  3. What Does Haskell Have to Do with C++?
  4. Ownership Systems against Data Races
  5. Template Metaprogramming Made Easy (Huh?)
  6. Spawning a Thread, the D way
  7. The Anatomy of Reference Counting
  8. On Actors and Casting
  9. What’s Wrong with the Thread Object?
  10. Multithreading Tutorial: Globals
  11. Race-free Multithreading : Owner polymorphism
  12. Race-free Multithreading: Ownership
  13. Race-free Multithreading
  14. unique_ptr–How Unique is it?
  15. SharC Infested C
  16. Cyclone with no Data Races
  17. Generic Types for Concurrency
  18. Types for Concurrency
  19. Futures done right
  20. Broken promises–C++0x futures
  21. Message Passing Atoms–MVars
  22. Message Passing Atoms–Channels
  23. Message Passing–Sync or Async?
  24. Immutable Things, where do they all come from?
  25. The more things change, the more we need “immutable”
  26. Java Pluggable Types

2008 15

  1. The Inscrutable C++ Memory Model
  2. C++ atomics and memory ordering
  3. Who ordered sequential consistency?
  4. Who ordered memory fences on an x86?
  5. Who ordered rvalue references? Part 3
  6. Who ordered rvalue references? Part 2
  7. Who ordered rvalue references? Part 1
  8. Thin Lock vs. Futex
  9. Threads Don’t Scale, Processes Do
  10. Thin Lock Implementation
  11. Sharing and Unsharing of Data Between Threads
  12. Multicores and Publication Safety
  13. Musings about the D Memory Model
  14. Sharing in D
  15. Thin Locks in D