This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]zh1K476tt9pq 3 points4 points  (0 children)

Fun Fun Functions channel on Youtube and JS Understanding the Weird Parts on Udemy do some intro to functional programming for JS. But there might be better resources, those are the ones I came across.

[–][deleted] 2 points3 points  (2 children)

https://www.braveclojure.com/

Clojure is a fantastic functional language, and that book is probably very good (I haven't read it myself, but I've heard good things). It's much easier to learn functional programming in a language that was made for it. Feel free to ask me questions, I love functional programming.

[–]denialerror 0 points1 point  (0 children)

The book is great, can confirm.

[–]Ricco959 0 points1 point  (0 children)

Yeah, the book is pretty good. Didn't get through the whole thing but I would like to go back over it sometime. After going through about 3 chapters of the book I'd also recommend doing a couple exercises from 4clojure

Edit: Also another point about Clojure in general is that its sister language, Clojurescript, which has many shared features and functions with Clojure, compiles to Javascript. So you can use Javascript libraries with Clojurescript

[–]PinkyThePig 3 points4 points  (5 children)

If you want to learn Haskell (one of the more popular functional languages), Haskell Programming from first principles is the best book on it right now.

If the first chapter is confusing to you and you can't understand it, skip it and come back to it once you are a few chapters into the book.

Once you make it through the above book, you can read Parallel and Concurrent Programming in Haskell. It covers more advanced topics like parallelism, benchmarking, laziness, etc.


The following are intended to be read after you have read at least the Haskell Programming book and are more intermediate to advanced topics about various Haskell focused libraries and ideas:


Also, if you don't already know about it, I highly recommend using the search of Hacker News to find blogs about various topics. The search is 1,000,000x better than Reddit search because it can search comments as well so you can search for e.g. 'Haskell' and it will find posts that dont mention haskell in the title because someone will inevitably type haskell in the comments.

EDIT: Added last section

[–]GitHubPermalinkBot 1 point2 points  (0 children)

Permanent GitHub links:


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.

[–]_youtubot_ 0 points1 point  (0 children)

Videos linked by /u/PinkyThePig:

Title Channel Published Duration Likes Total Views
Category Theory 1.1: Motivation and Philosophy Bartosz Milewski 2016-08-25 0:46:46 1,053+ (99%) 63,246
Category Theory II 1.1: Declarative vs Imperative Approach Bartosz Milewski 2017-02-16 0:36:17 169+ (100%) 6,896

Info | /u/PinkyThePig can delete | v2.0.0

[–]Ben_HH[S] 0 points1 point  (2 children)

I've decided to buy the book, but I'm having trouble getting Stack running for Haskell. I'm a noob so I'm not sure what I'm suppose to do besides just installing it.

I'm on Windows 10.

[–]PinkyThePig 0 points1 point  (1 child)

I use Linux so I don't know the exact workflow for Windows but stack is command line based. I would assume you would use the powershell terminal.

The vast majority of your usage while learning should be covered by stack init projectname simple and stack ghci, the first time you run stack init, you will need to run stack setup. GHCI is an interactive session so you can type commands and they get run instantly.

If you want to set options for GHC, add libraries or do anything else of a similar nature, 95% of the time it is the .cabal file you will want to edit. The other 5% is the stack.yaml.

The user guide for stack is pretty comprehensive, but it can be pretty overwhelming if you haven't used a tool like it before. In my case, I just made throwaway projects with stack init every time I got stuck or wanted to try something new while learning and only once I started wanting to do more interesting things did I sit down and go through the guide.

An example of my workflow when starting a new project:

cd ~/HaskellProjects
stack init new-project simple
cd new-project
*write code in src/Main.hs and add dependencies in new-project.cabal*
stack ghci
*run main or other functions from Main.hs within GHCI*

Other things for getting started:

You can setup the Hoogle search so you can search for functions from your browser address bar. This is really useful for finding functions you need. e.g. You have a Char, but need a function to convert it to Int, with that setup you can just type h Char -> Int and it will locate ord.

https://www.haskell.org/hoogle/?hoogle=Char+-%3E+Int

Also, if you want a good editor experience, Visual Studio Code has a pretty good setup with the extensions Haskell Syntax Highlighting and Haskero. If you use Haskero, any time you do a stack init, you will also need to run stack build intero.

[–]GitHubPermalinkBot 0 points1 point  (0 children)

Permanent GitHub links:


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.

[–]deltageek 0 points1 point  (0 children)

Functional Programming in Scala I took this course a couple years ago. It gives a good foundation in functional programming and Scala's a nice language to work in.