
Hi, there, I'm relatively new to Haskell...well... I mean I haven't done anything I believe truely in Haskell. I have gone through materials like Learn You a Haskell for Real Good, Real World Haskell, most chapters in Haskell Wikibook, Write Yourself Scheme in 48 Hours, Algorithms: A Functional Approach and other materials in Haskell Wiki. *But... what I feel is that I'm not confident while writing Haskell code.*Having gone through all those materials with "magic", I always feel I'm writing stupid code and there must be more elegant way... And... what's worse, I feel guilty while using IO monad but I simply cannot avoid it, like when I try to write code generator for a toy compiler, I need to keep state of the registers, which I need IORef... Then I feel its not pure anymore but I don't know how to get around it. I'm wondering if anyone else shares this kind of feeling and what should I do next? Could anyone suggest any project to get hands on experience with Haskell? Another question is that the deeper digging into functional algorithms design (reading the book Pearls of Functional Algorithm Design), the more ignorant I feel. So how do I make up the basics like fold law, list induction etc. Any suggested reading materials? Well.. I think that's a lot question. Thanks for your patience and your kind help.

I got a lot out of reading Parallel and Concurrent Programming in Haskell
by Simon Marlow. Purely Functional Data Structures by Chris Okasaki is also
quite useful. Haskell wasn't my first pure-ish FP language (I spent a lot
of time in Erlang) so for me it was really about wrapping my head around
Haskell's non-strict evaluation.
You could also try going through the exercises at http://exercism.io/ -
none of the exercises are too challenging but the code review component of
the site will keep you honest and will likely help you get closer to
writing better Haskell.
On Thu, Mar 20, 2014 at 11:17 AM, bruce li
Hi, there, I'm relatively new to Haskell...well... I mean I haven't done anything I believe truely in Haskell. I have gone through materials like Learn You a Haskell for Real Good, Real World Haskell, most chapters in Haskell Wikibook, Write Yourself Scheme in 48 Hours, Algorithms: A Functional Approach and other materials in Haskell Wiki.
*But... what I feel is that I'm not confident while writing Haskell code.*Having gone through all those materials with "magic", I always feel I'm writing stupid code and there must be more elegant way... And... what's worse, I feel guilty while using IO monad but I simply cannot avoid it, like when I try to write code generator for a toy compiler, I need to keep state of the registers, which I need IORef... Then I feel its not pure anymore but I don't know how to get around it.
I'm wondering if anyone else shares this kind of feeling and what should I do next? Could anyone suggest any project to get hands on experience with Haskell?
Another question is that the deeper digging into functional algorithms design (reading the book Pearls of Functional Algorithm Design), the more ignorant I feel. So how do I make up the basics like fold law, list induction etc. Any suggested reading materials?
Well.. I think that's a lot question. Thanks for your patience and your kind help.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On 20/03/14 18:17, bruce li wrote:
Hi, there, I'm relatively new to Haskell...well... I mean I haven't done anything I believe truely in Haskell. I have gone through materials like Learn You a Haskell for Real Good, Real World Haskell, most chapters in Haskell Wikibook, Write Yourself Scheme in 48 Hours, Algorithms: A Functional Approach and other materials in Haskell Wiki.
*But... what I feel is that I'm not confident while writing Haskell code.*Having gone through all those materials with "magic", I always feel I'm writing stupid code and there must be more elegant way... And... what's worse, I feel guilty while using IO monad but I simply cannot avoid it, like when I try to write code generator for a toy compiler, I need to keep state of the registers, which I need IORef... Then I feel its not pure anymore but I don't know how to get around it.
I'm wondering if anyone else shares this kind of feeling and what should I do next? Could anyone suggest any project to get hands on experience with Haskell?
Another question is that the deeper digging into functional algorithms design (reading the book Pearls of Functional Algorithm Design), the more ignorant I feel. So how do I make up the basics like fold law, list induction etc. Any suggested reading materials?
Well.. I think that's a lot question. Thanks for your patience and your kind help.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
I recommend that you try and help out with existing libraries. Writing patches for libs is very easy in Haskell as it's quite hard to break everything by not setting that one obscure global variable there somewhere ;) Toy problems only get you so far, and this way others will benefit too. -- Mateusz K.

