Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Re: WWAAA... I hate monads (Daniel Carrera) 2. parser comparison question (Walck, Scott) 3. Re: Re: WWAAA... I hate monads (Joel Neely) ---------------------------------------------------------------------- Message: 1 Date: Fri, 24 Apr 2009 22:50:28 +0200 From: Daniel Carrera <daniel.carr...@theingots.org> Subject: Re: [Haskell-beginners] Re: WWAAA... I hate monads To: beginners@haskell.org Message-ID: <49f22614.5010...@theingots.org> Content-Type: text/plain; charset=UTF-8; format=flowed Ertugrul Soeylemez wrote: > Actually Schrödinger's cat is neither dead nor alive. Its state S is a > unit vector living in a Hilbert space. I spoke imprecisely, but I do know about superposition. I took a couple of quantum courses when I got my physics degree (but generally I focused on astrophysics which is far more interesting than quantum mechanics). Daniel. ------------------------------ Message: 2 Date: Fri, 24 Apr 2009 22:31:29 -0400 From: "Walck, Scott" <wa...@lvc.edu> Subject: [Haskell-beginners] parser comparison question To: "beginners@haskell.org" <beginners@haskell.org> Message-ID: <e6c639c7e135d846b5127945421a789f164b760...@lvc02.lvc.edu> Content-Type: text/plain; charset="us-ascii" I've been comparing Graham Hutton's simple parser with Parsec. Here is some example code. -- Comparison of Hutton's simple parser with Parsec -- Hutton's simple parser is available at -- http://www.cs.nott.ac.uk/~gmh/Parsing.lhs -- Hutton simple parser called H -- Parsec called P import qualified Parsing as H import qualified Text.ParserCombinators.Parsec as P exH = H.parse (H.string "hi") "hiho" exP = P.parse (P.string "hi") "" "hiho" charH = H.parse (H.char 'a' H.+++ H.char 'b') "bbb" charP = P.parse (P.char 'a' P.<|> P.char 'b') "" "bbb" choiceH = H.parse (H.string "hoo" H.+++ H.string "ho") "hono" choiceP1 = P.parse (P.string "bb" P.<|> P.string "ba") "" "bbb" choiceP2 = P.parse (P.string "ba" P.<|> P.string "bb") "" "bbb" choiceP22 = P.parse (P.try (P.string "ba") P.<|> P.string "bb") "" "bbc" I am interested if anyone could comment on the design of the Parsec 'try' function. For example, choiceP2 fails and returns Left error, while choiceP22 succeeds. Hutton's simple parser doesn't need try. It seems so simple and elegant. I'm wondering why Parsec requires me to use 'try' for a string parse that might fail. Thanks, Scott Scott N. Walck Associate Professor of Physics Lebanon Valley College ------------------------------ Message: 3 Date: Fri, 24 Apr 2009 22:17:35 -0500 From: Joel Neely <joel.ne...@gmail.com> Subject: Re: [Haskell-beginners] Re: WWAAA... I hate monads To: j.romi...@gmail.com, beginners@haskell.org Message-ID: <5e0b968a0904242017v6c7d6c0cq35855361321ee...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" With Ertugrul's permission, I've done a simple print-to-PDF of his "Understanding Haskell Monads" tutorial, and am providing the PDF file to this list. -jn- On Fri, Apr 24, 2009 at 5:11 AM, <j.romi...@gmail.com> wrote: > On Thu, Apr 23, 2009 at 09:42:56PM +0200, Ertugrul Soeylemez wrote: >> Hello people, >> >> thanks for all your positive comments about my tutorial, both here and >> through direct email. I appreciate that very much. =) >> >> I'm glad that my work is helpful to the community. > > Would you provide a PDF version along with the HTML version? > > Regards, > > Romildo > >> Colin Paul Adams <co...@colina.demon.co.uk> wrote: >> >> > >>>>> "Daniel" == Daniel Carrera <daniel.carr...@theingots.org> writes: >> > >> > Daniel> Sam Martin wrote: >> > >>> This is excellent: >> > >>> >> > >>> http://ertes.de/articles/monads.html >> > >> >> > >> Wow. That really is a great tutorial! Suddenly the world >> > >> becomes clear... >> > >> >> > >> Definitely gets my vote as must read material. >> > >> > Daniel> +1 >> > >> > Daniel> I was very impressed too. And I am not easy to impress >> > Daniel> when it comes to documentation. I plan to read it a second >> > Daniel> time to solidify some of the ideas, but on my first >> > Daniel> reading my understanding of Monads increased by leaps and >> > Daniel> bounds. >> > >> > Daniel> Ertugrul deserves to be commended, and this tutorial >> > Daniel> should be made more prominent on haskell.org. >> > >> > I think so. >> > I've read VERY MANY tutorials on monads, and they were all confusing - >> > except this one. > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > -- Beauty of style and harmony and grace and good rhythm depend on simplicity. - Plato -------------- next part -------------- A non-text attachment was scrubbed... Name: Understanding Haskell Monads.pdf Type: application/pdf Size: 257719 bytes Desc: not available Url : http://www.haskell.org/pipermail/beginners/attachments/20090424/5476cc76/UnderstandingHaskellMonads.pdf ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 10, Issue 28 *****************************************