Send Beginners mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Re: Announcement: Real World Haskell (Dave Bayer)
   2. Re:  Re: Announcement: Real World Haskell ([email protected])
   3.  Re: Boilerplate Code (Christian Maeder)
   4. Re:  Re: Boilerplate Code (Alex Rozenshteyn)
   5. Re:  Yezod and Snap deployments to ISP (Kyle Murphy)
   6. Re:  Re: Announcement: Real World Haskell (Dave Bayer)
   7. Re:  Re: Boilerplate Code (Kyle Murphy)


----------------------------------------------------------------------

Message: 1
Date: Tue, 3 Aug 2010 10:18:58 -0700
From: Dave Bayer <[email protected]>
Subject: Re: [Haskell-beginners] Re: Announcement: Real World Haskell
To: "Benjamin L. Russell" <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii


On Aug 3, 2010, at 1:44 AM, Benjamin L. Russell wrote:

> One issue with reading RWH online is the sheer quantity and length of
> comments: 

I bought RWH for my Kindle, to support the authors. I prefer reading the HTML 
version, without comments. To best accomplish this, download the book folder 
from their site, using any "SiteSucker" type of tool on hand. Then delete the 
Java folder (I don't recall the details, so experiment on a copy) and the 
comments all magically go away, making a spectacular HTLM book.

The comments were solicited and intended to help the authors write the book; I 
contributed comments. I don't need to read every comment now.



------------------------------

Message: 2
Date: Tue, 3 Aug 2010 12:30:41 -0500
From: [email protected]
Subject: Re: [Haskell-beginners] Re: Announcement: Real World Haskell
To: Dave Bayer <[email protected]>
Cc: "Benjamin L. Russell" <[email protected]>,
        [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii


    >> One issue with reading RWH online is the sheer quantity and length of
    >> comments: 

    Dave> ... download the book folder from their site, using any
    Dave> "SiteSucker" type of tool on hand. Then delete the Java folder ...

Wouldn't it just be simpler to resist the urge to click on the comments
links in the online version?  Most of the time I ignore them but if
something doesn't settle properly into my brain on first reading I click the
comments link and skim what's there.

Maybe other peoples' browsers are different, but by default the comments are
not expanded when I read in Chrome on my Mac.  They are quite unobtrusive.

-- 
Skip Montanaro - [email protected] - http://www.smontanaro.net/


------------------------------

Message: 3
Date: Tue, 03 Aug 2010 19:45:08 +0200
From: Christian Maeder <[email protected]>
Subject: [Haskell-beginners] Re: Boilerplate Code
To: Matt Andrew <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Matt Andrew schrieb:
> Hi all,
> 
> I am in the process of writing a Scheme interpreter/compiler in Haskell as my 
> first serious project after learning the basics of Haskell. The goal is to 
> really get a feel for Haskell. I am trying to accomplish this as much as I 
> can on my own, but am referring to Jonathan Tang's 'Write Yourself a Scheme 
> in 48 hours' whenever I get really stuck.
> 
> I have a question regarding a pattern that I have found within my code for 
> which I cannot seem to find an abstraction.
> 
> I am implementing some of the primitive Scheme type-checker functions with 
> the following code:
> 
> numberP :: SchemeVal -> SchemeVal
> numberP (Number _) = Bool True
> numberP _          = Bool False
> 
> boolP :: SchemeVal -> SchemeVal
> boolP (Bool _) = Bool True
> boolP _        = Bool False
> 
> symbolP :: SchemeVal -> SchemeVal
> symbolP (Atom _) = Bool True
> symbolP _        = Bool False
> 
> This is a pattern that I could easily provide an abstraction for with a Lisp 
> macro, but I'm having trouble discovering if/how it's possible to do so 
> elegantly in Haskell. The closest (but obviously incorrect) code to what I'm 
> trying to accomplish would be:
> 
> typeChecker :: SchemeVal -> SchemeVal -> SchemeVal
> typeChecker (cons _) (cons2 _) = Bool $ cons == cons2
> 
> I understand this code drastically misunderstands how pattern matching works, 
> but (hopefully) it expresses what I'm trying to accomplish. Anyone have any 
> suggestions?

typeChecker s1 s2 = let f = takeWhile isAlphaNum . show in
   Bool $ f s1 == f s2

hoping that my "f" just extracts the constructor as string.

C.

> I do realise that such an abstraction is barely worth it for the amount of 
> code it will save, but this exercise is about learning the ins and outs of 
> Haskell.
> 
> Appreciate you taking the time to read this,
> 
> Matt Andrew


------------------------------

Message: 4
Date: Tue, 3 Aug 2010 20:51:36 +0300
From: Alex Rozenshteyn <[email protected]>
Subject: Re: [Haskell-beginners] Re: Boilerplate Code
To: Christian Maeder <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

That is a dirty, dirty hack.

On Tue, Aug 3, 2010 at 8:45 PM, Christian Maeder
<[email protected]>wrote:

> Matt Andrew schrieb:
> > Hi all,
> >
> > I am in the process of writing a Scheme interpreter/compiler in Haskell
> as my first serious project after learning the basics of Haskell. The goal
> is to really get a feel for Haskell. I am trying to accomplish this as much
> as I can on my own, but am referring to Jonathan Tang's 'Write Yourself a
> Scheme in 48 hours' whenever I get really stuck.
> >
> > I have a question regarding a pattern that I have found within my code
> for which I cannot seem to find an abstraction.
> >
> > I am implementing some of the primitive Scheme type-checker functions
> with the following code:
> >
> > numberP :: SchemeVal -> SchemeVal
> > numberP (Number _) = Bool True
> > numberP _          = Bool False
> >
> > boolP :: SchemeVal -> SchemeVal
> > boolP (Bool _) = Bool True
> > boolP _        = Bool False
> >
> > symbolP :: SchemeVal -> SchemeVal
> > symbolP (Atom _) = Bool True
> > symbolP _        = Bool False
> >
> > This is a pattern that I could easily provide an abstraction for with a
> Lisp macro, but I'm having trouble discovering if/how it's possible to do so
> elegantly in Haskell. The closest (but obviously incorrect) code to what I'm
> trying to accomplish would be:
> >
> > typeChecker :: SchemeVal -> SchemeVal -> SchemeVal
> > typeChecker (cons _) (cons2 _) = Bool $ cons == cons2
> >
> > I understand this code drastically misunderstands how pattern matching
> works, but (hopefully) it expresses what I'm trying to accomplish. Anyone
> have any suggestions?
>
> typeChecker s1 s2 = let f = takeWhile isAlphaNum . show in
>   Bool $ f s1 == f s2
>
> hoping that my "f" just extracts the constructor as string.
>
> C.
>
> > I do realise that such an abstraction is barely worth it for the amount
> of code it will save, but this exercise is about learning the ins and outs
> of Haskell.
> >
> > Appreciate you taking the time to read this,
> >
> > Matt Andrew
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

          Alex R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100803/f9b27ea8/attachment-0001.html

------------------------------

Message: 5
Date: Tue, 3 Aug 2010 14:11:58 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Yezod and Snap deployments to ISP
To: MH <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

Your choice of ISP will always determine your choice of language/framework,
and vice versa. Most cheap ISPs only support a limited subset of languages
and/or frameworks, typically ASP.NET, PHP, or Java. Some ISPs will also
dictate other choices, such as using a particular web server (Apache,
Tomcat, IIS, etc.), or a particular DB such as MySQL, MS SQL, or PosgreSQL.
On the more expensive end of choices you have dedicated servers or private
virtual servers, where you have complete control over what you run and it's
up to you to configure the services you want. The downside to private
virtual servers is that they typically have fairly strict resources limits,
such as 300M of RAM, or 5G of storage. Finally, the most expensive option is
a co-location facility that will plug your server into their network and
provide you backbone access, but which allows you to not only control what
software you run, but also the hardware that it runs on.

At this time, I know of no ISP that directly supports Haskell, in particular
Happs, Yesod, or Snap, so if you want to run any of those you'll have to go
with a dedicated server, or a virtual server. As for sending e-mail, and
language should be able to send e-mail if you have a properly configured
mail server that it can connect to, but the details of how to configure that
are a bit much to put into an e-mail.

If you want to play around with Yesod, I and a couple other people are using
slicehost to run various Haskell based webapps (under a variety of
frameworks), but be aware that it's more expensive than a lot of cheap hosts
(~$20 a month for a basic server with 256M of RAM), and you'll be
responsible for administering your own server, as well as having to work
within the limited resources provided.

-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.


On Tue, Aug 3, 2010 at 12:48, MH <[email protected]> wrote:

> I want to build a website using haskell and deploy it to some ISP. I
> appreciate if you help me understand the following:
> 1. Do I need to consider using special ISP to deploy Yezod or Snap?
> 2. Do I need to consider using special ISP to deploy any other Haskell
> based web app?
> 3. To start with I need to display a static content and ability to send
> email from user submitted form. Can I send email with these Web frameworks
> (I would appreciate the samples)?
> 4. Can you recommend me any ISP in USA?
>
> Thanks a lot.
>
> Malik
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100803/b88b2fad/attachment-0001.html

------------------------------

Message: 6
Date: Tue, 3 Aug 2010 11:30:47 -0700
From: Dave Bayer <[email protected]>
Subject: Re: [Haskell-beginners] Re: Announcement: Real World Haskell
To: [email protected]
Cc: "Benjamin L. Russell" <[email protected]>,
        [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

This is a matter of taste. I find them obtrusive, and worth the 30 seconds 
effort to fix the problem, and the 60 seconds effort to alert others to the fix 
in case they hadn't realized it was so simple. I'm not making a statement, just 
customizing my environment.

On Aug 3, 2010, at 10:30 AM, [email protected] wrote:

> Wouldn't it just be simpler to resist the urge to click on the comments
> links in the online version?  ... They are quite unobtrusive.


------------------------------

Message: 7
Date: Tue, 3 Aug 2010 14:38:53 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Re: Boilerplate Code
To: Alex Rozenshteyn <[email protected]>
Cc: Christian Maeder <[email protected]>, [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

Less of a dirty dirty hack (requires that SchemeVal be an instance of
Typeable):

import Data.Typeable
import Data.Maybe

typeChecker :: (Typeable a, Typeable b) => a -> b -> Bool
typeChecker a b = f a == f b
        where
                f :: (Typeable a) => a -> Maybe TypeRep
                f = listToMaybe . typeRepArgs . typeOf


-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.


On Tue, Aug 3, 2010 at 13:51, Alex Rozenshteyn <[email protected]> wrote:

> That is a dirty, dirty hack.
>
>
> On Tue, Aug 3, 2010 at 8:45 PM, Christian Maeder <[email protected]
> > wrote:
>
>> Matt Andrew schrieb:
>> > Hi all,
>> >
>> > I am in the process of writing a Scheme interpreter/compiler in Haskell
>> as my first serious project after learning the basics of Haskell. The goal
>> is to really get a feel for Haskell. I am trying to accomplish this as much
>> as I can on my own, but am referring to Jonathan Tang's 'Write Yourself a
>> Scheme in 48 hours' whenever I get really stuck.
>> >
>> > I have a question regarding a pattern that I have found within my code
>> for which I cannot seem to find an abstraction.
>> >
>> > I am implementing some of the primitive Scheme type-checker functions
>> with the following code:
>> >
>> > numberP :: SchemeVal -> SchemeVal
>> > numberP (Number _) = Bool True
>> > numberP _          = Bool False
>> >
>> > boolP :: SchemeVal -> SchemeVal
>> > boolP (Bool _) = Bool True
>> > boolP _        = Bool False
>> >
>> > symbolP :: SchemeVal -> SchemeVal
>> > symbolP (Atom _) = Bool True
>> > symbolP _        = Bool False
>> >
>> > This is a pattern that I could easily provide an abstraction for with a
>> Lisp macro, but I'm having trouble discovering if/how it's possible to do so
>> elegantly in Haskell. The closest (but obviously incorrect) code to what I'm
>> trying to accomplish would be:
>> >
>> > typeChecker :: SchemeVal -> SchemeVal -> SchemeVal
>> > typeChecker (cons _) (cons2 _) = Bool $ cons == cons2
>> >
>> > I understand this code drastically misunderstands how pattern matching
>> works, but (hopefully) it expresses what I'm trying to accomplish. Anyone
>> have any suggestions?
>>
>> typeChecker s1 s2 = let f = takeWhile isAlphaNum . show in
>>   Bool $ f s1 == f s2
>>
>> hoping that my "f" just extracts the constructor as string.
>>
>> C.
>>
>> > I do realise that such an abstraction is barely worth it for the amount
>> of code it will save, but this exercise is about learning the ins and outs
>> of Haskell.
>> >
>> > Appreciate you taking the time to read this,
>> >
>> > Matt Andrew
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>
>
>
> --
> ()  ascii ribbon campaign - against html e-mail
> /\  www.asciiribbon.org   - against proprietary attachments
>
>           Alex R
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100803/d867932a/attachment.html

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 26, Issue 5
****************************************

Reply via email to