--- tags: programming languages --- # First Steps in Haskell (part of the Programming Languages course at Chapman University ... subject to change) These notes are intended to help getting started with Haskell. (Thanks to all students who provided many of the links.) - For a quick start do the tutorial at [tryhaskell.org](https://tryhaskell.org/). ## Learning Haskell - [Installing Haskell](https://hackmd.io/@alexhkurz/Hk86XnCzD) - [Haskell Cheat Sheet](http://cheatsheet.codeslower.com/CheatSheet.pdf) - [Ninety-Nine Haskell Problems](https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems) - Haskell Resources: a) [haskell.org](https://www.haskell.org/documentation/), b) [wiki.haskell](https://wiki.haskell.org/Learning_Haskell), c) [leroux](https://gist.github.com/leroux/6395804) One of the most popular courses, and a very good one, available online, which I will use as a reference for Programming Languages, is - [Learn You a Haskell for Great Good!](https://learnyouahaskell.github.io/chapters.html) ## More Resources for Learning Haskell Graham Hutton, one of the leading Haskellers, has an introductory lecture series [Functional Programming in Haskell](http://tinyurl.com/haskell-notts), see also [here](http://www.cs.nott.ac.uk/~pszgmh/pgp.html). Find more tutorials that suit your background: - [Meta-tutorial](https://wiki.haskell.org/Meta-tutorial) Tutorials not in the Meta-tutorial (last time I looked) and that I know have been useful to some: [Learning Haskell](http://learn.hfm.io/) and [Happy Learn Haskell Tutorial](http://www.happylearnhaskelltutorial.com/contents.html) and [Real World Haskell](http://book.realworldhaskell.org/read/) and [Learning Haskell in One Video](https://www.youtube.com/watch?v=02_H3LjqMr8) ... Personally, I like - [School Of Haskell](https://www.schoolofhaskell.com/school/starting-with-haskell/introduction-to-haskell) because it is written with the relevant theory in mind. Moreover, Chapters 1-5 are a very good fit for what we will need in our Programming Languages course. But for a first introduction other tutorials may be better suited to your background. ## My Setup I use visual studio code as my editor with the extension ![](https://i.imgur.com/SsE56lC.png =400x) ## Haskell Projects It is best to learn a programming language by implementing a project that interests yourself. The [Ninety-Nine Haskell Problems](https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems) may provide some inspiration. Or, for example, for the 2020 edition of the course - Gary Zeri: [Haskell Blog](https://github.com/GaryZ700/Haskell_Blog/blob/master/README.md) implemented two nice projects highlighting many features of Haskell. You can also look at my own - [A very short introduction to automata and Haskell](https://hackmd.io/@alexhkurz/HylLKujCP) in which I started to explain Haskell from the point of view of automata theory (will be relevant for the Compiler Construction course that follows on from Programming Languages). Btw, if you wanted to implement more automata theory in Haskell, that could be a nice project as well. Some more projects some of my students found inspiring: - [Computational Biology](https://homepage.cs.uri.edu/~ndaniels/pdfs/mrfy_experience_report.pdf) - [Sudoku](https://abhinavsarkar.net/posts/fast-sudoku-solver-in-haskell-1/) - [Streaming Huffman Compression in Haskell](https://blog.jle.im/entry/streaming-huffman-compression-in-haskell-part-1-trees.html). [Github](https://github.com/mstksg/inCode/tree/master/code-samples/huffman). ## Even More resources #### Videos - [Haskell for Imperative Programmers](https://www.youtube.com/watch?v=Vgu82wiiZ90&list=PLe7Ei6viL6jGp1Rfu0dil1JH1SHk9bgDV&index=1) contains much more than we need for the Programming Languages course but is an excellent resource. - [Recursion in Programming - Full Course](https://www.youtube.com/watch?v=IJDJ0kBx2LM) is not about Haskell but it gives a good introduction to recursion in general, which does play a central role in any Haskell program. #### Blogs [Jacob Anabi](https://jd-anabi.github.io/functional-programming/) and [Dan Haub](https://danshaub.github.io/HaskellBlog/) who took the Programming Languages course in 2020 wrote blogs that contain a lot of useful information. ## Programming Languages: Part 0 Here are a few links from myself tailored to what we will need in the Programming Languages course. We will go over this at the beginning of the course again, but you may want to take a look already. - Notes: - [Imperative vs functional programming](https://hackmd.io/@alexhkurz/SJKWvna6U) - [Recursive programming in Haskell](https://hackmd.io/@alexhkurz/H1jUka4Gv) - [Equational Reasoning, Rewriting and the Call Stack](https://hackmd.io/@alexhkurz/HJiulVg0U) - Videos: - [The computational model of functional programming](https://youtu.be/u_OMwv8tDVg) - [Haskell Tips I](https://youtu.be/wj0j2HjMw6w) - [Haskell Tips II](https://youtu.be/naNLE4GLrTo) ## Further Links - [Haskell Study Plan](https://github.com/soupi/haskell-study-plan) - [Haskell in Industry](https://wiki.haskell.org/Haskell_in_industry) - [A History of Haskell: Being Lazy With Class](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf) - [Functional programming vs. imperative programming (LINQ to XML)](https://docs.microsoft.com/en-us/dotnet/standard/linq/functional-vs-imperative-programming) - [The Intel Labs Haskell Research Compiler](http://www.leafpetersen.com/leaf/publications/hs2013/hrc-paper.pdf)