An unofficial PDF version of "Category Theory For Programmers" by Bartosz Milewski, converted from his blogpost series (with permission!).
This is a fork of the original "upstream" repository, which can be found at github.com/hmemcpy/milewski-ctfp-pdf.
Currently, we have no plans to submit pull requests to merge this fork into the upstream master repository, though this may change if there's some interest in the Agda version.
We may occasionally fetch improvements from the upstream repo and merge them into this fork.
This is done as follows:
git remote add upstream git@github.com:hmemcpy/milewski-ctfp-pdf.git
git fetch upstream
git checkout master # make sure you currently have the local master branch checked out
git merge upstream/master
This may result in conflicts that must be resolved (e.g., with git mergetool
;
personally, I like meld
, which can be set as the default mergetool
by adding
the following to ~/.gitconfig
or ~/.config/git/config
:
[merge] tool = meld
).
- Standard edition in full-color hardcover
print
- Publish date: 12 August, 2019.
- Based off release tag v1.3.0. See errata-1.3.0 for changes and fixes since print.
- Scala Edition in paperback
- Publish date: 12 August, 2019.
- Based off release tag v1.3.0. See errata-scala for changes and fixes since print.
The building workflow requires Nix. After installing Nix, you need to enable the upcoming "flake" feature which must be enabled manually the time being. This is needed to expose the new Nix commands and flakes support that are hidden behind feature-flags.
Afterwards, type nix flake show
in the root directory of the project to see
all the available versions of this book. Then type nix build .#<edition>
to
build the edition you want (Haskell, Scala, OCaml, Reason, Agda and their
printed versions). For example, to build the Scala edition you'll have to type
nix build .#ctfp-scala
.
Upon successful compilation, the PDF file will be placed in the result
directory.
The command nix develop
will provide a shell containing all the required
dependencies to build the book manually using the provided Makefile
. To build
the ctfp-scala
edition, just run make ctfp-scala
.
Contributors are welcome to contribute to this book by sending pull-requests. Once reviewed, the changes are merged in the main branch and will be incorporated in the next release.
Note from Bartosz: I really appreciate all your contributions. You made this book much better than I could have imagined. Thank you!
Find the list of contributors on Github.
PDF LaTeX source and the tools to create it are based on the work by Andres Raba. The book content is taken, with permission, from Bartosz Milewski's blogpost series, and adapted to the LaTeX format.
The original blog post acknowledgments by Bartosz are consolidated in the Acknowledgments page at the end of the book.
The PDF book, .tex
files, and associated images and figures in directories
src/fig
and src/content
are licensed under Creative Commons
Attribution-ShareAlike 4.0 International License.
The script files scraper.py
and others are licensed under GNU General Public
License version 3.