Difference between revisions of "Practical Functional Programming"
Line 91: | Line 91: | ||
=== Tutorial 3 === | === Tutorial 3 === | ||
− | |||
* Presentation [http://linedu.vsb.cz/~beh01/wiki_data/PFP_monads.pdf Monads in Haskell] [http://linedu.vsb.cz/~beh01/wiki_data/PFP_tools.pdf Tools in Haskell] | * Presentation [http://linedu.vsb.cz/~beh01/wiki_data/PFP_monads.pdf Monads in Haskell] [http://linedu.vsb.cz/~beh01/wiki_data/PFP_tools.pdf Tools in Haskell] | ||
* [[PFP_Laboratory_7 | Laboratory 7]] | * [[PFP_Laboratory_7 | Laboratory 7]] | ||
* [[PFP_Laboratory_8 | Laboratory 8]] | * [[PFP_Laboratory_8 | Laboratory 8]] | ||
* [[PFP_Laboratory_9 | Laboratory 9]] | * [[PFP_Laboratory_9 | Laboratory 9]] | ||
+ | |||
+ | === Tutorial 4 === | ||
+ | * Presentation [http://linedu.vsb.cz/~beh01/wiki_data/PFP_monads_csharp.pdf Monads in C#] [http://linedu.vsb.cz/~beh01/wiki_data/PFP_conclude.pdf Other topics that should be mentioned] | ||
+ | * [[PFP_Laboratory_10 | Laboratory 10]] |
Revision as of 12:56, 4 November 2022
Basic introduction
Functional style of programming is well established, but for decades it was mostly used in universities and frequently it was treated like a nice concept without real practical application. Pure functional languages like Haskell, were rarely used for real life applications. Right now, functional style of programing is going through a sort of renaissance. It is embedded into many of the most popular multiparadigm languages like Python, Javascript or C#. Moreover, with the usage of JVM (Scala) or .NET CLR (F#) it is even easier to have a project accommodating various styles of programming. In this subject, we will focus on practical aspects of applications development using pure functional programming language Haskell (maybe also Elm) and on the application of principles of functional programming in other languages. Beside the programming itself, we will learn how to use some of the key infrastructure and tools supporting the development of real-life applications.
Subject aims expressed by acquired skills and competences
The aim of the course is to show the practical use of purely functional programming languages for the development of real-life applications. As a key project, a web-based information system will be implemented. In addition to pure functional programming languages and the related functional style of programming itself, students will also learn selected tools and a programming environment, that is necessary to build more complex applications.
After completing the course, participants will be able to practically apply a functional style of programming to solve real-life problems. They will be able to evaluate, if it is suitable to use it in given context and what advantages or disadvantages such approach will bring. They will get acquainted in more detail with the programming language Haskell and (probably) Elm (both are syntactically very similar). They will also learn more about the functional style of programming, which can be useful also in other technologies than for purely functional programming languages. Most of today's dominant technologies support many programming paradigms and it is more a choice of the programmer, which style will be used in the solution. The course enables you to use the functional style of programming in many aspects regardless of the used environment.
Recommended literature
- Wiki Books: Haskell, for free at: https://en.wikibooks.org/wiki/Haskell
- Lipovaca M.:Learn You a Haskell for Great Good!: A Beginner's Guide (1st ed.). No Starch Press, San Francisco, CA, USA, 2011 - for free at: http://learnyouahaskell.com/
- O'Sullivan B., Goerzen J., Stewart D.: Real world Haskell, O'Reilly Media, Inc. 2008. ISBN:0596514980 - for free at: http://book.realworldhaskell.org/read/
- Thompson S.: The Haskell: The Craft of Functional Programming (3nd ed.). Addison-Wesley Professional, October 2, 2011, ISBN-10: 0201882957.
- Milewski B.: Category Theory for Programmers, for free at: http://https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Way of continuous check of knowledge in the course of semester
During the exercises, students will be programming assigned tasks. The results of these tasks will be the crucial part of the final evaluation. Additionally, a project we will create a web-based information system, where the front end will be implemented in Elm and the back end will be in Haskell. They will be connected through REST Api. Moreover, we will address other issues as the usage of database or parsing various data formats.
On these tasks, it will be demonstrated, that these functional languages are well suited for the development of real-life applications.
Software
In our lectures, we will be using [1] with Visual Studio Code. For VS Code, we will be using an extension:
Presentations
Presentations used in our lectures:
Basics of functional Programming
Other topics that should be mentioned
Schedule:
- Lecture 1: Beginning - Page 34
- Lecture 2: Page 35 - Page 42
- Lecture 3: Page 43 - Page 51
- Lecture 4: Page 52 - Page 63
- Lecture 5: Page 64 - Page 81
- Lecture 6: Tools for Haskell
- Lecture 7: Begining - Page 18
- Lecture 8: Page 19 - Page 46
- Lecture 9: Page 47 - Page 62
- Lecture 10: Monads in C#
- Lecture 11: Other topics that should be mentioned
- Lecture 12: No lecture
Laboratories
- Laboratory 1
- Laboratory 2
- Laboratory 3
- Laboratory 4
- Laboratory 5
- Laboratory 6
- Laboratory 7
- Laboratory 8
- Laboratory 9
- Laboratory 10
- Credits for the subject given.
Cheat sheet containing basic functions in PDF
Homework
Combine study
Tutorial 1
- Presentation Beginning - Page 51
- Laboratory 1
- Laboratory 2
- Laboratory 3
Tutorial 2
- Presentation Page 52 - Page 81
- Laboratory 4
- Laboratory 5
- Laboratory 6