loading...

Interest in a Haskell tutorial?

drbearhands profile image DrBearhands ・1 min read

I'd been toying with the idea of writing a few things up on how to get started with Haskell development, but thought nobody would be interested.

Then I came across this comment:

I think there's a definite place for both communities

There is for sure, but alas the Real World Haskell book is getting a bit dated (it's from 2008) and is also quit long (700+ pages). What I'd like to see is something ~300ish pages that focuses on e.g. building a full web app or something like that. Anyway, I'm not writing those either (I settled on F# as my functional language of choice), so it's not for me to complain.

Is this a common feeling? I don't think I'll quite make 300 pages, but setting up a simple Haskell webserver is exactly what I've recently done, and there are a lot of different parts to it that show different features of the language.

The reason that Haskell tends not to start with webservers, is that in order to make one, IO monads are a necessity, and monads are considered scary. I think it can be done, but then again, I'm pretty good at underestimating the complexity of anything I find interesting.

If you'd want to read such a series written by yours truly, please react with a unicorn, so I can estimate how much interest there is for this subject. I'll be counting hearts as "this is nice but not for me".

Posted on by:

Discussion

pic
Editor guide
 

The reason that Haskell tends not to start with webservers, is that in order to make one, IO monads are a necessity

I don't believe anyone needs yet another beginner monad tutorial, there are plenty already. "And Learn You a Haskell" is a really nice and beginner friendly book. What I'm missing is some practical intermediate language book for someone like me, who has a good handle on the whole functor - applicative - monad progression (and arrows, lenses etc), but hasn't build anything substantial in Haskell yet. Real World Haskell was a pretty decent book, but its showing its age at this point. I want something that walks through a reasonably interesting (web) application, focusing on how to use a modern Haskell stack (Stackage and all), functional program design etc.

 

Have you ever looked at Parallel and Concurrent Programming in Haskell book? You should find what you're looking for except for modern Haskell stack etc.

 

I haven't. But does it have what I'm looking for, i.e. building up a complete non-trivial app? I've read books and concurrent and parallel programming before, if this is "just" snippets/pattern, but in Haskell instead of some other language then I'll give this one a pass.

Edit: nevermind, found the code samples on Github, thanks. Definitely a step in the right direction.

 

Not that I wish to influence the good doctor too much... but were he to present a tutorial in Haskell that could be added to

GitHub logo gypsydave5 / todo-mvp

The non-SPA version of the todo list app

Todo-MVP

The objective of this project is to demonstrate that it is relatively simple to build web applications using HTML, CSS and a small amount of server side code written in a language of your choice.

It's the Todo Minimum Viable Product - the simplest and most extensible application you can write - but perhaps it's also the Most Valuable Player in your web development toolkit. I like to think so!

META-TODO

  • Working Todo-MVP application
  • Nice CSS
  • Good a11y
  • Simple acceptance test
  • Best in class a11y
  • Implement in multiple languages
  • Multiple CSS files
  • Automated deployment
  • Automate the acceptance test
  • ???
  • PROFIT!

The Todo Application

The project consists (or will consist) of the following:

  • Many Todo applications, written in multiple languages, all each serving the same HTML and implementing the same API.
  • An acceptance test to confirm that the application does the above

Principles

Whereas I respect the skill and effort…

I'm sure that'd be great... πŸ˜„

 

I'm in two minds about this. On one hand it is pretty much a standard and standards are nice. On the other hand, I'm still rather conflicted about what is the "best" way of making a frontend, so I'd rather not push a particular (mental) framework on this subject.

It does not help that my own frontend is rather simplistic.

Luckily there is a lot of interesting stuff to cover before getting to the frontend, so I can postpone the decision.

 

I'm still rather conflicted about what is the "best" way of making a frontend

I'm a big fan of offensively simple HTML, as it's accessible and comprehendible to most developers - and so that's what the spec of Todo-MVP requires.

 

I'd be interested, yes. I'm with Michael, though - the world doesn't need another monad tutorial, but could use a "practical application of monadic IO in a real-world setting" tutorial. It's a different thing, but I think that's what you're talking about here. I feel I have a good grasp on what a monad is and how to apply them, but my Haskell has never managed to progress much beyond coding-challenge one-offs. I'm intimidated to sit down and build an API with it.

 

I would be interested in a Practical Haskell tutorial similar to packtpub.com/programming/the-pytho... or
packtpub.com/programming/the-java-...

And please no more monads tutorials. Just practical stuff.