Live data from Hacker News

Reading Simple Haskell

soupi.github.io

1–10 of 82 posts

Re: Reading Simple Haskell

#2
Unrelated: I'm obviously quite biased, but I generally like Haskell code for pseudo code like things, because it does away with a lot of syntax specific cruft, and stays close to the math it's usually talking about.

Also, readers might be interested in A Tour of Go in Haskell, which is the concurrency chapter of A Tour of Go, but just...in Haskell - https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html.

Re: Reading Simple Haskell

#3
I only started Haskell since the 1st day of Advent of Code this year. I didn't see that mentioned much either in the article or other articles, but Haskell is like Python and has significant whitespace to determine scope. The error messages related to this aren't always clear...

Re: Reading Simple Haskell

#4
One thing this doesn't mention, which might be useful to know, is that Haskell is indentation-sensitive. For instance, those examples using "let" won't compile if the lines beginning with "let" and "in" aren't indented.

I'd be interested if anyone knows of a simple guide to Haskell's indentation rules - I still find it trips me up now and then.

Re: Reading Simple Haskell

#5
post #2

Unrelated: I'm obviously quite biased, but I generally like Haskell code for pseudo code like things, because it does away with a lot of syntax specific cruft, and stays close to the math it's usually talking about. Also, readers might be interested in A Tour of Go in Haskell, which is the concurrency chapter of A Tour of Go, but just...in Haskell - https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html .

Wow that resource is super clever and useful, I wish it had the full "Tour"!

Re: Reading Simple Haskell

#6
post #5
post #2

Unrelated: I'm obviously quite biased, but I generally like Haskell code for pseudo code like things, because it does away with a lot of syntax specific cruft, and stays close to the math it's usually talking about. Also, readers might be interested in A Tour of Go in Haskell, which is the concurrency chapter of A Tour of Go, but just...in Haskell - https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html .

Wow that resource is super clever and useful, I wish it had the full "Tour"!

It was more or less just posted, but I could imagine there is plans for the rest of the content to be ported also. I might help with that if I get any time during Christmas :x

Re: Reading Simple Haskell

#7

One thing this doesn't mention, which might be useful to know, is that Haskell is indentation-sensitive. For instance, those examples using "let" won't compile if the lines beginning with "let" and "in" aren't indented. I'd be interested if anyone knows of a simple guide to Haskell's indentation rules - I still find it trips me up now and then.

> I'd be interested if anyone knows of a simple guide to Haskell's indentation rules - I still find it trips me up now and then.

The "simple" way I deal with it is to use Emacs and press TAB until things look right :)

Re: Reading Simple Haskell

#8

One thing this doesn't mention, which might be useful to know, is that Haskell is indentation-sensitive. For instance, those examples using "let" won't compile if the lines beginning with "let" and "in" aren't indented. I'd be interested if anyone knows of a simple guide to Haskell's indentation rules - I still find it trips me up now and then.

Re indentation, you might find these two useful https://en.wikibooks.org/wiki/Haskell/Indentation and http://echo.rsmw.net/n00bfaq.html.

Re: Reading Simple Haskell

#10
post #2

Unrelated: I'm obviously quite biased, but I generally like Haskell code for pseudo code like things, because it does away with a lot of syntax specific cruft, and stays close to the math it's usually talking about. Also, readers might be interested in A Tour of Go in Haskell, which is the concurrency chapter of A Tour of Go, but just...in Haskell - https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html .

Regarding concurrency in Haskell, there is a very good book from Simon Marlow, "Parallel and Concurrent Programming in Haskell".
Post reply on HN