
Learning Real Haskell Incrementally [video] - begriffs
http://begriffs.com/posts/2015-10-24-learning-haskell-incrementally.html
======
wetmore
This is roughly how I learned; I used Hakyll[0] to make my personal site, and
working with the Compiler monad it uses taught me to understand monads and use
do notation.

It's way easier to learn when you have a reason to be learning, and
abstractions always make more sense when you have a case to motivate them.

[0]: [http://jaspervdj.be/hakyll/](http://jaspervdj.be/hakyll/)

~~~
bootload
Nice example to look at @wetmore, very jeckyl and something I recognise well.
I got sick of trying to get Rails working on my light server so I wrote my own
in Python version using the same file structure(.md + yaml). So looking at a
Haskell example is great. The only bummer I see using Haskell is the install
for GHCi. [0]

[0] All my development is on RaspberryPi. You can get it going hacking thru
the source but it's a pain. So the running working code generating things is a
sort of anti-dote sort of negates this problem.

------
asgard1024
What projects in Haskell are considered to have well-written, idiomatic code?

I looked at some about a year ago but almost all projects I saw had lot of IO
and bangs everywhere.

~~~
skm
Don Stewart has given possibly the best answer to this question on
StackOverflow: [http://stackoverflow.com/questions/6398996/good-haskell-
sour...](http://stackoverflow.com/questions/6398996/good-haskell-source-to-
read-and-learn-from/6399082#6399082)

~~~
asgard1024
Thanks, I almost lost hope that I will get a sensible answer. I don't buy the
argument that real world code cannot be pretty; what would be the reason to
use Haskell, then?

------
orionblastar
I suffer from the problem of languages changing over time as I became disabled
in 2003, been in hospitals a lot, recovering at home a lot. Trying to get back
into programming after 13+ years of recovery and medical debt that forced me
into bankruptcy.

Any book I own is way out of date, I bought books in 2008 that are out of date
already. I might as well code in COBOL and FORTRAN on an old Mainframe that
didn't change since the 1970s as I still have books from college on those. I
tried to work in retroprogramming in writing code for old languages like
Visual BASIC 6.0 and ASP 3.0 and VBScript, but found no takers.

I read the LYAH book and found I couldn't get the code to work, Functional
Programming is still new to me, so I struggle with it. I was contacted by
someone on Github over the debate they had about a code of conduct and she
writes in F Sharp and wanted to pair program with me. So I had to learn F
Sharp, which is another functional language. I took an EDX course that
Microsoft offered on it. I have Visual Studio 2013 Community edition, and I
found that even if they say I can use 2013, the course is graded in 2015 which
made changes to F Sharp. Some code won't compile and has to be rewritten, code
that I write that passes tests may not work in 2015 so my homework assignments
got points taken off. Had they run it in 2013 it would have gotten 100% on a
score. I was two weeks behind due to being sick and I caught up on everything
but the last homework program and I scored 66% needing 50% to pass the course.
Even Microsoft changes the way their languages work. What few F Sharp books
that exist, are out of date just like the Haskell books.

Oddly enough I have Turbo C code I wrote in 1987 that still compiles on most
modern C compilers. I got C4Droid on my Android phone and it compiles the C
code without any errors and runs them just right as well. I saved my code on a
floppy disk and the moved them to a USB drive and transferred them to my
Android phone to see if it would still work.

I sort of wonder why most modern languages aren't backward compatible like C
is, and why they break compatibility. I guess it is so they can charge more
for the training in the new standard and write new books and teach more
courses? Either that or the changes they made had optimize the language so it
used less memory and ran faster but broke compatibility wit legacy code.

I find myself still using Python 2.7 instead of 3.X, because I have books that
have code that still works with it, and 3.X breaks a lot of things. I found
that a lot of GNU/Linux still uses Python 2.X and when you install Python 3.X
it is called Python3 on the command line.

This video helps me understand Haskell a bit more, and looking in Github for
FOSS Haskell projects to view the source code would help as well.

But I find as soon as I learn something, it has been changed and there is a
new version available.

~~~
kqr
I'm fairly sure there's a way to force GHC to compile "Haskell 98" code, which
is the first Haskell standard and has stayed the same for 17 years now.

~~~
massysett
Nope. There have been many changes since Haskell 98: for example Applicative
is now a superclass of Monad. So not only could you not force a current GHC to
compile Haskell 98; in addition, you cannot get Haskell 98 to compile on a
current GHC at all.

The only way to be sure you can compile old Haskell is to keep an old GHC and
old libraries around. Stackage should make this easier going forward.

~~~
plonh
Applicative didn't exist in 1998, so 1998 code won't have any Applicative code
that conflicts with the new language spec.

~~~
massysett
The problem is that 1998 code will have Monad instances that do not have
Applicative as a super class.

