Functional Programming, Functional Programming Exercise Solutions in Scala & Spark
I love Japan and the Japanese language - interestingly, its pure and simple enough, just like functional programming in Scala should be! In Japanese, Sukara is Scala and Supaku is Spark.
The project doesn’t help you in learning any language syntax. It details just concepts!
Supaku-Sukara explains Scala (from a functional programming perspective, and not syntax) and Spark. I am developing the project for personal purpose of learning, and with an intend to share it with my friends in future.
The main focus of this project, is to solve exercises in the book Functional Programming in Scala
written by Paul Chiusano and Runar Bjarnason (Foreword by Martin Odersky). The project is similar to fpinscala
in that respect but not exactly. The solutions may differ from those in fpinscala and are more verbose for beginners to understand. There are some pull requests raised to fpinscala
based on what I get out of doing this project.
The greatest advantage of keeping your code aligned with functional program paradigm is to enable stable, consistent, performant, and reliable parallelism with no chance of any state mutation even with multi-thread processes. One of the prominent use cases of parallelism is in Big Data platforms, where the program runs on big chunks of data distributed across different computing nodes.
While Scala can be a handy language for us to develop pure functional code, Spark provides us with a fast and reliable cluster computing platform (with APIs written in Scala) that runs our pure functional logic (or even as standalone or pseudo) to handle big data.
If you have got a sense of Functional Programming in Scala (or any language) you are all set to dive into the various other programming languages, FP libraries and emerging containerisation processes (eg: docker) out there in the industry. For instance, it is then fairly easy for you to undersand the fundamental concepts behind the explanations in O’Reilly Spark with in a few days of time.
The project also covers a few bits and pieces on Haskell
===============================================================
Project covers answers for the exercises in “Functional Programming in Scala” with conceptual explanation.
https://github.com/afsalthaj/supaku-sukara/tree/master/src/main/scala/com/thaj/functionalprogramming/exercises
A WIP keynote on functors, applicatives and monads.
https://rawgit.com/afsalthaj/ScalaSample/master/functor_applicative_monad/assets/player/KeynoteDHTMLPlayer.html#0
A WIP keynote on spark, based on O’Reilly
https://rawgit.com/afsalthaj/ScalaSample/master/spark/assets/player/KeynoteDHTMLPlayer.html#0
A sample Json parser using argonaut
https://github.com/afsalthaj/ScalaSample/tree/master/src/main/scala/com/thaj/functionalprogramming/example/jsonparsing
A better way to play with type classes
https://github.com/afsalthaj/ScalaSample/tree/master/src/main/scala/com/thaj/functionalprogramming/example/jsonparsing
https://github.com/afsalthaj/supaku-sukara/blob/master/scala-haskell/haskell.md
PS: