Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
Go to file
Pol Dellaiera de799935b2
refactor: CI and nix (#306)
* fix: remove custom fonts

Since they are available in Nix, there is no need to keep them in the project anymore

* chore: remove old obsolete files

* refactor: rewrite Nix files

- Switch from `numtide/flake-utils` to `flake-parts`
- Add custom font derivation for LaTeX
- Add `formatter`
- Switch to `python311`

* ci: update Github workflows

* feat: add `Makefile` for local development

Very useful when used in combination with `nix develop`

* feat: add `.envrc` file for loading development environment with `nix-direnv`

* feat: add `.editorconfig` and `.prettierrc`

* style: reformat files using `prettier`

Run `nix run nixpkgs#nodePackages.prettier -- --write .`

* fix: add workaround to prevent bug with `minted` package

see https://github.com/gpoore/minted/issues/353 for context

* fix: add `version.tex` in the repo

* chore: rewrite `README`

* chore: ignore LaTeX temporary files while building locally

* feat: add `latexindent.pl` configuration file

* style: lint LaTeX files
2023-02-02 10:53:45 +01:00
.github refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
src refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.editorconfig refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.envrc refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.gitignore refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.latexindent.yaml refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.prettierignore refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
.prettierrc refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
errata-1.0.0.md refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
errata-1.3.0.md refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
errata-scala.md refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
flake.lock refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
flake.nix refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
LICENSE Updating readme 2017-10-16 21:36:25 +03:00
Makefile refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00
README.md refactor: CI and nix (#306) 2023-02-02 10:53:45 +01:00

GitHub stars GitHub Workflow Status Download License

Category Theory For Programmers

An unofficial PDF version of "Category Theory For Programmers" by Bartosz Milewski, converted from his blogpost series (with permission!).

Category Theory for Programmers

Buy the book

Build the book

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 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.

Contribute

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.

Acknowledgements

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.

License

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.