Skip to content

Workshop materials to teach functional approach to IO-based programming.

Notifications You must be signed in to change notification settings

miciek/io-mtl-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IO/MTL workshop

Abstract

The objective of the workshop is to get some theoretical and practical overview of the functional approach to IO-based programming. You will learn how to program a real applications using Scala, Cats, Cats Effect, Cats MTL, Meow MTL and others. Throughout the day we will switch between quick introductions of the core features and longer step-by-step exercises. This will expose you to all features and tools needed to create and maintain production applications.

Table of Contents

  1. Using IO.
  2. Handling errors (Option / Either / EitherT / ApplicativeError / FunctorRaise / MonadError)
  3. Handling State (StateT / MonadState).
  4. Tagless final & the MTL style.
  5. Eithers in the business logic.
  6. Using mutable reference (Ref).
  7. Doing things concurrently (Concurrent / Fiber).
  8. Purely functional waiting for values (Deferred).

Prerequisites

  • Experience developing Scala applications.
  • Understanding of some fundamental FP concepts: immutability, pure functions, higher order functions, typeclasses.

Running the application

Before launching the application you need to generate csv files. Please run generate_movie_data.sh script first. Then run the app by executing sbt run.

Workshop details

We are going to implement "Movie: Hot Or Not?" application which is a comparison-based rating system. The sample output of the application:

 > The Transporter (a) or The Missing Person (b) or ? (q to quit)
You chose The Transporter
 > The Transporter (a) or Malcolm X (b) or ? (q to quit)
a
You chose The Transporter
 > The Transporter (a) or The Jungle Book 2 (b) or ? (q to quit)
?
You chose nothing
 > The Transporter (a) or The Matrix (b) or ? (q to quit)
b
You chose The Matrix

Acknowledgments

This project uses data from IMDB 5000 Movie Dataset.

About

Workshop materials to teach functional approach to IO-based programming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published