I teach FP for a living for an organisation called NICTA. This is the material I use primarily https://github.com/NICTA/course If you can do the easy stuff, fine. For example, https://github.com/NICTA/course/blob/master/src/Course/List.hs https://github.com/NICTA/course/blob/master/src/Course/ListZipper.hs https://github.com/NICTA/course/blob/master/src/Course/StateT.hs If you want it a bit harder: https://github.com/NICTA/course/blob/master/src/Course/Parser.hs https://github.com/NICTA/course/blob/master/src/Course/JsonParser.hs https://github.com/NICTA/course/blob/master/src/Course/Cheque.hs But if you can do any of these, then I would say you are not a beginner anymore: https://github.com/NICTA/course/blob/master/projects/TicTacToe/TicTacToe.mar... https://github.com/NICTA/course/blob/master/projects/NetworkServer/NetworkSe... On 21/03/14 04:17, bruce li wrote:
Hi, there, I'm relatively new to Haskell...well... I mean I haven't done anything I believe truely in Haskell. I have gone through materials like Learn You a Haskell for Real Good, Real World Haskell, most chapters in Haskell Wikibook, Write Yourself Scheme in 48 Hours, Algorithms: A Functional Approach and other materials in Haskell Wiki.
*But... what I feel is that I'm not confident while writing Haskell code.* Having gone through all those materials with "magic", I always feel I'm writing stupid code and there must be more elegant way... And... what's worse, I feel guilty while using IO monad but I simply cannot avoid it, like when I try to write code generator for a toy compiler, I need to keep state of the registers, which I need IORef... Then I feel its not pure anymore but I don't know how to get around it.
I'm wondering if anyone else shares this kind of feeling and what should I do next? Could anyone suggest any project to get hands on experience with Haskell?
Another question is that the deeper digging into functional algorithms design (reading the book Pearls of Functional Algorithm Design), the more ignorant I feel. So how do I make up the basics like fold law, list induction etc. Any suggested reading materials?
Well.. I think that's a lot question. Thanks for your patience and your kind help.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- Tony Morris http://tmorris.net/

Thanks for the exercises. I think I've finished all exercises except the
last 2 projects. But here are some questions regarding the exercises:
1. The layout of the typeclasses looks a bit different from Haskell, like
splitting applicative functor into apply and applicative. I wonder you
could tell me the reason.
2. How to write cooler code like lift2 ((++) =<<) preillion postillion?
How could I make such usage a habit?
Thanks.
2014-03-20 18:15 GMT-04:00 Tony Morris
I teach FP for a living for an organisation called NICTA. This is the material I use primarily https://github.com/NICTA/course
If you can do the easy stuff, fine. For example, https://github.com/NICTA/course/blob/master/src/Course/List.hs https://github.com/NICTA/course/blob/master/src/Course/ListZipper.hs https://github.com/NICTA/course/blob/master/src/Course/StateT.hs
If you want it a bit harder: https://github.com/NICTA/course/blob/master/src/Course/Parser.hs https://github.com/NICTA/course/blob/master/src/Course/JsonParser.hs https://github.com/NICTA/course/blob/master/src/Course/Cheque.hs
But if you can do any of these, then I would say you are not a beginner anymore:
https://github.com/NICTA/course/blob/master/projects/TicTacToe/TicTacToe.mar...
https://github.com/NICTA/course/blob/master/projects/NetworkServer/NetworkSe...
On 21/03/14 04:17, bruce li wrote:
Hi, there, I'm relatively new to Haskell...well... I mean I haven't done anything I believe truely in Haskell. I have gone through materials like Learn You a Haskell for Real Good, Real World Haskell, most chapters in Haskell Wikibook, Write Yourself Scheme in 48 Hours, Algorithms: A Functional Approach and other materials in Haskell Wiki.
*But... what I feel is that I'm not confident while writing Haskell code.* Having gone through all those materials with "magic", I always feel I'm writing stupid code and there must be more elegant way... And... what's worse, I feel guilty while using IO monad but I simply cannot avoid it, like when I try to write code generator for a toy compiler, I need to keep state of the registers, which I need IORef... Then I feel its not pure anymore but I don't know how to get around it.
I'm wondering if anyone else shares this kind of feeling and what should I do next? Could anyone suggest any project to get hands on experience with Haskell?
Another question is that the deeper digging into functional algorithms design (reading the book Pearls of Functional Algorithm Design), the more ignorant I feel. So how do I make up the basics like fold law, list induction etc. Any suggested reading materials?
Well.. I think that's a lot question. Thanks for your patience and your kind help.
_______________________________________________ Beginners mailing listBeginners@haskell.orghttp://www.haskell.org/mailman/listinfo/beginners
-- Tony Morrishttp://tmorris.net/
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Thu, 27 Mar 2014 16:50:28 +0100, bruce li
2. How to write cooler code like lift2 ((++) =<<) preillion postillion? How could I make such usage a habit?
I think it is better to not make this a habit; such coding is both hard to write and read. IMHO a better way to write this, is using a list comprehension: [x ++ y | x <- preillion, y <- postillion] I simple cases, point-free style[0] can be an advantage, however. Regards, Henk-Jan van Tuyl [0] http://www.haskell.org/haskellwiki/Pointfree -- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/ http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming --

On Thu, 27 Mar 2014 23:06:02 +0100, Henk-Jan van Tuyl
On Thu, 27 Mar 2014 16:50:28 +0100, bruce li
wrote: 2. How to write cooler code like lift2 ((++) =<<) preillion postillion? How could I make such usage a habit?
I think it is better to not make this a habit; such coding is both hard to write and read. IMHO a better way to write this, is using a list comprehension: [x ++ y | x <- preillion, y <- postillion]
Studying a bit better on the example, I see that I misinterpreted it; this show how hard it is to read. Regards, Henk-Jan van Tuyl -- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/ http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming --
participants (5)
-
Bob Ippolito
-
bruce li
-
Henk-Jan van Tuyl
-
Mateusz Kowalczyk
-
Tony Morris