Aditya Bhargava, author of Grokking Algorithms, writes illustrated explanations of functional programming, Haskell, and concurrency.
HN commenters call his pictorial guide to functors, applicatives, and monads the best and simplest explanation of monads they have seen.
I've been learning Haskell for the last year and a half, though I've been working with functionally inspired languages for 8 years. Haskell is wonderful, easily the most fun I've had learning a language in 20 years.
I'd advise not getting distracted by monads and other glamorous parts of the language. Monads are pretty abstract, and they won't likely make much sense until you've written enough Haskell to feel the pain-points they address.
I've learned a lot by reading blog posts from these people:
* Aditya Bhargava: http://adit.io
* Gabriel Gonzalez: http://www.haskellforall.com/
* Joseph Abrahamson: http://jspha.com/
* kqr (I don't know this person's full name. Avatar not withstanding, I'm pretty sure kqr isn't David Bowie): https://github.com/kqr/gists
* Edward Kmett: https://www.fpcomplete.com/user/edwardk
Most of all, I advise not getting discouraged. Haskell has a lot of concepts that seem intimidating. Many times I've spent days trying to figure out what the hell a contravariant functor is, only to get really discouraged. At times I've doubted my own abilities and whether learning the language was worth it. I stuck to it, and a year and a half later I'm pretty damn capable with Haskell (and I know what a contravariant functor is!) and I'm having the time of my life learning more about it.
Well, HtDP uses Racket, a flavor of Scheme/Lisp. So HtDP teaches with a functional language. But the contents seem to be about general program/algorithm design. (Like SICP, I started but never finished HtDP.)
I don't think HtDP/SICP explicitly cover topics from my short list of best introductions to practical FP. For example they don't seem to cover "monads" and "functional composition," which are a big part of practical FP programming.
"Monad" is a fancy mathematical term for a concept that allows you to write programs without worrying about exceptions/errors/IO cases until the very last moment. So you can keep your "happy" path code completely separate from the "sad" path code. Explained graphically: https://www.adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
I'm not detaro, but I'll take a crack. It's kind of like traffic—if you're constantly stopping for other cars, it doesn't really help to have a faster car. If the UI thread is waiting for something else to happen, having an entire core dedicated to the UI just means that entire core is waiting. In the case detaro was alluding to, compiling Chrome was creating so many processes, the UI had to wait for the kernel to shut down processes before it could do what the UI needed it to do. [0]
Adit has some good posts on concurrency:
—http://adit.io/posts/2013-05-11-The-Dining-Philosophers-Problem-With-Ron-Swanson.html
—http://adit.io/posts/2013-05-15-Locks,-Actors,-And-STM-In-Pictures.html.
[0]: https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and-i-cant-move-my-mouse/
A tad bit off topic, but for your functional language I'd recommend Haskell. It's given my mind the most trouble out of any of the other functional languages I've tried (which is a good thing). I find it's syntax reasonable, and resources plentiful.
Excellent lecture series on functional programming (language used is Haskell):
https://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals/
When you get to trying to understand monads, DON'T look up monad tutorials, look for functor -> applicative functor -> monad tutorials, like this one:
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
Feel free to email me if you’re stuck. I’d be happy to help you out.
I highly recommend spending a little time trying to understand the basics. You might find “Functors, Applicatives, and Monads in Pictures” helpful: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
Type classes, functors, and monads are assumed knowledge in most documentation, as they are foundational concepts in Haskell. Just like math, you must know addition, subtraction, multiplication when learning algebra.
This image (and ones like it) is so valuable: http://adit.io/imgs/functors/fmap_def.png
Every time you read about things even tangentially related to functional programming, you inevitably arrive at a slop of letters with arrows between them. Even just parsing that is rather difficult for non-initiates, let alone trying to grasp what it's actually saying after you've parsed it. Words and arrows (the normal kind of arrows, the kind that are for pointing at things) can help a lot.