Haskell, Step by Step, Tutorial, Developing a Whole Application

Is there a (or more; the more, the better) tutorial for Haskell, developing a whole application (of any kind: web, windows, console)? I mean something like NerdDinner or MVC Music Store for ASP.NET MVC; Or those whole applications in "in Action" books. Thanks Edit 1: Thanks to all for your replies. I just wanted to insist on "step by step developing a whole application" aspect of what I want; not those tutorials that teach Haskell (they are not bad - They are not this). I believe if one could understand Haskell well and even understand it's underlying mathematical foundations, that (absolutely) does not mean "he can develop an application in Haskell". The problem with Haskell is not failing to understand it (I can use LINQ and even developed a DSL based on LINQ - a LINQ provider - and see how it makes composition tidy) but failing to understand the context (system thinking). I can use same concepts in C# because I "know" the context and it is easy to "feed in" new tools/concepts. In Haskell, one can understand every bit of it (well almost) but there is no context there to fit in! So (I might not be wrong - but who knows!) there is an absolute need for this kind of "tutorial" (I wish there was a better name for this). Edit 2: I believe there is a way to learn and teach Haskell in a neat and straight way (That does not mean I think Haskell is a pragmatic programming language - don't get me wrong; I appreciate it; but start- up barrier with Haskell it too high; It has still a long way ahead to be considered as a common purpose programming language and may never does. But Haskell is definitely father of future programming languages - and also not so future ones!) Note: I have asked this question on stackoverflow (http://goo.gl/ bCFf7) and I will try to sync useful information as much as possible.

On 10-12-16 06:49 PM, __kaveh__ wrote:
Is there a (or more; the more, the better) tutorial for Haskell, developing a whole application (of any kind: web, windows, console)?
There is one developing a whole Scheme interpreter: http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours There is not exactly one developing a whole window manager, but if you stalk the past blogs of the authors of xmonad, you may uncovered a kind of "The Lost Chronicles of Developing a Window Manager in Action".

I too would like such a tutorial.
There is a lot of good material explaining certain concepts, and
complete examples doing some real-world task. I've read RWH and LYAH
and browsed quite some sources from packages from hackage. I
understand what I read and I'm able to re-use that knowledge. But I
too still feel uncertain about overall application design. Most stuff
on hackage are libraries. Binaries are mostly examples or some small
wrapper around a library.
My OOP background might be causing me to keep thinking that certain
parts (model, controller, storage layer) of an application talk to
each other by sending messages (method calls). When just trying out
something, this thinking leads me to applications that have a lot of
funcionality in IO. Sure there are lots of pure functions as well and
I occasionally lift them into Monads or Applicatives. Even
transformers are becoming less scary as of late. But the parts that
tie everything together are IO, they feel very imperative, and I feel
this isn't necessary. I can think of some ways to make it better, so
sure, by trial and error I learn and indeed it's fun. But I would have
a lot more confidence if I knew that there's a certain workflow that's
generally considered the right thing to do. Some default ways to
organize code (like the MVC pattern), and for tying things together.
It's indeed hard to really explain what I feel is missing. The
examples you mention, and some examples I know of (like the blog app
in 15 minutes ruby on rails demo) are more like a top-down approach.
Most haskell tutorials and libraries are bottom-up.
While I like "building" stuff brick by brick to make it really steady,
I still feel that first putting up some steady scaffolds are great to
give me some boundaries while building. I know what point to build
towards, and gives me some insights into progress. In the end ofcourse
the scaffolds will be taken away, when the bottom-up brick-laying is
complete enough.
Don't get me wrong, I'm not asking for a full-blown framework. I know
there are specialized frameworks for many things (especially webapps
as of late), many of which have some tutorials. I'm asking for
something more generic. How do you start, where do you place things,
what type of things are usually around, how do you bind them together
and most importantly: why.
On Fri, Dec 17, 2010 at 12:49 AM, __kaveh__
Is there a (or more; the more, the better) tutorial for Haskell, developing a whole application (of any kind: web, windows, console)?
I mean something like NerdDinner or MVC Music Store for ASP.NET MVC; Or those whole applications in "in Action" books.
Thanks
Edit 1: Thanks to all for your replies. I just wanted to insist on "step by step developing a whole application" aspect of what I want; not those tutorials that teach Haskell (they are not bad - They are not this). I believe if one could understand Haskell well and even understand it's underlying mathematical foundations, that (absolutely) does not mean "he can develop an application in Haskell". The problem with Haskell is not failing to understand it (I can use LINQ and even developed a DSL based on LINQ - a LINQ provider - and see how it makes composition tidy) but failing to understand the context (system thinking). I can use same concepts in C# because I "know" the context and it is easy to "feed in" new tools/concepts. In Haskell, one can understand every bit of it (well almost) but there is no context there to fit in! So (I might not be wrong - but who knows!) there is an absolute need for this kind of "tutorial" (I wish there was a better name for this).
Edit 2: I believe there is a way to learn and teach Haskell in a neat and straight way (That does not mean I think Haskell is a pragmatic programming language - don't get me wrong; I appreciate it; but start- up barrier with Haskell it too high; It has still a long way ahead to be considered as a common purpose programming language and may never does. But Haskell is definitely father of future programming languages - and also not so future ones!)
Note: I have asked this question on stackoverflow (http://goo.gl/ bCFf7) and I will try to sync useful information as much as possible.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Mathijs Kwik
It's indeed hard to really explain what I feel is missing.
I think the basics are well covered, with lots of introductory and tutorial material available. The advanced stuff is very abstract and general, and the difficult part is developing an intuition for how and when to apply the different patterns. Anyway - *I* would like lectures on video. I guess I'm just much better at learning from lectures than from text, but I've recently started to watch on-line lectures¹, and this is great, as you get lecturers from world-leading institutinos which you can watch whenever convenient. Are there any video material on either advanced functional programming, or functional progamming in the large? This would be really great. Of course, a video lecture has some advantages (you can pause it to get a cup of coffee or look up some stuff), but also disadvantages (you can't ask the lecturer, and there's usually no exercises or other stuff). So I think it'd be ideal to combine each lecture with a Stack Overflow-like forum - it seems this could add a lot of value. But I digress. Any videos out there? -k ¹ So far, I've been through: 1. Teaching College level science from MIT, really great stuff http://ocw.mit.edu/courses/chemistry/5-95j-teaching-college-level-science-an... 2. As suggested by Alberto G. Corona in an earlier thread, a Yale course on evolution, giving a very nice - if not very deep - overview of the field, with lots of fun examples. http://www.youtube.com/view_play_list?p=6299F3195349CCDA 3. TED talks. http://ted.com/ - I guess you know about these. 4. Oh, yes, I've also been watching Greg Meredith's videos, which are fun, but perhaps aimed at a somewhat different target. -k -- If I haven't seen further, it is by standing in the footprints of giants

I agree with the feeling that Haskell tutorials feel like they are bottom-up. But I think there's a reason for this: In my experience, at least, Haskell applications are built bottom-up. Functional programming languages strive for composability. In Haskell you have very clean, clear ways of composing functions, Monads, and even composing them with each other. In OOP languages, the glue that you have for composing objects is more objects. This can be a much less elegant way to build applications bottom-up, and so bottom up applications feel sloppy and hacked together. In an OOP app, you need to start with some kind of scaffolding, such as mvc or the like, so that as you compose your objects, they start to take the shape of a well-structured application. In functional programming, that composability is much more flexible, so you don't need to worry as much about coding yourself into a poorly structured app. After all, mvc is all about separation of concerns which comes naturally if you keep as much as possible outside of the IO monad. When I'm coding in Haskell, I like to think in the paradigm of creating a domain specific language. I'm not writing my program for the first 90% of development, I'm actually working on the DSL that will be used to create my app. Finally, i switch from functional programming to imperative, procedural programming in the IO monad (or some custom Monad) to write the actual code. The end result is a flexible, maintainable program in very few lines of code and then some very general, reusable library code supporting it. I didn't address the actual question, instead I tried to speak to how I got around the problem. Hope my $0.02 helps. --Jonathan
participants (5)
-
__kaveh__
-
Albert Y. C. Lai
-
Jonathan Geddes
-
Ketil Malde
-
Mathijs Kwik