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: Looking for some pro bono haskell work (Ertugrul Soeylemez) 2. happstack versus yesod (Ramy Abdel-Azim) 3. Re: happstack versus yesod (Alexey G) 4. Tuples .vs Either Vs datatypes (Mike Meyer) 5. Re: Tuples .vs Either Vs datatypes (Alex Rozenshteyn) 6. Re: Tuples .vs Either Vs datatypes (MAN) ---------------------------------------------------------------------- Message: 1 Date: Tue, 5 Apr 2011 19:12:30 +0200 From: Ertugrul Soeylemez <e...@ertes.de> Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work To: beginners@haskell.org Message-ID: <20110405191230.03423...@angst.streitmacht.eu> Content-Type: text/plain; charset=US-ASCII Hello Ramy, Yesod is a tightly integrated web framework, while Happstack is more like a set of libraries for web development. The main difference is that Happstack uses normal Haskell approaches to everything and allows you to use individual components easily, while the idea of Yesod is to add more integration and some own language (by Template Haskell and quasi-quoting) to allow you to write less code. You can be very productive with both of them. If you want more freedom, use Happstack. If you want more integration, use Yesod. Personally I found myself to have shorter development cycles with Yesod, but it has a steep learning curve, because you need to understand Haskell and a few of its extensions well to use it. That's just my opinion, by the way. Others may have made different experiences. Greets, Ertugrul Ramy Abdel-Azim <ramy.abdela...@gmail.com> wrote: > Maybe i should start a new thread here ( i certainly don't want to derail > the conversation too much) but could someone explain the differences between > happstack and yesod? Also, i've been thinking of getting my hands dirtier > with haskell and trying to possibly create a webiste in Haskell. What are > the strengths and weaknesses of each? > Thanks, > _Ramy > > On Tue, Apr 5, 2011 at 12:34 PM, aditya siram <aditya.si...@gmail.com>wrote: > > > I'm no Haskell guru, but I don't know any category theory and it > > hasn't been a major stumbling block for me. I think you get a long > > ways with Haskell before you need to go there. > > -deech > > > > On Tue, Apr 5, 2011 at 9:04 AM, Patrick Lynch <kmandpjly...@verizon.net> > > wrote: > > > ...one more project... > > > > > > I tried to understand Category Theory but was unable to do so... > > > I tried reading three books in regard to it and can understand the > > > definition of Category...but couldn't follow any of these books past the > > > first chapter and was unable to do any of the exercises in them... > > > However, I did see a few links that 'graphically' showed a Category and > > > another that showed some categories and how they were implemented in > > Haskell > > > - these made the most sense to me... > > > Since categories are the basis for Functors, Monoids and Monads - which > > are > > > extensively used in Haskell and implicitly used, I think, in Linq - I > > would > > > be very willing to participate in a project that showed categories and > > how > > > they are implemented in Haskell... > > > > > > Just a thought... > > > > > > Ps > > > I am an independent software consultant [been doing it for 30+ years]. > > > I did a market evaluation of Haskell and Linq and found the following: > > > - there are page after page of Ling/C# jobs... > > > - I only saw 1 Haskell job... > > > It 'begs the question': is some commercial organization going to > > implement > > > Haskell as a product [I don't think it will be Microsoft, since they have > > > introduced F#]... > > > > > > ----- Original Message ----- From: "Patrick Lynch" > > > <kmandpjly...@verizon.net> > > > To: "aditya siram" <aditya.si...@gmail.com> > > > Cc: <beginners@haskell.org> > > > Sent: Tuesday, April 05, 2011 9:45 AM > > > Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work > > > > > > > > >> Good morning, > > >> Thanks for the advice. > > >> I sent an email to Zvon and volunteered to help them with the examples > > of > > >> Haskell functions in their "Haskell Reference Page" > > >> The projects that I envisage are: > > >> - I tried to get TK installed but was unable to do so, if someone is > > >> working this install, I would be willing to test it for them... > > >> - If anyone is working on a web front-end to Haskell, I would be > > >> willing to participate... > > >> Good day > > >> > > >> ----- Original Message ----- From: "aditya siram" < > > aditya.si...@gmail.com> > > >> To: "Patrick Lynch" <kmandpjly...@verizon.net> > > >> Cc: <beginners@haskell.org> > > >> Sent: Monday, April 04, 2011 5:19 PM > > >> Subject: Re: [Haskell-beginners] Looking for some pro bono haskell work > > >> > > >> > > >>> I would pick a project and contribute a patch to it, or start one of > > your > > >>> own. > > >>> -deech > > >>> > > >>> On Mon, Apr 4, 2011 at 4:17 PM, Patrick Lynch < > > kmandpjly...@verizon.net> > > >>> wrote: > > >>>> > > >>>> Good afternoon, > > >>>> I've read all the books and am looking for some pro bono Haskell > > >>>> Development > > >>>> work... > > >>>> If you have some, please email me... > > >>>> Thanks > > >>>> _______________________________________________ > > >>>> Beginners mailing list > > >>>> Beginners@haskell.org > > >>>> http://www.haskell.org/mailman/listinfo/beginners > > >>>> > > >>>> > > >>> > > >> > > >> > > >> _______________________________________________ > > >> Beginners mailing list > > >> Beginners@haskell.org > > >> http://www.haskell.org/mailman/listinfo/beginners > > >> > > > > > > > > > > _______________________________________________ > > Beginners mailing list > > Beginners@haskell.org > > http://www.haskell.org/mailman/listinfo/beginners > > > -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/ ------------------------------ Message: 2 Date: Tue, 5 Apr 2011 13:24:59 -0400 From: Ramy Abdel-Azim <ramy.abdela...@gmail.com> Subject: [Haskell-beginners] happstack versus yesod To: beginners@haskell.org Message-ID: <banlktim4nz2rruiw4kz-rtyskaxep7t...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" I already posted about this a little bit but i think i should let the old thread get back to it's regularly scheduled conversaion. on to my question: So I know there are a million easier ways to createa blog (wordpress, django, drupal, etc. etc.) but which would you recommend I use to build a beginner website that is simliar to a blog: happstack or yesod? _Ramy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110405/9c6e3e61/attachment-0001.htm> ------------------------------ Message: 3 Date: Tue, 5 Apr 2011 20:35:40 +0300 From: Alexey G <kreed...@gmail.com> Subject: Re: [Haskell-beginners] happstack versus yesod To: beginners@haskell.org Message-ID: <BANLkTikfz5iFjqO=LvuoewHpP6j=ida...@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Hello. It's very interesting theme for me and I want to express my opinion. Yesod - very fast web-framework( http://www.yesodweb.com/blog/preliminary-warp-cross-language-benchmarks). But I don't like Yesod, because idea of Happstack more interesting for me. Happstack gives to you some freedom. I trying to use Snap Framework now. And it's very good for me. Try it http://snapframework.com/! Sorry for my english. 2011/4/5 Ramy Abdel-Azim <ramy.abdela...@gmail.com> > I already posted about this a little bit but i think i should let the old > thread get back to it's regularly scheduled conversaion. on to my question: > > So I know there are a million easier ways to createa blog (wordpress, > django, drupal, etc. etc.) but which would you recommend I use to build a > beginner website that is simliar to a blog: happstack or yesod? > _Ramy > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110405/5a713b3c/attachment-0001.htm> ------------------------------ Message: 4 Date: Tue, 5 Apr 2011 13:41:07 -0400 From: Mike Meyer <m...@mired.org> Subject: [Haskell-beginners] Tuples .vs Either Vs datatypes To: beginners@haskell.org Message-ID: <20110405134107.65477...@bhuda.mired.org> Content-Type: text/plain; charset=US-ASCII One of the exercises in Real World Haskell is to write a glob matcher without translating it to regular expressions. This turns out to be a lot more subtle than it looks (character classes like [!]-}] tend to break things). In doing this, I wrote a matchCharClass function for handling character classes. The initial version had type: matchCharClass :: Pattern -> Char -> (Bool, Pattern) I.e. - it returned rest of pattern after the char class as well as a match succeed/fail indicator. Upon reflection, I realized that only one of the two was ever used, so rewrote it to be: matchCharClass :: Pattern -> Char -> Either Bool Pattern This made the calling code a little larger - taking a apart tuples is a bit easier than taking apart Either's - but simplified the values being generated. I then realized that the code only used one of the Bool values: if it was True, then Pattern got used instead. So I rewrote it a third time, giving: data CharClass = Fail | Pattern String matchCharClass :: Pattern -> Char -> CharClass This only required minor changes to the code, but made it easy to add "Error String" to the CharClass datatype later. That version can be seen at http://pastebin.com/eyre8795 (as always, critiques welcome). I'd like to hear what more experienced haskell programmers have to say about those three ways of returning multiple values. Thanks, <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Software developer/SCM consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org ------------------------------ Message: 5 Date: Tue, 5 Apr 2011 14:01:30 -0400 From: Alex Rozenshteyn <rpglove...@gmail.com> Subject: Re: [Haskell-beginners] Tuples .vs Either Vs datatypes To: Mike Meyer <m...@mired.org> Cc: beginners@haskell.org Message-ID: <BANLkTi=3y3ybyr+rrcszjwwarqdcneq...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Sounds like a Maybe to me... On Tue, Apr 5, 2011 at 1:41 PM, Mike Meyer <m...@mired.org> wrote: > One of the exercises in Real World Haskell is to write a glob matcher > without translating it to regular expressions. This turns out to be a > lot more subtle than it looks (character classes like [!]-}] tend to > break things). > > In doing this, I wrote a matchCharClass function for handling > character classes. The initial version had type: > > matchCharClass :: Pattern -> Char -> (Bool, Pattern) > > I.e. - it returned rest of pattern after the char class as well as a > match succeed/fail indicator. Upon reflection, I realized that only > one of the two was ever used, so rewrote it to be: > > matchCharClass :: Pattern -> Char -> Either Bool Pattern > > This made the calling code a little larger - taking a apart tuples is > a bit easier than taking apart Either's - but simplified the values > being generated. I then realized that the code only used one of the > Bool values: if it was True, then Pattern got used instead. So I > rewrote it a third time, giving: > > data CharClass = Fail | Pattern String > matchCharClass :: Pattern -> Char -> CharClass > > This only required minor changes to the code, but made it easy to add > "Error String" to the CharClass datatype later. That version can be > seen at http://pastebin.com/eyre8795 (as always, critiques welcome). > > I'd like to hear what more experienced haskell programmers have to say > about those three ways of returning multiple values. > > Thanks, > <mike > -- > Mike Meyer <m...@mired.org> > http://www.mired.org/consulting.html > Independent Software developer/SCM consultant, email for more information. > > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners > -- Alex R -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20110405/43af0f11/attachment-0001.htm> ------------------------------ Message: 6 Date: Tue, 05 Apr 2011 15:04:30 -0300 From: MAN <elviotoccal...@gmail.com> Subject: Re: [Haskell-beginners] Tuples .vs Either Vs datatypes To: Mike Meyer <m...@mired.org> Cc: beginners@haskell.org Message-ID: <1302026670.2272.25.camel@dy-book> Content-Type: text/plain; charset="UTF-8" I, for one, have a simplified view of the three that often proves helpful for fast decisions: - tuples are a sort of quick-and-dirty tool that gets the job done (simple to code, accessors and constructor already there). They don't stand well for refactoring and maintenance. - A simple, custom datatype like yours is more explicit, easier to read (later, after you wrote the program), and flexible. It requires bit more code to write, and names (good names, please!) thought out. - Apart from being a good container, Either has an Monad instance written for you. It allows data-on-the-side :). This can prove incredibly valuable in *some* situations. Think through if it's worth it (it can cripple your code if your not sure about the "shape" data should take). I hope I'm expressing clearly enough (this subject borders subjectivity). El mar, 05-04-2011 a las 13:41 -0400, Mike Meyer escribi?: > One of the exercises in Real World Haskell is to write a glob matcher > without translating it to regular expressions. This turns out to be a > lot more subtle than it looks (character classes like [!]-}] tend to > break things). > > In doing this, I wrote a matchCharClass function for handling > character classes. The initial version had type: > > matchCharClass :: Pattern -> Char -> (Bool, Pattern) > > I.e. - it returned rest of pattern after the char class as well as a > match succeed/fail indicator. Upon reflection, I realized that only > one of the two was ever used, so rewrote it to be: > > matchCharClass :: Pattern -> Char -> Either Bool Pattern > > This made the calling code a little larger - taking a apart tuples is > a bit easier than taking apart Either's - but simplified the values > being generated. I then realized that the code only used one of the > Bool values: if it was True, then Pattern got used instead. So I > rewrote it a third time, giving: > > data CharClass = Fail | Pattern String > matchCharClass :: Pattern -> Char -> CharClass > > This only required minor changes to the code, but made it easy to add > "Error String" to the CharClass datatype later. That version can be > seen at http://pastebin.com/eyre8795 (as always, critiques welcome). > > I'd like to hear what more experienced haskell programmers have to say > about those three ways of returning multiple values. > > Thanks, > <mike ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 34, Issue 10 *****************************************