Skip to content

Conversation

@jakubsvec001
Copy link
Contributor

I want to suggest adding "Category Theory for Programmers" to OCaml.org's book list page. I created a new file that supplies most of the properties of this book you need for your website (the subject of this pull request).

Category Theory for Programmers by Bartosz Milewski is a one-of-a-kind book that is primarily targeted at Haskell developers, but the book is available with OCaml, Reason, and Scala versions as well.

The Haskell version is available for sale as a hardback, but it is also offered for free as a pdf. The Scala version is available for sale as a softcover. Unfortunately, the free OCaml, Reason, and Scala pdfs are only available through a github repo that require the reader build each version of the book with Nix :(

Additionally, I found a few errors in the OCaml and Reason code snippets that I submitted a pull request fixes for, but they have not been review and merged.

For your consideration of this book (both the OCaml and Reason versions) to be added to OCaml.org/books, here is a link to my Google Drive pointing to pre-built Haskell/OCaml and Haskell/Reason versions of the books. This pdfs at these links have my code snippet fixes applied:

You can also build this yourself (without my pull request fixes) at:

You can view my pull request here:

In regards to the ocaml.org/data/books/category-theory-for-programmers.md file, I could not find a summary of this book online that is suitable for the summary section your .md book files. It might exist, but I couldn't find it. Furthermore, I don't want to mock one up either for fear it might be published on OCaml.org and it not being approved by Milewski.

A potential issue with this book is that to get the OCaml and Reason versions it requires a reader to clone the book's github repo and build the book using Nix (as well as Nix's 'experimental' flake and nix-command features). This is a bit of a chore and may not be something OCaml.org wishes its audience have to do.

Additionally, here is my Google Drive jpeg of the cover you can use for the website, but it is also findable using google images:

I think this book would be a great addition to OCaml.org's books page. It fills a very specific niche that no other book does, and it has relevant OCaml and Reason variants.

If you agree and wish to post this book, here potential options:

  1. You can simply point your audience to the Github repo and let them sort out building the OCaml and/or Reason versions themselves (not unreasonable, but there is friction involved due to the build step)
  2. Someone can get in touch with Milewski or his team for approval to offer it on your site.

In addition to asking for permission from Milewski to host the OCaml and Reson versions on your site, Milewski can be asked for a summary of the book.

@cuihtlauac
Copy link
Collaborator

Thanks @jakubsvec001

I haven't read Milewski's book entirely, but the parts I read (in the Haskell version) were excellent.

I wasn't aware it had been adapted to OCaml. In ocaml.org, we advertise books where OCaml plays a central role, either because their topic is OCaml itself, an introduction to programming or FP in OCaml, or some programming technique in OCaml.

I agree that some version of Milewski's book for OCaml may fit in this picture. However, I'm concerned about the quality of the OCaml code presented in the current version. I've only reviewed the code samples in chapter 1; here is what I observed:

  1. It does not compile
  2. It is not idiomatic
  3. It is a mixture of OCaml and Haskell

I'm afraid we can't include this book as-is. However, we'd be delighted to consider a version that addresses those issues.

@jakubsvec001
Copy link
Contributor Author

@cuihtlauac Understandable. Thanks for considering it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants