Giter Club home page Giter Club logo

scala-with-cats's Introduction

Scala with Cats

Copyright Noel Welsh and Dave Gurnell, 2014-2021.

Artwork by Jenny Clements.

Published by Underscore Consulting LLP.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Overview

Scala with Cats teaches core functional abstractions of monoids, functors, monads, and applicative functors using the Cats library and a number of case studies.

Building

The build requires a lot of heavy machinery: texlive, node, java, scala, and pandoc and pandoc-crossref. The simplest way to build it is to use Docker Compose with the provided shell scripts, Dockerfile, and docker-compose.yaml:

  • install Docker Compose (brew install docker-compose on OS X; or download from docker.com); and

  • run go.sh (or docker-compose run book bash if go.sh doesn't work).

This will open a bash shell running inside the Docker container that contains all the dependencies to build the book.

From the shell run sbt to open an SBT prompt, from which you can issue the following commands:

  • pdf builds a PDF version in dist/scala-with-cats.pdf;
  • html builds an HTML version in dist/scala-with-cats.html;
  • epub builds an ePub version in dist/scala-with-cats.epub;
  • all builds all three versions.

The pdf, html, and epub commands are each made of three smaller commands:

  • {foo}Setup creates temp directories and builds JS/CSS prerequisites for the HTML/ePub versions;
  • mdoc runs the files in src/pages through mdoc to compile and run the Scala snippets;
  • {foo}Pandoc runs the output of mdoc through pandoc to produce the output.

There are also tex and json commands (and commands like texSetup, jsonPandoc, and so on) that build a LaTeX version of the book and a Pandoc AST respectively. These are useful for debugging the build.

Contributing

If you spot a typo or mistake, please feel free to fork the repo and submit a Pull Request. Add yourself to contributors.md to ensure we credit you for your contribution.

If you don't have time to submit a PR or you'd like to suggest a larger change to the content or structure of the book, please raise an issue instead.

scala-with-cats's People

Contributors

noelwelsh avatar noelhwelsh avatar davegurnell avatar d6y avatar dependabot[bot] avatar eddsteel avatar seoh avatar robstoll avatar niqdev avatar ghisvail avatar arosien avatar dkim avatar eugeneyushin avatar evis avatar artemkorsakov avatar nashid avatar jrpelkonen avatar rudwna avatar mcarolan avatar somanythings avatar frankoid avatar dhpiggott avatar danielasfregola avatar ltbs avatar marcprux avatar mr-sd avatar phderome avatar philipschwarz avatar rebekah avatar bamboo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.