These are the exercises for the Stream Processing Code Jam at the 2018 YOW! Lambda Jam conference.
Sample solutions can be found in the solutions
branch of this repository.
-
These do not have much content and serve primarily as an introduction to the exercises.
-
This workshop was based upon a talk I gave at FP-Syd on 25 October, 2017. These slides contain more content than the ones above, with examples, etc.
Each exercise contains a README.md
that you should read to gain
background understanding of the tasks involved.
However, the actual details are found in the actual source files.
Each exercise has its Haskell source file (within
LambdaJAM/Streaming/
) with detailed discussion, instructions, etc.
-
Dijkstra. QED.
-
More realistically: because if you're comfortable enough with Haskell data structures, etc. you may wish to skip this one.
It's not like I spent any time on it...
You have the option of three build tool options:
-
stack
: from the root directory, runstack build
to get all dependencies, etc. built.You can then do
stack ghci exercise0:lib
, etc. to load each exercise's file.Note that for
exercise_5
, you may need to specify a filename of"exercise_5/languages.csv"
. -
cabal-install
: you will need to consider each exercise in isolation. For example:ivan LambdaJAM-Streaming-exercises $cd exercise_0/ ivan exercise_0 $cabal sandbox init Writing a default package environment file to /home/ivan/Haskell/LambdaJAM-Streaming-exercises/exercise_0/cabal.sandbox.config Creating a new sandbox at /home/ivan/Haskell/LambdaJAM-Streaming-exercises/exercise_0/.cabal-sandbox ivan exercise_0 $cabal install --only-dependencies Resolving dependencies... All the requested packages are already installed: Use --reinstall if you want to reinstall anyway. ivan exercise_0 $cabal repl Resolving dependencies... Configuring exercise0-0.1.0.0... Preprocessing library for exercise0-0.1.0.0.. GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/ivan/.ghci [1 of 1] Compiling LambdaJAM.Streaming.Exercise0 ( LambdaJAM/Streaming/Exercise0.hs, interpreted ) Ok, one module loaded. *LambdaJAM.Streaming.Exercise0>
(You may need to run
cabal update
first.) -
cabal-install
+ the Nix package manager: similar to above but with no need for a sandbox:ivan LambdaJAM-Streaming-exercises $cd exercise_0 ivan exercise_0 $nix-shell --command "cabal configure" Resolving dependencies... Configuring exercise0-0.1.0.0... ivan exercise_0 $cabal repl Preprocessing library for exercise0-0.1.0.0.. GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/ivan/.ghci [1 of 1] Compiling LambdaJAM.Streaming.Exercise0 ( LambdaJAM/Streaming/Exercise0.hs, interpreted ) Ok, one module loaded. *LambdaJAM.Streaming.Exercise0>