From sussman@gmail.com Wed Oct 28 15:19:24 2009
Received: from mail-qy0-f200.google.com ([209.85.221.200]:61944)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3EzM-0003er-Qy
	for haskell-study@red-bean.com; Wed, 28 Oct 2009 15:19:24 -0500
Received: by qyk38 with SMTP id 38so770552qyk.25
	for <haskell-study@red-bean.com>; Wed, 28 Oct 2009 13:19:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=QQz9habn9i2p7CLbla8zMwAuDR3MWQEWGJlRj56I8PY=;
	b=H/wcn5e9USaUvoDZYXSfD1ZlmZwjwQJ+JnbyfW7evhIkm0cotnqb/M9OqKMaclk/Al
	ZOkUDr6Sp5KJdS/Y+to7+ZWYaSbG0Bxt2w1uAl0IC3EgXIh59I7ycMZZok5bnzLNy4U8
	UsNz31WPxRhhO+tEigcazi59FuGGWf4T3Q1kE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=M0QhFGDzd/f3JT0fd8WmjROXb9ZxtWwj/9tEeiCAw8+vnAoYQQK50I/hsrCc6mzlTL
	XIV3fBcPms2nW4HIvy5gMo/7APICpkD3Z1P4w5XM0CseLYQCkmIoByOGB1QVxrmOBeT7
	QHBWPQ8WwULQKrLUUirGGot/ojffHmd9eUsOA=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.126.205 with SMTP id d13mr11898087vcs.84.1256761159296; 
	Wed, 28 Oct 2009 13:19:19 -0700 (PDT)
Date: Wed, 28 Oct 2009 15:19:19 -0500
X-Google-Sender-Auth: 60f4a8de84659d0d
Message-ID: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 28 Oct 2009 20:19:25 -0000

Can we set up an hg repository to share code in?

I'm talking about something like
http://code.google.com/p/eng-chi-haskell/source/browse/

We could make a googlecode project, or if we want to be red-bean
Proud, someone can make one on red-bean for us.


From carlton@bactrian.org Wed Oct 28 15:52:52 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:53153)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3FVk-0000vq-RG; Wed, 28 Oct 2009 15:52:52 -0500
Received: by mail-pz0-f174.google.com with SMTP id 4so875263pzk.32
	for <multiple recipients>; Wed, 28 Oct 2009 13:52:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.248.6 with SMTP id v6mr1560799wfh.348.1256763172550; Wed, 
	28 Oct 2009 13:52:52 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
Date: Wed, 28 Oct 2009 13:52:52 -0700
Message-ID: <90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502ca697779b4047704fad2
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 28 Oct 2009 20:52:53 -0000

--00504502ca697779b4047704fad2
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Oct 28, 2009 at 1:19 PM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:

> Can we set up an hg repository to share code in?
>
> I'm talking about something like
> http://code.google.com/p/eng-chi-haskell/source/browse/
>
> We could make a googlecode project, or if we want to be red-bean
> Proud, someone can make one on red-bean for us.
>

Makes sense to me.  Would the googlecode project get us the mailing list as
well?  If so, I'd vote for that, to avoid spam filtering problems.
 (haskell-study-red-bean, or something.)

(You're obviously more familiar with googlecode than I am, so I think it
would make sense for you to set it up if we go that route.)

-- 
David Carlton
carlton@bactrian.org

--00504502ca697779b4047704fad2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 28, 2009 at 1:19 PM, Ben Collins-Sussman <span dir=3D"ltr">&lt;=
<a href=3D"mailto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;</span>=
 wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Can we set up an hg repository to share code in?<br>
<br>
I&#39;m talking about something like<br>
<a href=3D"http://code.google.com/p/eng-chi-haskell/source/browse/" target=
=3D"_blank">http://code.google.com/p/eng-chi-haskell/source/browse/</a><br>
<br>
We could make a googlecode project, or if we want to be red-bean<br>
Proud, someone can make one on red-bean for us.<br></blockquote><div><br></=
div><div>Makes sense to me. =A0Would the googlecode project get us the mail=
ing list as well? =A0If so, I&#39;d vote for that, to avoid spam filtering =
problems. =A0(haskell-study-red-bean, or something.)=A0</div>
<div><br></div><div>(You&#39;re obviously more familiar with googlecode tha=
n I am, so I think it would make sense for you to set it up if we go that r=
oute.)</div><div><br></div></div>-- <br>David Carlton<br><a href=3D"mailto:=
carlton@bactrian.org">carlton@bactrian.org</a><br>


--00504502ca697779b4047704fad2--


From sussman@gmail.com Wed Oct 28 15:55:47 2009
Received: from mail-qy0-f200.google.com ([209.85.221.200]:36706)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3FYZ-0003Nw-2u
	for haskell-study@red-bean.com; Wed, 28 Oct 2009 15:55:47 -0500
Received: by qyk38 with SMTP id 38so787344qyk.25
	for <haskell-study@red-bean.com>; Wed, 28 Oct 2009 13:55:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=xnAkYYyYT2CWx15j4Oll5jF5BOTFDrCpzr4LYOpY16s=;
	b=d4R5tdp63sbahF1l6+jPOaDNArP1seL6sc5JzVnfgJoEs5PRqlt6RagSXJVU55oq/R
	PSnDS+GX0CjsMJ48j4tfvwSTHOvjGsGErrCLjfrAyKhzEIoNYcKptb2vR7Q3oj1X64ms
	/BchQFg2VoAkKkKvLis/Ve3q8RrtAa4VEtKEY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=RsCoZ6qv4/ATt9/tVLB2awgy/tIqaqt56+MK78laWInph2mzwkGcT/SwcDUpBh3Pba
	/sMH3Vdw87JwfJTginS7YgPH+FR6/GQXfZw3nR9lP2gUNAja1nzvVHpPdAOYmYG/2PIz
	CkRdAX3Tyshmq8ew5bGbgeb2wF5qHwiADyVWc=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.127.74 with SMTP id f10mr11158vcs.23.1256763341629; Wed, 
	28 Oct 2009 13:55:41 -0700 (PDT)
In-Reply-To: <90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
Date: Wed, 28 Oct 2009 15:55:41 -0500
X-Google-Sender-Auth: 2cf9838c59c03c9a
Message-ID: <53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 28 Oct 2009 20:55:47 -0000

A googlecode project would give us a world-readable:

  * hg repository
  * versioned wiki
  * bug tracker
  * downloads-server

It doesn't automatically create a mailing list, but most people just
go and create a 'googlegroup' for that, and then tell googlecode about
it.  Googlecode will send commit-emails to any list you want.

Googlegroups are easy to administer:  you can make the list closed to
members-only, so it gets no spam.

I'm happy to do this if you want, it takes 5 mins.




On Wed, Oct 28, 2009 at 3:52 PM, David Carlton <carlton@bactrian.org> wrote=
:
> On Wed, Oct 28, 2009 at 1:19 PM, Ben Collins-Sussman <sussman@red-bean.co=
m>
> wrote:
>>
>> Can we set up an hg repository to share code in?
>>
>> I'm talking about something like
>> http://code.google.com/p/eng-chi-haskell/source/browse/
>>
>> We could make a googlecode project, or if we want to be red-bean
>> Proud, someone can make one on red-bean for us.
>
> Makes sense to me. =A0Would the googlecode project get us the mailing lis=
t as
> well? =A0If so, I'd vote for that, to avoid spam filtering problems.
> =A0(haskell-study-red-bean, or something.)
> (You're obviously more familiar with googlecode than I am, so I think it
> would make sense for you to set it up if we go that route.)
> --
> David Carlton
> carlton@bactrian.org
>


From carlton@bactrian.org Wed Oct 28 19:59:44 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:52447)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3JMe-0005f5-CA; Wed, 28 Oct 2009 19:59:44 -0500
Received: by pzk4 with SMTP id 4so997016pzk.32
	for <multiple recipients>; Wed, 28 Oct 2009 17:59:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.25.36 with SMTP id c36mr1475393wfj.1.1256777978506; Wed, 
	28 Oct 2009 17:59:38 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
Date: Wed, 28 Oct 2009 17:59:38 -0700
Message-ID: <90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=001636e1f81df86d3c0477086c7c
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 00:59:44 -0000

--001636e1f81df86d3c0477086c7c
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Oct 28, 2009 at 1:55 PM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:

> A googlecode project would give us a world-readable:
>
>  * hg repository
>  * versioned wiki
>  * bug tracker
>  * downloads-server
>
> It doesn't automatically create a mailing list, but most people just
> go and create a 'googlegroup' for that, and then tell googlecode about
> it.  Googlecode will send commit-emails to any list you want.
>
> Googlegroups are easy to administer:  you can make the list closed to
> members-only, so it gets no spam.
>
> I'm happy to do this if you want, it takes 5 mins.
>

Sounds good to me, if nobody else objects.

-- 
David Carlton
carlton@bactrian.org


>
>
>
>
> On Wed, Oct 28, 2009 at 3:52 PM, David Carlton <carlton@bactrian.org>
> wrote:
> > On Wed, Oct 28, 2009 at 1:19 PM, Ben Collins-Sussman <
> sussman@red-bean.com>
> > wrote:
> >>
> >> Can we set up an hg repository to share code in?
> >>
> >> I'm talking about something like
> >> http://code.google.com/p/eng-chi-haskell/source/browse/
> >>
> >> We could make a googlecode project, or if we want to be red-bean
> >> Proud, someone can make one on red-bean for us.
> >
> > Makes sense to me.  Would the googlecode project get us the mailing list
> as
> > well?  If so, I'd vote for that, to avoid spam filtering problems.
> >  (haskell-study-red-bean, or something.)
> > (You're obviously more familiar with googlecode than I am, so I think it
> > would make sense for you to set it up if we go that route.)
> > --
> > David Carlton
> > carlton@bactrian.org
> >
>

--001636e1f81df86d3c0477086c7c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 28, 2009 at 1:55 PM, Ben Collins-Sussman <span dir=3D"ltr">&lt;=
<a href=3D"mailto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;</span>=
 wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
A googlecode project would give us a world-readable:<br>
<br>
 =A0* hg repository<br>
 =A0* versioned wiki<br>
 =A0* bug tracker<br>
 =A0* downloads-server<br>
<br>
It doesn&#39;t automatically create a mailing list, but most people just<br=
>
go and create a &#39;googlegroup&#39; for that, and then tell googlecode ab=
out<br>
it. =A0Googlecode will send commit-emails to any list you want.<br>
<br>
Googlegroups are easy to administer: =A0you can make the list closed to<br>
members-only, so it gets no spam.<br>
<br>
I&#39;m happy to do this if you want, it takes 5 mins.<br></blockquote><div=
><br></div><div>Sounds good to me, if nobody else objects.</div><br>--=A0<b=
r>David Carlton<br><div><a href=3D"mailto:carlton@bactrian.org">carlton@bac=
trian.org</a></div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class=3D"h5"><br>
<br>
<br>
<br>
On Wed, Oct 28, 2009 at 3:52 PM, David Carlton &lt;<a href=3D"mailto:carlto=
n@bactrian.org">carlton@bactrian.org</a>&gt; wrote:<br>
&gt; On Wed, Oct 28, 2009 at 1:19 PM, Ben Collins-Sussman &lt;<a href=3D"ma=
ilto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Can we set up an hg repository to share code in?<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m talking about something like<br>
&gt;&gt; <a href=3D"http://code.google.com/p/eng-chi-haskell/source/browse/=
" target=3D"_blank">http://code.google.com/p/eng-chi-haskell/source/browse/=
</a><br>
&gt;&gt;<br>
&gt;&gt; We could make a googlecode project, or if we want to be red-bean<b=
r>
&gt;&gt; Proud, someone can make one on red-bean for us.<br>
&gt;<br>
&gt; Makes sense to me. =A0Would the googlecode project get us the mailing =
list as<br>
&gt; well? =A0If so, I&#39;d vote for that, to avoid spam filtering problem=
s.<br>
&gt; =A0(haskell-study-red-bean, or something.)<br>
&gt; (You&#39;re obviously more familiar with googlecode than I am, so I th=
ink it<br>
&gt; would make sense for you to set it up if we go that route.)<br>
&gt; --<br>
&gt; David Carlton<br>
&gt; <a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>
&gt;<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>

--001636e1f81df86d3c0477086c7c--


From roland@frob.com Wed Oct 28 20:23:42 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:60518
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3Jjq-0008VA-J4; Wed, 28 Oct 2009 20:23:42 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id A49071C360; Wed, 28 Oct 2009 18:23:36 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: David Carlton <carlton@bactrian.org>
In-Reply-To: David Carlton's message of  Wednesday,
	28 October 2009 17:59:38 -0700
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
X-Windows: it could be worse, but it'll take time.
Message-Id: <20091029012336.A49071C360@topped-with-meat.com>
Date: Wed, 28 Oct 2009 18:23:36 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 01:23:42 -0000

If we welcome the insect overlords, I demand that the first exercise be to
devise a purely functional tinfoil hat.


From jimblandy@gmail.com Wed Oct 28 22:20:10 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:50849)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3LYY-0004f1-Cn
	for haskell-study@red-bean.com; Wed, 28 Oct 2009 22:20:10 -0500
Received: by pwj21 with SMTP id 21so1248026pwj.39
	for <haskell-study@red-bean.com>; Wed, 28 Oct 2009 20:20:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=Xkv7WNVJoEX5I5VLF3Wv54fYTG5ixxCYHgklWM8WYtU=;
	b=cmCwYQmCJ9tSR9nA4ncq87PEgBVmkwsDss5lL8qe+aNlTQHvLvL/YTtAEjeLphjTQQ
	BRQcSIY1f5TEdBmBIwSR2dmKFoQ7gBPU/PeOTt0Uf+cQeEpwu3nsvX1u3txBOCI6DBUz
	Hoc1ogvpCQsL1n5psGp5CQrZTxclpteJVQmOs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=jgm0p0Rel5kaKf1l9AOK84UcykIrvC8wBqYPoSvFdQaILHV/HZJO6acIWzckIlJBJd
	LoRzsCx6Q3IGyZaxCN0wXEsBD+LOhgIyKG/++T6jXE4jpEYF8TqK645dzIM2k3oLuunL
	eJlnOrUgHV+4grL5/ZOLK0FkXlGqVV2qHfSTk=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.249.7 with SMTP id w7mr1516098wfh.317.1256786404610; Wed, 
	28 Oct 2009 20:20:04 -0700 (PDT)
In-Reply-To: <20091029012336.A49071C360@topped-with-meat.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
Date: Wed, 28 Oct 2009 20:20:04 -0700
X-Google-Sender-Auth: 9a33c2ba690e11c2
Message-ID: <8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 03:20:10 -0000

Actually...

If we're worried about spam, would this be a good excuse to try out
Google Wave?  I'm sure the people who don't have them yet (me) can
score the necessary invites.


From SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com Wed Oct 28 22:42:31 2009
Received: from mailout07.yourhostingaccount.com ([65.254.253.58]:53245)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com>)
	id 1N3LuB-00072J-Nx; Wed, 28 Oct 2009 22:42:31 -0500
Received: from mailscan15.yourhostingaccount.com ([10.1.15.15]
	helo=mailscan15.yourhostingaccount.com)
	by mailout07.yourhostingaccount.com with esmtp (Exim)
	id 1N3LuB-0006F1-33; Wed, 28 Oct 2009 23:42:31 -0400
Received: from impout03.yourhostingaccount.com ([10.1.55.3]
	helo=impout03.yourhostingaccount.com)
	by mailscan15.yourhostingaccount.com with esmtp (Exim)
	id 1N3LuA-0003ec-Gw; Wed, 28 Oct 2009 23:42:30 -0400
Received: from authsmtp08.yourhostingaccount.com ([10.1.18.8])
	by impout03.yourhostingaccount.com with NO UCE
	id yTiW1c0020ASqTN0000000; Wed, 28 Oct 2009 23:42:30 -0400
X-EN-OrigOutIP: 10.1.18.8
X-EN-IMPSID: yTiW1c0020ASqTN0000000
Received: from [166.205.134.18] (helo=[10.107.88.5])
	by authsmtp08.yourhostingaccount.com with esmtpsa
	(TLSv1:AES128-SHA:128) (Exim)
	id 1N3Lu8-0005LF-68; Wed, 28 Oct 2009 23:42:30 -0400
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
Message-Id: <6A727930-AF1B-439E-9FC5-D8658F425395@minionis.com>
From: Per Knudsgaard <per@minionis.com>
To: Jim Blandy <jimb@red-bean.com>
In-Reply-To: <8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit
X-Mailer: iPhone Mail (7D11)
Mime-Version: 1.0 (iPhone Mail 7D11)
Date: Wed, 28 Oct 2009 20:42:12 -0700
X-EN-UserInfo: 37e122c84aa99a9cb85b0365addb7dd4:9ebaf55806d00861ace70b9d1c44fe85
X-EN-AuthUser: perk
Sender: Per Knudsgaard <per@minionis.com>
X-EN-OrigIP: 166.205.134.18
X-EN-OrigHost: unknown
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 03:42:31 -0000

How many people are we talking about?  (I have known Jens and Lars  
since '87)

This message was sent from a mobile device and may contain less  
verbiage than would otherwise be the case.

On Oct 28, 2009, at 20:20, Jim Blandy <jimb@red-bean.com> wrote:

> Actually...
>
> If we're worried about spam, would this be a good excuse to try out
> Google Wave?  I'm sure the people who don't have them yet (me) can
> score the necessary invites.
>
> _______________________________________________
> Haskell-study mailing list
> Haskell-study@red-bean.com
> http://www.red-bean.com/mailman/listinfo/haskell-study


From praveen@kumar.in Thu Oct 29 01:07:09 2009
Received: from mail-yx0-f177.google.com ([209.85.210.177]:49104)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <praveen@kumar.in>) id 1N3OA9-0001pN-5w
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 01:07:09 -0500
Received: by yxe7 with SMTP id 7so1447595yxe.25
	for <haskell-study@red-bean.com>; Wed, 28 Oct 2009 23:07:03 -0700 (PDT)
Received: by 10.150.65.19 with SMTP id n19mr11272052yba.119.1256796423426;
	Wed, 28 Oct 2009 23:07:03 -0700 (PDT)
Received: from ?192.168.0.104? ([71.202.43.0])
	by mx.google.com with ESMTPS id 9sm643037ywe.41.2009.10.28.23.07.02
	(version=SSLv3 cipher=RC4-MD5); Wed, 28 Oct 2009 23:07:02 -0700 (PDT)
Message-ID: <4AE93105.20307@kumar.in>
Date: Wed, 28 Oct 2009 23:07:01 -0700
From: Praveen Kumar <praveen@kumar.in>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] Mathematics primer
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 06:07:09 -0000

I am new to functional programming and I don't have a sound Mathematics 
background. Should I start right away with "Real world Haskell"?

I came across a reference to "An Introduction to Functional Programming 
through Lambda Calculus" [1] on the web. Should I start with that one 
instead? Any other Mathematics primer recommendations are welcome.

Thanks -
Praveen

[1] - www.macs.hw.ac.uk/~greg/books/gjm.lambook88.ps

-- 
Praveen Kumar
http://praveen.kumar.in/


From jimblandy@gmail.com Thu Oct 29 02:13:02 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:64291)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3PBu-0004l6-CS
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 02:13:02 -0500
Received: by pwj21 with SMTP id 21so1343526pwj.39
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 00:12:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=80RzOwTOdh69SV90mIdreSexwZsFuykwnE0OLyAMxec=;
	b=rzQjuARyyosQunR19rH8Sl8nXzwtblpqlU0ZD+3lB82d2QyV581TIAA/JTVbAB6Ju0
	LxQmf71Y1T71jJjlNxrMQOx1ir3Xt0xeSZ1TdQr36OZQ3dvCtQQbklpxmhbo9Dgup8CX
	wKMZCpv2ZR/S+tQpCnXAMetmX9iBB8QSuVBhI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=XO7vz20hhOGCh1w3gdf2hL/7OEm7tgAPvP6gqZ+s1Zsub0bMzo7Jyjf61tZzofgsS8
	eUTbSDrzaY0Js7z/+X8OC+CZ1Satg3MvFiklJv98UbGgmCZwoWS59XFz5YQ69eLFqP63
	vFpJkwCJKCJLNLUetvMHgxv8O53Yt5Oiz08fs=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.8.12 with SMTP id 12mr1635297wfh.70.1256800376762; Thu, 29 
	Oct 2009 00:12:56 -0700 (PDT)
In-Reply-To: <4AE93105.20307@kumar.in>
References: <4AE93105.20307@kumar.in>
Date: Thu, 29 Oct 2009 00:12:56 -0700
X-Google-Sender-Auth: 0852cd1b02d754b3
Message-ID: <8f2776cb0910290012mfd30359vd324268390f872e9@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Praveen Kumar <praveen@kumar.in>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] Mathematics primer
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 07:13:02 -0000

On Wed, Oct 28, 2009 at 11:07 PM, Praveen Kumar <praveen@kumar.in> wrote:
> I am new to functional programming and I don't have a sound Mathematics
> background. Should I start right away with "Real world Haskell"?
>
> I came across a reference to "An Introduction to Functional Programming
> through Lambda Calculus" [1] on the web. Should I start with that one
> instead? Any other Mathematics primer recommendations are welcome.

Goodness gracious, no.  RWH should be just fine to start with.


From roland@frob.com Thu Oct 29 02:53:23 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:51309
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3Pox-0000Sk-2W; Thu, 29 Oct 2009 02:53:23 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id 393E91C2AA; Thu, 29 Oct 2009 00:53:16 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Jim Blandy <jimb@red-bean.com>
In-Reply-To: Jim Blandy's message of  Wednesday, 28 October 2009 20:20:04 -0700
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
X-Zippy-Says: TAPPING? You POLITICIANS! Don't you realize that the END of the
	``Wash Cycle'' is a TREASURED MOMENT for most people?!
Message-Id: <20091029075316.393E91C2AA@topped-with-meat.com>
Date: Thu, 29 Oct 2009 00:53:16 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 07:53:23 -0000

> If we're worried about spam, would this be a good excuse to try out
> Google Wave?  I'm sure the people who don't have them yet (me) can
> score the necessary invites.

Is that some new web hooey to never log into a second time after you
configure it to send you normal email?  If it's not, then get it off my
lawn, sonny.


From jimblandy@gmail.com Thu Oct 29 10:15:49 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:39461)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3Wj7-0001At-LH
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 10:15:49 -0500
Received: by pwj21 with SMTP id 21so100823pwj.39
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 08:15:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=GmlakmF9j7/L9MIpq8b+lHQlrJCph69rdxT/pZraSE8=;
	b=FGGCN7avpkWt0Yr1X8lhTvU8/I1vc/QNfjNj+P/xgJ/BXB4nxMoNNEctRlE1fYTMWh
	lqjfobivpIf5wcI12JlTPVXxKWVk2fYGcsiG1s5IOvq/QmZfpLLyL75sxyRbbaG9ONWb
	6s60d4/J8BRGulosJmmUqod369x2aC8QBM4gY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=PStf7iAyYgBWWg22fjBsE+guFlL8iOh929LPXUF7gZ+unqsfFcY72IHfl0LlFEjKtS
	2ABZjAIy/jqu+XEMVM36ZP0tZUHwdpSGv+hcTrtDsCbLcTOh1OWGaTzqRuYZWMfHq94U
	s7KdjZ5neGtSP06K+cmyRrZzc0/HOHbvMqMV8=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.25.38 with SMTP id c38mr13842wfj.253.1256829343678; Thu, 
	29 Oct 2009 08:15:43 -0700 (PDT)
In-Reply-To: <20091029075316.393E91C2AA@topped-with-meat.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
Date: Thu, 29 Oct 2009 08:15:43 -0700
X-Google-Sender-Auth: 12742ec3ea7a5143
Message-ID: <8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 15:15:49 -0000

On Thu, Oct 29, 2009 at 12:53 AM, Roland McGrath <roland@frob.com> wrote:
> Is that some new web hooey to never log into a second time after you
> configure it to send you normal email? =A0If it's not, then get it off my
> lawn, sonny.

I have no idea if one can configure a wave to interact with email.  I
kind of doubt it.  Is that really a deal-breaker?  I can't tell if
you're serious. :)


From SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com Thu Oct 29 10:42:47 2009
Received: from mailout06.yourhostingaccount.com ([65.254.253.54]:45250)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com>)
	id 1N3X9C-0005F5-VA; Thu, 29 Oct 2009 10:42:47 -0500
Received: from mailscan19.yourhostingaccount.com ([10.1.15.19]
	helo=mailscan19.yourhostingaccount.com)
	by mailout06.yourhostingaccount.com with esmtp (Exim)
	id 1N3X9C-0003qB-8J; Thu, 29 Oct 2009 11:42:46 -0400
Received: from impout02.yourhostingaccount.com ([10.1.55.2]
	helo=impout02.yourhostingaccount.com)
	by mailscan19.yourhostingaccount.com with esmtp (Exim)
	id 1N3X9B-00025U-Tv; Thu, 29 Oct 2009 11:42:45 -0400
Received: from authsmtp09.yourhostingaccount.com ([10.1.18.9])
	by impout02.yourhostingaccount.com with NO UCE
	id yfhb1c0080BkWne0000000; Thu, 29 Oct 2009 11:41:35 -0400
X-EN-OrigOutIP: 10.1.18.9
X-EN-IMPSID: yfhb1c0080BkWne0000000
Received: from adsl-99-25-112-5.dsl.pltn13.sbcglobal.net ([99.25.112.5]
	helo=[192.168.2.51])
	by authsmtp09.yourhostingaccount.com with esmtpsa
	(TLSv1:AES128-SHA:128) (Exim)
	id 1N3X81-00048L-Qu; Thu, 29 Oct 2009 11:41:34 -0400
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
Message-Id: <A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
From: Per Knudsgaard <per@minionis.com>
To: Roland McGrath <roland@frob.com>
In-Reply-To: <20091029075316.393E91C2AA@topped-with-meat.com>
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit
X-Mailer: iPhone Mail (7D11)
Mime-Version: 1.0 (iPhone Mail 7D11)
Date: Thu, 29 Oct 2009 08:41:24 -0700
X-EN-UserInfo: 37e122c84aa99a9cb85b0365addb7dd4:9ebaf55806d00861ace70b9d1c44fe85
X-EN-AuthUser: perk
Sender: Per Knudsgaard <per@minionis.com>
X-EN-OrigIP: 99.25.112.5
X-EN-OrigHost: adsl-99-25-112-5.dsl.pltn13.sbcglobal.net
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 15:42:47 -0000

On Oct 29, 2009, at 0:53, Roland McGrath <roland@frob.com> wrote:

>> If we're worried about spam, would this be a good excuse to try out
>> Google Wave?  I'm sure the people who don't have them yet (me) can
>> score the necessary invites.
>
> Is that some new web hooey to never log into a second time after you
> configure it to send you normal email?  If it's not, then get it off  
> my
> lawn, sonny.

No, it is more like a mix between email, IM and wiki.  Hard to  
explain, but it might be useful in this context.  It doesn't have an  
email forward because it is so much more than email.

Jens and Lars are the two guys who came up with it and Jens has told  
me to just send him names and he will put them on the priority invite  
list so we can easily try it out.

> _______________________________________________
> Haskell-study mailing list
> Haskell-study@red-bean.com
> http://www.red-bean.com/mailman/listinfo/haskell-study


From jimblandy@gmail.com Thu Oct 29 10:51:45 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:36541)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3XHs-0008Jc-Go
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 10:51:44 -0500
Received: by pwj21 with SMTP id 21so122726pwj.39
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 08:51:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=YOKZVtd/X8ZQ8VgPdcQzIihdhUZeavw6lsE+trTUBkg=;
	b=T++VcCT6ngnbl5fQy4rjoEyv2glWPx9L319TAFGWIeuY+tNUEUwZ39e17yCKJ+MHDF
	/krKF7HtSPaZTmhw2BHcK97c+SnEq1/u33NFOIiG684Dr+a9XFg3U/zs16BwDUkElZZl
	5hJ9KBmvNjytO91gwxEY480NRXbG/4sZRcNc8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=YSRmMnsoTv3jzQhMBvcCyTyyssgxm/XWUiJHlanGO5efxHLPIjR4hnoti19Y9TaqIo
	a/kmQANKsy53BHq40/UweT8N/D1KSxWR2fFaiGjNCoynG/V1A+bp6+1eQ29ubycd5F0L
	t5A5pZSvZCwK47sI6mZVLKTIrdENLBwNl+K/Q=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.74.16 with SMTP id w16mr22401wfa.200.1256831498950; Thu, 
	29 Oct 2009 08:51:38 -0700 (PDT)
In-Reply-To: <A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
Date: Thu, 29 Oct 2009 08:51:38 -0700
X-Google-Sender-Auth: f514fcaa8fe72b04
Message-ID: <8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Per Knudsgaard <per@minionis.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 15:51:45 -0000

On Thu, Oct 29, 2009 at 8:41 AM, Per Knudsgaard <per@minionis.com> wrote:
>> Is that some new web hooey to never log into a second time after you
>> configure it to send you normal email? =A0If it's not, then get it off m=
y
>> lawn, sonny.
>
> No, it is more like a mix between email, IM and wiki. =A0Hard to explain,=
 but
> it might be useful in this context. =A0It doesn't have an email forward
> because it is so much more than email.

I'm pretty sure Roland has some idea what Google Wave is.  He's
saying, in a roundabout way, that he'd prefer to have the discussion
in mail, and that if we chose to use Wave, he'd hope to have stuff
forwarded to him via email, and offering a mild apology for being less
than excited about new technology.

I don't want to introduce a long discussion about Wave to distract
from the Haskell.  If folks could offer a quick +/- 1/0 on the idea of
using Wave for this discussion, we can probably tell pretty quickly
whether it's something to pay any more attention to.  I'm +1.


From bos@serpentine.com Thu Oct 29 10:56:28 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:40691)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3XMS-0002eW-57; Thu, 29 Oct 2009 10:56:28 -0500
Received: by pxi10 with SMTP id 10so1377811pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 08:56:22 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.115.39.11 with SMTP id r11mr146049waj.152.1256831782496; Thu, 
	29 Oct 2009 08:56:22 -0700 (PDT)
In-Reply-To: <8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
Date: Thu, 29 Oct 2009 08:56:22 -0700
Message-ID: <c290c4f20910290856l644e0556hd0bbb84233294960@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e64c24fef028ea047714f391
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 15:56:28 -0000

--0016e64c24fef028ea047714f391
Content-Type: text/plain; charset=UTF-8

On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com> wrote:


> If folks could offer a quick +/- 1/0 on the idea of
> using Wave for this discussion, we can probably tell pretty quickly
> whether it's something to pay any more attention to.  I'm +1.


Given that I haven't found a use for it yet, I'd be curious to see it in
action. (But it's currently down, oops.)

--0016e64c24fef028ea047714f391
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a=
>&gt;</span> wrote:<br><div>=C2=A0</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If folks could offer a quick +/- 1/0 on the idea of<br>
using Wave for this discussion, we can probably tell pretty quickly<br>
whether it&#39;s something to pay any more attention to. =C2=A0I&#39;m +1.<=
/blockquote><div><br></div><div>Given that I haven&#39;t found a use for it=
 yet, I&#39;d be curious to see it in action. (But it&#39;s currently down,=
 oops.)</div>
</div>

--0016e64c24fef028ea047714f391--


From jimblandy@gmail.com Thu Oct 29 11:11:44 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:64701)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3XbE-0000f4-SZ
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 11:11:44 -0500
Received: by pwj21 with SMTP id 21so135982pwj.39
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 09:11:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=JlB0yqUXBT2zZifs3fwAbndJypDCzCTzmqhtdxOwvcM=;
	b=j8bTG9OMfIul2XerukYtMNXIzjbTt9RURTzaztpyEeLIAsMSlXCGyPQjrkkc5cUH4w
	54vigccI9HtsbFEB6yoqF7onXxzvRZ0j83ANPPiezasmix4MbSw4hZfdxzFxWlYt+Txa
	CAhbhijMZI9JbevNSIO+sD/P6NyfeE7KYJUmM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=qnP9P+nAOIiLj2LlV3YgbTwrPrXfSegjmJ1LH6tDQHtdkhaGrVsOs6NhOV8sMbJtIS
	I2esqK0kBIg91CAomflMoVL9wju9okkZen/jZrHvbqbxhtfiBp/6mZpGWPhgfLtNeC4t
	gIJ4IHKwg1XzGxH+0UEjtFmv4M/cFGp9GVFmU=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.154.23 with SMTP id g23mr25343wfo.57.1256832699259; Thu, 
	29 Oct 2009 09:11:39 -0700 (PDT)
Date: Thu, 29 Oct 2009 09:11:39 -0700
X-Google-Sender-Auth: 622e257e70b08b5d
Message-ID: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 16:11:45 -0000

As penance for introducing completely extraneous and contentious
topics, I'll do the first substantive post. :)

Ex 1.  It's interesting to see Haskell accumulate type class
constraints as it goes.  For example, 'succ' is (Enum a) => a -> a: it
takes a value of some enumerable type to another value of that type.
When we apply that to an integer literal like 6, whose type is
"something numeric", the type of the expression is "something numeric
and enumerable": (Enum a, Num a) => a

Are there any non-enumerable numeric types?  If all numeric types are
enumerable, then the same type constraint could be written more simply
as (Num a) => a, couldn't it?

Ex 2.

-- Why is it only showing the very first "it" that I made??
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> 10
10
Prelude> 20
20
Prelude> let x = 30
Prelude> :show bindings
it :: Integer = 10
x :: Integer = _
Prelude>

Ex 3.

Typo in the book: 'words' doesn't count words; rather, (length .
words) counts words.

I didn't know that Einstein was born in Germany.  I assumed he'd been
born in Switzerland.


From m.e.albaugh@gmail.com Thu Oct 29 11:19:37 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:35119)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <m.e.albaugh@gmail.com>)
	id 1N3Xir-0005WV-Ae; Thu, 29 Oct 2009 11:19:37 -0500
Received: by pxi10 with SMTP id 10so1393547pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 09:19:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=PwNzegU4bhxjafB7hbSnW1ajBj0PhZJBBi2L0qsM4t4=;
	b=l10Yq2pv2MK6QBIZcDWqa7Cee1uhOgMvcmQDVdAZz+Qfp/1ML7ZuGLMKSe1Wfv6hoQ
	3Egw8VKI63vyvbV4NJJA4BsNQdLQQe4U1yomUBhmFCqaWkR/fXFKRZytgUXT51Cidq9n
	3dz+ByfcNgUsk84y9ZtojePdvyrlZ4Tx0DC08=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=myL1v/s7pQ0UjFMTiJZe6/TUHSlfPrnAvOJdWXwgDyCxPuTHka8XJBtNhB9iWjstFt
	6isi/oKy/liGAt3POFVVDpDrSPTmTsc9qCCceMSB0k4u8hY0l4MzwjLeNcuo2uX7jpNa
	MAJExDckLgbQbH6GSdlPaQdGxiXmFr91ne5nU=
MIME-Version: 1.0
Received: by 10.143.20.39 with SMTP id x39mr21063wfi.213.1256833171686; Thu, 
	29 Oct 2009 09:19:31 -0700 (PDT)
In-Reply-To: <8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
Date: Thu, 29 Oct 2009 09:19:31 -0700
Message-ID: <780dd8d30910290919n1365bd27oebc8d964eea00e84@mail.gmail.com>
From: Michael Albaugh <m.e.albaugh@gmail.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 16:19:37 -0000

On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com> wrote:

> I don't want to introduce a long discussion about Wave to distract
> from the Haskell.

Agreed.

> =A0If folks could offer a quick +/- 1/0 on the idea of
> using Wave for this discussion, we can probably tell pretty quickly
> whether it's something to pay any more attention to. =A0I'm +1.

-4

  Mike


From bos@serpentine.com Thu Oct 29 11:40:36 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:34456)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3Y3A-0002IK-26; Thu, 29 Oct 2009 11:40:36 -0500
Received: by pzk4 with SMTP id 4so1460775pzk.32
	for <multiple recipients>; Thu, 29 Oct 2009 09:40:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.114.7.9 with SMTP id 9mr205579wag.71.1256834429905; Thu, 29 
	Oct 2009 09:40:29 -0700 (PDT)
In-Reply-To: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
Date: Thu, 29 Oct 2009 09:40:29 -0700
Message-ID: <c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e648d6dcbc6d4c0477159160
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 16:40:36 -0000

--0016e648d6dcbc6d4c0477159160
Content-Type: text/plain; charset=UTF-8

On Thu, Oct 29, 2009 at 9:11 AM, Jim Blandy <jimb@red-bean.com> wrote:

> Are there any non-enumerable numeric types?


Of course. Reals, for one.

--0016e648d6dcbc6d4c0477159160
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Oct 29, 2009 at 9:11 AM, Jim Blandy <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Are there any non-enumerable numeric types?</blockquote><div><br></div><div=
>Of course. Reals, for one.</div></div>

--0016e648d6dcbc6d4c0477159160--


From jimblandy@gmail.com Thu Oct 29 11:41:57 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:40601)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3Y4T-00035b-Jq
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 11:41:57 -0500
Received: by pzk4 with SMTP id 4so1461618pzk.32
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 09:41:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=+8MtIDDmWc94So616jqVk/zyGPE9dwAoyczvYm40g5I=;
	b=lHDTh6FkU4ifYemg/zhblHhxKmoe+ToghuoxvZKubZQhM3hc6w2/PEk8TSanqd+dgw
	J7JD9/BH4ZNKvpR9jyC1k9cezyXGCji5wUlvNTbfs4VmINeXE1vKKOS1gNiV8MDbz3B5
	DJAII6PaRyGwpnhST9sDkm0qYbVJ2/GfxLzWw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=vodvvGBybc1ERwZlozojOK0cGVIjNaCp/v4MtsI/g5PLxhrH8eM5hURufEnKlkwQOl
	eBeVW8aH5iwuxv4CYe8FrWRqQitNYTOa0jcNPx5q+cYEBLrT7AJ5ss9rV5y9rEi8XYOJ
	KxpwNuuqnlXqo2Abe8lYptV/+WTMPMN2kcJ6k=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.117.6 with SMTP id p6mr23672wfc.343.1256834511967; Thu, 29 
	Oct 2009 09:41:51 -0700 (PDT)
In-Reply-To: <c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
Date: Thu, 29 Oct 2009 09:41:51 -0700
X-Google-Sender-Auth: 52e271d79745f52b
Message-ID: <8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 16:41:57 -0000

On Thu, Oct 29, 2009 at 9:40 AM, Bryan O'Sullivan <bos@serpentine.com> wrote:
>> Are there any non-enumerable numeric types?
>
> Of course. Reals, for one.

That's what I thought of, but then:

GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> succ pi
4.141592653589793
Prelude>


From carlton@bactrian.org Thu Oct 29 12:14:30 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:59410)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3YZy-0002fa-IO; Thu, 29 Oct 2009 12:14:30 -0500
Received: by pxi10 with SMTP id 10so1428536pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 10:14:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.118.3 with SMTP id q3mr30441wfc.9.1256836464816; Thu, 29 
	Oct 2009 10:14:24 -0700 (PDT)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
Date: Thu, 29 Oct 2009 10:14:24 -0700
Message-ID: <90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=001636e0b96206b4fa0477160b10
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 17:14:30 -0000

--001636e0b96206b4fa0477160b10
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com> wrote:

> I don't want to introduce a long discussion about Wave to distract
> from the Haskell.  If folks could offer a quick +/- 1/0 on the idea of
> using Wave for this discussion, we can probably tell pretty quickly
> whether it's something to pay any more attention to.  I'm +1.


-1.

-- 
David Carlton
carlton@bactrian.org

--001636e0b96206b4fa0477160b10
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br>On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br>=
<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">I don&#39;t want to introduce a long discussion about Wav=
e to distract</div>
from the Haskell. =A0If folks could offer a quick +/- 1/0 on the idea of<br=
>
using Wave for this discussion, we can probably tell pretty quickly<br>
whether it&#39;s something to pay any more attention to. =A0I&#39;m +1.</bl=
ockquote><div><br></div><div>-1.=A0</div></div><br>-- <br>David Carlton<br>=
<a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>

--001636e0b96206b4fa0477160b10--


From maxb@f2s.com Thu Oct 29 12:17:35 2009
Received: from mx-uk.mxtelecom.com ([87.86.212.101]:36479
	helo=puma.mxtelecom.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <maxb@f2s.com>) id 1N3Ycw-0003AZ-QU
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 12:17:35 -0500
Received: from altimeter.mxtelecom.com ([192.168.2.180])
	by puma.mxtelecom.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256)
	(Exim 4.66) (envelope-from <maxb@f2s.com>) id 1N3Ycu-0004fn-Ts
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 17:17:32 +0000
Message-ID: <4AE9CE1F.80702@f2s.com>
Date: Thu, 29 Oct 2009 17:17:19 +0000
From: Max Bowsher <maxb@f2s.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>	<20091029012336.A49071C360@topped-with-meat.com>	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>	<20091029075316.393E91C2AA@topped-with-meat.com>	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
	<90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
In-Reply-To: <90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
X-Enigmail-Version: 0.95.7
OpenPGP: id=C0F2C580
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enigCAC341430DF6A9D9354B3D47"
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 17:17:35 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCAC341430DF6A9D9354B3D47
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

> On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com
> <mailto:jimb@red-bean.com>> wrote:
>=20
>     I don't want to introduce a long discussion about Wave to distract
>     from the Haskell.  If folks could offer a quick +/- 1/0 on the idea=
 of
>     using Wave for this discussion, we can probably tell pretty quickly=

>     whether it's something to pay any more attention to.  I'm +1.


Hello!

I don't know what Wave is and I don't have an account, so I favour
traditional email.

Max.


--------------enigCAC341430DF6A9D9354B3D47
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrpziwACgkQfFNSmcDyxYAKoQCeLnJ3b332rlAVYRaPMvW769ih
KjUAnjD+j4JpX9rO0D363Vu64V66HNAv
=ADTI
-----END PGP SIGNATURE-----

--------------enigCAC341430DF6A9D9354B3D47--


From carlton@bactrian.org Thu Oct 29 12:25:59 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:57724)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N3Yl4-0002bT-TY
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 12:25:59 -0500
Received: by pzk4 with SMTP id 4so1490134pzk.32
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 10:25:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.60.3 with SMTP id i3mr31409wfa.270.1256837153126; Thu, 29 
	Oct 2009 10:25:53 -0700 (PDT)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
Date: Thu, 29 Oct 2009 10:25:52 -0700
Message-ID: <90804c6f0910291025j747ca836p51ad8e33e7dc1f67@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=00504502ad140d7873047716348b
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 17:25:59 -0000

--00504502ad140d7873047716348b
Content-Type: text/plain; charset=ISO-8859-1

I'm replying  to this message because I added a few new people to the list
after this message was sent, and they might want to read its contents.  (And
for newcomers, no, there's no grand plan or schedule or anything, we're
making this up as we go along.)

Since I'm probably the only person who has an idea who everybody on the list
is, and since we're still a small group, I'll go through a summary (and I
hope I'm not hopelessly mischaracterizing anybody):

* Craig, Jim, Mike, Max, Roland, Ben, me: all people who are involved with
red-bean, the server / anarchist collective that hosts this list.

* Bryan: Falls into the above category, but he also has the distinction of
being one of the authors of the book we're reading.

* Per, Praveen: Former coworkers of mine at Sun.

* Tim: Also at Sun, though we were in quite different groups; general
programming / computing / web technologies guy.

* Joe: I think of him as a video game blogger, though he also seems to have
author and programmer hats.

And I will add: I can't imagine a nicer group of people to go through the
book with, and I'm really looking forward to this!

-- 
David Carlton
carlton@bactrian.org

On Thu, Oct 29, 2009 at 9:11 AM, Jim Blandy <jimb@red-bean.com> wrote:

> As penance for introducing completely extraneous and contentious
> topics, I'll do the first substantive post. :)
>
> Ex 1.  It's interesting to see Haskell accumulate type class
> constraints as it goes.  For example, 'succ' is (Enum a) => a -> a: it
> takes a value of some enumerable type to another value of that type.
> When we apply that to an integer literal like 6, whose type is
> "something numeric", the type of the expression is "something numeric
> and enumerable": (Enum a, Num a) => a
>
> Are there any non-enumerable numeric types?  If all numeric types are
> enumerable, then the same type constraint could be written more simply
> as (Num a) => a, couldn't it?
>
> Ex 2.
>
> -- Why is it only showing the very first "it" that I made??
> GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
> Loading package base ... linking ... done.
> Prelude> 10
> 10
> Prelude> 20
> 20
> Prelude> let x = 30
> Prelude> :show bindings
> it :: Integer = 10
> x :: Integer = _
> Prelude>
>
> Ex 3.
>
> Typo in the book: 'words' doesn't count words; rather, (length .
> words) counts words.
>
> I didn't know that Einstein was born in Germany.  I assumed he'd been
> born in Switzerland.
>
> _______________________________________________
> Haskell-study mailing list
> Haskell-study@red-bean.com
> http://www.red-bean.com/mailman/listinfo/haskell-study
>

--00504502ad140d7873047716348b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I&#39;m replying =A0to this message because I added a few new people to the=
 list after this message was sent, and they might want to read its contents=
. =A0(And for newcomers, no, there&#39;s no grand plan or schedule or anyth=
ing, we&#39;re making this up as we go along.)<div>
<br></div><div>Since I&#39;m probably the only person who has an idea who e=
verybody on the list is, and since we&#39;re still a small group, I&#39;ll =
go through a summary (and I hope I&#39;m not hopelessly mischaracterizing a=
nybody):</div>
<div><br></div><div>* Craig, Jim, Mike, Max, Roland, Ben, me: all people wh=
o are involved with red-bean, the server / anarchist collective that hosts =
this list.</div><div><br></div><div>* Bryan: Falls into the above category,=
 but he also has the distinction of being one of the authors of the book we=
&#39;re reading.</div>
<div><br></div><div>* Per, Praveen: Former coworkers of mine at Sun.</div><=
div><br></div><div>* Tim: Also at Sun, though we were in quite different gr=
oups; general programming / computing / web technologies guy.</div><div>
<br></div><div>* Joe: I think of him as a video game blogger, though he als=
o seems to have author and programmer hats.</div><div><br></div><div>And I =
will add: I can&#39;t imagine a nicer group of people to go through the boo=
k with, and I&#39;m really looking forward to this!</div>
<div><br>--=A0<br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">=
carlton@bactrian.org</a><br><br><div class=3D"gmail_quote">On Thu, Oct 29, =
2009 at 9:11 AM, Jim Blandy <span dir=3D"ltr">&lt;<a href=3D"mailto:jimb@re=
d-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">As penance for introducing completely extra=
neous and contentious<br>
topics, I&#39;ll do the first substantive post. :)<br>
<br>
Ex 1. =A0It&#39;s interesting to see Haskell accumulate type class<br>
constraints as it goes. =A0For example, &#39;succ&#39; is (Enum a) =3D&gt; =
a -&gt; a: it<br>
takes a value of some enumerable type to another value of that type.<br>
When we apply that to an integer literal like 6, whose type is<br>
&quot;something numeric&quot;, the type of the expression is &quot;somethin=
g numeric<br>
and enumerable&quot;: (Enum a, Num a) =3D&gt; a<br>
<br>
Are there any non-enumerable numeric types? =A0If all numeric types are<br>
enumerable, then the same type constraint could be written more simply<br>
as (Num a) =3D&gt; a, couldn&#39;t it?<br>
<br>
Ex 2.<br>
<br>
-- Why is it only showing the very first &quot;it&quot; that I made??<br>
GHCi, version 6.8.2: <a href=3D"http://www.haskell.org/ghc/" target=3D"_bla=
nk">http://www.haskell.org/ghc/</a> =A0:? for help<br>
Loading package base ... linking ... done.<br>
Prelude&gt; 10<br>
10<br>
Prelude&gt; 20<br>
20<br>
Prelude&gt; let x =3D 30<br>
Prelude&gt; :show bindings<br>
it :: Integer =3D 10<br>
x :: Integer =3D _<br>
Prelude&gt;<br>
<br>
Ex 3.<br>
<br>
Typo in the book: &#39;words&#39; doesn&#39;t count words; rather, (length =
.<br>
words) counts words.<br>
<br>
I didn&#39;t know that Einstein was born in Germany. =A0I assumed he&#39;d =
been<br>
born in Switzerland.<br>
<br>
_______________________________________________<br>
Haskell-study mailing list<br>
<a href=3D"mailto:Haskell-study@red-bean.com">Haskell-study@red-bean.com</a=
><br>
<a href=3D"http://www.red-bean.com/mailman/listinfo/haskell-study" target=
=3D"_blank">http://www.red-bean.com/mailman/listinfo/haskell-study</a><br>
</blockquote></div><br><br clear=3D"all"><br>
</div>

--00504502ad140d7873047716348b--


From SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com Thu Oct 29 12:38:50 2009
Received: from mailout07.yourhostingaccount.com ([65.254.253.58]:49761)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<SRS0=UWcGN0=GS=minionis.com=per@yourhostingaccount.com>)
	id 1N3YxV-0002Rj-V7
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 12:38:50 -0500
Received: from mailscan13.yourhostingaccount.com ([10.1.15.13]
	helo=mailscan13.yourhostingaccount.com)
	by mailout07.yourhostingaccount.com with esmtp (Exim)
	id 1N3YxV-00010g-9n
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 13:38:49 -0400
Received: from impout02.yourhostingaccount.com ([10.1.55.2]
	helo=impout02.yourhostingaccount.com)
	by mailscan13.yourhostingaccount.com with esmtp (Exim)
	id 1N3YxU-00008Y-Vw
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 13:38:49 -0400
Received: from authsmtp06.yourhostingaccount.com ([10.1.18.6])
	by impout02.yourhostingaccount.com with NO UCE
	id yheo1c00807rVmq0000000; Thu, 29 Oct 2009 13:38:48 -0400
X-EN-OrigOutIP: 10.1.18.6
X-EN-IMPSID: yheo1c00807rVmq0000000
Received: from msg10001.rgbnetworks.com ([65.46.252.194] helo=[10.32.13.25])
	by authsmtp06.yourhostingaccount.com with esmtpa (Exim)
	id 1N3YxU-0008DC-83
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 13:38:48 -0400
Message-ID: <4AE9D323.3020002@minionis.com>
Date: Thu, 29 Oct 2009 10:38:43 -0700
From: Per Knudsgaard <per@minionis.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>	
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>	
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>	
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>	
	<20091029012336.A49071C360@topped-with-meat.com>	
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>	
	<20091029075316.393E91C2AA@topped-with-meat.com>	
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>	
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
	<90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
In-Reply-To: <90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-EN-UserInfo: 37e122c84aa99a9cb85b0365addb7dd4:9ebaf55806d00861ace70b9d1c44fe85
X-EN-AuthUser: perk
Sender: Per Knudsgaard <per@minionis.com>
X-EN-OrigIP: 65.46.252.194
X-EN-OrigHost: msg10001.rgbnetworks.com
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 17:38:50 -0000

   I don't think this is worth wasting bandwidth on.  If a single person 
is opposed then we shouldn't do it.

   On a personal note (and thus replies to me, not the list), I find 
email to be a really bad collaboration tool.  I am currently involved in 
one similar group and we moved to wiki and would have moved to wave if 
it wasn't for the lack of ability to migrate existing data.  I think the 
whole +1/-1 thing shows exactly why wave is stronger:  A wave vote is a 
simple widget that is updated real-time.  An email vote is a somewhat 
painful process.  Wave still has a long way to go before it reaches its 
potential, and there are still areas where email is stronger, but I am 
sold when it comes to collaboration and discussion.

   -- Per.

David Carlton wrote:
>
> On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com 
> <mailto:jimb@red-bean.com>> wrote:
>
>     I don't want to introduce a long discussion about Wave to distract
>     from the Haskell.  If folks could offer a quick +/- 1/0 on the idea of
>     using Wave for this discussion, we can probably tell pretty quickly
>     whether it's something to pay any more attention to.  I'm +1.
>
>
> -1. 
>
> -- 
> David Carlton
> carlton@bactrian.org <mailto:carlton@bactrian.org>



From sussman@gmail.com Thu Oct 29 12:54:22 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:37893)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3ZCY-0007Pf-N3
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 12:54:22 -0500
Received: by vws13 with SMTP id 13so352438vws.25
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 10:54:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=5D2gcOA71HQXXPVA0WBZDhLRDP2g8G1T1ntBEhH8v+E=;
	b=VDF+HX0MdUu6g5E06QqsY2WOMAgncf+eiWCEdwA7NpxKcnxV11I53Vt16oCIGVjdSG
	1F5uGd6BI+mn3hABmmyTIKnGVxUdxrwInjmY53UEodBJ5LcQRG0YA8AtakHEJdJ3NhyU
	N9cHVZAJ684eKPPufw/r9nye+PGVpjeCZQV8A=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=PjN3OAB9QitxjbPEOir3EX2gF9hTY5oDnu6/GZFHYYxSw5qePOpDeqn21wpzPpEdMe
	fXL8nnlnrjGnTcRk6qj9f8IJMBaWhX2qF5wps/EnPfDwA1bu8or1OxSK84JJRR481ycj
	yKHuHvX+GYxF+NlqeLLtWRPj2XkwUe0r7sgZo=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.125.5 with SMTP id w5mr576170vcr.30.1256838857112; Thu, 29 
	Oct 2009 10:54:17 -0700 (PDT)
In-Reply-To: <4AE9D323.3020002@minionis.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
	<90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
	<4AE9D323.3020002@minionis.com>
Date: Thu, 29 Oct 2009 12:54:17 -0500
X-Google-Sender-Auth: 74dac2867e29aca9
Message-ID: <53c059c90910291054y6d45c467n836242316db7971e@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: Per Knudsgaard <per@minionis.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 17:54:22 -0000

We've been using Wave at Google (internally) for 6+ months, and it's
great, but it's not clear to me that it's either necessary nor
sufficient for our discussion.  Let's stick to this email list for
now, and I'll make the googleproject for code in a moment.

I'm happy to send out Wave invitations to those interested, if you'd
like to explore what it's like "on the side".

But no, despite being opensource and that it has an openly documented
federated protocol, Wave doesn't yet have email gateways.  Coming
soon, but not yet.  If you guys want to learn more about Wave, search
youtube for the 10 minute "compressed" version of the 1.5 hour talk
given at the big Google I/O developer conference last May.


On Thu, Oct 29, 2009 at 12:38 PM, Per Knudsgaard <per@minionis.com> wrote:
> =A0I don't think this is worth wasting bandwidth on. =A0If a single perso=
n is
> opposed then we shouldn't do it.
>
> =A0On a personal note (and thus replies to me, not the list), I find emai=
l to
> be a really bad collaboration tool. =A0I am currently involved in one sim=
ilar
> group and we moved to wiki and would have moved to wave if it wasn't for =
the
> lack of ability to migrate existing data. =A0I think the whole +1/-1 thin=
g
> shows exactly why wave is stronger: =A0A wave vote is a simple widget tha=
t is
> updated real-time. =A0An email vote is a somewhat painful process. =A0Wav=
e still
> has a long way to go before it reaches its potential, and there are still
> areas where email is stronger, but I am sold when it comes to collaborati=
on
> and discussion.
>
> =A0-- Per.
>
> David Carlton wrote:
>>
>> On Thu, Oct 29, 2009 at 8:51 AM, Jim Blandy <jimb@red-bean.com
>> <mailto:jimb@red-bean.com>> wrote:
>>
>> =A0 =A0I don't want to introduce a long discussion about Wave to distrac=
t
>> =A0 =A0from the Haskell. =A0If folks could offer a quick +/- 1/0 on the =
idea of
>> =A0 =A0using Wave for this discussion, we can probably tell pretty quick=
ly
>> =A0 =A0whether it's something to pay any more attention to. =A0I'm +1.
>>
>>
>> -1.
>> --
>> David Carlton
>> carlton@bactrian.org <mailto:carlton@bactrian.org>
>
>
> _______________________________________________
> Haskell-study mailing list
> Haskell-study@red-bean.com
> http://www.red-bean.com/mailman/listinfo/haskell-study
>


From sussman@gmail.com Thu Oct 29 13:12:40 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:53973)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3ZUF-00007v-W1
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 13:12:40 -0500
Received: by vws13 with SMTP id 13so361211vws.25
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 11:12:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=sLB5qhmqHzJbV5Yr2gyDGbvbcgBADvDmIw7JHP2Xerg=;
	b=PhmpILLDIW46AA2v6NppxFo5DKGXNJPQ9cOz9wUfeC5h0vzNi3DBWEEbH/s5pXaUrN
	63EJhOoYMxk53fjfzk+bElMstF4qoOTLIzIkb9OIxwajhDzHZ05hjhDrUsciu4jHWyVG
	R6IUi/shORou8L3CTxhMlu0dh0z6icLkcmF0I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=OBvAhQSTnjxn5VJwmSoFRu9GVwVOrDpyCizzHx/0cKOrplziuw7sEYUNAl2I2npuuW
	AJm3QepORPaF7bcDbOgWAbrG3JyO20iJj828oXMm+VwuGB2abvVIOMeHXClBW/1XfFY5
	DI1lMStEJHlYq9JtizB0FRODKXsHOFy4lzRsI=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.122.100 with SMTP id k36mr601240vcr.38.1256839954391; Thu, 
	29 Oct 2009 11:12:34 -0700 (PDT)
Date: Thu, 29 Oct 2009 13:12:34 -0500
X-Google-Sender-Auth: 110df61e6433bd9b
Message-ID: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 18:12:40 -0000

OK, I created the 'haskell-study' project on googlecode, located at:
http://code.google.com/p/haskell-study

For sharing code (answers to book exercises?), you can clone the
repository:  'hg clone https://haskell-study.googlecode.com/hg/
haskell-study'

To push back changesets, you need a google account.  If people tell me
their google accounts, I can make you all committers on the project.

We also have a wiki available on the project too (which lives in a
separate hg repository.)


From roland@frob.com Thu Oct 29 13:59:18 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:47574
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3aDO-00068v-Le; Thu, 29 Oct 2009 13:59:18 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id 6ABDD1C19E; Thu, 29 Oct 2009 11:59:11 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Jim Blandy <jimb@red-bean.com>
X-Fcc: ~/Mail/jimb
In-Reply-To: Jim Blandy's message of  Thursday, 29 October 2009 08:51:38 -0700
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
X-Antipastobozoticataclysm: Bariumenemanilow
Message-Id: <20091029185911.6ABDD1C19E@topped-with-meat.com>
Date: Thu, 29 Oct 2009 11:59:11 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 18:59:18 -0000

> forwarded to him via email, and offering a mild apology for being less
> than excited about new technology.

You know me so well.


From roland@frob.com Thu Oct 29 14:05:18 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:45820
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3aJB-0008FG-St; Thu, 29 Oct 2009 14:05:17 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id 160251C19E; Thu, 29 Oct 2009 12:05:12 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Jim Blandy <jimb@red-bean.com>
X-Fcc: ~/Mail/jimb
In-Reply-To: Jim Blandy's message of  Thursday, 29 October 2009 08:15:43 -0700
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
Emacs: more boundary conditions than the Middle East.
Message-Id: <20091029190512.160251C19E@topped-with-meat.com>
Date: Thu, 29 Oct 2009 12:05:12 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:05:18 -0000

> I have no idea if one can configure a wave to interact with email.  I
> kind of doubt it.  Is that really a deal-breaker?  I can't tell if
> you're serious. :)

I'm completely serious that some newfangled web hooey laden with javascript
is something that I will not really use.  I mean, this newfangled web hooey
laden with javascript does not even claim to help me get laid, let alone
get friended by my mother while presented with dating ads.  I can't stand
using those more than is necessary to get invitations to parties where
there are actual single women.  I've now been interacting with you lot via
email for the majority of my lifetime and I don't see a reason to change now.


Thanks,
Roland


From roland@frob.com Thu Oct 29 14:10:32 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:55703
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3aOG-0002fF-MF; Thu, 29 Oct 2009 14:10:32 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id 25D3B1C1DF; Thu, 29 Oct 2009 12:10:26 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Jim Blandy <jimb@red-bean.com>
In-Reply-To: Jim Blandy's message of  Thursday, 29 October 2009 09:11:39 -0700
	<8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
X-Windows: you'd better sit down.
Message-Id: <20091029191026.25D3B1C1DF@topped-with-meat.com>
Date: Thu, 29 Oct 2009 12:10:26 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:10:32 -0000

Holy crap, my book's still in the mail.  
Is there a plan about timing and pacing of collective progress?


From jimblandy@gmail.com Thu Oct 29 14:27:37 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:42931)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3aen-0001FD-7O
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 14:27:37 -0500
Received: by pzk4 with SMTP id 4so1563651pzk.32
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 12:27:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=whtQMwC9+MNbWCsINJL+CCCsmyrHziMQfDrLDm5jDXo=;
	b=rqhxyLEwfdIRo/Cg5YDM7wgZo8iseeFR5bJq+6seSe2LI3YsNIG4Xs2+JYuMXKJdDz
	ZUOG5SPA7m0QRrNzhpfWRyHhlO8PBiLj+AlfJW90LQft2/B9V5xlqROyTN/viwzVa997
	W8lzokIS6oQjqF71+kQT2Mf0FlZo1CuSXUW8w=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=NM+RMTiHVDxE5K5KnfOIE702om1Ad3MuHfgAFSmWEC3NzoNf6zVwkCJJES5nSCCFV9
	aLgK9FDK591D0YCh1Q8j0tGpuBazCghBFhTMKXojU1FpAjUF60D4eKLdjojAxlV+6DYc
	Rcx4m/OflobrfMnZNYVmew+qC/Lukd3hmFUqE=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.55.11 with SMTP id d11mr49384wfa.61.1256844451752; Thu, 29 
	Oct 2009 12:27:31 -0700 (PDT)
In-Reply-To: <4AE9D323.3020002@minionis.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<A5146724-BA42-47A9-BDBB-4DDECAB73564@minionis.com>
	<8f2776cb0910290851i33d9255dyfe2b07ca9a74c02d@mail.gmail.com>
	<90804c6f0910291014y88bff78qa85ecafdf3ed145c@mail.gmail.com>
	<4AE9D323.3020002@minionis.com>
Date: Thu, 29 Oct 2009 12:27:31 -0700
X-Google-Sender-Auth: 6a00f60a5f888712
Message-ID: <8f2776cb0910291227p2f84b6d5l3ed83c0c5ddac068@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Per Knudsgaard <per@minionis.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:27:37 -0000

On Thu, Oct 29, 2009 at 10:38 AM, Per Knudsgaard <per@minionis.com> wrote:
> =A0I don't think this is worth wasting bandwidth on. =A0If a single perso=
n is
> opposed then we shouldn't do it.

Idea's dead.  Forget I brought it up. :)


From jimblandy@gmail.com Thu Oct 29 14:30:53 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:49334)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3ahx-0002Cj-JT
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 14:30:53 -0500
Received: by pwj21 with SMTP id 21so254625pwj.39
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 12:30:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=Re1SRi0m75Pb4FcJiEkH0RzVi2IvfpqtZlDfjkNW67U=;
	b=JG2Mo3zcncz3WK4lcdh1bGT/NXv9KcnBWsoU4Tx+cgM1s+QWqwfO3L9TwLXfNghb0y
	njvC+wdpYG7ZQgJZ6pP/8K21Qo3MJU1kUlaoz7xHEK2gWLhx5zoI2XO6HJP8PVj+Lsop
	JMvZNRj0dhw0RXu5G5PNdbVB1h1wvK0LStJ4g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=VO+fOnKTorSrxiNdCirgYUZzT868xrLG38KL0mrJrkZ+aVOB0KMkxNu2DTM2nBS5vQ
	gupSDEx0X8DIz4ddw59bM56CtX6XOSkNdzYSoH8B40AQKezEGmeJztMbpfTS8fTGKoUq
	ZPfRRX/0oo0PUddTfv2NGKcm+dIvTXKwpA854=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.129.7 with SMTP id g7mr52265wfn.43.1256844647878; Thu, 29 
	Oct 2009 12:30:47 -0700 (PDT)
In-Reply-To: <20091029191026.25D3B1C1DF@topped-with-meat.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<20091029191026.25D3B1C1DF@topped-with-meat.com>
Date: Thu, 29 Oct 2009 12:30:47 -0700
X-Google-Sender-Auth: 08a8bf5ac71f91fc
Message-ID: <8f2776cb0910291230l27b554a3y43d68dc3d7d3d8c2@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:30:53 -0000

On Thu, Oct 29, 2009 at 12:10 PM, Roland McGrath <roland@frob.com> wrote:
> Holy crap, my book's still in the mail.
> Is there a plan about timing and pacing of collective progress?

Here's an idea about how to handle this:

- If you're sending a message about working on a particular chapter,
include that chapter name in the subject.

- If your message has spoilers (i.e., answers), mention that
prominently at the top of the message.

- If you're moving slowly, just join in a given chapter's thread
whenever you get there, and watch for spoilers.

- If you're moving quickly, be open to discussions on old threads.


From sussman@gmail.com Thu Oct 29 14:38:56 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:57676)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>)
	id 1N3apk-0004Aj-1B; Thu, 29 Oct 2009 14:38:56 -0500
Received: by vws13 with SMTP id 13so388812vws.25
	for <multiple recipients>; Thu, 29 Oct 2009 12:38:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=Ikr8jiEi6n2PY2bZV8p/d3BFgareSeIt26lyNZZZFC8=;
	b=ThfTmvUNyTjPAI34LrvXLHsfGwisLD61nOsf/P7UBj7mbfr+iNm2RX6JY7FeQT8DHY
	MkJCRpfK75AqmkuQp5vfRkx6ecGMmwS0tgo+5N/w2mhiZNc7wSc+fptfe+J6s2SG35+i
	fQmgw1FhNDLZ/CbcyHfPyMiVymzWxlOdccYRE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=giJvY8hODimPt95LCUxmOQkbmeWw9iAwopVRIywMxfJXt0T6VKAlI8Q4Y8WanLViSc
	FzNO/WtBkiJLdPrGwlx3j4YNNll+PB+t27wBLV3M3Xmh3gfAOblPtmSLTnbX8w4j4awB
	vVXCW22FTjG378+o3OQ7X1Hv1f4/T14gdZwyM=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.125.7 with SMTP id w7mr682323vcr.74.1256845130398; Thu, 29 
	Oct 2009 12:38:50 -0700 (PDT)
In-Reply-To: <20091029190512.160251C19E@topped-with-meat.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
	<20091029190512.160251C19E@topped-with-meat.com>
Date: Thu, 29 Oct 2009 14:38:50 -0500
X-Google-Sender-Auth: 1f0541e6f9dcef3e
Message-ID: <53c059c90910291238i60564417sf24b6e2dbbbb2af2@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:38:56 -0000

On Thu, Oct 29, 2009 at 2:05 PM, Roland McGrath <roland@frob.com> wrote:

> I mean, this newfangled web hooey
> laden with javascript does not even claim to help me get laid

...certainly not to the extent functional programming does!


From sussman@gmail.com Thu Oct 29 14:43:13 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:63269)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>)
	id 1N3att-0008J4-L1; Thu, 29 Oct 2009 14:43:13 -0500
Received: by vws13 with SMTP id 13so389979vws.25
	for <multiple recipients>; Thu, 29 Oct 2009 12:43:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=uvjBIjsFoBXHzvbvcWPBTieNpjObejQ+AG3G40B1hqE=;
	b=s7eJtfTH3GY1Mm1u9ckZNFpl+SKjbGFlDvzTzQEnaORfjfwhiZ19GoOH3UqoBlyX4f
	uf9YVvHO4IedSCKtr9gdJyHt/ISwCYhhfBHgsURi6hw/oKDr+Vn0u7TjNF0uBva4znEY
	y0JvFt4HlcZuQ9N5nfu3YWN0Zu1P4Za/hj/kY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=TQX20E7+5aHzKCAR/Rlc5FDXtM8xwqEoUXBDTdtr94Wg/LzQs1fbmrkjhBVGSJy72j
	PJd8bfw6zSbf62AK0EkPHuJ4fT8dLLcKfIyLE4uZwuunSVGOQl3mYcBy2Fy44Jt01yXQ
	+EpIQ4sxylEpGJVsuFB95cFQfGR2CCSCu/fT0=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.121.131 with SMTP id h3mr731848vcr.42.1256845388231; Thu, 
	29 Oct 2009 12:43:08 -0700 (PDT)
In-Reply-To: <20091029191026.25D3B1C1DF@topped-with-meat.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<20091029191026.25D3B1C1DF@topped-with-meat.com>
Date: Thu, 29 Oct 2009 14:43:08 -0500
X-Google-Sender-Auth: 16115c2b05b5cef2
Message-ID: <53c059c90910291243l5cbcad43u947114e149472b3a@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:43:13 -0000

http://book.realworldhaskell.org/read/

...it's hosted right here on red-bean, I believe.  Start reading!


On Thu, Oct 29, 2009 at 2:10 PM, Roland McGrath <roland@frob.com> wrote:
> Holy crap, my book's still in the mail.
> Is there a plan about timing and pacing of collective progress?
>
> _______________________________________________
> Haskell-study mailing list
> Haskell-study@red-bean.com
> http://www.red-bean.com/mailman/listinfo/haskell-study
>


From bos@serpentine.com Thu Oct 29 14:52:28 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:45532)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3b2q-0005ah-CD; Thu, 29 Oct 2009 14:52:28 -0500
Received: by pxi10 with SMTP id 10so1524362pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 12:52:22 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.115.38.30 with SMTP id q30mr326511waj.184.1256845942651; Thu, 
	29 Oct 2009 12:52:22 -0700 (PDT)
In-Reply-To: <53c059c90910291238i60564417sf24b6e2dbbbb2af2@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
	<20091029190512.160251C19E@topped-with-meat.com>
	<53c059c90910291238i60564417sf24b6e2dbbbb2af2@mail.gmail.com>
Date: Thu, 29 Oct 2009 12:52:22 -0700
Message-ID: <c290c4f20910291252n76c9dbaar90f2f7d2114eb873@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e64cc37af2fd020477183f5c
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:52:28 -0000

--0016e64cc37af2fd020477183f5c
Content-Type: text/plain; charset=UTF-8

On Thu, Oct 29, 2009 at 12:38 PM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:

>
> > I mean, this newfangled web hooey
> > laden with javascript does not even claim to help me get laid
>
> ...certainly not to the extent functional programming does!


I can confirm that Haskell can get you laid. I'm not sure it's sufficient by
itself, however I would be happy to be proven wrong. Further study of this
important phenomenon is no doubt warranted.

--0016e64cc37af2fd020477183f5c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Oct 29, 2009 at 12:38 PM, Ben Collins-Su=
ssman <span dir=3D"ltr">&lt;<a href=3D"mailto:sussman@red-bean.com">sussman=
@red-bean.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im"><br>
&gt; I mean, this newfangled web hooey<br>
&gt; laden with javascript does not even claim to help me get laid<br>
<br>
</div>...certainly not to the extent functional programming does!</blockquo=
te><div><br></div><div>I can confirm that Haskell can get you laid. I&#39;m=
 not sure it&#39;s sufficient by itself, however I would be happy to be pro=
ven wrong. Further study of this important phenomenon is no doubt warranted=
.</div>
</div>

--0016e64cc37af2fd020477183f5c--


From sussman@gmail.com Thu Oct 29 14:59:02 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:37828)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3b9C-0003JB-Rp
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 14:59:02 -0500
Received: by vws13 with SMTP id 13so394432vws.25
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 12:58:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=xgDxazyL8ZzmshbqCkyLF3/uLddl3OCpzgAqIW4IcqU=;
	b=pA1PdwBsR9Ka/Y9hsstXf8BNrvJ3n5MYziyhG9gJPcZEokL8olkZlKes/NG22lvtd3
	MBdMYEToQ3K1Xp/iJWIUtTLHOUQq0Lk1DrVNa2fhxxrQDRsKQYoRTYDdo0o6Kz0dGIkv
	cwx5zTbCHCMWuKrmmpJh2+j8Xy3RTzT6WQQnA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=YNJs1WojRyhKkfWjF7GQJ8xD8CrgWHGqgeJxdbDfqcxdzxWnKeyvdcZ0w9by6Mt5t7
	hfi5UsmvRDjT00VAFH0rz5Tjo8XXB85SJkef33ULuGkD9kjDq7QZdc/TqLnv4hykS452
	ADdajF7MdW4+Iqtwp0Q5GERk+gEmUl9dYlv80=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.125.5 with SMTP id w5mr774822vcr.30.1256846337127; Thu, 29 
	Oct 2009 12:58:57 -0700 (PDT)
Date: Thu, 29 Oct 2009 14:58:57 -0500
X-Google-Sender-Auth: fbe6fc29030117c5
Message-ID: <53c059c90910291258m42294366t9c022bac4467c5c7@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] unix libraries
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 19:59:03 -0000

Chapter 17 in the book is all about how to call C libraries from your
Haskell program.  But is it possible to do the reverse?

Specifically, can I compile some Haskell code into a unix library that
appears to be the same as any other C library -- same ABI and all?

I'm asking because Android recently got the ability to do JNI calls to
C libraries;  I'm doing this now for my Android app.  (Android apps
*have* to be Java, but JNI is the escape hatch.)  I'm having insane
thoughts about wanting to cross-compile Haskell into an ARM-linux
library I can call via JNI.


From roland@frob.com Thu Oct 29 15:02:02 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:55130
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>)
	id 1N3bC6-00052G-98; Thu, 29 Oct 2009 15:02:02 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id 67CB71C1BE; Thu, 29 Oct 2009 13:01:55 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: "Bryan O'Sullivan" <bos@serpentine.com>
In-Reply-To: Bryan O'Sullivan's message of  Thursday,
	29 October 2009 12:52:22 -0700
	<c290c4f20910291252n76c9dbaar90f2f7d2114eb873@mail.gmail.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281352k2348137bmd238fadab41292a9@mail.gmail.com>
	<53c059c90910281355k7a7e234ftb177b849a31173ee@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
	<20091029190512.160251C19E@topped-with-meat.com>
	<53c059c90910291238i60564417sf24b6e2dbbbb2af2@mail.gmail.com>
	<c290c4f20910291252n76c9dbaar90f2f7d2114eb873@mail.gmail.com>
X-Zippy-Says: The PILLSBURY DOUGHBOY is CRYING for an END to BURT REYNOLDS
	movies!!
Message-Id: <20091029200155.67CB71C1BE@topped-with-meat.com>
Date: Thu, 29 Oct 2009 13:01:55 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 20:02:02 -0000

Equivalent in all experienceable ways to having been laid,
but unknowable by definition whether or not you've actually
been laid yet, is all I had ever hoped for, of course.


From carlton@bactrian.org Thu Oct 29 15:06:16 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:65110)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3bGC-00008D-9Q; Thu, 29 Oct 2009 15:06:16 -0500
Received: by pwj21 with SMTP id 21so272131pwj.39
	for <multiple recipients>; Thu, 29 Oct 2009 13:06:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.247.23 with SMTP id u23mr44152wfh.332.1256846770705; Thu, 
	29 Oct 2009 13:06:10 -0700 (PDT)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <8f2776cb0910291230l27b554a3y43d68dc3d7d3d8c2@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<20091029191026.25D3B1C1DF@topped-with-meat.com>
	<8f2776cb0910291230l27b554a3y43d68dc3d7d3d8c2@mail.gmail.com>
Date: Thu, 29 Oct 2009 13:06:10 -0700
Message-ID: <90804c6f0910291306r12b1312bud59160b49f2bde07@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502c6c94e13f80477187152
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 20:06:16 -0000

--00504502c6c94e13f80477187152
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Oct 29, 2009 at 12:30 PM, Jim Blandy <jimb@red-bean.com> wrote:

> On Thu, Oct 29, 2009 at 12:10 PM, Roland McGrath <roland@frob.com> wrote:
> > Holy crap, my book's still in the mail.
> > Is there a plan about timing and pacing of collective progress?
>
> Here's an idea about how to handle this:
>
> - If you're sending a message about working on a particular chapter,
> include that chapter name in the subject.
>
> - If your message has spoilers (i.e., answers), mention that
> prominently at the top of the message.
>
> - If you're moving slowly, just join in a given chapter's thread
> whenever you get there, and watch for spoilers.
>
> - If you're moving quickly, be open to discussions on old threads.


I agree with all of that; having said that, I'd personally be up for a bit
more synchronization.  In the Vintage Game Club, we do optional
synchronization where we suggest a point to not go further than over, say,
the next week; I think it's worked well in that context, and I don't see
offhand why it wouldn't work here.  (I would make a concrete proposal along
those lines but my copy of the book is at home and I'm at work.)

-- 
David Carlton
carlton@bactrian.org

--00504502c6c94e13f80477187152
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 29, 2009 at 12:30 PM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Thu, Oct 29, 2009 at 12:10 PM, Roland McGrath &lt;<a h=
ref=3D"mailto:roland@frob.com">roland@frob.com</a>&gt; wrote:<br>
&gt; Holy crap, my book&#39;s still in the mail.<br>
&gt; Is there a plan about timing and pacing of collective progress?<br>
<br>
</div>Here&#39;s an idea about how to handle this:<br>
<br>
- If you&#39;re sending a message about working on a particular chapter,<br=
>
include that chapter name in the subject.<br>
<br>
- If your message has spoilers (i.e., answers), mention that<br>
prominently at the top of the message.<br>
<br>
- If you&#39;re moving slowly, just join in a given chapter&#39;s thread<br=
>
whenever you get there, and watch for spoilers.<br>
<br>
- If you&#39;re moving quickly, be open to discussions on old threads.</blo=
ckquote></div><div><br></div>I agree with all of that; having said that, I&=
#39;d personally be up for a bit more synchronization. =A0In the Vintage Ga=
me Club, we do optional synchronization where we suggest a point to not go =
further than over, say, the next week; I think it&#39;s worked well in that=
 context, and I don&#39;t see offhand why it wouldn&#39;t work here. =A0(I =
would make a concrete proposal along those lines but my copy of the book is=
 at home and I&#39;m at work.)<br clear=3D"all">
<br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton=
@bactrian.org</a><br>

--00504502c6c94e13f80477187152--


From sussman@gmail.com Thu Oct 29 15:16:26 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:64957)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>)
	id 1N3bQ1-0005Uy-WE; Thu, 29 Oct 2009 15:16:26 -0500
Received: by vws13 with SMTP id 13so399548vws.25
	for <multiple recipients>; Thu, 29 Oct 2009 13:16:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=TCXzQur3uNH2rAvTbYNv79g4lT9kNbClQOWSeyPy+TM=;
	b=axjxLGDPLNC/pbUzGbyhhKsj9omiYFsyvRtOq/8cEdxchs2MPwVFH6CERbgbzne4hy
	oXOrAdIETddZwdv2Tse0mrGkUqGf6FDnxZpTWnVKfZhS38wRhV6xPy5dMZ0RSug5ZCPZ
	Gj1YSgdYcHW2a+VVFopcclLHg2XctE2qy88Gw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=bV3bn2bGRP8n8rY18zB83YBRP4UtlXLnakREjXkCHz/f8wJKanA/SQPPDEZJgB9sl2
	lKrbdTM8zUCpMAAYVdEYsjo3OOrELAd4rw7uBQN8giad+ncHDQHR+9oUvvuoPp3wSCTa
	vDwGRzPlSqm+RYYHaEaV0BH1aSVYUpbzTHVS0=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.125.7 with SMTP id w7mr808826vcr.14.1256847027689; Thu, 29 
	Oct 2009 13:10:27 -0700 (PDT)
In-Reply-To: <90804c6f0910291306r12b1312bud59160b49f2bde07@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<20091029191026.25D3B1C1DF@topped-with-meat.com>
	<8f2776cb0910291230l27b554a3y43d68dc3d7d3d8c2@mail.gmail.com>
	<90804c6f0910291306r12b1312bud59160b49f2bde07@mail.gmail.com>
Date: Thu, 29 Oct 2009 15:10:27 -0500
X-Google-Sender-Auth: cad41f3f56a019fb
Message-ID: <53c059c90910291310t33aa797apfd57014ae3cacdc5@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 20:16:26 -0000

What worked well for our study group at work was to say "OK, do all
chapter 1 exercises for homework by date X."  Then we'd all commit our
"answers" into the shared repository, get together, and
compare/discuss our solutions.  Super-educational to see different
approaches.


From jimblandy@gmail.com Thu Oct 29 15:16:42 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:64749)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3bQI-0005Wg-P0
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 15:16:42 -0500
Received: by pzk4 with SMTP id 4so1588559pzk.32
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 13:16:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=YXyWLET4GTp5fmu8IKw4/DHXfm3HOORt6tT2bNZg1v4=;
	b=TbwF3yQRiW2WWH2Oznx2NIxHE6q5a6Eu8+josg3tOIUS7t6rgX+eJArf58pRgIZJ20
	2Ak3h5mPYnSrvfz3k2RKobQ+aiK8TWMuefvR4Ms4MYQnv6bu195iaZ+udqV1qWuGyzZo
	NPAIoqgFl+KYGTiHVd6Q+YMyCkToOL4VJVk9c=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=RRr7zDOWTuewOiuv/OjmbQg1WqQhbo8m0TskuFKXsfbXJjyAdXep/DaV30ltBhe+3c
	1foa1IU2LvsEO6XvPBBC/qi5F8fuwdwZAT9Psq2MgyVyV0UncjvzOH0xoAOdU8c7ZbVT
	Tauqj1fVyeYSAbkQfT+4vNAlZ6iwjR7A12/Hg=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.129.7 with SMTP id g7mr56992wfn.43.1256847090864; Thu, 29 
	Oct 2009 13:11:30 -0700 (PDT)
In-Reply-To: <20091029200155.67CB71C1BE@topped-with-meat.com>
References: <53c059c90910281319g3b6e349dh282a91c927c342de@mail.gmail.com>
	<90804c6f0910281759v30405914s3c045546eb6f5819@mail.gmail.com>
	<20091029012336.A49071C360@topped-with-meat.com>
	<8f2776cb0910282020v3b8fd098o91caf5e481713608@mail.gmail.com>
	<20091029075316.393E91C2AA@topped-with-meat.com>
	<8f2776cb0910290815h3d174348qb960b75d7d71dad3@mail.gmail.com>
	<20091029190512.160251C19E@topped-with-meat.com>
	<53c059c90910291238i60564417sf24b6e2dbbbb2af2@mail.gmail.com>
	<c290c4f20910291252n76c9dbaar90f2f7d2114eb873@mail.gmail.com>
	<20091029200155.67CB71C1BE@topped-with-meat.com>
Date: Thu, 29 Oct 2009 13:11:30 -0700
X-Google-Sender-Auth: eeb152271b08e11a
Message-ID: <8f2776cb0910291311v29631a93ka30f25ebe91b00f2@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Roland McGrath <roland@frob.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] o hai!
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 20:16:42 -0000

On Thu, Oct 29, 2009 at 1:01 PM, Roland McGrath <roland@frob.com> wrote:
> Equivalent in all experienceable ways to having been laid,
> but unknowable by definition whether or not you've actually
> been laid yet, is all I had ever hoped for, of course.

Well, now.  Having established the tone...


From bos@serpentine.com Thu Oct 29 15:39:08 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:38807)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3bm0-0002J5-9h; Thu, 29 Oct 2009 15:39:08 -0500
Received: by pxi10 with SMTP id 10so1548255pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 13:39:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.114.253.14 with SMTP id a14mr362054wai.160.1256848741917; Thu, 
	29 Oct 2009 13:39:01 -0700 (PDT)
In-Reply-To: <53c059c90910291258m42294366t9c022bac4467c5c7@mail.gmail.com>
References: <53c059c90910291258m42294366t9c022bac4467c5c7@mail.gmail.com>
Date: Thu, 29 Oct 2009 13:39:01 -0700
Message-ID: <c290c4f20910291339i449dac7el27d0a034ec69f0e1@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e68789e6cc6403047718e6df
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] unix libraries
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 20:39:08 -0000

--0016e68789e6cc6403047718e6df
Content-Type: text/plain; charset=UTF-8

On Thu, Oct 29, 2009 at 12:58 PM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:


> Specifically, can I compile some Haskell code into a unix library that
> appears to be the same as any other C library -- same ABI and all?
>

Yes, you can do this using the FFI.

I'm asking because Android recently got the ability to do JNI calls to
> C libraries;  I'm doing this now for my Android app.  (Android apps
> *have* to be Java, but JNI is the escape hatch.)  I'm having insane
> thoughts about wanting to cross-compile Haskell into an ARM-linux
> library I can call via JNI.
>

Neat. There are some people dusting off the ARM port of GHC for iPhone
purposes. Presumably some part of that could be brought to bear for Android
use, too.

--0016e68789e6cc6403047718e6df
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Oct 29, 2009 at 12:58 PM, Ben Collins-Su=
ssman <span dir=3D"ltr">&lt;<a href=3D"mailto:sussman@red-bean.com">sussman=
@red-bean.com</a>&gt;</span> wrote:<br><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex;">
Specifically, can I compile some Haskell code into a unix library that<br>
appears to be the same as any other C library -- same ABI and all?<br></blo=
ckquote><div><br></div><div>Yes, you can do this using the FFI.</div><div><=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex;">
I&#39;m asking because Android recently got the ability to do JNI calls to<=
br>
C libraries; =C2=A0I&#39;m doing this now for my Android app. =C2=A0(Androi=
d apps<br>
*have* to be Java, but JNI is the escape hatch.) =C2=A0I&#39;m having insan=
e<br>
thoughts about wanting to cross-compile Haskell into an ARM-linux<br>
library I can call via JNI.<br>
</blockquote><div><br></div><div>Neat. There are some people dusting off th=
e ARM port of GHC for iPhone purposes. Presumably some part of that could b=
e brought to bear for Android use, too.=C2=A0</div></div>

--0016e68789e6cc6403047718e6df--


From roland@frob.com Thu Oct 29 17:38:27 2009
Received: from toast.topped-with-meat.com ([168.75.111.31]:34239
	helo=topped-with-meat.com) by sanpietro.red-bean.com with esmtps
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69)
	(envelope-from <roland@frob.com>) id 1N3ddT-0004Fk-Qr
	for haskell-study@red-bean.com; Thu, 29 Oct 2009 17:38:27 -0500
Received: by topped-with-meat.com (Postfix, from userid 5281)
	id C84C51C1F2; Thu, 29 Oct 2009 15:38:20 -0700 (PDT)
From: Roland McGrath <roland@frob.com>
To: haskell-study@red-bean.com
X-Antipastobozoticataclysm: Bariumenemanilow
Message-Id: <20091029223820.C84C51C1F2@topped-with-meat.com>
Date: Thu, 29 Oct 2009 15:38:20 -0700 (PDT)
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] important perspective
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 29 Oct 2009 22:38:28 -0000

15:36 <roland> or you could join my haskell study group
15:36 <jimmyz> eddie?


From m.e.albaugh@gmail.com Thu Oct 29 22:57:33 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:42373)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <m.e.albaugh@gmail.com>)
	id 1N3icH-0004Gf-Lc; Thu, 29 Oct 2009 22:57:33 -0500
Received: by pxi10 with SMTP id 10so1745588pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 20:57:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=BInxa8HY8kVyJ31e3xPHhbbSxggTBnzTxCeAOwkG0Mw=;
	b=tt7c3Dl1//Pv/LR0kfX6Ods9wOoI6TR3kMnYCNUMStpOVQsnM4WTz16FSOyG4IPlGP
	F+YiQF7p066GjaS8bhPgIHnRreRrxWBFC1yf2czQdAl4YNDq8ENWAS2aXWFKXFbdxhnq
	4LfPPuR8ISQgB+9pZoyXRhe8KV7PaW01aqm3c=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=RdBYQreJbnQc0CYV4fksBDe2PEWDP2ekkCOevUFlG/p2xs4evA967xkFN3gUgMx48w
	KpSdvNDDZhhyoRo8cojeiK+DoF18zFSboYxqNslBrNNo3o+6Z/UvFIsthphPqK56ZA6l
	0Y5YchfBBKWSnwLiVR2wdTIchjGwOU7qV+CEY=
MIME-Version: 1.0
Received: by 10.142.55.8 with SMTP id d8mr101472wfa.22.1256875047973; Thu, 29 
	Oct 2009 20:57:27 -0700 (PDT)
In-Reply-To: <8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
	<8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
Date: Thu, 29 Oct 2009 20:57:27 -0700
Message-ID: <780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
From: Michael Albaugh <m.e.albaugh@gmail.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 03:57:33 -0000

On Thu, Oct 29, 2009 at 9:41 AM, Jim Blandy <jimb@red-bean.com> wrote:
> On Thu, Oct 29, 2009 at 9:40 AM, Bryan O'Sullivan <bos@serpentine.com> wr=
ote:
>>> Are there any non-enumerable numeric types?
>>
>> Of course. Reals, for one.
>
> That's what I thought of, but then:
>
> GHCi, version 6.8.2: http://www.haskell.org/ghc/ =A0:? for help
> Loading package base ... linking ... done.
> Prelude> succ pi
> 4.141592653589793
> Prelude>

OK, that's suprising. I just bought my book, and haven't really read more t=
han
"how to get the software", but I was wondering how the "successor" of a rat=
ional
would be handled.They, at least are enumerable, via the diagonalization tri=
ck,
but is there a preferred direction to start? And how would a person react t=
o
the result. Leaving for after I've actually read some of the book to ask
"and how would you implement a diagonalized succ for rationals, or
even just how would you implement rationals.

  I can tell my brain is going to be a little sore.

  Mike


From carlton@bactrian.org Thu Oct 29 23:51:38 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:62506)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3jSc-0004Wg-KB; Thu, 29 Oct 2009 23:51:38 -0500
Received: by pwj21 with SMTP id 21so495037pwj.39
	for <multiple recipients>; Thu, 29 Oct 2009 21:51:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.3.37 with SMTP id 37mr102044wfc.146.1256878292347; Thu, 29 
	Oct 2009 21:51:32 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
Date: Thu, 29 Oct 2009 21:51:32 -0700
Message-ID: <90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502c14d242c4804771fc8da
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 04:51:38 -0000

--00504502c14d242c4804771fc8da
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Oct 29, 2009 at 11:12 AM, Ben Collins-Sussman
<sussman@red-bean.com>wroteOK, I created the 'haskell-study' project
on googlecode, located at:

> http://code.google.com/p/haskell-study
>
> For sharing code (answers to book exercises?), you can clone the
> repository:  'hg clone https://haskell-study.googlecode.com/hg/
> haskell-study'
>
> To push back changesets, you need a google account.  If people tell me
> their google accounts, I can make you all committers on the project.
>

Awesome, works for me.

For people who, like me, haven't used Google code before: it turns out that
the password that you use when pushing code isn't any other Google password
you might have, it's a special one that you can find by going to the project
home page, clicking on your name under 'project committers' (once Ben has
added you), and then clicking on your Settings tab.

-- 
David Carlton
carlton@bactrian.org

--00504502c14d242c4804771fc8da
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 29, 2009 at 11:12 AM, Ben Collins-Sussman <span dir=3D"ltr">&lt=
;<a href=3D"mailto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;</span=
> wroteOK, I created the &#39;haskell-study&#39; project on googlecode, loc=
ated at:<br>
<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<a href=3D"http://code.google.com/p/haskell-study" target=3D"_blank">http:/=
/code.google.com/p/haskell-study</a><br>
<br>
For sharing code (answers to book exercises?), you can clone the<br>
repository: =A0&#39;hg clone <a href=3D"https://haskell-study.googlecode.co=
m/hg/
haskell-study" target=3D"_blank">https://haskell-study.googlecode.com/hg/<b=
r>
haskell-study</a>&#39;<br>
<br>
To push back changesets, you need a google account. =A0If people tell me<br=
>
their google accounts, I can make you all committers on the project.<br></b=
lockquote><div><br></div><div>Awesome, works for me.</div><div><br></div><d=
iv>For people who, like me, haven&#39;t used Google code before: it turns o=
ut that the password that you use when pushing code isn&#39;t any other Goo=
gle password you might have, it&#39;s a special one that you can find by go=
ing to the project home page, clicking on your name under &#39;project comm=
itters&#39; (once Ben has added you), and then clicking on your Settings ta=
b.</div>
<div><br></div></div>-- <br>David Carlton<br><a href=3D"mailto:carlton@bact=
rian.org">carlton@bactrian.org</a><br>

--00504502c14d242c4804771fc8da--


From jimblandy@gmail.com Fri Oct 30 01:10:53 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:47749)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>)
	id 1N3khJ-0007lK-AK; Fri, 30 Oct 2009 01:10:53 -0500
Received: by pzk4 with SMTP id 4so1859652pzk.32
	for <multiple recipients>; Thu, 29 Oct 2009 23:10:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=JwM1dZp2hUbQMtLpLY2HhcIKgkZO4HSimHFy3Rrp88M=;
	b=YIzyhaxitvuhqbBHL9+yet1PzH/PaGNutnRwP/GWYvVUAJiaJB+uYL6Wrbl1K+3dXb
	W9nheIkEDmJKVusi6m3yfk5DfHa10e7fyRKYenW74PmZwDKouPmvMFKg7Pt76Djt3cT3
	UAJlSTNvmnnMFsRIONAIffOCe6DwWe3AUFKNc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=pU8KBQGro6EzHMg8vuEXETND4/f8TX+ErtFg/0l6KZTFQALp+/gf0Eqfh9wpByXFA+
	BD4tZ0TxVNoOpOwNwnCSVUu8mN/JO5rTMffA6rQkZYd+/c1iM7xEGr59M2SoyM78Hxuu
	n6Kj21xvTDKANKJm6oO9g6PLGccbLISyhks7o=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.21.41 with SMTP id y41mr104650wfi.209.1256883047579; Thu, 
	29 Oct 2009 23:10:47 -0700 (PDT)
In-Reply-To: <90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
Date: Thu, 29 Oct 2009 23:10:47 -0700
X-Google-Sender-Auth: f0d1ce2790d45aeb
Message-ID: <8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 06:10:53 -0000

On Thu, Oct 29, 2009 at 9:51 PM, David Carlton <carlton@bactrian.org> wrote:
> For people who, like me, haven't used Google code before: it turns out that
> the password that you use when pushing code isn't any other Google password
> you might have, it's a special one that you can find by going to the project
> home page, clicking on your name under 'project committers' (once Ben has
> added you), and then clicking on your Settings tab.

I was able to commit, but I was not able to tell hg which username and
password to use by default.  Do you know the right hgrc magic?


From bos@serpentine.com Fri Oct 30 01:18:08 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:38212)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3koK-0008S0-QT; Fri, 30 Oct 2009 01:18:08 -0500
Received: by pxi10 with SMTP id 10so1811203pxi.33
	for <multiple recipients>; Thu, 29 Oct 2009 23:18:03 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.115.103.29 with SMTP id f29mr886894wam.222.1256883482833; Thu, 
	29 Oct 2009 23:18:02 -0700 (PDT)
In-Reply-To: <8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
Date: Thu, 29 Oct 2009 23:18:02 -0700
Message-ID: <c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e64cc4a884b3cb047720fda0
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 06:18:09 -0000

--0016e64cc4a884b3cb047720fda0
Content-Type: text/plain; charset=UTF-8

On Thu, Oct 29, 2009 at 11:10 PM, Jim Blandy <jimb@red-bean.com> wrote:

> On Thu, Oct 29, 2009 at 9:51 PM, David Carlton <carlton@bactrian.org>
> wrote:
> > For people who, like me, haven't used Google code before: it turns out
> that
> > the password that you use when pushing code isn't any other Google
> password
> > you might have, it's a special one that you can find by going to the
> project
> > home page, clicking on your name under 'project committers' (once Ben has
> > added you), and then clicking on your Settings tab.
>
> I was able to commit, but I was not able to tell hg which username and
> password to use by default.  Do you know the right hgrc magic?


You mean when pushing?

hg-haskell.prefix = https://hg.whatever.com/
hg-haskell.username = user@host.domain
hg-haskell.password = mypassword

--0016e64cc4a884b3cb047720fda0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Oct 29, 2009 at 11:10 PM, Jim Blandy <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Thu, Oct 29, 2009 at 9:51 PM, David Carlton &lt;<a hre=
f=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a>&gt; wrote:<br>
&gt; For people who, like me, haven&#39;t used Google code before: it turns=
 out that<br>
&gt; the password that you use when pushing code isn&#39;t any other Google=
 password<br>
&gt; you might have, it&#39;s a special one that you can find by going to t=
he project<br>
&gt; home page, clicking on your name under &#39;project committers&#39; (o=
nce Ben has<br>
&gt; added you), and then clicking on your Settings tab.<br>
<br>
</div>I was able to commit, but I was not able to tell hg which username an=
d<br>
password to use by default. =C2=A0Do you know the right hgrc magic?</blockq=
uote><div><br></div><div>You mean when pushing?</div><div><br></div><div>hg=
-haskell.prefix =3D <a href=3D"https://hg.whatever.com/">https://hg.whateve=
r.com/</a></div>
<div>hg-haskell.username =3D user@host.domain</div><div>hg-haskell.password=
 =3D mypassword</div><div><br></div></div>

--0016e64cc4a884b3cb047720fda0--


From jimblandy@gmail.com Fri Oct 30 01:31:22 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:33011)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3l17-0007Es-W1
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 01:31:22 -0500
Received: by pzk4 with SMTP id 4so1868639pzk.32
	for <haskell-study@red-bean.com>; Thu, 29 Oct 2009 23:31:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=CgqPhhIsUZbnqJEhdTy0HsmYA5BvmSH8REFUijeEsiU=;
	b=eSStfvGP0R+TD/flNzJ6DWVLqqqVYE9mPcNbn1fjSm5YNWPHQJbhCviyAhm1SXL2Vn
	O/qXMKqhOForKcRqm0wDYSHAk0pyn9P2g4khYlvaC003s1TMcoXB9yb+oYtubIvYF32j
	DKru7xoewhEcLSmCd9TSHsveWAtztwG5bQsIU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=uxYRPdrzJCp82ur54ySX2PAaGU+1srvrXag0+7dFDTmOOWLZEtFQlFcySPK81QaB+m
	460fBxT4eL3+T1w3DVJz4ooV5YXLczMptdCt89KdxkrUxas1SgxCsv8XgMwQH4hPgouW
	L/x/Bq5XM/yK0lCMWChjBrQuDrPdMj8SX9Pu0=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.9.16 with SMTP id 16mr120639wfi.92.1256884276083; Thu, 29 
	Oct 2009 23:31:16 -0700 (PDT)
In-Reply-To: <c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
Date: Thu, 29 Oct 2009 23:31:16 -0700
X-Google-Sender-Auth: 6277637840e6facb
Message-ID: <8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 06:31:22 -0000

On Thu, Oct 29, 2009 at 11:18 PM, Bryan O'Sullivan <bos@serpentine.com> wrote:
> You mean when pushing?
> hg-haskell.prefix = https://hg.whatever.com/
> hg-haskell.username = user@host.domain
> hg-haskell.password = mypassword

Yes.  Surely I'm doing something dumb, but shouldn't it not be
prompting me here?

$ hg showconfig | grep haskell-study
auth.haskell-study.prefix=https://haskell-study.googlecode.com/
auth.haskell-study.username=jimblandy@gmail.com
auth.haskell-study.password=<omitted>
paths.default=https://haskell-study.googlecode.com/hg/haskell-study
$ hg push
pushing to https://haskell-study.googlecode.com/hg/haskell-study
searching for changes
http authorization required
realm: Google Code Mercurial Repository
user: interrupted!
$

This is with hg-stable 07a62819b309.


From sussman@gmail.com Fri Oct 30 06:45:05 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:62803)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>)
	id 1N3puj-0005xb-GO; Fri, 30 Oct 2009 06:45:05 -0500
Received: by vws13 with SMTP id 13so582897vws.25
	for <multiple recipients>; Fri, 30 Oct 2009 04:45:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=s9I/iGaJtF7GMei4eqc26tLMw+4kyzrlzc53b4VYkfI=;
	b=kBfyeT0gDxlRAIr71vfrnpjcXhpF4WAf9DwHuo1Nsee/WOL3G7rlGdzXAl0UmnxqTs
	bA0MwR5hPRQeDvhG9bNjsZJ+WSbMeBHN2u05M7WQByMjeQ7rUWWJ1ObGwZrboEqC+CJT
	X21kYLPkQ7SNm8coFjUt1Z6Q5z+rvjdrmlXvs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=Di+6Vl35ZSYP/ckRAR9r9AoLCB8pMDz0avdv0rG+x+4oVapTl4xQ/UKhKUtOvstMxy
	ZMg6Bu3A9IrOk64MRIwy26hTXrb2RWQgV+6fj6X3jL590d69SjgHuE5FGJlk7jfsrYQ2
	Brxa3NpaSk8iHkjZV3eIXmN75rHtM3781Yirk=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.125.7 with SMTP id w7mr1206239vcr.14.1256903099902; Fri, 
	30 Oct 2009 04:44:59 -0700 (PDT)
In-Reply-To: <8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
Date: Fri, 30 Oct 2009 06:44:59 -0500
X-Google-Sender-Auth: 34caadf03747f636
Message-ID: <53c059c90910300444i676b9d6cqa0a3a5c2867b8999@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 11:45:05 -0000

I've added everyone as committers (if you've given me google account
names);  you should see yourself on the front page of the project.

The name that shows up in the log history is whatever is attached to
the changeset, *not* the account name you authenticate with.  It's
very common, in fact, to pull changes from a peer, then push up to
googlecode a set of changes from various people.

For example, Jim appears to have pushed to googlecode.  Even though
he's authenticating the push with jimblandy@gmail.com, if you look at
the logs (or at http://code.google.com/p/haskell-study/source/list),
each changeset appears to be authored by "Jim Blandy
<jimb@mozilla.org>".   This probably because Jim has

[ui]
username = Jim Blandy <jimb@mozilla.org>

...in his ~/.hgrc.  Everyone else is free to set that variable as your
'friendly' changelist author name.


From sussman@gmail.com Fri Oct 30 11:17:44 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:61513)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N3uAa-0004A9-5Q
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 11:17:44 -0500
Received: by vws13 with SMTP id 13so660510vws.25
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 09:17:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to
	:content-type; bh=Doy5IE7sP3G+tmbOfPQSc8t6AHF7LravXKmhqPoCeNM=;
	b=P+qCA3tGjzF3Iy8jQzYS5rM+2a+QfdFFFMbe7T6x4nmqnm5F07QJs9cCE17R7IwcbS
	DHteEgBf7At0nEUQkjjDI+Ay2IuH85kmxNd7yOCeNhW7lRBFC93WcWqvJ5OuuXCxHoVe
	LFPx6IFhk4aplNyCKK+d4HtjlobCX/LEpVULk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=aOzq1GHhrbj+WTPDGJRgjC+oqR4PWNrVA8z77SiJrBhXKE6HuUX5obuRsxJpc7FhFB
	tNjBMoJWfZDFAqfnz2kYzv32hhh74g/UMFhenhvUl8JvcUE/ox7XnY3sCYlPgV8YAh96
	RwNm165YTnrt+D/ZxFoSMp9+e/YB+v6oROr68=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.127.1 with SMTP id e1mr1439666vcs.49.1256919458654; Fri, 
	30 Oct 2009 09:17:38 -0700 (PDT)
In-Reply-To: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
Date: Fri, 30 Oct 2009 11:17:38 -0500
X-Google-Sender-Auth: 32dd6f5af9b470e4
Message-ID: <53c059c90910300917p6e6ba785i54acfe5c1e2c363@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 16:17:44 -0000

Folks, I'd like our hg repository to email us commit mails.  Whoever
owns this list, can you configure it to accept emails from
"haskell-study@googlecode.com"?


From carlton@bactrian.org Fri Oct 30 11:58:54 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:64352)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N3uoQ-0006rb-FH; Fri, 30 Oct 2009 11:58:54 -0500
Received: by pxi10 with SMTP id 10so2111174pxi.33
	for <multiple recipients>; Fri, 30 Oct 2009 09:58:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.60.3 with SMTP id i3mr173440wfa.270.1256921928405; Fri, 30 
	Oct 2009 09:58:48 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <53c059c90910300917p6e6ba785i54acfe5c1e2c363@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<53c059c90910300917p6e6ba785i54acfe5c1e2c363@mail.gmail.com>
Date: Fri, 30 Oct 2009 09:58:48 -0700
Message-ID: <90804c6f0910300958l44a9ed88m910443a02ac2f1c3@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502ad140d944c047729f145
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 16:58:54 -0000

--00504502ad140d944c047729f145
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 30, 2009 at 9:17 AM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:

> Folks, I'd like our hg repository to email us commit mails.  Whoever
> owns this list, can you configure it to accept emails from
> "haskell-study@googlecode.com"?


Done.

-- 
David Carlton
carlton@bactrian.org

--00504502ad140d944c047729f145
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 30, 2009 at 9:17 AM, Ben Collins-Sussman <span dir=3D"ltr">&lt;=
<a href=3D"mailto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;</span>=
 wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Folks, I&#39;d like our hg repository to email us commit mails. =A0Whoever<=
br>
owns this list, can you configure it to accept emails from<br>
&quot;<a href=3D"mailto:haskell-study@googlecode.com">haskell-study@googlec=
ode.com</a>&quot;?</blockquote><div><br></div><div>Done.</div><div>=A0</div=
></div>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carl=
ton@bactrian.org</a><br>


--00504502ad140d944c047729f145--


From 3jhTrSg0OANgB4ME8FF-MNO7SAIIAF86I78.6IG@codesite.bounces.google.com Fri Oct 30 11:30:12 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:46211)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3jhTrSg0OANgB4ME8FF-MNO7SAIIAF86I78.6IG@codesite.bounces.google.com>)
	id 1N3uMe-000402-4B
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 11:30:12 -0500
Received: by pzk24 with SMTP id 24so5889pzk.7
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 09:30:06 -0700 (PDT)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.114.105.11 with SMTP id d11mr287293wac.21.1256920206573; Fri, 
	30 Oct 2009 09:30:06 -0700 (PDT)
Message-ID: <00504502e9a66c84d30477298a42@google.com>
Date: Fri, 30 Oct 2009 16:30:06 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
X-Mailman-Approved-At: Fri, 30 Oct 2009 11:59:57 -0500
Subject: [Haskell-study] [haskell-study] 2 new revisions pushed by
	prav...@kumar.in on 2009-10-30 16:28 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 16:30:12 -0000

2 new revisions:

Revision: 9c7e84b1bb
Author: Praveen Kumar <praveen+hg@kumar.in>
Date: Thu Oct 29 23:29:42 2009
Log: Add chapter 1 exercise programs.
http://code.google.com/p/haskell-study/source/detail?r=9c7e84b1bb

Revision: 0e78867204
Author: Praveen Kumar <praveen+hg@kumar.in>
Date: Fri Oct 30 09:24:09 2009
Log: Add chapter 2 exercise programs.
http://code.google.com/p/haskell-study/source/detail?r=0e78867204

==============================================================================
Revision: 9c7e84b1bb
Author: Praveen Kumar <praveen+hg@kumar.in>
Date: Thu Oct 29 23:29:42 2009
Log: Add chapter 1 exercise programs.
http://code.google.com/p/haskell-study/source/detail?r=9c7e84b1bb

Added:
  /praveen/ch01/Cat.hs
  /praveen/ch01/WC.hs

=======================================
--- /dev/null
+++ /praveen/ch01/Cat.hs	Thu Oct 29 23:29:42 2009
@@ -0,0 +1,3 @@
+-- Cat STDIN to STDOUT.
+
+main = interact cat where cat stdin = stdin
=======================================
--- /dev/null
+++ /praveen/ch01/WC.hs	Thu Oct 29 23:29:42 2009
@@ -0,0 +1,6 @@
+-- Count the number of lines, words and characters from STDIN.
+
+main = interact wordCount
+       where wordCount input = show (length (lines input)) ++ ' ' :
+                               show (length (words input)) ++ ' ' :
+                               show (length input) ++ "\n"

==============================================================================
Revision: 0e78867204
Author: Praveen Kumar <praveen+hg@kumar.in>
Date: Fri Oct 30 09:24:09 2009
Log: Add chapter 2 exercise programs.
http://code.google.com/p/haskell-study/source/detail?r=0e78867204

Added:
  /praveen/ch02/EvenOdd.hs
  /praveen/ch02/lastButOne.hs
  /praveen/ch02/myDrop.hs

=======================================
--- /dev/null
+++ /praveen/ch02/EvenOdd.hs	Fri Oct 30 09:24:09 2009
@@ -0,0 +1,5 @@
+-- Determine if a given integer is odd or even.
+
+isOdd n = mod n 2 == 1
+
+isEven n = not (isOdd n)
=======================================
--- /dev/null
+++ /praveen/ch02/lastButOne.hs	Fri Oct 30 09:24:09 2009
@@ -0,0 +1,3 @@
+-- Return the element before the last element from a list.
+
+lastButOne xs = last (take (length xs - 1) xs)
=======================================
--- /dev/null
+++ /praveen/ch02/myDrop.hs	Fri Oct 30 09:24:09 2009
@@ -0,0 +1,5 @@
+-- Drop first 'n' elements of a list.
+
+myDrop n xs = if n <= 0 || null xs
+              then xs
+              else myDrop (n - 1) (tail xs)


From jimblandy@gmail.com Fri Oct 30 12:19:20 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:42857)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3v8C-0003Vp-8I
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 12:19:20 -0500
Received: by pzk4 with SMTP id 4so2173973pzk.32
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 10:19:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=sjXsgs8dsxD8aRyimMH6ZvDYWdwXAV6C5nk3wrDQ4qE=;
	b=tRY/M9zhTQZFKrBTFlf9krVUeu/ShzXtnjr5InWwjSFHxDk4ARAlTmRQHhQuHhojld
	FBDZ0xTwm7V53+J/hO5xWr1Zai/PeJw3BjjJwQ2LiX7QDRI6gSMk6FDnKBXyrtY28oHZ
	Y/Q6fBrHeJTD95ha3eq3jAbafB2pBxUy2is4o=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=NYdu1E3sNJSyxmuKXWIVGl+lPONmQBxS9oA3JzVkiNwmnZQa5C6XQOkw+RZNUyQhLy
	Uj4WaA2x+uj3qKbio9t+dYj8vL9YAJaw7RzfyYFr3iqcPlyAFaElLY2MmiSduPcmv+l7
	KH2SUIJM6prjBf93lND86FTSssi30ycXFygsg=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.6.11 with SMTP id 11mr173151wff.79.1256923154479; Fri, 30 
	Oct 2009 10:19:14 -0700 (PDT)
In-Reply-To: <780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
	<8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
	<780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
Date: Fri, 30 Oct 2009 10:19:14 -0700
X-Google-Sender-Auth: 87896594bb61939e
Message-ID: <8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Michael Albaugh <m.e.albaugh@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 17:19:20 -0000

On Thu, Oct 29, 2009 at 8:57 PM, Michael Albaugh <m.e.albaugh@gmail.com> wrote:
> OK, that's suprising. I just bought my book, and haven't really read more than
> "how to get the software", but I was wondering how the "successor" of a rational
> would be handled.They, at least are enumerable, via the diagonalization trick,
> but is there a preferred direction to start? And how would a person react to
> the result. Leaving for after I've actually read some of the book to ask
> "and how would you implement a diagonalized succ for rationals, or
> even just how would you implement rationals.

So, according to the Haskell spec:
http://haskell.org/onlinereport/basic.html#sect6.3.4
'succ' and 'pred' simply add one and subtract one on all numeric
types.  There's no attempt to actually enumerate all the values of the
type, by diagonalization or otherwise.

Bryan said that Reals are not Enum, but I don't understand this.  Real
is a type class, not a type, and according to the diagram here:
http://haskell.org/onlinereport/basic.html#sect6.3
all the actual *types* t that are Real (Int, Integer, Float, Double)
are also Enum.

I do understand, though, why the constraint (Num t, Enum t) => t
doesn't get simplified to (Num t): neither is an ancestor of the
other.


From jimblandy@gmail.com Fri Oct 30 12:20:51 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:46322)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3v9f-0004kL-C1
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 12:20:51 -0500
Received: by pzk4 with SMTP id 4so2174802pzk.32
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 10:20:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=wVS5aIxnqnavGCOVurr46ur3HYY38DU5QzyX0OLGxNM=;
	b=eFcsIzH4dx+B6v5G3t87K6DLP4s5LFpznREH0kuSiiCxQVlPLvOaTJ1OFGdzlCWMKv
	fJz5yube9crK+5KCBP9oIF2ltJdOWKj0xX57Ad3MjkGfduXpmRHqUPdmhqDNu4klN05D
	kM0TgYFSJmbFsXvCTLDxZC+eulT8OwztPIeZo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=Yi1+yQYe5i8AFztd6ysUCqpKAiLxE/n0J3wJFDth6XlS1cEMDGpNRS4NfjWntgkj0N
	ZG78MUAgH7aDmcPLUNPe3w6YU7ATo9AeztvHG3qo5FvBbBiCmgzOA9EMSm2PrWuK0WFK
	1qJe0OiaxJ7Ke9sQFqvjS64oRDfLEzAm745jI=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.129.7 with SMTP id g7mr187912wfn.43.1256923245702; Fri, 30 
	Oct 2009 10:20:45 -0700 (PDT)
In-Reply-To: <8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
	<8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
	<780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
	<8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
Date: Fri, 30 Oct 2009 10:20:45 -0700
X-Google-Sender-Auth: cf207c69974c2bf8
Message-ID: <8f2776cb0910301020v2913eef7h18f5e02e1bc32e7@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: Michael Albaugh <m.e.albaugh@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 17:20:51 -0000

On Fri, Oct 30, 2009 at 10:19 AM, Jim Blandy <jimb@red-bean.com> wrote:
> I do understand, though, why the constraint (Num t, Enum t) => t
> doesn't get simplified to (Num t): neither is an ancestor of the
> other.

That is, anyone at any time could define a new type and place it in
one but not the other.


From bos@serpentine.com Fri Oct 30 12:30:39 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:41071)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1N3vJ9-0005pP-2H; Fri, 30 Oct 2009 12:30:39 -0500
Received: by pwj21 with SMTP id 21so822014pwj.39
	for <multiple recipients>; Fri, 30 Oct 2009 10:30:33 -0700 (PDT)
Received: by 10.114.248.20 with SMTP id v20mr1399658wah.132.1256923833276;
	Fri, 30 Oct 2009 10:30:33 -0700 (PDT)
Received: from ?10.91.86.199? ([32.157.234.120])
	by mx.google.com with ESMTPS id 20sm233105pxi.7.2009.10.30.10.30.30
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 30 Oct 2009 10:30:32 -0700 (PDT)
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
	<8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
	<780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
	<8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
Message-Id: <0C69681E-B0B5-4D26-BF98-43640B2CF380@serpentine.com>
From: Bryan O'Sullivan <bos@serpentine.com>
To: Jim Blandy <jimb@red-bean.com>
In-Reply-To: <8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
Content-Type: text/plain;
	charset=us-ascii;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit
X-Mailer: iPhone Mail (7D11)
Mime-Version: 1.0 (iPhone Mail 7D11)
Date: Fri, 30 Oct 2009 10:30:13 -0700
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 17:30:39 -0000

I was referring to the real numbers not being enumerable, not to  
anything Haskell related.

In practice, I never use the Enum class.

On Oct 30, 2009, at 10:19 AM, Jim Blandy <jimb@red-bean.com> wrote:

> On Thu, Oct 29, 2009 at 8:57 PM, Michael Albaugh <m.e.albaugh@gmail.com 
> > wrote:
>> OK, that's suprising. I just bought my book, and haven't really  
>> read more than
>> "how to get the software", but I was wondering how the "successor"  
>> of a rational
>> would be handled.They, at least are enumerable, via the  
>> diagonalization trick,
>> but is there a preferred direction to start? And how would a person  
>> react to
>> the result. Leaving for after I've actually read some of the book  
>> to ask
>> "and how would you implement a diagonalized succ for rationals, or
>> even just how would you implement rationals.
>
> So, according to the Haskell spec:
> http://haskell.org/onlinereport/basic.html#sect6.3.4
> 'succ' and 'pred' simply add one and subtract one on all numeric
> types.  There's no attempt to actually enumerate all the values of the
> type, by diagonalization or otherwise.
>
> Bryan said that Reals are not Enum, but I don't understand this.  Real
> is a type class, not a type, and according to the diagram here:
> http://haskell.org/onlinereport/basic.html#sect6.3
> all the actual *types* t that are Real (Int, Integer, Float, Double)
> are also Enum.
>
> I do understand, though, why the constraint (Num t, Enum t) => t
> doesn't get simplified to (Num t): neither is an ancestor of the
> other.


From jimblandy@gmail.com Fri Oct 30 12:39:30 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:41714)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N3vRi-00032v-3O
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 12:39:30 -0500
Received: by pzk4 with SMTP id 4so2184941pzk.32
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 10:39:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=HNZtZ4qrJ2fGuj9JfEbzR1DBKp9dNkIwWjAYHbRuqpc=;
	b=AYZkIrEFe6i5i+4e6sGRhiC79IIMrTDGVSVgGSwo41r5dbtbBH3/KQE9y1KySUN1Tj
	AMcVFco3+UV2p+gwNGCc/AG/wvzqSlPzO8dGP92bRPLUMhg6ARm+TbmZ42/uip7LLk9j
	JI2AEjXa+R3rXqIM0/91SLW+148Q9R3q8eM1w=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=ieJt1yL5omGtZT7UIAxOhGGgxPdy7sY8DntNkj6Uh4FpxK9hCrvrgJM5aC3vDqQl6w
	duhy+C1MmaWcB6MLXVD9bQbETgmY2TehOGLu/NFlt+HOG5x8eJ0xm5ftnVGpuzAFpHBc
	7B53KBqvdNsVuECAte7/JBCR3vVhwYPeTflzE=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.55.14 with SMTP id d14mr79468wfa.282.1256924364430; Fri, 
	30 Oct 2009 10:39:24 -0700 (PDT)
In-Reply-To: <0C69681E-B0B5-4D26-BF98-43640B2CF380@serpentine.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<c290c4f20910290940p2040f200lcb076b8dedcdab5c@mail.gmail.com>
	<8f2776cb0910290941y78d6501egccdb58314e8e37ee@mail.gmail.com>
	<780dd8d30910292057g6d1c9a7fja45287097b55241b@mail.gmail.com>
	<8f2776cb0910301019k3f42ecdfyedd91b289b65db8e@mail.gmail.com>
	<0C69681E-B0B5-4D26-BF98-43640B2CF380@serpentine.com>
Date: Fri, 30 Oct 2009 10:39:24 -0700
X-Google-Sender-Auth: c8991189faa2dcfb
Message-ID: <8f2776cb0910301039s3984f611me0b0c3a6bf1229dd@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: "haskell-study@red-bean.com" <haskell-study@red-bean.com>
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 17:39:30 -0000

On Fri, Oct 30, 2009 at 10:30 AM, Bryan O'Sullivan <bos@serpentine.com> wrote:
> I was referring to the real numbers not being enumerable, not to anything
> Haskell related.

Oh --- you mean *the* real numbers.  The real reals.  Yes, those are
not enumerable.

I don't think they can be represented on a computer, either.
http://en.wikipedia.org/wiki/Computable_number


From carlton@bactrian.org Fri Oct 30 14:16:20 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:51094)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N3wxQ-0004GR-Fu
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 14:16:20 -0500
Received: by pzk4 with SMTP id 4so2235843pzk.32
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 12:16:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.138.4 with SMTP id q4mr220069wfn.38.1256930174872; Fri, 30 
	Oct 2009 12:16:14 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
Date: Fri, 30 Oct 2009 12:16:14 -0700
Message-ID: <90804c6f0910301216w34074c69n908c105348ecf06a@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=000e0cd5f6dc94aed104772bdc20
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] Preface
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 19:16:20 -0000

--000e0cd5f6dc94aed104772bdc20
Content-Type: text/plain; charset=ISO-8859-1

I read through the preface last night; the main thing that caught my eye was
this:

==

Lazy evaluation has some spooky effects. Let's say we want to find the k
least-valued elements of an unsorted list. In a traditional language, the
obvious approach would be to sort the list and take the first k elements,
but this is expensive. For efficiency, we would instead write a special
function that takes these values in one pass, and it would have to perform
some moderately complex book-keeping. In Haskell, the sort-then-take
approach actually performs well: laziness ensures that the list will only be
sorted enough to find the k minimal elements.

Better yet, our Haskell code that operates so efficiently is tiny, and uses
standard library functions.

-- file: ch00/KMinima.hs
-- lines beginning with "--" are comments.

minima k xs = take k (sort xs)

==

My first reaction was: surely it's a stretch to say that laziness ensures
that that implementation is efficient?  Laziness is a prerequisite for it to
be efficient, but presumably you could do an implementation of sort such
that "take k (sort xs)" took just as much time as (sort xs) did.

If that's true, then I guess that's one criterion for how to choose a good
implementation of an algorithm in Haskell: if it makes sense to only want
some of the information out of the result of the algorithm, then you should
be able to get that information as cheaply as possible by from laziness if
all you request is that laziness.  So prefer algorithms where that's true
over algorithms where it isn't.

Thinking about it a bit more, though, for all I know any natural
implementation of sorting that works with lists as its internal data
structures (instead of vectors) will actually be one where "take k (sort
xs)" is efficient.  I'm far from an expert on sorting algorithms, and I
haven't taken the time to look up / play around with various possibilities
here.


The mention of testing in the preface and table of contents also made me
happy; I've heard a lot of good things about quickcheck, I'm looking forward
to getting my hands dirty with it to understand better where it works well
and where it doesn't.  Though I'll probably start off sticking with HUnit,
since I looked into that when I dipped my toes into the book this summer and
it seemed to work well.


Incidentally, if anybody else is setting up cabal from scratch (e.g. to get
HUnit installed), I remember the book's instructions leading to some amount
of head-scratching.  I think the main issue I had was that the book tells
you to pass the '-p' flag to various commands; this turns on profiling
support, and requires you to have more stuff installed than you otherwise
would.  So I found it worked more smoothly if I just omitted that.  Also,
there's a shell script on the cabal web site that installs all the required
prerequisites; I found that easier than following the book's instructions
for getting cabal in place.

--
David Carlton
carlton@bactrian.org

--000e0cd5f6dc94aed104772bdc20
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I read through the preface last night; the main thing that caught my eye wa=
s this:<br><br>=3D=3D <br><br>Lazy evaluation has some spooky effects. Let&=
#39;s say we want to find the k least-valued elements of an unsorted list. =
In a traditional language, the obvious approach would be to sort the list a=
nd take the first k elements, but this is expensive. For efficiency, we wou=
ld instead write a special function that takes these values in one pass, an=
d it would have to perform some moderately complex book-keeping. In Haskell=
, the sort-then-take approach actually performs well: laziness ensures that=
 the list will only be sorted enough to find the k minimal elements.<br>
<br>Better yet, our Haskell code that operates so efficiently is tiny, and =
uses standard library functions.<br><br>-- file: ch00/KMinima.hs<br>-- line=
s beginning with &quot;--&quot; are comments.<br><br>minima k xs =3D take k=
 (sort xs)<br>
<br>=3D=3D<br><br><div>My first reaction was: surely it&#39;s a stretch to =
say that laziness ensures that that implementation is efficient? =A0Lazines=
s is a prerequisite for it to be efficient, but presumably you could do an =
implementation of sort such that &quot;take k (sort xs)&quot; took just as =
much time as (sort xs) did.</div>
<div><br></div><div>If that&#39;s true, then I guess that&#39;s one criteri=
on for how to choose a good implementation of an algorithm in Haskell: if i=
t makes sense to only want some of the information out of the result of the=
 algorithm, then you should be able to get that information as cheaply as p=
ossible by from laziness if all you request is that laziness. =A0So prefer =
algorithms where that&#39;s true over algorithms where it isn&#39;t.</div>
<div><br></div><div>Thinking about it a bit more, though, for all I know an=
y natural implementation of sorting that works with lists as its internal d=
ata structures (instead of vectors) will actually be one where &quot;take k=
 (sort xs)&quot; is efficient. =A0I&#39;m far from an expert on sorting alg=
orithms, and I haven&#39;t taken the time to look up / play around with var=
ious possibilities here.</div>
<div><br></div><div><br></div><div>The mention of testing in the preface an=
d table of contents also made me happy; I&#39;ve heard a lot of good things=
 about quickcheck, I&#39;m looking forward to getting my hands dirty with i=
t to understand better where it works well and where it doesn&#39;t. =A0Tho=
ugh I&#39;ll probably start off sticking with HUnit, since I looked into th=
at when I dipped my toes into the book this summer and it seemed to work we=
ll.</div>
<div><br></div><div><br></div><div>Incidentally, if anybody else is setting=
 up cabal from scratch (e.g. to get HUnit installed), I remember the book&#=
39;s instructions leading to some amount of head-scratching. =A0I think the=
 main issue I had was that the book tells you to pass the &#39;-p&#39; flag=
 to various commands; this turns on profiling support, and requires you to =
have more stuff installed than you otherwise would. =A0So I found it worked=
 more smoothly if I just omitted that. =A0Also, there&#39;s a shell script =
on the cabal web site that installs all the required prerequisites; I found=
 that easier than following the book&#39;s instructions for getting cabal i=
n place.</div>
<div><br>--<br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">car=
lton@bactrian.org</a><br></div>

--000e0cd5f6dc94aed104772bdc20--


From bos@serpentine.com Fri Oct 30 14:43:54 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:55005)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>) id 1N3xO6-0004xh-DW
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 14:43:54 -0500
Received: by pxi10 with SMTP id 10so2197926pxi.33
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 12:43:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.115.100.4 with SMTP id c4mr1528334wam.13.1256931828785; Fri, 
	30 Oct 2009 12:43:48 -0700 (PDT)
In-Reply-To: <90804c6f0910301216w34074c69n908c105348ecf06a@mail.gmail.com>
References: <90804c6f0910301216w34074c69n908c105348ecf06a@mail.gmail.com>
Date: Fri, 30 Oct 2009 12:43:48 -0700
Message-ID: <c290c4f20910301243w14045b8fne2d18838d8d41fbb@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: multipart/alternative; boundary=0016e64dde6429617004772c3fb1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Preface
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 19:43:54 -0000

--0016e64dde6429617004772c3fb1
Content-Type: text/plain; charset=UTF-8

On Fri, Oct 30, 2009 at 12:16 PM, David Carlton <carlton@bactrian.org>wrote:


> My first reaction was: surely it's a stretch to say that laziness ensures
> that that implementation is efficient?  Laziness is a prerequisite for it to
> be efficient, but presumably you could do an implementation of sort such
> that "take k (sort xs)" took just as much time as (sort xs) did.
>

How would you do so? Actually, let me back up, because your language makes
me think that there's some confusion between what I think I wrote and what
you think I wrote. I'll reiterate the point of that example: in Haskell,
take k (sort xs) does *less* work than evaluating all of sort xs, because
only the first k elements of the result need to be fully sorted.

Thinking about it a bit more, though, for all I know any natural
> implementation of sorting that works with lists as its internal data
> structures (instead of vectors) will actually be one where "take k (sort
> xs)" is efficient.
>

That's actually not the case. You have to choose the implementation
carefully so that it's both efficient and has this "sort as little as
possible" property.


> The mention of testing in the preface and table of contents also made me
> happy; I've heard a lot of good things about quickcheck, I'm looking forward
> to getting my hands dirty with it to understand better where it works well
> and where it doesn't.  Though I'll probably start off sticking with HUnit,
> since I looked into that when I dipped my toes into the book this summer and
> it seemed to work well.
>

HUnit is fine, but unit testing is weak beer indeed compared to the stuff
you can do with QuickCheck and its cousins. I actually never use HUnit,
because the alternatives are always far better at exposing bugs and design
flaws.

--0016e64dde6429617004772c3fb1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Oct 30, 2009 at 12:16 PM, David Carlton =
<span dir=3D"ltr">&lt;<a href=3D"mailto:carlton@bactrian.org">carlton@bactr=
ian.org</a>&gt;</span> wrote:<br><div>=C2=A0</div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">
<div>My first reaction was: surely it&#39;s a stretch to say that laziness =
ensures that that implementation is efficient? =C2=A0Laziness is a prerequi=
site for it to be efficient, but presumably you could do an implementation =
of sort such that &quot;take k (sort xs)&quot; took just as much time as (s=
ort xs) did.</div>
</blockquote><div><br></div><div>How would you do so? Actually, let me back=
 up, because your language makes me think that there&#39;s some confusion b=
etween what I think I wrote and what you think I wrote. I&#39;ll reiterate =
the point of that example: in Haskell, take k (sort xs) does <b>less</b>=C2=
=A0work than evaluating all of sort xs, because only the first k elements o=
f the result need to be fully sorted.</div>
<div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
<div>Thinking about it a bit more, though, for all I know any natural imple=
mentation of sorting that works with lists as its internal data structures =
(instead of vectors) will actually be one where &quot;take k (sort xs)&quot=
; is efficient.</div>
</blockquote><div><br></div><div>That&#39;s actually not the case. You have=
 to choose the implementation carefully so that it&#39;s both efficient and=
 has this &quot;sort as little as possible&quot; property.</div><div>=C2=A0=
</div>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div>The mention of testing in the preface =
and table of contents also made me happy; I&#39;ve heard a lot of good thin=
gs about quickcheck, I&#39;m looking forward to getting my hands dirty with=
 it to understand better where it works well and where it doesn&#39;t. =C2=
=A0Though I&#39;ll probably start off sticking with HUnit, since I looked i=
nto that when I dipped my toes into the book this summer and it seemed to w=
ork well.</div>
</blockquote><div><br></div><div>HUnit is fine, but unit testing is weak be=
er indeed compared to the stuff you can do with QuickCheck and its cousins.=
 I actually never use HUnit, because the alternatives are always far better=
 at exposing bugs and design flaws.</div>
</div>

--0016e64dde6429617004772c3fb1--


From carlton@bactrian.org Fri Oct 30 15:24:45 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:61025)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N3y1d-00061q-Os
	for haskell-study@red-bean.com; Fri, 30 Oct 2009 15:24:45 -0500
Received: by pwj21 with SMTP id 21so907793pwj.39
	for <haskell-study@red-bean.com>; Fri, 30 Oct 2009 13:24:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.154.2 with SMTP id g2mr225041wfo.18.1256934280154; Fri, 30 
	Oct 2009 13:24:40 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <c290c4f20910301243w14045b8fne2d18838d8d41fbb@mail.gmail.com>
References: <90804c6f0910301216w34074c69n908c105348ecf06a@mail.gmail.com>
	<c290c4f20910301243w14045b8fne2d18838d8d41fbb@mail.gmail.com>
Date: Fri, 30 Oct 2009 13:24:40 -0700
Message-ID: <90804c6f0910301324y63977f27x2ea7dfdba8f16144@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: multipart/alternative; boundary=001636e0a6c0464e6f04772cd191
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Preface
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 30 Oct 2009 20:24:46 -0000

--001636e0a6c0464e6f04772cd191
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 30, 2009 at 12:43 PM, Bryan O'Sullivan <bos@serpentine.com>wrote:

> On Fri, Oct 30, 2009 at 12:16 PM, David Carlton <carlton@bactrian.org>wrote:
>
>
>> My first reaction was: surely it's a stretch to say that laziness ensures
>> that that implementation is efficient?  Laziness is a prerequisite for it to
>> be efficient, but presumably you could do an implementation of sort such
>> that "take k (sort xs)" took just as much time as (sort xs) did.
>>
>
> How would you do so? Actually, let me back up, because your language makes
> me think that there's some confusion between what I think I wrote and what
> you think I wrote. I'll reiterate the point of that example: in Haskell,
> take k (sort xs) does *less* work than evaluating all of sort xs, because
> only the first k elements of the result need to be fully sorted.
>

Thanks for the clarification. I guess what I'm saying is: the natural
implication of "only the first k elements need to be fully sorted" is that
"it is _conceivable_ that take k (sort xs) will do less work than all of
sort xs" (in an algorithmic sense, e.g. nlog(k) instead of nlog(n), or
whatever the right numbers are), whereas I interpreted the book as
suggesting that that possibility, by itself, implies that take k (sort xs)
is _guaranteed_ to do less work than sort xs.  (And, to head off further
confusion, I'm more than willing to accept that that is true for the
implementation that comes with GHC.)  And...


> Thinking about it a bit more, though, for all I know any natural
>> implementation of sorting that works with lists as its internal data
>> structures (instead of vectors) will actually be one where "take k (sort
>> xs)" is efficient.
>>
>
> That's actually not the case. You have to choose the implementation
> carefully so that it's both efficient and has this "sort as little as
> possible" property.
>

That seems to agree with what I'm trying to say: laziness opens the door to
efficiency in this case, but the library implementor has to do some work to
attain that efficiency.  Though, don't get me wrong, just opening the door
to efficiency is a very big deal.


> The mention of testing in the preface and table of contents also made me
>> happy; I've heard a lot of good things about quickcheck, I'm looking forward
>> to getting my hands dirty with it to understand better where it works well
>> and where it doesn't.  Though I'll probably start off sticking with HUnit,
>> since I looked into that when I dipped my toes into the book this summer and
>> it seemed to work well.
>>
>
> HUnit is fine, but unit testing is weak beer indeed compared to the stuff
> you can do with QuickCheck and its cousins. I actually never use HUnit,
> because the alternatives are always far better at exposing bugs and design
> flaws.
>

That sounds exciting!

-- 
David Carlton
carlton@bactrian.org

--001636e0a6c0464e6f04772cd191
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 30, 2009 at 12:43 PM, Bryan O&#39;Sullivan <span dir=3D"ltr">&l=
t;<a href=3D"mailto:bos@serpentine.com">bos@serpentine.com</a>&gt;</span> w=
rote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"gmail_quote"><div class=3D"im">On Fri, Oct 30, 2009 at 12:16 =
PM, David Carlton <span dir=3D"ltr">&lt;<a href=3D"mailto:carlton@bactrian.=
org" target=3D"_blank">carlton@bactrian.org</a>&gt;</span> wrote:<br><div>=
=A0</div>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div>My first reaction was: surely it&#39;s a stretch to say that laziness =
ensures that that implementation is efficient? =A0Laziness is a prerequisit=
e for it to be efficient, but presumably you could do an implementation of =
sort such that &quot;take k (sort xs)&quot; took just as much time as (sort=
 xs) did.</div>

</blockquote><div><br></div></div><div>How would you do so? Actually, let m=
e back up, because your language makes me think that there&#39;s some confu=
sion between what I think I wrote and what you think I wrote. I&#39;ll reit=
erate the point of that example: in Haskell, take k (sort xs) does <b>less<=
/b>=A0work than evaluating all of sort xs, because only the first k element=
s of the result need to be fully sorted.</div>
</div></blockquote><div><br></div><div>Thanks for the clarification. I gues=
s what I&#39;m saying is: the natural implication of &quot;only the first k=
 elements need to be fully sorted&quot; is that &quot;it is _conceivable_ t=
hat take k (sort xs) will do less work than all of sort xs&quot; (in an alg=
orithmic sense, e.g. nlog(k) instead of nlog(n), or whatever the right numb=
ers are), whereas I interpreted the book as suggesting that that possibilit=
y, by itself, implies that take k (sort xs) is _guaranteed_ to do less work=
 than sort xs. =A0(And, to head off further confusion, I&#39;m more than wi=
lling to accept that that is true for the implementation that comes with GH=
C.) =A0And...</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote"><d=
iv class=3D"im"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex">

<div>Thinking about it a bit more, though, for all I know any natural imple=
mentation of sorting that works with lists as its internal data structures =
(instead of vectors) will actually be one where &quot;take k (sort xs)&quot=
; is efficient.</div>

</blockquote><div><br></div></div><div>That&#39;s actually not the case. Yo=
u have to choose the implementation carefully so that it&#39;s both efficie=
nt and has this &quot;sort as little as possible&quot; property.</div>
</div></blockquote><div><br></div><div>That seems to agree with what I&#39;=
m trying to say: laziness opens the door to efficiency in this case, but th=
e library implementor has to do some work to attain that efficiency. =A0Tho=
ugh, don&#39;t get me wrong, just opening the door to efficiency is a very =
big deal.</div>
<div>=A0=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote"=
><div class=3D"im">
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>The mention of testing in the preface a=
nd table of contents also made me happy; I&#39;ve heard a lot of good thing=
s about quickcheck, I&#39;m looking forward to getting my hands dirty with =
it to understand better where it works well and where it doesn&#39;t. =A0Th=
ough I&#39;ll probably start off sticking with HUnit, since I looked into t=
hat when I dipped my toes into the book this summer and it seemed to work w=
ell.</div>

</blockquote><div><br></div></div><div>HUnit is fine, but unit testing is w=
eak beer indeed compared to the stuff you can do with QuickCheck and its co=
usins. I actually never use HUnit, because the alternatives are always far =
better at exposing bugs and design flaws.</div>

</div>
</blockquote></div><br>That sounds exciting!<br clear=3D"all"><br>-- <br>Da=
vid Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org=
</a><br>

--001636e0a6c0464e6f04772cd191--


From 3vtHsSg0OAMcun5xryy-567qBt11tyrp1qr.p1z@codesite.bounces.google.com Sat Oct 31 19:09:40 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:54139)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3vtHsSg0OAMcun5xryy-567qBt11tyrp1qr.p1z@codesite.bounces.google.com>)
	id 1N4O0q-0002bk-9O
	for haskell-study@red-bean.com; Sat, 31 Oct 2009 19:09:40 -0500
Received: by pzk24 with SMTP id 24so7613pzk.7
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 17:09:34 -0700 (PDT)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.74.16 with SMTP id w16mr431390wfa.11.1257034174606; Sat, 
	31 Oct 2009 17:09:34 -0700 (PDT)
Message-ID: <001636e90b7a72c94304774413a2@google.com>
Date: Sun, 01 Nov 2009 00:09:34 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 11 new revisions pushed by
	carl...@bactrian.org on 2009-11-01 00:09 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:09:40 -0000

11 new revisions:

Revision: d1dc70c406
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:45:04 2009
Log: Start working on chapter 1.  Writing tests like this is a bit  
bizarre,...
http://code.google.com/p/haskell-study/source/detail?r=d1dc70c406

Revision: 31e1777e5c
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:49:06 2009
Log: countLines -> showLineCount
http://code.google.com/p/haskell-study/source/detail?r=31e1777e5c

Revision: dca20e5c29
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:51:26 2009
Log: Extract countLines.
http://code.google.com/p/haskell-study/source/detail?r=dca20e5c29

Revision: bab61f3c53
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:54:54 2009
Log: Whee, composition.
http://code.google.com/p/haskell-study/source/detail?r=bab61f3c53

Revision: e542cef373
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:59:40 2009
Log: Extract tests into suites.
http://code.google.com/p/haskell-study/source/detail?r=e542cef373

Revision: 5c663611c9
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:02:18 2009
Log: Count words, too.
http://code.google.com/p/haskell-study/source/detail?r=5c663611c9

Revision: 2c06ada31e
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:04:55 2009
Log: Add countChars.
http://code.google.com/p/haskell-study/source/detail?r=2c06ada31e

Revision: 1075df9571
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:06:55 2009
Log: Let's put a more generic showCount function instead.
http://code.google.com/p/haskell-study/source/detail?r=1075df9571

Revision: 8becb27dc7
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:32:10 2009
Log: After more work than I would have liked, the Makefile can now build...
http://code.google.com/p/haskell-study/source/detail?r=8becb27dc7

Revision: 8cb092d573
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:38:38 2009
Log: Move compiled programs into a build/ directory.
http://code.google.com/p/haskell-study/source/detail?r=8cb092d573

Revision: 1a31bdb1fd
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:56:29 2009
Log: This should put all the generated files in the build/ directory.
http://code.google.com/p/haskell-study/source/detail?r=1a31bdb1fd

==============================================================================
Revision: d1dc70c406
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:45:04 2009
Log: Start working on chapter 1.  Writing tests like this is a bit bizarre,
but I wanted to get a test framework in place.
http://code.google.com/p/haskell-study/source/detail?r=d1dc70c406

Added:
  /carlton/Makefile
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /dev/null
+++ /carlton/Makefile	Sat Oct 31 13:45:04 2009
@@ -0,0 +1,10 @@
+default: test
+
+TESTS = $(wildcard *Test.hs)
+
+.PHONY: $(TESTS) test default
+
+$(TESTS): %.hs:
+	ghc -e "Test.HUnit.runTestTT $*.tests" $@
+
+test: $(TESTS)
=======================================
--- /dev/null
+++ /carlton/ShowCount.hs	Sat Oct 31 13:45:04 2009
@@ -0,0 +1,3 @@
+module ShowCount(countLines) where
+
+countLines input = show (length (lines input)) ++ "\n"
=======================================
--- /dev/null
+++ /carlton/ShowCountTest.hs	Sat Oct 31 13:45:04 2009
@@ -0,0 +1,9 @@
+module ShowCountTest(tests) where
+
+import Test.HUnit
+import ShowCount
+
+tests = TestList["empty" ~: "0\n" @=? countLines "",
+                 "one" ~: "1\n" @=? countLines "foo\n",
+                 "many" ~: "3\n" @=? countLines "a\nbc\nd\n",
+                 "no trailing newline" ~: "2\n" @=? countLines "a\nbc"]

==============================================================================
Revision: 31e1777e5c
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:49:06 2009
Log: countLines -> showLineCount
http://code.google.com/p/haskell-study/source/detail?r=31e1777e5c

Modified:
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 13:45:04 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 13:49:06 2009
@@ -1,3 +1,3 @@
-module ShowCount(countLines) where
-
-countLines input = show (length (lines input)) ++ "\n"
+module ShowCount(showLineCount) where
+
+showLineCount input = show (length (lines input)) ++ "\n"
=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 13:45:04 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 13:49:06 2009
@@ -3,7 +3,7 @@
  import Test.HUnit
  import ShowCount

-tests = TestList["empty" ~: "0\n" @=? countLines "",
-                 "one" ~: "1\n" @=? countLines "foo\n",
-                 "many" ~: "3\n" @=? countLines "a\nbc\nd\n",
-                 "no trailing newline" ~: "2\n" @=? countLines "a\nbc"]
+tests = TestList["empty" ~: "0\n" @=? showLineCount "",
+                 "one" ~: "1\n" @=? showLineCount "foo\n",
+                 "many" ~: "3\n" @=? showLineCount "a\nbc\nd\n",
+                 "no trailing newline" ~: "2\n" @=? showLineCount "a\nbc"]

==============================================================================
Revision: dca20e5c29
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:51:26 2009
Log: Extract countLines.
http://code.google.com/p/haskell-study/source/detail?r=dca20e5c29

Modified:
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 13:49:06 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 13:51:26 2009
@@ -1,3 +1,5 @@
-module ShowCount(showLineCount) where
-
-showLineCount input = show (length (lines input)) ++ "\n"
+module ShowCount(countLines, showLineCount) where
+
+countLines input = length (lines input)
+
+showLineCount input = show (countLines input) ++ "\n"
=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 13:49:06 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 13:51:26 2009
@@ -3,7 +3,8 @@
  import Test.HUnit
  import ShowCount

-tests = TestList["empty" ~: "0\n" @=? showLineCount "",
-                 "one" ~: "1\n" @=? showLineCount "foo\n",
-                 "many" ~: "3\n" @=? showLineCount "a\nbc\nd\n",
-                 "no trailing newline" ~: "2\n" @=? showLineCount "a\nbc"]
+tests = TestList["empty" ~: 0 @=? countLines "",
+                 "one" ~: 1 @=? countLines "foo\n",
+                 "many" ~: 3 @=? countLines "a\nbc\nd\n",
+                 "no trailing newline" ~: 2 @=? countLines "a\nbc",
+                 "show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]

==============================================================================
Revision: bab61f3c53
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:54:54 2009
Log: Whee, composition.
http://code.google.com/p/haskell-study/source/detail?r=bab61f3c53

Modified:
  /carlton/ShowCount.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 13:51:26 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 13:54:54 2009
@@ -1,5 +1,5 @@
  module ShowCount(countLines, showLineCount) where

-countLines input = length (lines input)
+countLines = length . lines

  showLineCount input = show (countLines input) ++ "\n"

==============================================================================
Revision: e542cef373
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 13:59:40 2009
Log: Extract tests into suites.
http://code.google.com/p/haskell-study/source/detail?r=e542cef373

Modified:
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 13:51:26 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 13:59:40 2009
@@ -3,8 +3,13 @@
  import Test.HUnit
  import ShowCount

-tests = TestList["empty" ~: 0 @=? countLines "",
-                 "one" ~: 1 @=? countLines "foo\n",
-                 "many" ~: 3 @=? countLines "a\nbc\nd\n",
-                 "no trailing newline" ~: 2 @=? countLines "a\nbc",
-                 "show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]
+countLinesTests =
+    TestList["empty" ~: 0 @=? countLines "",
+             "one" ~: 1 @=? countLines "foo\n",
+             "many" ~: 3 @=? countLines "a\nbc\nd\n",
+             "no trailing newline" ~: 2 @=? countLines "a\nbc"]
+
+showLineCountTests =
+    TestList["show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]
+
+tests = TestList[countLinesTests, showLineCountTests]

==============================================================================
Revision: 5c663611c9
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:02:18 2009
Log: Count words, too.
http://code.google.com/p/haskell-study/source/detail?r=5c663611c9

Modified:
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 13:54:54 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 14:02:18 2009
@@ -1,5 +1,7 @@
-module ShowCount(countLines, showLineCount) where
+module ShowCount(countLines, countWords, showLineCount) where

  countLines = length . lines

+countWords = length . words
+
  showLineCount input = show (countLines input) ++ "\n"
=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 13:59:40 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 14:02:18 2009
@@ -9,7 +9,14 @@
               "many" ~: 3 @=? countLines "a\nbc\nd\n",
               "no trailing newline" ~: 2 @=? countLines "a\nbc"]

+countWordsTests =
+    TestList["empty" ~: 0 @=? countWords "",
+             "one" ~: 1 @=? countWords "abc",
+             "two" ~: 2 @=? countWords "two words",
+             "many" ~: 5 @=? countWords "there are five words here",
+             "special chars" ~: 3 @=? countWords "a\tb\nc"]
+
  showLineCountTests =
      TestList["show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]

-tests = TestList[countLinesTests, showLineCountTests]
+tests = TestList[countLinesTests, countWordsTests, showLineCountTests]

==============================================================================
Revision: 2c06ada31e
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:04:55 2009
Log: Add countChars.
http://code.google.com/p/haskell-study/source/detail?r=2c06ada31e

Modified:
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 14:02:18 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 14:04:55 2009
@@ -1,7 +1,9 @@
-module ShowCount(countLines, countWords, showLineCount) where
+module ShowCount(countLines, countWords, countChars, showLineCount) where

  countLines = length . lines

  countWords = length . words

+countChars = length
+
  showLineCount input = show (countLines input) ++ "\n"
=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 14:02:18 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 14:04:55 2009
@@ -16,7 +16,14 @@
               "many" ~: 5 @=? countWords "there are five words here",
               "special chars" ~: 3 @=? countWords "a\tb\nc"]

+countCharsTests =
+    TestList["empty" ~: 0 @=? countChars "",
+             "one" ~: 1 @=? countChars "a",
+             "many" ~: 4 @=? countChars "four",
+             "special chars" ~: 5 @=? countChars "a\tb\nc"]
+
  showLineCountTests =
      TestList["show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]

-tests = TestList[countLinesTests, countWordsTests, showLineCountTests]
+tests = TestList[countLinesTests, countWordsTests, countCharsTests,
+                 showLineCountTests]

==============================================================================
Revision: 1075df9571
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 14:06:55 2009
Log: Let's put a more generic showCount function instead.
http://code.google.com/p/haskell-study/source/detail?r=1075df9571

Modified:
  /carlton/ShowCount.hs
  /carlton/ShowCountTest.hs

=======================================
--- /carlton/ShowCount.hs	Sat Oct 31 14:04:55 2009
+++ /carlton/ShowCount.hs	Sat Oct 31 14:06:55 2009
@@ -1,4 +1,4 @@
-module ShowCount(countLines, countWords, countChars, showLineCount) where
+module ShowCount(countLines, countWords, countChars, showCount) where

  countLines = length . lines

@@ -6,4 +6,4 @@

  countChars = length

-showLineCount input = show (countLines input) ++ "\n"
+showCount counter input = show (counter input) ++ "\n"
=======================================
--- /carlton/ShowCountTest.hs	Sat Oct 31 14:04:55 2009
+++ /carlton/ShowCountTest.hs	Sat Oct 31 14:06:55 2009
@@ -22,8 +22,8 @@
               "many" ~: 4 @=? countChars "four",
               "special chars" ~: 5 @=? countChars "a\tb\nc"]

-showLineCountTests =
-    TestList["show output" ~: "3\n" @=? showLineCount "a\nbc\nd\n"]
+showCountTests =
+    TestList["show output" ~: "3\n" @=? (showCount  
countLines) "a\nbc\nd\n"]

  tests = TestList[countLinesTests, countWordsTests, countCharsTests,
-                 showLineCountTests]
+                 showCountTests]

==============================================================================
Revision: 8becb27dc7
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:32:10 2009
Log: After more work than I would have liked, the Makefile can now build
stuff.  But I should probably have it put output somewhere else, to
not interfere with version control?
http://code.google.com/p/haskell-study/source/detail?r=8becb27dc7

Added:
  /carlton/makedepend
  /carlton/wc.hs
Modified:
  /carlton/Makefile

=======================================
--- /dev/null
+++ /carlton/makedepend	Sat Oct 31 16:32:10 2009
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Ubuntu (via Debian) still comes with GHC 6.8.2, even though there
+# are several later GHC versions.  And that GHC version only has the
+# -M flag for dependency generation, which hand-edits your Makefile.
+# Which, of course, doesn't play so well with the idea that you
+# shouldn't check generated code into source code.  Sigh.
+
+cleanup() {
+    mv Makefile-saved Makefile
+}
+
+trap cleanup EXIT
+
+mv Makefile Makefile-saved
+
+ghc -M "$@"
+
+mv Makefile programs.dep
+
+for PROGRAM_HS in "$@"; do
+    PROGRAM=$(echo ${PROGRAM_HS} | sed 's/\.hs//')
+    OBJECTS=$(grep ${PROGRAM}.o programs.dep | grep .hi | awk '{ print $3  
}' | sed 's/\.hi/.o/')
+    echo bin/${PROGRAM}: ${OBJECTS} ${PROGRAM}.o >> programs.dep
+    echo '	ghc -o $@ $^' >> programs.dep
+done
=======================================
--- /dev/null
+++ /carlton/wc.hs	Sat Oct 31 16:32:10 2009
@@ -0,0 +1,4 @@
+import ShowCount
+
+main = interact wordCount
+    where wordCount = showCount countLines
=======================================
--- /carlton/Makefile	Sat Oct 31 13:45:04 2009
+++ /carlton/Makefile	Sat Oct 31 16:32:10 2009
@@ -1,10 +1,27 @@
-default: test
+default: test programs
+
+PROGRAMS=wc

  TESTS = $(wildcard *Test.hs)

-.PHONY: $(TESTS) test default
+PROGRAM_SOURCES=$(addsuffix .hs, $(PROGRAMS))
+
+.PHONY: $(TESTS) test programs default depend

  $(TESTS): %.hs:
  	ghc -e "Test.HUnit.runTestTT $*.tests" $@

  test: $(TESTS)
+
+programs: $(PROGRAMS)
+
+# I hate separate 'make depend' steps.  Grr.
+depend:
+	./makedepend $(PROGRAM_SOURCES)
+
+%.hi: %.o ;
+
+%.o: %.hs
+	ghc -c $<
+
+-include programs.dep

==============================================================================
Revision: 8cb092d573
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:38:38 2009
Log: Move compiled programs into a build/ directory.
http://code.google.com/p/haskell-study/source/detail?r=8cb092d573

Modified:
  /.hgignore
  /carlton/Makefile
  /carlton/makedepend

=======================================
--- /.hgignore	Thu Oct 29 22:44:35 2009
+++ /.hgignore	Sat Oct 31 16:38:38 2009
@@ -1,3 +1,5 @@
  .*~$
  (^|/)\#[^/]*\#$
  (^|/).\#[^/]*$
+build/.*
+.*\.dep$
=======================================
--- /carlton/Makefile	Sat Oct 31 16:32:10 2009
+++ /carlton/Makefile	Sat Oct 31 16:38:38 2009
@@ -6,6 +6,8 @@

  PROGRAM_SOURCES=$(addsuffix .hs, $(PROGRAMS))

+PROGRAM_TARGETS=$(addprefix build/, $(PROGRAMS))
+
  .PHONY: $(TESTS) test programs default depend

  $(TESTS): %.hs:
@@ -13,7 +15,7 @@

  test: $(TESTS)

-programs: $(PROGRAMS)
+programs: $(PROGRAM_TARGETS)

  # I hate separate 'make depend' steps.  Grr.
  depend:
=======================================
--- /carlton/makedepend	Sat Oct 31 16:32:10 2009
+++ /carlton/makedepend	Sat Oct 31 16:38:38 2009
@@ -21,6 +21,6 @@
  for PROGRAM_HS in "$@"; do
      PROGRAM=$(echo ${PROGRAM_HS} | sed 's/\.hs//')
      OBJECTS=$(grep ${PROGRAM}.o programs.dep | grep .hi | awk '{ print $3  
}' | sed 's/\.hi/.o/')
-    echo bin/${PROGRAM}: ${OBJECTS} ${PROGRAM}.o >> programs.dep
+    echo build/${PROGRAM}: ${OBJECTS} ${PROGRAM}.o >> programs.dep
      echo '	ghc -o $@ $^' >> programs.dep
  done

==============================================================================
Revision: 1a31bdb1fd
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 16:56:29 2009
Log: This should put all the generated files in the build/ directory.
http://code.google.com/p/haskell-study/source/detail?r=1a31bdb1fd

Modified:
  /carlton/Makefile
  /carlton/makedepend

=======================================
--- /carlton/Makefile	Sat Oct 31 16:38:38 2009
+++ /carlton/Makefile	Sat Oct 31 16:56:29 2009
@@ -8,7 +8,7 @@

  PROGRAM_TARGETS=$(addprefix build/, $(PROGRAMS))

-.PHONY: $(TESTS) test programs default depend
+.PHONY: $(TESTS) test programs default depend clean

  $(TESTS): %.hs:
  	ghc -e "Test.HUnit.runTestTT $*.tests" $@
@@ -21,9 +21,12 @@
  depend:
  	./makedepend $(PROGRAM_SOURCES)

-%.hi: %.o ;
-
-%.o: %.hs
-	ghc -c $<
+build/%.hi: build/%.o ;
+
+build/%.o: %.hs
+	ghc -c -ibuild -o $@ -ohi $(addsuffix .hi, $(basename $@)) $<
+
+clean:
+	rm -f build/*

  -include programs.dep
=======================================
--- /carlton/makedepend	Sat Oct 31 16:38:38 2009
+++ /carlton/makedepend	Sat Oct 31 16:56:29 2009
@@ -16,11 +16,11 @@

  ghc -M "$@"

-mv Makefile programs.dep
+sed 's:\([a-zA-Z]*\.\(o\|hi\)\):build/\1:g' < Makefile > programs.dep

  for PROGRAM_HS in "$@"; do
      PROGRAM=$(echo ${PROGRAM_HS} | sed 's/\.hs//')
      OBJECTS=$(grep ${PROGRAM}.o programs.dep | grep .hi | awk '{ print $3  
}' | sed 's/\.hi/.o/')
-    echo build/${PROGRAM}: ${OBJECTS} ${PROGRAM}.o >> programs.dep
+    echo build/${PROGRAM}: ${OBJECTS} build/${PROGRAM}.o >> programs.dep
      echo '	ghc -o $@ $^' >> programs.dep
  done


From carlton@bactrian.org Sat Oct 31 19:10:03 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:52364)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N4O1D-0002cm-OW; Sat, 31 Oct 2009 19:10:03 -0500
Received: by pwj21 with SMTP id 21so1355418pwj.39
	for <multiple recipients>; Sat, 31 Oct 2009 17:09:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.118.3 with SMTP id q3mr294387wfc.248.1257034197790; Sat, 
	31 Oct 2009 17:09:57 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
Date: Sat, 31 Oct 2009 17:09:57 -0700
Message-ID: <90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=001636e0b962d471c80477441460
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:10:04 -0000

--001636e0b962d471c80477441460
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Oct 29, 2009 at 11:31 PM, Jim Blandy <jimb@red-bean.com> wrote:

> On Thu, Oct 29, 2009 at 11:18 PM, Bryan O'Sullivan <bos@serpentine.com>
> wrote:
> > You mean when pushing?
> > hg-haskell.prefix = https://hg.whatever.com/
> > hg-haskell.username = user@host.domain
> > hg-haskell.password = mypassword
>
> Yes.  Surely I'm doing something dumb, but shouldn't it not be
> prompting me here?
>
> $ hg showconfig | grep haskell-study
> auth.haskell-study.prefix=https://haskell-study.googlecode.com/
> auth.haskell-study.username=jimblandy@gmail.com<https://haskell-study.googlecode.com/%0Aauth.haskell-study.username=jimblandy@gmail.com>
> auth.haskell-study.password=<omitted>
> paths.default=https://haskell-study.googlecode.com/hg/haskell-study
> $ hg push
> pushing to https://haskell-study.googlecode.com/hg/haskell-study
> searching for changes
> http authorization required
> realm: Google Code Mercurial Repository
> user: interrupted!
> $
>
> This is with hg-stable 07a62819b309.
>

I'm having the same problem as Jim.

-- 
David Carlton
carlton@bactrian.org

--001636e0b962d471c80477441460
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 29, 2009 at 11:31 PM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"border-=
left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left=
: 1ex;">
<div class=3D"im">On Thu, Oct 29, 2009 at 11:18 PM, Bryan O&#39;Sullivan &l=
t;<a href=3D"mailto:bos@serpentine.com">bos@serpentine.com</a>&gt; wrote:<b=
r>
&gt; You mean when pushing?<br>
&gt; hg-haskell.prefix =3D <a href=3D"https://hg.whatever.com/" target=3D"_=
blank">https://hg.whatever.com/</a><br>
&gt; hg-haskell.username =3D user@host.domain<br>
&gt; hg-haskell.password =3D mypassword<br>
<br>
</div>Yes. =A0Surely I&#39;m doing something dumb, but shouldn&#39;t it not=
 be<br>
prompting me here?<br>
<br>
$ hg showconfig | grep haskell-study<br>
auth.haskell-study.prefix=3D<a href=3D"https://haskell-study.googlecode.com=
/%0Aauth.haskell-study.username=3Djimblandy@gmail.com" target=3D"_blank">ht=
tps://haskell-study.googlecode.com/<br>
auth.haskell-study.username=3Djimblandy@gmail.com</a><br>
auth.haskell-study.password=3D&lt;omitted&gt;<br>
paths.default=3D<a href=3D"https://haskell-study.googlecode.com/hg/haskell-=
study" target=3D"_blank">https://haskell-study.googlecode.com/hg/haskell-st=
udy</a><br>
$ hg push<br>
pushing to <a href=3D"https://haskell-study.googlecode.com/hg/haskell-study=
" target=3D"_blank">https://haskell-study.googlecode.com/hg/haskell-study</=
a><br>
searching for changes<br>
http authorization required<br>
realm: Google Code Mercurial Repository<br>
user: interrupted!<br>
$<br>
<br>
This is with hg-stable 07a62819b309.<br>
</blockquote></div><br>I&#39;m having the same problem as Jim.<br clear=3D"=
all"><br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">ca=
rlton@bactrian.org</a><br>

--001636e0b962d471c80477441460--


From praveen@kumar.in Sat Oct 31 19:16:22 2009
Received: from mail-yx0-f177.google.com ([209.85.210.177]:58858)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <praveen@kumar.in>)
	id 1N4O7J-0003x8-VE; Sat, 31 Oct 2009 19:16:22 -0500
Received: by yxe7 with SMTP id 7so3740169yxe.25
	for <multiple recipients>; Sat, 31 Oct 2009 17:16:16 -0700 (PDT)
Received: by 10.150.236.3 with SMTP id j3mr5730313ybh.113.1257034574787;
	Sat, 31 Oct 2009 17:16:14 -0700 (PDT)
Received: from ?192.168.0.104? ([71.202.43.0])
	by mx.google.com with ESMTPS id 4sm1607852ywg.43.2009.10.31.17.16.13
	(version=SSLv3 cipher=RC4-MD5); Sat, 31 Oct 2009 17:16:13 -0700 (PDT)
Message-ID: <4AECD34C.3000409@kumar.in>
Date: Sat, 31 Oct 2009 17:16:12 -0700
From: Praveen Kumar <praveen@kumar.in>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: David Carlton <carlton@bactrian.org>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
	<90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
In-Reply-To: <90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:16:22 -0000

David Carlton wrote:
> On Thu, Oct 29, 2009 at 11:31 PM, Jim Blandy <jimb@red-bean.com 
  >     $ hg showconfig | grep haskell-study
>     auth.haskell-study.prefix=https://haskell-study.googlecode.com/
>     auth.haskell-study.username=jimblandy@gmail.com
>     <https://haskell-study.googlecode.com/%0Aauth.haskell-study.username=jimblandy@gmail.com>
>     auth.haskell-study.password=<omitted>
>     paths.default=https://haskell-study.googlecode.com/hg/haskell-study
>     $ hg push
>     pushing to https://haskell-study.googlecode.com/hg/haskell-study
>     searching for changes
>     http authorization required
>     realm: Google Code Mercurial Repository
>     user: interrupted!
>     $
> 
>     This is with hg-stable 07a62819b309.
> 
> 
> I'm having the same problem as Jim.

Mine works fine.

$ hg showconfig | grep auth
auth.hg-haskell.prefix=https://haskell-study.googlecode.com/hg/
auth.hg-haskell.username=praveen@kumar.in
auth.hg-haskell.password=REMOVED

$ hg version
Mercurial Distributed SCM (version 1.3.1)

I think that you are using 'haskell-study' instead of hg-haskell.

-- 
Praveen Kumar
http://praveen.kumar.in/


From carlton@bactrian.org Sat Oct 31 19:20:51 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:60497)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N4OBe-0006nC-VH
	for haskell-study@red-bean.com; Sat, 31 Oct 2009 19:20:51 -0500
Received: by pzk4 with SMTP id 4so2770822pzk.32
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 17:20:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.154.2 with SMTP id g2mr348165wfo.18.1257034844060; Sat, 31 
	Oct 2009 17:20:44 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <001636e90b7a72c94304774413a2@google.com>
References: <001636e90b7a72c94304774413a2@google.com>
Date: Sat, 31 Oct 2009 17:20:44 -0700
Message-ID: <90804c6f0910311720i3cfa2c39n2a16f70aedd94d75@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=001636e0a6c059c50b0477443bcf
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] [haskell-study] 11 new revisions pushed by
	carl...@bactrian.org on 2009-11-01 00:09 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:20:51 -0000

--001636e0a6c059c50b0477443bcf
Content-Type: text/plain; charset=ISO-8859-1

I was going to ask if Mercurial has some analogue to git rebase
--interactive; googling suggests that hg rebase exists, though (e.g. <
http://seanerussell.blogspot.com/2009/07/mercurial-rebase.html>), but that
it isn't supported with hg 1.1, which is what comes with  Ubuntu 9.4.

Fortunately, Ubuntu 9.10 comes with hg 1.3 (as well as ghc 6.10, which would
have solved another headache); guess I should go upgrade to that.

(And no, for people following the details of that patch sequence, I don't
usually write unit tests for functions as trivial as "countChars = length",
I mostly just wanted to have a testing framework in place for when things
get a tiny bit more complicated.)

-- 
David Carlton
carlton@bactrian.org

--001636e0a6c059c50b0477443bcf
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I was going to ask if Mercurial has some analogue to git rebase --interacti=
ve; googling suggests that hg rebase exists, though (e.g. &lt;<a href=3D"ht=
tp://seanerussell.blogspot.com/2009/07/mercurial-rebase.html">http://seaner=
ussell.blogspot.com/2009/07/mercurial-rebase.html</a>&gt;), but that it isn=
&#39;t supported with hg 1.1, which is what comes with=A0 Ubuntu 9.4.<br>
<br>Fortunately, Ubuntu 9.10 comes with hg 1.3 (as well as ghc 6.10, which =
would have solved another headache); guess I should go upgrade to that.<br>=
<br>(And no, for people following the details of that patch sequence, I don=
&#39;t usually write unit tests for functions as trivial as &quot;countChar=
s =3D length&quot;, I mostly just wanted to have a testing framework in pla=
ce for when things get a tiny bit more complicated.)<br clear=3D"all">
<br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton=
@bactrian.org</a><br>

--001636e0a6c059c50b0477443bcf--


From carlton@bactrian.org Sat Oct 31 19:25:20 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:35995)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N4OG0-00008E-4X; Sat, 31 Oct 2009 19:25:20 -0500
Received: by pzk4 with SMTP id 4so2771856pzk.32
	for <multiple recipients>; Sat, 31 Oct 2009 17:25:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.60.18 with SMTP id i18mr305187wfa.111.1257035114054; Sat, 
	31 Oct 2009 17:25:14 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <4AECD34C.3000409@kumar.in>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
	<90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
	<4AECD34C.3000409@kumar.in>
Date: Sat, 31 Oct 2009 17:25:14 -0700
Message-ID: <90804c6f0910311725p5122c826k68f72ed0c0d7d898@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Praveen Kumar <praveen@kumar.in>
Content-Type: multipart/alternative; boundary=00504502ad2071839f0477444b9c
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:25:20 -0000

--00504502ad2071839f0477444b9c
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Oct 31, 2009 at 5:16 PM, Praveen Kumar <praveen@kumar.in> wrote:
>
>
> Mine works fine.
>
> $ hg showconfig | grep auth
> auth.hg-haskell.prefix=https://haskell-study.googlecode.com/hg/
> auth.hg-haskell.username=praveen@kumar.in
> auth.hg-haskell.password=REMOVED
>
> $ hg version
> Mercurial Distributed SCM (version 1.3.1)
>
> I think that you are using 'haskell-study' instead of hg-haskell.
>

I think that's an arbitrary token? But I'm using an old haskell version, and
looking at the local hgrc man page, I don't see the auth section, so maybe
that's the issue.  I'll go do an OS upgrade now...

-- 
David Carlton
carlton@bactrian.org

--00504502ad2071839f0477444b9c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Oct 31, 2009 at 5:16 PM, Praveen Kumar <=
span dir=3D"ltr">&lt;<a href=3D"mailto:praveen@kumar.in">praveen@kumar.in</=
a>&gt;</span> wrote:<blockquote class=3D"gmail_quote" style=3D"border-left:=
 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex=
;">
<br>
Mine works fine.<br>
<br>
$ hg showconfig | grep auth<br>
auth.hg-haskell.prefix=3D<a href=3D"https://haskell-study.googlecode.com/hg=
/" target=3D"_blank">https://haskell-study.googlecode.com/hg/</a><br>
auth.hg-haskell.username=3D<a href=3D"mailto:praveen@kumar.in" target=3D"_b=
lank">praveen@kumar.in</a><br>
auth.hg-haskell.password=3DREMOVED<br>
<br>
$ hg version<br>
Mercurial Distributed SCM (version 1.3.1)<br>
<br>
I think that you are using &#39;haskell-study&#39; instead of hg-haskell.=
=A0<br></blockquote><div><br>I think that&#39;s an arbitrary token? But I&#=
39;m using an old haskell version, and looking at the local hgrc man page, =
I don&#39;t see the auth section, so maybe that&#39;s the issue.=A0 I&#39;l=
l go do an OS upgrade now...<br clear=3D"all">
</div></div><br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.=
org">carlton@bactrian.org</a><br>

--00504502ad2071839f0477444b9c--


From carlton@bactrian.org Sat Oct 31 19:25:54 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:56835)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N4OGY-0001dG-JS; Sat, 31 Oct 2009 19:25:54 -0500
Received: by pxi10 with SMTP id 10so2722054pxi.33
	for <multiple recipients>; Sat, 31 Oct 2009 17:25:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.143.138.4 with SMTP id q4mr366167wfn.38.1257035148794; Sat, 31 
	Oct 2009 17:25:48 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <90804c6f0910311725p5122c826k68f72ed0c0d7d898@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
	<90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
	<4AECD34C.3000409@kumar.in>
	<90804c6f0910311725p5122c826k68f72ed0c0d7d898@mail.gmail.com>
Date: Sat, 31 Oct 2009 17:25:48 -0700
Message-ID: <90804c6f0910311725s245675ffg62409ab5091bdc8c@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Praveen Kumar <praveen@kumar.in>
Content-Type: multipart/alternative; boundary=000e0cd5f6dc839cf80477444da2
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 00:25:54 -0000

--000e0cd5f6dc839cf80477444da2
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Oct 31, 2009 at 5:25 PM, David Carlton <carlton@bactrian.org> wrote:

> On Sat, Oct 31, 2009 at 5:16 PM, Praveen Kumar <praveen@kumar.in> wrote:
>>
>>
>> Mine works fine.
>>
>> $ hg showconfig | grep auth
>> auth.hg-haskell.prefix=https://haskell-study.googlecode.com/hg/
>> auth.hg-haskell.username=praveen@kumar.in
>> auth.hg-haskell.password=REMOVED
>>
>> $ hg version
>> Mercurial Distributed SCM (version 1.3.1)
>>
>> I think that you are using 'haskell-study' instead of hg-haskell.
>>
>
> I think that's an arbitrary token? But I'm using an old haskell version,
> and looking at the local hgrc man page, I don't see the auth section, so
> maybe that's the issue.  I'll go do an OS upgrade now...
>

An old HG version.  (Though I am using an old ghc version, too.  But that
doesn't cause this problem!)

-- 
David Carlton
carlton@bactrian.org

--000e0cd5f6dc839cf80477444da2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sat, Oct 31, 2009 at 5:25 PM, David C=
arlton <span dir=3D"ltr">&lt;<a href=3D"mailto:carlton@bactrian.org">carlto=
n@bactrian.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8e=
x; padding-left: 1ex;">
<div class=3D"gmail_quote"><div class=3D"im">On Sat, Oct 31, 2009 at 5:16 P=
M, Praveen Kumar <span dir=3D"ltr">&lt;<a href=3D"mailto:praveen@kumar.in" =
target=3D"_blank">praveen@kumar.in</a>&gt;</span> wrote:<blockquote class=
=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin=
: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Mine works fine.<br>
<br>
$ hg showconfig | grep auth<br>
auth.hg-haskell.prefix=3D<a href=3D"https://haskell-study.googlecode.com/hg=
/" target=3D"_blank">https://haskell-study.googlecode.com/hg/</a><br>
auth.hg-haskell.username=3D<a href=3D"mailto:praveen@kumar.in" target=3D"_b=
lank">praveen@kumar.in</a><br>
auth.hg-haskell.password=3DREMOVED<br>
<br>
$ hg version<br>
Mercurial Distributed SCM (version 1.3.1)<br>
<br>
I think that you are using &#39;haskell-study&#39; instead of hg-haskell.=
=A0<br></blockquote></div><div><br>I think that&#39;s an arbitrary token? B=
ut I&#39;m using an old haskell version, and looking at the local hgrc man =
page, I don&#39;t see the auth section, so maybe that&#39;s the issue.=A0 I=
&#39;ll go do an OS upgrade now...<br clear=3D"all">

</div></div></blockquote><div><br>An old HG version.=A0 (Though I am using =
an old ghc version, too.=A0 But that doesn&#39;t cause this problem!)<br cl=
ear=3D"all"></div></div><br>-- <br>David Carlton<br><a href=3D"mailto:carlt=
on@bactrian.org">carlton@bactrian.org</a><br>


--000e0cd5f6dc839cf80477444da2--


From 3xwHtSg0OAAEibtlfmm-tuvezhpphmfdpef.dpn@codesite.bounces.google.com Sat Oct 31 22:34:37 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:35526)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3xwHtSg0OAAEibtlfmm-tuvezhpphmfdpef.dpn@codesite.bounces.google.com>)
	id 1N4RDB-0001y3-Jf
	for haskell-study@red-bean.com; Sat, 31 Oct 2009 22:34:37 -0500
Received: by pzk24 with SMTP id 24so8384pzk.7
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 20:34:31 -0700 (PDT)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.114.6 with SMTP id r6mr596674wam.10.1257046471833; Sat, 31 
	Oct 2009 20:34:31 -0700 (PDT)
Message-ID: <0016e64eeca66b78eb047746f0f2@google.com>
Date: Sun, 01 Nov 2009 03:34:31 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org -
	Remove README file. on 2009-11-01 03:33 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 03:34:37 -0000

Revision: 057882e517
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 17:22:57 2009
Log: Remove README file.
http://code.google.com/p/haskell-study/source/detail?r=057882e517

Deleted:
  /carlton/README

=======================================
--- /carlton/README	Thu Oct 29 21:45:21 2009
+++ /dev/null
@@ -1,1 +0,0 @@
-Just creating something trivial to make sure hg pushing is working.


From carlton@bactrian.org Sat Oct 31 22:37:23 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:56310)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N4RFr-0004m2-4y; Sat, 31 Oct 2009 22:37:23 -0500
Received: by pzk4 with SMTP id 4so2816664pzk.32
	for <multiple recipients>; Sat, 31 Oct 2009 20:37:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.4.41 with SMTP id 41mr349901wfd.123.1257046637513; Sat, 31 
	Oct 2009 20:37:17 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <4AECD34C.3000409@kumar.in>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910292151y4657b407p565c199f4a4852d2@mail.gmail.com>
	<8f2776cb0910292310q70a0710bkf264abc1fe6927df@mail.gmail.com>
	<c290c4f20910292318o7d008dd0t2f65e4eeab072c92@mail.gmail.com>
	<8f2776cb0910292331i4fab4dd4x9a30d76af8b0c0b4@mail.gmail.com>
	<90804c6f0910311709w364139b6w55c54d566822c80b@mail.gmail.com>
	<4AECD34C.3000409@kumar.in>
Date: Sat, 31 Oct 2009 20:37:17 -0700
Message-ID: <90804c6f0910312037g4c853b20i2bf486e8169405e2@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Praveen Kumar <praveen@kumar.in>
Content-Type: multipart/alternative; boundary=00504502b4434b8c87047746fa61
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 03:37:23 -0000

--00504502b4434b8c87047746fa61
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Oct 31, 2009 at 5:16 PM, Praveen Kumar <praveen@kumar.in> wrote:

>
> Mine works fine.
> ...
> $ hg version
> Mercurial Distributed SCM (version 1.3.1)
>

That was the trick; Jim, you might want to consider upgrading hg versions,
too.  (This is what happens when one gets in the habit of googling for man
pages instead of reading them locally!)

-- 
David Carlton
carlton@bactrian.org

--00504502b4434b8c87047746fa61
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 31, 2009 at 5:16 PM, Praveen Kumar <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:praveen@kumar.in">praveen@kumar.in</a>&gt;</span> wrote:<br><di=
v class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"border-l=
eft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:=
 1ex;">
<br>
Mine works fine.<br>
...<br>
$ hg version<br>
Mercurial Distributed SCM (version 1.3.1)<br></blockquote><div><br>That was=
 the trick; Jim, you might want to consider upgrading hg versions, too.=A0 =
(This is what happens when one gets in the habit of googling for man pages =
instead of reading them locally!) <br>
</div></div><br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.=
org">carlton@bactrian.org</a><br>

--00504502b4434b8c87047746fa61--


From 3bwftSg0OAK4VOgYSZZ-ghiRmUccUZSQcRS.Qca@codesite.bounces.google.com Sat Oct 31 22:58:45 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:48134)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3bwftSg0OAK4VOgYSZZ-ghiRmUccUZSQcRS.Qca@codesite.bounces.google.com>)
	id 1N4RaX-0001nF-8H
	for haskell-study@red-bean.com; Sat, 31 Oct 2009 22:58:45 -0500
Received: by pzk24 with SMTP id 24so8390pzk.7
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 20:58:39 -0700 (PDT)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.24.2 with SMTP id b2mr598067waj.6.1257047919632; Sat, 31 
	Oct 2009 20:58:39 -0700 (PDT)
Message-ID: <00163646b93ab726c6047747463f@google.com>
Date: Sun, 01 Nov 2009 03:58:39 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org -
	makedepend can now take advantage of ghc -dep-makefile. on
	2009-11-01 03:57 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 03:58:45 -0000

Revision: c8a82ce698
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 20:57:45 2009
Log: makedepend can now take advantage of ghc -dep-makefile.
http://code.google.com/p/haskell-study/source/detail?r=c8a82ce698

Modified:
  /carlton/makedepend

=======================================
--- /carlton/makedepend	Sat Oct 31 16:56:29 2009
+++ /carlton/makedepend	Sat Oct 31 20:57:45 2009
@@ -1,22 +1,12 @@
  #!/bin/bash

-# Ubuntu (via Debian) still comes with GHC 6.8.2, even though there
-# are several later GHC versions.  And that GHC version only has the
-# -M flag for dependency generation, which hand-edits your Makefile.
-# Which, of course, doesn't play so well with the idea that you
-# shouldn't check generated code into source code.  Sigh.
-
-cleanup() {
-    mv Makefile-saved Makefile
-}
-
-trap cleanup EXIT
-
-mv Makefile Makefile-saved
-
-ghc -M "$@"
-
-sed 's:\([a-zA-Z]*\.\(o\|hi\)\):build/\1:g' < Makefile > programs.dep
+set -e
+
+rm -f programs.dep
+
+ghc -M -dep-makefile programs.dep "$@"
+
+sed -i 's:\([a-zA-Z]*\.\(o\|hi\)\):build/\1:g' programs.dep

  for PROGRAM_HS in "$@"; do
      PROGRAM=$(echo ${PROGRAM_HS} | sed 's/\.hs//')


From 32hXtSg0OACgLEWOIPP-WXYHcKSSKPIGSHI.GSQ@codesite.bounces.google.com Sun Nov 01 00:00:16 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:51148)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<32hXtSg0OACgLEWOIPP-WXYHcKSSKPIGSHI.GSQ@codesite.bounces.google.com>)
	id 1N4SY4-000470-EK
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 00:00:16 -0500
Received: by pzk24 with SMTP id 24so8422pzk.7
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 22:00:10 -0700 (PDT)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.75.18 with SMTP id x18mr456227wfa.18.1257051610759; Sat, 
	31 Oct 2009 22:00:10 -0700 (PDT)
Message-ID: <001636e1fb23b9432804774822c7@google.com>
Date: Sun, 01 Nov 2009 05:00:10 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - Make
	wc more flexible. I was surprised to see the way command
	line... on 2009-11-01 04:59 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 05:00:16 -0000

Revision: d8a3de53b4
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Oct 31 21:58:53 2009
Log: Make wc more flexible.  I was surprised to see the way command line
args were handled - why not have them be arguments to main, like in
other languages?
http://code.google.com/p/haskell-study/source/detail?r=d8a3de53b4

Modified:
  /carlton/wc.hs

=======================================
--- /carlton/wc.hs	Sat Oct 31 16:32:10 2009
+++ /carlton/wc.hs	Sat Oct 31 21:58:53 2009
@@ -1,4 +1,10 @@
  import ShowCount
-
-main = interact wordCount
-    where wordCount = showCount countLines
+import System
+
+main = do
+  args <- getArgs
+  interact (showCount (counter args))
+      where counter [] = countLines
+            counter ["-l"] = countLines
+            counter ["-w"] = countWords
+            counter ["-c"] = countChars


From carlton@bactrian.org Sun Nov 01 00:05:03 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:34165)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N4Sch-0000s1-JN
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 00:05:03 -0500
Received: by pzk4 with SMTP id 4so2836638pzk.32
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 22:04:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.250.41 with SMTP id x41mr319166wfh.42.1257051897881; Sat, 
	31 Oct 2009 22:04:57 -0700 (PDT)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <00504502e9a66c84d30477298a42@google.com>
References: <00504502e9a66c84d30477298a42@google.com>
Date: Sat, 31 Oct 2009 22:04:57 -0700
Message-ID: <90804c6f0910312204v2b1bc3e9v79199f89a94ffd65@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=001636ed657ed666bd0477483323
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] [haskell-study] 2 new revisions pushed by
	prav...@kumar.in on 2009-10-30 16:28 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 05:05:03 -0000

--001636ed657ed666bd0477483323
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 30, 2009 at 9:30 AM, <haskell-study@googlecode.com> wrote:

> +main = interact wordCount
> +       where wordCount input = show (length (lines input)) ++ ' ' :
> +                               show (length (words input)) ++ ' ' :
> +                               show (length input) ++ "\n"
>

Interesting - it took me a little while to understand why that combination
of : and ++ compiled and did the right thing.  I wonder if that's a standard
idiom for writing that sort of formatted output?

-- 
David Carlton
carlton@bactrian.org

--001636ed657ed666bd0477483323
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 30, 2009 at 9:30 AM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:h=
askell-study@googlecode.com">haskell-study@googlecode.com</a>&gt;</span> wr=
ote:<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

+main =3D interact wordCount<br>
+ =A0 =A0 =A0 where wordCount input =3D show (length (lines input)) ++ &#39=
; &#39; :<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 show (length =
(words input)) ++ &#39; &#39; :<br>
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 show (length =
input) ++ &quot;\n&quot;<br></blockquote><div><br></div><div>Interesting - =
it took me a little while to understand why that combination of : and ++ co=
mpiled and did the right thing. =A0I wonder if that&#39;s a standard idiom =
for writing that sort of formatted output?</div>
<div><br></div></div>-- <br>David Carlton<br><a href=3D"mailto:carlton@bact=
rian.org">carlton@bactrian.org</a><br>

--001636ed657ed666bd0477483323--


From praveen@kumar.in Sun Nov 01 01:49:04 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:54862)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <praveen@kumar.in>) id 1N4UFM-00038T-6l
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 01:49:04 -0500
Received: by pzk4 with SMTP id 4so2860124pzk.32
	for <haskell-study@red-bean.com>; Sat, 31 Oct 2009 23:48:58 -0700 (PDT)
Received: by 10.114.19.30 with SMTP id 30mr4750445was.134.1257058137708;
	Sat, 31 Oct 2009 23:48:57 -0700 (PDT)
Received: from ?192.168.0.104? ([71.202.43.0])
	by mx.google.com with ESMTPS id 22sm1429284pxi.6.2009.10.31.23.48.56
	(version=SSLv3 cipher=RC4-MD5); Sat, 31 Oct 2009 23:48:56 -0700 (PDT)
Message-ID: <4AED2F57.2040405@kumar.in>
Date: Sat, 31 Oct 2009 23:48:55 -0700
From: Praveen Kumar <praveen@kumar.in>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: David Carlton <carlton@bactrian.org>
References: <00504502e9a66c84d30477298a42@google.com>
	<90804c6f0910312204v2b1bc3e9v79199f89a94ffd65@mail.gmail.com>
In-Reply-To: <90804c6f0910312204v2b1bc3e9v79199f89a94ffd65@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] [haskell-study] 2 new revisions pushed by
 prav...@kumar.in on 2009-10-30 16:28 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 06:49:04 -0000

David Carlton wrote:
> On Fri, Oct 30, 2009 at 9:30 AM, <haskell-study@googlecode.com 
> <mailto:haskell-study@googlecode.com>> wrote:
> 
>     +main = interact wordCount
>     +       where wordCount input = show (length (lines input)) ++ ' ' :
>     +                               show (length (words input)) ++ ' ' :
>     +                               show (length input) ++ "\n"
> 
> 
> Interesting - it took me a little while to understand why that 
> combination of : and ++ compiled and did the right thing.  I wonder if 
> that's a standard idiom for writing that sort of formatted output?

I initially had it as the following.

++ " " ++

However, I just wanted to put the cons operator (:) that I learned in 
chapter 1 to use. I am not sure if that's a standard idiom though!

-- 
Praveen Kumar
http://praveen.kumar.in/


From maxb@f2s.com Sun Nov 01 12:05:01 2009
Received: from jabberwock.vm.bytemark.co.uk ([80.68.92.224]:38717)
	by sanpietro.red-bean.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69) (envelope-from <maxb@f2s.com>) id 1N4enV-0001Dn-0o
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 12:05:01 -0600
Received: from i-195-137-12-32.freedom2surf.net ([195.137.12.32]
	helo=[172.31.4.105])
	by jabberwock.vm.bytemark.co.uk with esmtpsa (plain_server:maxb)
	(TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1N4enR-0005Ev-UK (Exim 4.69)
	(return-path <maxb@f2s.com>); Sun, 01 Nov 2009 18:04:58 +0000
Message-ID: <4AEDCDC0.80901@f2s.com>
Date: Sun, 01 Nov 2009 18:04:48 +0000
From: Max Bowsher <maxb@f2s.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.7.12) Gecko/20050923 Thunderbird/1.0.7
MIME-Version: 1.0
To: David Carlton <carlton@bactrian.org>
References: <001636e90b7a72c94304774413a2@google.com>
	<90804c6f0910311720i3cfa2c39n2a16f70aedd94d75@mail.gmail.com>
In-Reply-To: <90804c6f0910311720i3cfa2c39n2a16f70aedd94d75@mail.gmail.com>
X-Enigmail-Version: 0.95.7
OpenPGP: id=C0F2C580
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enigE863352A49188C69AD729ACC"
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] [haskell-study] 11 new revisions pushed
 by	carl...@bactrian.org on 2009-11-01 00:09 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 18:05:01 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE863352A49188C69AD729ACC
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

David Carlton wrote:
> I was going to ask if Mercurial has some analogue to git rebase
> --interactive; googling suggests that hg rebase exists, though (e.g.
> <http://seanerussell.blogspot.com/2009/07/mercurial-rebase.html>), but
> that it isn't supported with hg 1.1, which is what comes with  Ubuntu 9=
=2E4.
>=20
> Fortunately, Ubuntu 9.10 comes with hg 1.3 (as well as ghc 6.10, which
> would have solved another headache); guess I should go upgrade to that.=


Or, there's https://launchpad.net/~mercurial-ppa, wherein you can get
the latest Mercurial release, or latest daily snapshot of the main or
stable branches, fed to you via apt, for Hardy through Karmic.

Max.


--------------enigE863352A49188C69AD729ACC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrtzcgACgkQfFNSmcDyxYAHBACg0WyvcRBq7ZgwHKNI/4UrVhRS
tM0Anjzx89pNjEvp8NFYmudzZCs+e/iD
=kr9H
-----END PGP SIGNATURE-----

--------------enigE863352A49188C69AD729ACC--


From carlton@bactrian.org Sun Nov 01 12:09:36 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:63352)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N4erw-0003ZN-3a
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 12:09:36 -0600
Received: by pzk4 with SMTP id 4so3036573pzk.32
	for <haskell-study@red-bean.com>; Sun, 01 Nov 2009 10:09:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.27.39 with SMTP id e39mr393826wfj.212.1257098969980; Sun, 
	01 Nov 2009 10:09:29 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <4AEDCDC0.80901@f2s.com>
References: <001636e90b7a72c94304774413a2@google.com>
	<90804c6f0910311720i3cfa2c39n2a16f70aedd94d75@mail.gmail.com>
	<4AEDCDC0.80901@f2s.com>
Date: Sun, 1 Nov 2009 10:09:29 -0800
Message-ID: <90804c6f0911011009i40b0af56yf44381d379178255@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Max Bowsher <maxb@f2s.com>
Content-Type: multipart/alternative; boundary=001636e1f77f8d9faa0477532907
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] [haskell-study] 11 new revisions pushed by
	carl...@bactrian.org on 2009-11-01 00:09 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 18:09:36 -0000

--001636e1f77f8d9faa0477532907
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Nov 1, 2009 at 10:04 AM, Max Bowsher <maxb@f2s.com> wrote:

> David Carlton wrote:
> > I was going to ask if Mercurial has some analogue to git rebase
> > --interactive; googling suggests that hg rebase exists, though (e.g.
> > <http://seanerussell.blogspot.com/2009/07/mercurial-rebase.html>), but
> > that it isn't supported with hg 1.1, which is what comes with  Ubuntu
> 9.4.
> >
> > Fortunately, Ubuntu 9.10 comes with hg 1.3 (as well as ghc 6.10, which
> > would have solved another headache); guess I should go upgrade to that.
>
> Or, there's https://launchpad.net/~mercurial-ppa<https://launchpad.net/%7Emercurial-ppa>,
> wherein you can get
> the latest Mercurial release, or latest daily snapshot of the main or
> stable branches, fed to you via apt, for Hardy through Karmic.
>

Ah, thanks for the suggestion.

-- 
David Carlton
carlton@bactrian.org

--001636e1f77f8d9faa0477532907
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Nov 1, 2009 at 10:04 AM, Max Bowsher <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:maxb@f2s.com">maxb@f2s.com</a>&gt;</sp=
an> wrote:<br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px s=
olid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class=3D"im">David Carlton wrote:<br>
&gt; I was going to ask if Mercurial has some analogue to git rebase<br>
&gt; --interactive; googling suggests that hg rebase exists, though (e.g.<b=
r>
&gt; &lt;<a href=3D"http://seanerussell.blogspot.com/2009/07/mercurial-reba=
se.html" target=3D"_blank">http://seanerussell.blogspot.com/2009/07/mercuri=
al-rebase.html</a>&gt;), but<br>
&gt; that it isn&#39;t supported with hg 1.1, which is what comes with =A0U=
buntu 9.4.<br>
&gt;<br>
&gt; Fortunately, Ubuntu 9.10 comes with hg 1.3 (as well as ghc 6.10, which=
<br>
&gt; would have solved another headache); guess I should go upgrade to that=
.<br>
<br>
</div>Or, there&#39;s <a href=3D"https://launchpad.net/%7Emercurial-ppa" ta=
rget=3D"_blank">https://launchpad.net/~mercurial-ppa</a>, wherein you can g=
et<br>
the latest Mercurial release, or latest daily snapshot of the main or<br>
stable branches, fed to you via apt, for Hardy through Karmic.<br>
</blockquote><div>=A0</div></div>Ah, thanks for the suggestion.<br><br>-- <=
br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton@bactria=
n.org</a><br>

--001636e1f77f8d9faa0477532907--


From 3-BPuSg0OAEUohzrlss-z01k5nvvnsljvkl.jvt@codesite.bounces.google.com Sun Nov 01 17:04:30 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:34022)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3-BPuSg0OAEUohzrlss-z01k5nvvnsljvkl.jvt@codesite.bounces.google.com>)
	id 1N4jTK-000868-Bb
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 17:04:30 -0600
Received: by pzk24 with SMTP id 24so9536pzk.7
	for <haskell-study@red-bean.com>; Sun, 01 Nov 2009 15:04:24 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.141.33.20 with SMTP id l20mr782852rvj.14.1257116664651; Sun, 
	01 Nov 2009 15:04:24 -0800 (PST)
Message-ID: <000e0cd1476c3ce31a0477574833@google.com>
Date: Sun, 01 Nov 2009 23:04:24 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [wiki.haskell-study] push by - Initial version of a
	page we can link to in the "welcome to the group"... on
	2009-11-01 23:03 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 23:04:30 -0000

Revision: a89925a4b4
Author: carlton@bactrian.org
Date: Sun Nov  1 15:03:33 2009
Log: Initial version of a page we can link to in the "welcome to the group"  
e-mail.
http://code.google.com/p/haskell-study/source/detail?repo=wiki&r=a89925a4b4

Added:
  /Welcome.wiki

=======================================
--- /dev/null
+++ /Welcome.wiki	Sun Nov  1 15:03:33 2009
@@ -0,0 +1,20 @@
+#summary Welcome to the haskell-study mailing list
+
+= Introduction =
+
+Welcome to the haskell-study mailing list, a group dedicated to reading  
through the book _Real World Haskell_, by Bryan O'Sullivan, Don Stewart,  
and John Goerzen.  Feel free to send a message to the mailing list  
introducing yourself.
+
+= Code repository =
+
+We've created a [http://code.google.com/p/haskell-study code repository]  
for the mailing list; we encourage participants to use it to share their  
answers to the exercises and other bits of code that others might find  
interesting.  You can check out a copy of the repository by doing the  
following:
+{{{
+hg clone https://haskell-study.googlecode.com/hg/haskell-study
+}}}
+
+To get write access to the repository, send your google account name to  
Ben Collins-Sussman.  (FIXME: How to contact Ben?  Put his e-mail here?   
Have people include their google account name in their introductory  
e-mail?  Something else?)  Once he's added you as a commiter, you'll see  
your name on the right side of the project page; you can get the password  
to use when commiting by clicking on your name and going to your Settings  
tab.
+
+= Useful Links =
+
+  * The book is [http://book.realworldhaskell.org/ available online],  
though we certainly encourage participants to buy a copy.
+  * [http://www.haskell.org/ The official Haskell web site.]
+  * [http://hgbook.red-bean.com/ Mercurial: The Definitive Guide], if  
you're not familiar with hg.


From carlton@bactrian.org Sun Nov 01 17:08:23 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:41321)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N4jX5-0002On-Dg; Sun, 01 Nov 2009 17:08:23 -0600
Received: by pwj21 with SMTP id 21so1665506pwj.39
	for <multiple recipients>; Sun, 01 Nov 2009 15:08:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.59.6 with SMTP id h6mr376928wfa.25.1257116897722; Sun, 01 
	Nov 2009 15:08:17 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <90804c6f0910301154q3400e493t72afe086453e0e96@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910301154q3400e493t72afe086453e0e96@mail.gmail.com>
Date: Sun, 1 Nov 2009 15:08:17 -0800
Message-ID: <90804c6f0911011508j4171a402ua9221802ad972c97@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com, Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502aeeb21412904775756a0
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 01 Nov 2009 23:08:23 -0000

--00504502aeeb21412904775756a0
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 30, 2009 at 10:54 AM, David Carlton <carlton@bactrian.org>wrote:

> Hmm, I guess we should put this on a wiki page and add a link to that wiki
> page in a welcome e-mail?  I'll do that over the weekend some time.
>

 I put up a wiki page telling people how to access the code repository at <
http://code.google.com/p/haskell-study/wiki/Welcome> - feel free to edit it
/ move stuff to other pages / whatever as y'all see fit.

One unresolved question: Ben, can you update the page for how people should
get your their google account?

Thanks,
David Carlton
carlton@bactrian.org

--00504502aeeb21412904775756a0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 30, 2009 at 10:54 AM, David Carlton <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a>&gt;</span> wrot=
e:<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Hmm, I guess we should put this on a wiki page and add a link to that =
wiki page in a welcome e-mail? =A0I&#39;ll do that over the weekend some ti=
me.<br></div></blockquote><div><br></div><div>=A0I put up a wiki page telli=
ng people how to access the code repository at &lt;<a href=3D"http://code.g=
oogle.com/p/haskell-study/wiki/Welcome">http://code.google.com/p/haskell-st=
udy/wiki/Welcome</a>&gt; - feel free to edit it / move stuff to other pages=
 / whatever as y&#39;all see fit.</div>
<div><br></div><div>One unresolved question: Ben, can you update the page f=
or how people should get your their google account?</div></div><br>Thanks,<=
br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton@bactria=
n.org</a><br>


--00504502aeeb21412904775756a0--


From 3tDnuSg0OACcKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com Sun Nov 01 19:45:30 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:36169)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3tDnuSg0OACcKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com>)
	id 1N4lz8-0006iK-DD
	for haskell-study@red-bean.com; Sun, 01 Nov 2009 19:45:30 -0600
Received: by pzk24 with SMTP id 24so10301pzk.7
	for <haskell-study@red-bean.com>; Sun, 01 Nov 2009 17:45:24 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.134.11 with SMTP id l11mr795258wan.2.1257126324655; Sun, 
	01 Nov 2009 17:45:24 -0800 (PST)
Message-ID: <0016e64be58004d79204775988a0@google.com>
Date: Mon, 02 Nov 2009 01:45:24 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [wiki.haskell-study] push by - Edited wiki page
	through web user interface. on 2009-11-02 01:44 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 02 Nov 2009 01:45:30 -0000

Revision: b19822bed6
Author: sussman
Date: Sun Nov  1 17:44:53 2009
Log: Edited wiki page through web user interface.
http://code.google.com/p/haskell-study/source/detail?repo=wiki&r=b19822bed6

Modified:
  /Welcome.wiki

=======================================
--- /Welcome.wiki	Sun Nov  1 15:03:33 2009
+++ /Welcome.wiki	Sun Nov  1 17:44:53 2009
@@ -1,4 +1,5 @@
  #summary Welcome to the haskell-study mailing list
+#labels Featured

  = Introduction =



From sussman@gmail.com Mon Nov 02 13:00:45 2009
Received: from mail-vw0-f183.google.com ([209.85.212.183]:55950)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <sussman@gmail.com>) id 1N528z-0003J2-RA
	for haskell-study@red-bean.com; Mon, 02 Nov 2009 13:00:45 -0600
Received: by vws13 with SMTP id 13so1418387vws.25
	for <haskell-study@red-bean.com>; Mon, 02 Nov 2009 11:00:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=nzcsuy3Seh610uY8pJs5FbYpgqWL8JjvjIM8wZrM3Zs=;
	b=bg/tBwYizsTms7Bv1CB+YKMqCsbvDK4QQv7x9jqYl7j0lqo5bfgr/9SzWPh46qqtm6
	IPGnBcpdvLbsBst460IZHLnQNvlfk7+7DTRqdocCPD3y6pWYon8A8Q3MnDIQ8SRwQGy9
	zNq+6YMRKeKDJr9u8LPHtNP7/zeoQ2IDDr9oI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=St/Nd0UandOFdWg9VagzE7s0STqlKeLHljRj1GOmylF9BHkcdi8rRmJpeuak5sMWDa
	f2cGBRJaE9bKZK/i4ZPJkjBCGfv9AuALqnXxNEOVWFT4hPUkzOCqfB63fKq7WD3ihFSv
	DmAbRnMi9qoEsbi3eLqTujVh1ch4VetvPgkAk=
MIME-Version: 1.0
Sender: sussman@gmail.com
Received: by 10.220.123.32 with SMTP id n32mr5497048vcr.48.1257188440217; Mon, 
	02 Nov 2009 11:00:40 -0800 (PST)
In-Reply-To: <90804c6f0911011508j4171a402ua9221802ad972c97@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910301154q3400e493t72afe086453e0e96@mail.gmail.com>
	<90804c6f0911011508j4171a402ua9221802ad972c97@mail.gmail.com>
Date: Mon, 2 Nov 2009 13:00:40 -0600
X-Google-Sender-Auth: 95a6b271b61072af
Message-ID: <53c059c90911021100k2abd7c6epb815ae9013aa100f@mail.gmail.com>
From: Ben Collins-Sussman <sussman@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 02 Nov 2009 19:00:46 -0000

On Sun, Nov 1, 2009 at 5:08 PM, David Carlton <carlton@bactrian.org> wrote:
> On Fri, Oct 30, 2009 at 10:54 AM, David Carlton <carlton@bactrian.org>
> wrote:
>>
>> Hmm, I guess we should put this on a wiki page and add a link to that wi=
ki
>> page in a welcome e-mail? =A0I'll do that over the weekend some time.
>
> =A0I put up a wiki page telling people how to access the code repository =
at
> <http://code.google.com/p/haskell-study/wiki/Welcome> - feel free to edit=
 it
> / move stuff to other pages / whatever as y'all see fit.
> One unresolved question: Ben, can you update the page for how people shou=
ld
> get your their google account?

It's silly, I shouldn't be the only admin of the project.  Daivd, I
just made you an 'owner' like me.  You should now see the 'Administer'
tab, which allows you to add members and configure a zililon other
settings.  First thing I'd do is take your 'Welcome' wiki page and
copy and paste it to the front page of the project -- people should
see it automatically when visiting.  As for adding new members, I'd
have the front page say to email haskell-study@red-bean.com,
requesting to join the list and the repository.  You can mod the
message through, then add them to both things.


From carlton@bactrian.org Mon Nov 02 14:47:30 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:44213)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N53oI-0000I6-EZ; Mon, 02 Nov 2009 14:47:30 -0600
Received: by pzk4 with SMTP id 4so3765104pzk.32
	for <multiple recipients>; Mon, 02 Nov 2009 12:47:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.27.37 with SMTP id e37mr893885wfj.234.1257194844657; Mon, 
	02 Nov 2009 12:47:24 -0800 (PST)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <53c059c90911021100k2abd7c6epb815ae9013aa100f@mail.gmail.com>
References: <53c059c90910291112x33653600y8c7f6702c7310c8a@mail.gmail.com>
	<90804c6f0910301154q3400e493t72afe086453e0e96@mail.gmail.com>
	<90804c6f0911011508j4171a402ua9221802ad972c97@mail.gmail.com>
	<53c059c90911021100k2abd7c6epb815ae9013aa100f@mail.gmail.com>
Date: Mon, 2 Nov 2009 12:47:24 -0800
Message-ID: <90804c6f0911021247q5479971aoa3ae53ca2f3725a2@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Ben Collins-Sussman <sussman@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502cd542118c00477697c99
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] google project up
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 02 Nov 2009 20:47:30 -0000

--00504502cd542118c00477697c99
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Nov 2, 2009 at 11:00 AM, Ben Collins-Sussman
<sussman@red-bean.com>wrote:

> On Sun, Nov 1, 2009 at 5:08 PM, David Carlton <carlton@bactrian.org>
> wrote:
>
> > One unresolved question: Ben, can you update the page for how people
> should
> > get your their google account?
>
> It's silly, I shouldn't be the only admin of the project.  Daivd, I
> just made you an 'owner' like me.  You should now see the 'Administer'
> tab, which allows you to add members and configure a zililon other
> settings.  First thing I'd do is take your 'Welcome' wiki page and
> copy and paste it to the front page of the project -- people should
> see it automatically when visiting.  As for adding new members, I'd
> have the front page say to email haskell-study@red-bean.com,
> requesting to join the list and the repository.  You can mod the
> message through, then add them to both things.
>

Cool, thanks, I'll do that when I have some spare cycles.

-- 
David Carlton
carlton@bactrian.org

--00504502cd542118c00477697c99
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 2, 2009 at 11:00 AM, Ben Collins-Sussman <span dir=3D"ltr">&lt;=
<a href=3D"mailto:sussman@red-bean.com">sussman@red-bean.com</a>&gt;</span>=
 wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class=3D"h5">On Sun, Nov 1, 2009 at 5:08 PM, David Car=
lton &lt;<a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a>&g=
t; wrote:<br><br>
&gt; One unresolved question: Ben, can you update the page for how people s=
hould<br>
&gt; get your their google account?<br>
<br>
</div></div><div><div></div><div class=3D"h5">It&#39;s silly, I shouldn&#39=
;t be the only admin of the project. =A0Daivd, I<br>
just made you an &#39;owner&#39; like me. =A0You should now see the &#39;Ad=
minister&#39;<br>
tab, which allows you to add members and configure a zililon other<br>
settings. =A0First thing I&#39;d do is take your &#39;Welcome&#39; wiki pag=
e and<br>
copy and paste it to the front page of the project -- people should<br>
see it automatically when visiting. =A0As for adding new members, I&#39;d<b=
r>
have the front page say to email <a href=3D"mailto:haskell-study@red-bean.c=
om">haskell-study@red-bean.com</a>,<br>
requesting to join the list and the repository. =A0You can mod the<br>
message through, then add them to both things.<br>
</div></div></blockquote></div><br>Cool, thanks, I&#39;ll do that when I ha=
ve some spare cycles.<br clear=3D"all"><br>-- <br>David Carlton<br><a href=
=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>

--00504502cd542118c00477697c99--


From 3VSn1Sg0OAL4lewoipp-wxyh2ksskpigshi.gsq@codesite.bounces.google.com Sat Nov 07 02:01:31 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:61272)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3VSn1Sg0OAL4lewoipp-wxyh2ksskpigshi.gsq@codesite.bounces.google.com>)
	id 1N6gEl-00051P-C5
	for haskell-study@red-bean.com; Sat, 07 Nov 2009 02:01:31 -0600
Received: by pzk24 with SMTP id 24so3979pzk.7
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 00:01:25 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.81.10 with SMTP id i10mr1004743wal.29.1257580885564; Sat, 
	07 Nov 2009 00:01:25 -0800 (PST)
Message-ID: <0016e64cae6af5e3920477c35dfe@google.com>
Date: Sat, 07 Nov 2009 08:01:25 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - More chapter 3
	exercises. on 2009-11-07 08:00 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 07 Nov 2009 08:01:31 -0000

Revision: 55201e45b7
Author: Jim Blandy <jimb@mozilla.org>
Date: Fri Nov  6 23:59:25 2009
Log: More chapter 3 exercises.
http://code.google.com/p/haskell-study/source/detail?r=55201e45b7

Added:
  /jimb/ch03/maybetree.hs
  /jimb/ch03/mean.hs
  /jimb/ch03/mylength.hs
  /jimb/ch03/palindrome.hs
Deleted:
  /jimb/ch03/ex
Modified:
  /jimb/ch03/tolist.hs

=======================================
--- /dev/null
+++ /jimb/ch03/maybetree.hs	Fri Nov  6 23:59:25 2009
@@ -0,0 +1,3 @@
+-- p. 60 #2
+data MTree a = MTree (Maybe (MTree a)) a (Maybe (MTree a))
+             deriving (Show)
=======================================
--- /dev/null
+++ /jimb/ch03/mean.hs	Fri Nov  6 23:59:25 2009
@@ -0,0 +1,10 @@
+-- p.60 #3
+mean, mean2 :: (Fractional n) => [n] -> n
+
+mean (n:ns) = sum / (fromIntegral len)
+              where sum = foldl (+)  0 (n:ns)
+                    len = length (n:ns)
+
+mean2 (n:ns) = walk (n:ns) 0 0
+               where walk (n:ns) sum count = walk ns (sum + n) (count + 1)
+                     walk []     sum count = sum / count
=======================================
--- /dev/null
+++ /jimb/ch03/mylength.hs	Fri Nov  6 23:59:25 2009
@@ -0,0 +1,7 @@
+-- p. 60 #1, #2
+myLength, myLength2 :: (Num n) => [a] -> n
+
+myLength [] = 0
+myLength (x:xs) = 1 + (myLength xs)
+
+myLength2 xs = foldr (\elt -> (+1)) 0 xs
=======================================
--- /dev/null
+++ /jimb/ch03/palindrome.hs	Fri Nov  6 23:59:25 2009
@@ -0,0 +1,18 @@
+-- p. 69 #4, #5
+palindrome, palindrome2 :: [x] -> [x]
+
+palindrome xs = xs ++ (reverse xs)
+
+palindrome2 []     = []
+palindrome2 (x:xs) = [x] ++ (palindrome2 xs) ++ [x]
+
+
+isPalindrome, isPalindrome2 :: (Eq x) => [x] -> Bool
+
+isPalindrome xs = xs == (reverse xs)
+
+isPalindrome2 xs = final
+    where (final,_) = check xs
+          check [] = (True, xs)
+          check (x:xs) = (sofar && (x == head), tail)
+                         where (sofar, (head:tail)) = check xs
=======================================
--- /jimb/ch03/ex	Thu Oct 29 22:44:35 2009
+++ /dev/null
@@ -1,4 +0,0 @@
-p. 60
-
-Ex 1:
-
=======================================
--- /jimb/ch03/tolist.hs	Thu Oct 29 22:49:16 2009
+++ /jimb/ch03/tolist.hs	Fri Nov  6 23:59:25 2009
@@ -1,3 +1,4 @@
+-- p. 60 #1
  data List a = Cons a (List a)
              | Nil
                deriving (Show)


From 3-lf2Sg0OAJM4xF7188-FGH0L3BB381zB01.zB9@codesite.bounces.google.com Sat Nov 07 23:32:48 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:57411)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3-lf2Sg0OAJM4xF7188-FGH0L3BB381zB01.zB9@codesite.bounces.google.com>)
	id 1N70OO-0007wJ-79
	for haskell-study@red-bean.com; Sat, 07 Nov 2009 23:32:48 -0600
Received: by pzk24 with SMTP id 24so5664pzk.7
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 21:32:42 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.143.21.41 with SMTP id y41mr866644wfi.23.1257658362470; Sat, 
	07 Nov 2009 21:32:42 -0800 (PST)
Message-ID: <00504502cb24f1b16d0477d56722@google.com>
Date: Sun, 08 Nov 2009 05:32:42 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 5 new revisions pushed by
	carl...@bactrian.org on 2009-11-08 05:32 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 05:32:48 -0000

5 new revisions:

Revision: a0a6d5116a
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 18:41:18 2009
Log: Most of the chapter 2 tests; I'm doing a checkpoint before I start...
http://code.google.com/p/haskell-study/source/detail?r=a0a6d5116a

Revision: c1c92805f6
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:16:42 2009
Log: Add assertException.  But how can I get this to work with...
http://code.google.com/p/haskell-study/source/detail?r=c1c92805f6

Revision: d25e2c51d1
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:21:29 2009
Log: Introduce @! as a shorthand for assertException.
http://code.google.com/p/haskell-study/source/detail?r=d25e2c51d1

Revision: a7c9c82e48
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:25:47 2009
Log: Update chapter 2 notes.
http://code.google.com/p/haskell-study/source/detail?r=a7c9c82e48

Revision: fe28778319
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:32:13 2009
Log: Clean up some stuff I accidentally left in.
http://code.google.com/p/haskell-study/source/detail?r=fe28778319

==============================================================================
Revision: a0a6d5116a
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 18:41:18 2009
Log: Most of the chapter 2 tests; I'm doing a checkpoint before I start
trying to write a test for exception behavior.
http://code.google.com/p/haskell-study/source/detail?r=a0a6d5116a

Added:
  /carlton/Ch02.hs
  /carlton/Ch02Test.hs
  /carlton/add.hs
  /carlton/ch02-notes.txt

=======================================
--- /dev/null
+++ /carlton/Ch02.hs	Sat Nov  7 18:41:18 2009
@@ -0,0 +1,20 @@
+module Ch02(myDrop, myDrop2, myDrop3, lastButOne, lastButOne1) where
+
+myDrop n xs = if n <= 0 || null xs
+              then xs
+              else myDrop (n - 1) (tail xs)
+
+myDrop2 n xs | n <= 0 = xs
+myDrop2 n [] = []
+myDrop2 n (x:xs) = myDrop2 (n-1) xs
+
+myDrop3 n [] = []
+myDrop3 n xs | n <= 0 = xs
+myDrop3 n (x:xs) = myDrop3 (n-1) xs
+
+lastButOne xs = if null (tail (tail xs))
+                then head xs
+                else lastButOne (tail xs)
+
+lastButOne1 (x:[y]) = x
+lastButOne1 (x:xs) = lastButOne xs
=======================================
--- /dev/null
+++ /carlton/Ch02Test.hs	Sat Nov  7 18:41:18 2009
@@ -0,0 +1,38 @@
+module Ch02Test(tests) where
+
+import Test.HUnit
+import Control.Exception
+import Ch02
+
+-- dropTests :: (Int -> [a] -> [a]) -> Test
+basicDropTests func =
+    TestList["drop with remainder" ~: [3,4,5] @=? func 2 [1,2,3,4,5],
+             "drop all" ~: [] @=? func 3 [1,2,3],
+             "drop past end" ~: [] @=? func 4 [1,2],
+             "drop none" ~: [1, 2] @=? func 0 [1,2],
+             "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
+
+lazyRightDropTests func =
+    TestList[basicDropTests func,
+             "drop infinite" ~: [3,4,5] @=? take 3 (func 2 [1..])]
+
+lazyLeftDropTests func =
+    TestList[basicDropTests func,
+             "drop undetermined count" ~: [] @=? func (length [1..]) []]
+
+-- dropTests :: (Int -> [a] -> [a]) -> Test
+-- dropTests func =
+--     TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
+--              "drop all" ~: "" @=? func 6 "foobar",
+--              "drop past end" ~: [] @=? func 4 [1,2],
+--              "drop none" ~: [1, 2] @=? func 0 [1,2],
+--              "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
+
+lastButOneTests func =
+    TestList["basic" ~: 3 @=? func [1,2,3,4],
+             "first" ~: 2 @=? func [2,3]]
+
+tests = TestList[lazyRightDropTests drop,
+                 lazyRightDropTests myDrop, lazyRightDropTests myDrop2,
+                 lazyLeftDropTests myDrop3,
+                 lastButOneTests lastButOne, lastButOneTests lastButOne1]
=======================================
--- /dev/null
+++ /carlton/add.hs	Sat Nov  7 18:41:18 2009
@@ -0,0 +1,1 @@
+add a b = a + b
=======================================
--- /dev/null
+++ /carlton/ch02-notes.txt	Sat Nov  7 18:41:18 2009
@@ -0,0 +1,61 @@
+Ch 2:
+
+p. 20: In the past, I haven't found myself having to write fewer tests
+   for programs in dynamic languages than in static languages.  But
+   maybe the stronger type system in Haskell will make a difference
+   there?
+
+p. 27: I was surprised to see that :type lines is String -> [String]
+   rather than [Char] -> [[Char]].  Looking back to p. 13, the two are
+   apparently synonyms.  Playing around with this further, I was
+   surprised that ghci complained when I tried this:
+
+Prelude> lines :: String -> [String]
+
+<interactive>:1:0:
+    No instance for (Show (String -> [String]))
+      arising from a use of `print' at <interactive>:1:0-26
+    Possible fix:
+      add an instance declaration for (Show (String -> [String]))
+    In a stmt of a 'do' expression: print it
+
+   (Nothing to do with String, the same thing happened when doing the
+   same thing with any function type.)  But I guess the bottom of
+   p. 27 addresses that.
+
+* I tried to write a unit test for a generic drop function that passed
+  the function a string in some cases and a list of integers in other
+  cases, and I couldn't get it to compile.  Why not?  Here's an
+  example of what I tried; it works fine if I replace the occurrences
+  of func on the RHS with drop.
+
+dropTests func =
+    TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
+             "drop all" ~: "" @=? func 6 "foobar",
+             "drop past end" ~: [] @=? func 4 [1,2],
+             "drop none" ~: [1, 2] @=? func 0 [1,2],
+             "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
+
+Ch02Test.hs:30:47:
+    No instance for (Num Char)
+      arising from the literal `1' at Ch02Test.hs:30:47
+    Possible fix: add an instance declaration for (Num Char)
+    In the expression: 1
+    In the second argument of `func', namely `[1, 2]'
+    In the second argument of `(@=?)', namely `func 4 [1, 2]'
+
+  I tried sticking
+
+dropTests :: (Int -> [a] -> [a]) -> Test
+
+  at the front and it didn't help:
+
+Ch02Test.hs:28:56:
+    Couldn't match expected type `a' against inferred type `Char'
+      `a' is a rigid type variable bound by
+          the type signature for `dropTests' at Ch02Test.hs:26:22
+      Expected type: [a]
+      Inferred type: [Char]
+    In the second argument of `func', namely `"foobar"'
+    In the second argument of `(@=?)', namely `func 2 "foobar"'
+

==============================================================================
Revision: c1c92805f6
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:16:42 2009
Log: Add assertException.  But how can I get this to work with
Control.Exception instead of Control.OldException?
http://code.google.com/p/haskell-study/source/detail?r=c1c92805f6

Added:
  /carlton/TestHelper.hs
Modified:
  /carlton/Ch02Test.hs

=======================================
--- /dev/null
+++ /carlton/TestHelper.hs	Sat Nov  7 21:16:42 2009
@@ -0,0 +1,16 @@
+module TestHelper(assertException) where
+
+import Test.HUnit
+import Control.OldException
+
+-- How do I get this to work with Control.Exception?
+shouldBeException :: (IO (Either a Int)) -> Assertion
+shouldBeException x = do
+  val <- x
+  checkForException val where
+      checkForException (Left _) = return ()
+      checkForException (Right _) = assertFailure "oops"
+
+assertException :: String -> Int -> Assertion
+assertException msg val = do
+  shouldBeException (try (evaluate val))
=======================================
--- /carlton/Ch02Test.hs	Sat Nov  7 18:41:18 2009
+++ /carlton/Ch02Test.hs	Sat Nov  7 21:16:42 2009
@@ -1,7 +1,7 @@
  module Ch02Test(tests) where

  import Test.HUnit
-import Control.Exception
+import TestHelper
  import Ch02

  -- dropTests :: (Int -> [a] -> [a]) -> Test
@@ -30,7 +30,8 @@

  lastButOneTests func =
      TestList["basic" ~: 3 @=? func [1,2,3,4],
-             "first" ~: 2 @=? func [2,3]]
+             "first" ~: 2 @=? func [2,3],
+             TestCase (assertException "one element" (func [1]))]

  tests = TestList[lazyRightDropTests drop,
                   lazyRightDropTests myDrop, lazyRightDropTests myDrop2,

==============================================================================
Revision: d25e2c51d1
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:21:29 2009
Log: Introduce @! as a shorthand for assertException.
http://code.google.com/p/haskell-study/source/detail?r=d25e2c51d1

Modified:
  /carlton/Ch02Test.hs
  /carlton/TestHelper.hs

=======================================
--- /carlton/Ch02Test.hs	Sat Nov  7 21:16:42 2009
+++ /carlton/Ch02Test.hs	Sat Nov  7 21:21:29 2009
@@ -31,7 +31,8 @@
  lastButOneTests func =
      TestList["basic" ~: 3 @=? func [1,2,3,4],
               "first" ~: 2 @=? func [2,3],
-             TestCase (assertException "one element" (func [1]))]
+             "one element" @! func [1],
+             "no elements" @! func []]

  tests = TestList[lazyRightDropTests drop,
                   lazyRightDropTests myDrop, lazyRightDropTests myDrop2,
=======================================
--- /carlton/TestHelper.hs	Sat Nov  7 21:16:42 2009
+++ /carlton/TestHelper.hs	Sat Nov  7 21:21:29 2009
@@ -1,4 +1,4 @@
-module TestHelper(assertException) where
+module TestHelper(assertException, (@!)) where

  import Test.HUnit
  import Control.OldException
@@ -14,3 +14,7 @@
  assertException :: String -> Int -> Assertion
  assertException msg val = do
    shouldBeException (try (evaluate val))
+
+infix 1 @!
+
+(@!) msg val = TestCase (assertException msg val)

==============================================================================
Revision: a7c9c82e48
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:25:47 2009
Log: Update chapter 2 notes.
http://code.google.com/p/haskell-study/source/detail?r=a7c9c82e48

Modified:
  /carlton/ch02-notes.txt

=======================================
--- /carlton/ch02-notes.txt	Sat Nov  7 18:41:18 2009
+++ /carlton/ch02-notes.txt	Sat Nov  7 21:25:47 2009
@@ -59,3 +59,15 @@
      In the second argument of `func', namely `"foobar"'
      In the second argument of `(@=?)', namely `func 2 "foobar"'

+* It also took me ages to get assertExpression working.  It turns out
+  that it's caused by the exception changes in GHC 6.10.1, and I could
+  get it to work by importing Control.OldException instead of
+  Control.Exception.  How does it work with the latter?  If I use
+  Control.Exception instead, I get:
+
+TestHelper.hs:16:21:
+    Ambiguous type variable `a' in the constraint:
+      `Exception a' arising from a use of `try' at TestHelper.hs:16:21-38
+    Probable fix: add a type signature that fixes these type variable(s)
+
+  And I haven't yet figured out how to fix that.

==============================================================================
Revision: fe28778319
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:32:13 2009
Log: Clean up some stuff I accidentally left in.
http://code.google.com/p/haskell-study/source/detail?r=fe28778319

Deleted:
  /carlton/add.hs
Modified:
  /carlton/Ch02Test.hs

=======================================
--- /carlton/add.hs	Sat Nov  7 18:41:18 2009
+++ /dev/null
@@ -1,1 +0,0 @@
-add a b = a + b
=======================================
--- /carlton/Ch02Test.hs	Sat Nov  7 21:21:29 2009
+++ /carlton/Ch02Test.hs	Sat Nov  7 21:32:13 2009
@@ -4,7 +4,6 @@
  import TestHelper
  import Ch02

--- dropTests :: (Int -> [a] -> [a]) -> Test
  basicDropTests func =
      TestList["drop with remainder" ~: [3,4,5] @=? func 2 [1,2,3,4,5],
               "drop all" ~: [] @=? func 3 [1,2,3],


From 3Jln2Sg0OAMAngyqkrr-yz0j4muumrkiujk.ius@codesite.bounces.google.com Sat Nov 07 23:37:48 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:49975)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3Jln2Sg0OAMAngyqkrr-yz0j4muumrkiujk.ius@codesite.bounces.google.com>)
	id 1N70TE-0001z2-QO
	for haskell-study@red-bean.com; Sat, 07 Nov 2009 23:37:48 -0600
Received: by pzk24 with SMTP id 24so5667pzk.7
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 21:37:43 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.114.5.19 with SMTP id 19mr1200898wae.8.1257658662860; Sat, 07 
	Nov 2009 21:37:42 -0800 (PST)
Message-ID: <0016e649cd84d939a10477d57942@google.com>
Date: Sun, 08 Nov 2009 05:37:42 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - Move
	my question about types to a separate file. on 2009-11-08 05:36 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 05:37:49 -0000

Revision: 05f2e83795
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov  7 21:36:47 2009
Log: Move my question about types to a separate file.
http://code.google.com/p/haskell-study/source/detail?r=05f2e83795

Added:
  /carlton/Ch02Question.hs
Modified:
  /carlton/Ch02Test.hs

=======================================
--- /dev/null
+++ /carlton/Ch02Question.hs	Sat Nov  7 21:36:47 2009
@@ -0,0 +1,9 @@
+import Test.HUnit
+
+-- dropTests :: (Int -> [a] -> [a]) -> Test
+dropTests func =
+    TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
+             "drop all" ~: "" @=? func 6 "foobar",
+             "drop past end" ~: [] @=? func 4 [1,2],
+             "drop none" ~: [1, 2] @=? func 0 [1,2],
+             "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
=======================================
--- /carlton/Ch02Test.hs	Sat Nov  7 21:32:13 2009
+++ /carlton/Ch02Test.hs	Sat Nov  7 21:36:47 2009
@@ -19,14 +19,6 @@
      TestList[basicDropTests func,
               "drop undetermined count" ~: [] @=? func (length [1..]) []]

--- dropTests :: (Int -> [a] -> [a]) -> Test
--- dropTests func =
---     TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
---              "drop all" ~: "" @=? func 6 "foobar",
---              "drop past end" ~: [] @=? func 4 [1,2],
---              "drop none" ~: [1, 2] @=? func 0 [1,2],
---              "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
-
  lastButOneTests func =
      TestList["basic" ~: 3 @=? func [1,2,3,4],
               "first" ~: 2 @=? func [2,3],


From carlton@bactrian.org Sat Nov 07 23:43:34 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:47941)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N70Yo-0004Hz-9D
	for haskell-study@red-bean.com; Sat, 07 Nov 2009 23:43:34 -0600
Received: by pwj3 with SMTP id 3so723738pwj.39
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 21:43:28 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.247.42 with SMTP id u42mr621348wfh.259.1257659008503; Sat, 
	07 Nov 2009 21:43:28 -0800 (PST)
X-Originating-IP: [76.102.15.41]
Date: Sat, 7 Nov 2009 21:43:28 -0800
Message-ID: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: "Bryan O'Sullivan" <bos@serpentine.com>, haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=00504502cc357351cd0477d58ea6
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 05:43:34 -0000

--00504502cc357351cd0477d58ea6
Content-Type: text/plain; charset=ISO-8859-1

When reading chapter 2, I figured I'd try turning the examples on the bottom
of p. 29 into unit tests.  And I wanted to make the tests parametrizable, so
I could try them both with the builtin drop function and with different
versions that I came up with.

I couldn't get it to compile, though, and I'm wondering what I'm missing;
Bryan (or anybody else), can you help a Haskell newbie out here?  This is
what I tried:

import Test.HUnit

dropTests func =
    TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
             "drop all" ~: "" @=? func 6 "foobar",
             "drop past end" ~: [] @=? func 4 [1,2],
             "drop none" ~: [1, 2] @=? func 0 [1,2],
             "drop negative" ~: [1, 2] @=? func (-7) [1,2]]

(I put this in the haskell-study repository as carlton/Ch02Question.hs.)
 When I compile it, I get the following error message:

Ch02Question.hs:7:47:

    No instance for (Num Char)
      arising from the literal `1' at Ch02Question.hs:7:47
    Possible fix: add an instance declaration for (Num Char)
    In the expression: 1
    In the second argument of `func', namely `[1, 2]'
    In the second argument of `(@=?)', namely `func 4 [1, 2]'
Failed, modules loaded: none.

So it seems to not like it that I'm running func against both [Char]s and
[Int]s.  I tried providing a type signature for dropTests,

dropTests :: (Int -> [a] -> [a]) -> Test


but that just added another error message rather than fixing things.  (I did
verify that the tests should work - they compile and pass if I replace
'func' in the body with 'drop'.)

What am I missing here?

-- 
David Carlton
carlton@bactrian.org

--00504502cc357351cd0477d58ea6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

When reading chapter 2, I figured I&#39;d try turning the examples on the b=
ottom of p. 29 into unit tests. =A0And I wanted to make the tests parametri=
zable, so I could try them both with the builtin drop function and with dif=
ferent versions that I came up with.<div>
<br></div><div>I couldn&#39;t get it to compile, though, and I&#39;m wonder=
ing what I&#39;m missing; Bryan (or anybody else), can you help a Haskell n=
ewbie out here? =A0This is what I tried:</div><div><br></div><div><div>impo=
rt Test.HUnit</div>
<div><br></div><div>dropTests func =3D</div><div>=A0=A0 =A0TestList[&quot;d=
rop with remainder&quot; ~: &quot;obar&quot; @=3D? func 2 &quot;foobar&quot=
;,</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop all&quot; ~: &quot;&quot=
; @=3D? func 6 &quot;foobar&quot;,</div>
<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop past end&quot; ~: [] @=3D? func =
4 [1,2],</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop none&quot; ~: [1, =
2] @=3D? func 0 [1,2],</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop nega=
tive&quot; ~: [1, 2] @=3D? func (-7) [1,2]]</div>
<div><br></div><div>(I put this in the haskell-study repository as carlton/=
Ch02Question.hs.) =A0When I compile it, I get the following error message:<=
/div><div><br></div><div><div>Ch02Question.hs:7:47: =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0=A0</div>
<div>=A0=A0 =A0No instance for (Num Char)</div><div>=A0=A0 =A0 =A0arising f=
rom the literal `1&#39; at Ch02Question.hs:7:47</div><div>=A0=A0 =A0Possibl=
e fix: add an instance declaration for (Num Char)</div><div>=A0=A0 =A0In th=
e expression: 1</div><div>
=A0=A0 =A0In the second argument of `func&#39;, namely `[1, 2]&#39;</div><d=
iv>=A0=A0 =A0In the second argument of `(@=3D?)&#39;, namely `func 4 [1, 2]=
&#39;</div><div>Failed, modules loaded: none.</div><div><br></div><div>So i=
t seems to not like it that I&#39;m running func against both [Char]s and [=
Int]s. =A0I tried providing a type signature for dropTests,</div>
<div><br></div><div><div>dropTests :: (Int -&gt; [a] -&gt; [a]) -&gt; Test =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0<=
/div><div><br></div></div></div><div>but that just added another error mess=
age rather than fixing things. =A0(I did verify that the tests should work =
- they compile and pass if I replace &#39;func&#39; in the body with &#39;d=
rop&#39;.)</div>
<div><br></div><div>What am I missing here?</div><div><br></div><div>-- <br=
>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.=
org</a><br>
</div></div>

--00504502cc357351cd0477d58ea6--


From bos@serpentine.com Sat Nov 07 23:46:54 2009
Received: from mail-px0-f189.google.com ([209.85.216.189]:50054)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>) id 1N70c2-0005Y8-KA
	for haskell-study@red-bean.com; Sat, 07 Nov 2009 23:46:54 -0600
Received: by pxi27 with SMTP id 27so401805pxi.25
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 21:46:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.115.99.4 with SMTP id b4mr10516895wam.88.1257659208976; Sat, 
	07 Nov 2009 21:46:48 -0800 (PST)
In-Reply-To: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
Date: Sat, 7 Nov 2009 21:46:48 -0800
Message-ID: <c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: multipart/alternative; boundary=0016e648f0ae66492d0477d59a91
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 05:46:54 -0000

--0016e648f0ae66492d0477d59a91
Content-Type: text/plain; charset=UTF-8

On Sat, Nov 7, 2009 at 9:43 PM, David Carlton <carlton@bactrian.org> wrote:

>
> I couldn't get it to compile, though, and I'm wondering what I'm missing;
> Bryan (or anybody else), can you help a Haskell newbie out here?
>

I don't have a copy of the book handy (common authorial reaction of "I never
want to see that fucking thing again", dontcha know), so I'm not sure what
the function on p29 is. Can you fill me in?

--0016e648f0ae66492d0477d59a91
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Nov 7, 2009 at 9:43 PM, David Carlton <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:carlton@bactrian.org">carlton@bactria=
n.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><br></div><div>I couldn&#39;t get it to compile, though, and I&#39;m w=
ondering what I&#39;m missing; Bryan (or anybody else), can you help a Hask=
ell newbie out here?</div></blockquote><div><br></div><div>I don&#39;t have=
 a copy of the book handy (common authorial reaction of &quot;I never want =
to see that fucking thing again&quot;, dontcha know), so I&#39;m not sure w=
hat the function on p29 is. Can you fill me in?=C2=A0</div>
</div><br>

--0016e648f0ae66492d0477d59a91--


From carlton@bactrian.org Sun Nov 08 00:00:21 2009
Received: from mail-px0-f189.google.com ([209.85.216.189]:57647)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N70p3-0002Bm-Pd
	for haskell-study@red-bean.com; Sun, 08 Nov 2009 00:00:21 -0600
Received: by pxi27 with SMTP id 27so404912pxi.25
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 22:00:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.27.35 with SMTP id e35mr635537wfj.185.1257660016058; Sat, 
	07 Nov 2009 22:00:16 -0800 (PST)
X-Originating-IP: [76.102.15.41]
Date: Sat, 7 Nov 2009 22:00:15 -0800
Message-ID: <90804c6f0911072200i757d8a6rdcca1c72d5fdf36b@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: "Bryan O'Sullivan" <bos@serpentine.com>, haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=00504502cc038162970477d5ca16
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] how can I use Control.Exception with GHC 6.10.>=1?
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 06:00:21 -0000

--00504502cc038162970477d5ca16
Content-Type: text/plain; charset=ISO-8859-1

I perversely decided when reading through chapter 2 that I'd try to unit
test that exceptions were generated in certain circumstances.  And I
eventually got it to work, but it took ages, largely because of issues
related to the exception changes that happened in GHC 6.10.1.

I know we're not anywhere near that far in the book, but, Bryan, can I
impose on you to briefly explain how this should work?  What I'd ultimately
like is to get carlton/TestHelper.hs working where I import
Control.Exception instead of Control.OldException; for the time being,
though, I'd be happy if I could get the example on p. 455 of RWH working.
 With a current GHC, what I get is this:

Prelude> :m Control.Exception
Prelude Control.Exception> let x = 5 `div` 0
Prelude Control.Exception> try (print x)

<interactive>:1:0:

    Ambiguous type variable `e' in the constraint:
      `Exception e' arising from a use of `try' at <interactive>:1:0-12
    Probable fix: add a type signature that fixes these type variable(s)

I did some amount of googling, but everything that I tried failed.  (It
would probably help if I understood typeclasses better, but I haven't gotten
that far in the book.)

-- 
David Carlton
carlton@bactrian.org

--00504502cc038162970477d5ca16
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I perversely decided when reading through chapter 2 that I&#39;d try to uni=
t test that exceptions were generated in certain circumstances. =A0And I ev=
entually got it to work, but it took ages, largely because of issues relate=
d to the exception changes that happened in GHC 6.10.1.<div>
<br></div><div>I know we&#39;re not anywhere near that far in the book, but=
, Bryan, can I impose on you to briefly explain how this should work? =A0Wh=
at I&#39;d ultimately like is to get carlton/TestHelper.hs working where I =
import Control.Exception instead of Control.OldException; for the time bein=
g, though, I&#39;d be happy if I could get the example on p. 455 of RWH wor=
king. =A0With a current GHC, what I get is this:</div>
<div><br></div><div><div>Prelude&gt; :m Control.Exception</div><div>Prelude=
 Control.Exception&gt; let x =3D 5 `div` 0</div><div>Prelude Control.Except=
ion&gt; try (print x)</div><div><br></div><div>&lt;interactive&gt;:1:0: =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</div>
<div>=A0=A0 =A0Ambiguous type variable `e&#39; in the constraint:</div><div=
>=A0=A0 =A0 =A0`Exception e&#39; arising from a use of `try&#39; at &lt;int=
eractive&gt;:1:0-12</div><div>=A0=A0 =A0Probable fix: add a type signature =
that fixes these type variable(s)</div>
<div><br></div><div>I did some amount of googling, but everything that I tr=
ied failed. =A0(It would probably help if I understood typeclasses better, =
but I haven&#39;t gotten that far in the book.)</div><div><br>-- <br>David =
Carlton<br>
<a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>
</div></div>

--00504502cc038162970477d5ca16--


From carlton@bactrian.org Sun Nov 08 00:04:05 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:33424)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N70sf-00041k-BS
	for haskell-study@red-bean.com; Sun, 08 Nov 2009 00:04:05 -0600
Received: by pwj3 with SMTP id 3so728275pwj.39
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 22:03:59 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.27.35 with SMTP id e35mr635776wfj.185.1257660239692; Sat, 
	07 Nov 2009 22:03:59 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
Date: Sat, 7 Nov 2009 22:03:59 -0800
Message-ID: <90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: multipart/alternative; boundary=00504502cc03d5c53f0477d5d753
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 06:04:05 -0000

--00504502cc03d5c53f0477d5d753
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Nov 7, 2009 at 9:46 PM, Bryan O'Sullivan <bos@serpentine.com> wrote:

> On Sat, Nov 7, 2009 at 9:43 PM, David Carlton <carlton@bactrian.org>wrote:
>
>>
>> I couldn't get it to compile, though, and I'm wondering what I'm missing;
>> Bryan (or anybody else), can you help a Haskell newbie out here?
>>
>
> I don't have a copy of the book handy (common authorial reaction of "I
> never want to see that fucking thing again", dontcha know), so I'm not sure
> what the function on p29 is. Can you fill me in?
>

p. 29 was just going through examples of how the drop function works (before
launching into an implementation on p.30), giving examples like

ghci> drop 2 "foobar"
"obar"
ghci> drop 4 [1,2]
[]

So I just turned those into unit tests with the function 'dropTests' that I
mentioned in my earlier message.  But the function that I wrote doesn't
load.

-- 
David Carlton
carlton@bactrian.org

--00504502cc03d5c53f0477d5d753
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 7, 2009 at 9:46 PM, Bryan O&#39;Sullivan <span dir=3D"ltr">&lt;=
<a href=3D"mailto:bos@serpentine.com">bos@serpentine.com</a>&gt;</span> wro=
te:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"gmail_quote"><div class=3D"im">On Sat, Nov 7, 2009 at 9:43 PM=
, David Carlton <span dir=3D"ltr">&lt;<a href=3D"mailto:carlton@bactrian.or=
g" target=3D"_blank">carlton@bactrian.org</a>&gt;</span> wrote:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex">

<div><br></div><div>I couldn&#39;t get it to compile, though, and I&#39;m w=
ondering what I&#39;m missing; Bryan (or anybody else), can you help a Hask=
ell newbie out here?</div></blockquote><div><br></div></div><div>I don&#39;=
t have a copy of the book handy (common authorial reaction of &quot;I never=
 want to see that fucking thing again&quot;, dontcha know), so I&#39;m not =
sure what the function on p29 is. Can you fill me in?=A0</div>

</div></blockquote></div><br>p. 29 was just going through examples of how t=
he drop function works (before launching into an implementation on p.30), g=
iving examples like<div><br></div><div>ghci&gt; drop 2 &quot;foobar&quot;</=
div>
<div>&quot;obar&quot;</div><div>ghci&gt; drop 4 [1,2]</div><div>[]</div><di=
v><br></div><div>So I just turned those into unit tests with the function &=
#39;dropTests&#39; that I mentioned in my earlier message. =A0But the funct=
ion that I wrote doesn&#39;t load.=A0<br clear=3D"all">
<br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton=
@bactrian.org</a><br>
</div>

--00504502cc03d5c53f0477d5d753--


From jimblandy@gmail.com Sun Nov 08 01:49:54 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:33859)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N72X4-0004sr-QK
	for haskell-study@red-bean.com; Sun, 08 Nov 2009 01:49:54 -0600
Received: by pzk4 with SMTP id 4so1664519pzk.32
	for <haskell-study@red-bean.com>; Sat, 07 Nov 2009 23:49:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=/GIkAE+BFTY2tsWDisztrghUaYDbksGmXipKZf19ufc=;
	b=ComnAzg7rQyr/A6ETyjYGpVZjQlxM9BYurS1GVJ+2n4aAMIsZzteXeWUFzzE1TfD6f
	y71IahKgNO+ir4c3qEa0d+SkQ8UHACDXAquG5j7cBT6y9S8w/D5nMb6aqjbhdEzhRcBv
	LjsDmSpdj9wi1jvI/C9MWqti7qxzH5qOT2/cs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=J58sdaO1q2DyQmPRGsEK9j9OJur5eDiPZr+xT9Pd6mdgu6g7DafAUVxIki2vBw76U3
	nuQ4/aCtyc8MqMXme3BbjkZA6ugNwuEfA7O578V4p4fXnqTCBf8SnmKDdFoDeB4W1v+I
	+O7++tvHX9a8BFbPsqjOFjpIcS9bWqBXM+oHo=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.25.39 with SMTP id c39mr592278wfj.249.1257666589043; Sat, 
	07 Nov 2009 23:49:49 -0800 (PST)
In-Reply-To: <90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
	<90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
Date: Sat, 7 Nov 2009 23:49:49 -0800
X-Google-Sender-Auth: 65bbdf1af5c65655
Message-ID: <8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 07:49:54 -0000

Here's a simpler example that shows (I think) the same issue:

poly f = ((f "a"), (f 1))

That doesn't compile either:

poly.hs:1:22:
    No instance for (Num [Char])
      arising from the literal `1' at poly.hs:1:22
    Possible fix: add an instance declaration for (Num [Char])
    In the first argument of `f', namely `1'
    In the expression: (f 1)
    In the expression: ((f "a"), (f 1))

The issue here is let-bound polymorphism.  See 12.1 here:
http://www.haskell.org/tutorial/pitfalls.html

[This is not the best explanation; sorry.  I hope it's still useful.]

If I remember right, the procedure is this:

To type an equation 'id arg1 arg2 ... = expr', we first give the args
'holes' for types.  As we type expr, we discover constraints on those
types: the holes get filled in (perhaps with types that have other
holes in them).  (We're doing unification, if that helps: the types
are formulas; the holes are variables for which we're accumulating a
substitution.)

When we are done typing expr, if there are any holes left in the args'
types *that we introduced while typing this equation*, then id is
polymorphic, and those holes become type variables in id's type.  Each
subsequent use of id effectively gets its own fresh set of holes, one
for each distinct variable in id's type.

Here's the point: it's only equations that can give identifiers
polymorphic types, where each use gets a fresh set of holes.
Identifiers appearing as lambda parameters (like the args) don't get
such types: all their uses accumulate constraints on their types.

This means that the classic transformation of 'let x = y in z' into
'(\x -> z) y' isn't valid in Haskell (or SML, or OCaml), because the
latter won't ever give you an x with a polymorphic type, whereas the
former will.

You can't work around it like this:

poly4 f = let f2 x = f x
          in ((f2 "a"), (f2 1))

because of the restriction I put in *asterisks* above: the type of f2
has a hole, but it becomes constrained to match the hole that was
introduced when we dealt with poly4's arguments.  Thus, it doesn't
become a type variable in f2's type.  The uses of f2 constrain f2's
and f's type (because they are the same hole).  So f2 and f end up
with effectively the same type.

However, this works fine:

poly2 = ((f "a"), (f 1))
        where f x = x

because the hole in f's type is introduced when we process the
equation 'f x = x', and it's never constrained to match holes from
containing scopes, so by the time we're done checking the equation
it's still a hole, and f gets a polymorphic type.


From carlton@bactrian.org Sun Nov 08 13:43:11 2009
Received: from mail-px0-f189.google.com ([209.85.216.189]:34689)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N7DfL-00067a-EP; Sun, 08 Nov 2009 13:43:11 -0600
Received: by pxi27 with SMTP id 27so604832pxi.25
	for <multiple recipients>; Sun, 08 Nov 2009 11:43:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.24.42 with SMTP id b42mr681965wfj.41.1257709385801; Sun, 
	08 Nov 2009 11:43:05 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
	<90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
	<8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
Date: Sun, 8 Nov 2009 11:43:05 -0800
Message-ID: <90804c6f0911081143w659c1e24u917c5d259ba7629e@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=001636e1f7ab2bdf570477e14992
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 19:43:11 -0000

--001636e1f7ab2bdf570477e14992
Content-Type: text/plain; charset=ISO-8859-1

Thanks.  So I can sort of see how that let-bound polymorphism is relevant; I
don't completely understand your workaround discussion, and haven't yet been
able to come up with a workaround that works in my case.   (The fact that
func is passed in from the outside seems to be throwing a wrench into my
attempts.)

Do you think it's possible in my case or not?    You can test things by
doing

  ghc -e "Test.HUnit.runTestTT (dropTests drop)" Ch02Question.hs

in haskell-study/carlton.

-- 
David Carlton
carlton@bactrian.org


On Sat, Nov 7, 2009 at 11:49 PM, Jim Blandy <jimb@red-bean.com> wrote:

> Here's a simpler example that shows (I think) the same issue:
>
> poly f = ((f "a"), (f 1))
>
> That doesn't compile either:
>
> poly.hs:1:22:
>     No instance for (Num [Char])
>       arising from the literal `1' at poly.hs:1:22
>     Possible fix: add an instance declaration for (Num [Char])
>     In the first argument of `f', namely `1'
>    In the expression: (f 1)
>    In the expression: ((f "a"), (f 1))
>
> The issue here is let-bound polymorphism.  See 12.1 here:
> http://www.haskell.org/tutorial/pitfalls.html
>
> [This is not the best explanation; sorry.  I hope it's still useful.]
>
> If I remember right, the procedure is this:
>
> To type an equation 'id arg1 arg2 ... = expr', we first give the args
> 'holes' for types.  As we type expr, we discover constraints on those
> types: the holes get filled in (perhaps with types that have other
> holes in them).  (We're doing unification, if that helps: the types
> are formulas; the holes are variables for which we're accumulating a
> substitution.)
>
> When we are done typing expr, if there are any holes left in the args'
> types *that we introduced while typing this equation*, then id is
> polymorphic, and those holes become type variables in id's type.  Each
> subsequent use of id effectively gets its own fresh set of holes, one
> for each distinct variable in id's type.
>
> Here's the point: it's only equations that can give identifiers
> polymorphic types, where each use gets a fresh set of holes.
> Identifiers appearing as lambda parameters (like the args) don't get
> such types: all their uses accumulate constraints on their types.
>
> This means that the classic transformation of 'let x = y in z' into
> '(\x -> z) y' isn't valid in Haskell (or SML, or OCaml), because the
> latter won't ever give you an x with a polymorphic type, whereas the
> former will.
>
> You can't work around it like this:
>
> poly4 f = let f2 x = f x
>          in ((f2 "a"), (f2 1))
>
> because of the restriction I put in *asterisks* above: the type of f2
> has a hole, but it becomes constrained to match the hole that was
> introduced when we dealt with poly4's arguments.  Thus, it doesn't
> become a type variable in f2's type.  The uses of f2 constrain f2's
> and f's type (because they are the same hole).  So f2 and f end up
> with effectively the same type.
>
> However, this works fine:
>
> poly2 = ((f "a"), (f 1))
>        where f x = x
>
> because the hole in f's type is introduced when we process the
> equation 'f x = x', and it's never constrained to match holes from
> containing scopes, so by the time we're done checking the equation
> it's still a hole, and f gets a polymorphic type.
>

--001636e1f7ab2bdf570477e14992
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks. =A0So I can sort of see how that let-bound polymorphism is relevant=
; I don&#39;t completely understand your workaround discussion, and haven&#=
39;t yet been able to come up with a workaround that works in my case. =A0=
=A0(The fact that func is passed in from the outside seems to be throwing a=
 wrench into my attempts.)<div>
<br></div><div>Do you think it&#39;s possible in my case or not? =A0 =A0You=
 can test things by doing<div><br></div><div>=A0=A0ghc -e &quot;Test.HUnit.=
runTestTT (dropTests drop)&quot; Ch02Question.hs<br><div><div><br></div><di=
v>in haskell-study/carlton.</div>
<div><br>--=A0<br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org" =
target=3D"_blank">carlton@bactrian.org</a></div><div><br><br><div class=3D"=
gmail_quote">On Sat, Nov 7, 2009 at 11:49 PM, Jim Blandy <span dir=3D"ltr">=
&lt;<a href=3D"mailto:jimb@red-bean.com" target=3D"_blank">jimb@red-bean.co=
m</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Here&#39;s a simpler example that shows (I t=
hink) the same issue:<br>
<br>
poly f =3D ((f &quot;a&quot;), (f 1))<br>
<br>
That doesn&#39;t compile either:<br>
<br>
poly.hs:1:22:<br>
<div> =A0 =A0No instance for (Num [Char])<br>
</div> =A0 =A0 =A0arising from the literal `1&#39; at poly.hs:1:22<br>
<div> =A0 =A0Possible fix: add an instance declaration for (Num [Char])<br>
</div> =A0 =A0In the first argument of `f&#39;, namely `1&#39;<br>
 =A0 =A0In the expression: (f 1)<br>
 =A0 =A0In the expression: ((f &quot;a&quot;), (f 1))<br>
<br>
The issue here is let-bound polymorphism. =A0See 12.1 here:<br>
<a href=3D"http://www.haskell.org/tutorial/pitfalls.html" target=3D"_blank"=
>http://www.haskell.org/tutorial/pitfalls.html</a><br>
<br>
[This is not the best explanation; sorry. =A0I hope it&#39;s still useful.]=
<br>
<br>
If I remember right, the procedure is this:<br>
<br>
To type an equation &#39;id arg1 arg2 ... =3D expr&#39;, we first give the =
args<br>
&#39;holes&#39; for types. =A0As we type expr, we discover constraints on t=
hose<br>
types: the holes get filled in (perhaps with types that have other<br>
holes in them). =A0(We&#39;re doing unification, if that helps: the types<b=
r>
are formulas; the holes are variables for which we&#39;re accumulating a<br=
>
substitution.)<br>
<br>
When we are done typing expr, if there are any holes left in the args&#39;<=
br>
types *that we introduced while typing this equation*, then id is<br>
polymorphic, and those holes become type variables in id&#39;s type. =A0Eac=
h<br>
subsequent use of id effectively gets its own fresh set of holes, one<br>
for each distinct variable in id&#39;s type.<br>
<br>
Here&#39;s the point: it&#39;s only equations that can give identifiers<br>
polymorphic types, where each use gets a fresh set of holes.<br>
Identifiers appearing as lambda parameters (like the args) don&#39;t get<br=
>
such types: all their uses accumulate constraints on their types.<br>
<br>
This means that the classic transformation of &#39;let x =3D y in z&#39; in=
to<br>
&#39;(\x -&gt; z) y&#39; isn&#39;t valid in Haskell (or SML, or OCaml), bec=
ause the<br>
latter won&#39;t ever give you an x with a polymorphic type, whereas the<br=
>
former will.<br>
<br>
You can&#39;t work around it like this:<br>
<br>
poly4 f =3D let f2 x =3D f x<br>
 =A0 =A0 =A0 =A0 =A0in ((f2 &quot;a&quot;), (f2 1))<br>
<br>
because of the restriction I put in *asterisks* above: the type of f2<br>
has a hole, but it becomes constrained to match the hole that was<br>
introduced when we dealt with poly4&#39;s arguments. =A0Thus, it doesn&#39;=
t<br>
become a type variable in f2&#39;s type. =A0The uses of f2 constrain f2&#39=
;s<br>
and f&#39;s type (because they are the same hole). =A0So f2 and f end up<br=
>
with effectively the same type.<br>
<br>
However, this works fine:<br>
<br>
poly2 =3D ((f &quot;a&quot;), (f 1))<br>
 =A0 =A0 =A0 =A0where f x =3D x<br>
<br>
because the hole in f&#39;s type is introduced when we process the<br>
equation &#39;f x =3D x&#39;, and it&#39;s never constrained to match holes=
 from<br>
containing scopes, so by the time we&#39;re done checking the equation<br>
it&#39;s still a hole, and f gets a polymorphic type.<br>
</blockquote></div><br><br clear=3D"all"><br>
</div>
</div></div></div>

--001636e1f7ab2bdf570477e14992--


From jimblandy@gmail.com Sun Nov 08 17:16:31 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:41208)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1N7Gzn-0008SV-Qn
	for haskell-study@red-bean.com; Sun, 08 Nov 2009 17:16:31 -0600
Received: by pwj3 with SMTP id 3so973412pwj.39
	for <haskell-study@red-bean.com>; Sun, 08 Nov 2009 15:16:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=X4MjGVA4fyPX3WZyQnGBswQqwR2ZTSDS64dkNLF+7g4=;
	b=jnk4jr4DoVnDxWdxpjKEQ1vprlhJ45KUpm4Q16hp7UR0LLnoplVAfKWDb5I1YMrAC9
	3ObZJVRp6zcwlSLyfB9e98L9tog+MmcN46rFJ81byqXp5tLb2d3VrImz1fMqhkzYCD+H
	QcgmNimZEh/XCTtMoPauyzsBcl/YVXFJNX48k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=YQQMOnQ64kIL9cMfTBfVMiG7ncIk/E0O5w0O4UfT4MWWSqXlhm/a8T4WGAu8/wYjxO
	zowM6kSVva8GtmxVZMtW/bl1a2gMEQr5oO8TtRZ1G2b28R7yeehQCDBUmFU8voJpz6KL
	dxAro/pDQaJK+Qy12LCl+pwofuKI7zqN4i164=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.122.24 with SMTP id u24mr733733wfc.74.1257722186153; Sun, 
	08 Nov 2009 15:16:26 -0800 (PST)
In-Reply-To: <90804c6f0911081143w659c1e24u917c5d259ba7629e@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
	<90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
	<8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
	<90804c6f0911081143w659c1e24u917c5d259ba7629e@mail.gmail.com>
Date: Sun, 8 Nov 2009 15:16:26 -0800
X-Google-Sender-Auth: 07aac43880c6ef1e
Message-ID: <8f2776cb0911081516k5bd8112aw8454cc086328d773@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 08 Nov 2009 23:16:32 -0000

Try this:

f x = x
poly5 f1 f2 = ((f1 "a"), (f2 1))
poly5 f f


From carlton@bactrian.org Sun Nov 08 18:35:36 2009
Received: from mail-pz0-f174.google.com ([209.85.222.174]:58159)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1N7IEK-0003mZ-Hw; Sun, 08 Nov 2009 18:35:36 -0600
Received: by pzk4 with SMTP id 4so1950763pzk.32
	for <multiple recipients>; Sun, 08 Nov 2009 16:35:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.118.3 with SMTP id q3mr723927wfc.248.1257726930701; Sun, 
	08 Nov 2009 16:35:30 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <8f2776cb0911081516k5bd8112aw8454cc086328d773@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
	<90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
	<8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
	<90804c6f0911081143w659c1e24u917c5d259ba7629e@mail.gmail.com>
	<8f2776cb0911081516k5bd8112aw8454cc086328d773@mail.gmail.com>
Date: Sun, 8 Nov 2009 16:35:30 -0800
Message-ID: <90804c6f0911081635l56b3bbb9q50b3c2b2e11a2b18@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=001636e0b962edcd2f0477e55e63
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 09 Nov 2009 00:35:36 -0000

--001636e0b962edcd2f0477e55e63
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Nov 8, 2009 at 3:16 PM, Jim Blandy <jimb@red-bean.com> wrote:

> Try this:
>
> f x = x
> poly5 f1 f2 = ((f1 "a"), (f2 1))
> poly5 f f
>

Yay, that worked!

import Test.HUnit

dropTests funcchar funcint =
    TestList["drop with remainder" ~: "obar" @=? funcchar 2 "foobar",
             "drop all" ~: "" @=? funcchar 6 "foobar",
             "drop past end" ~: [] @=? funcint 4 [1,2],
             "drop none" ~: [1, 2] @=? funcint 0 [1,2],
             "drop negative" ~: [1, 2] @=? funcint (-7) [1,2]]

tests = TestList[dropTests drop drop]



-- 
David Carlton
carlton@bactrian.org

--001636e0b962edcd2f0477e55e63
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 8, 2009 at 3:16 PM, Jim Blandy <span dir=3D"ltr">&lt;<a href=3D=
"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><div =
class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Try this:<br>
<br>
f x =3D x<br>
poly5 f1 f2 =3D ((f1 &quot;a&quot;), (f2 1))<br>
poly5 f f<br>
</blockquote></div><div><br></div>Yay, that worked!<div><br></div><div><div=
>import Test.HUnit</div><div><br></div><div>dropTests funcchar funcint =3D<=
/div><div>=A0=A0 =A0TestList[&quot;drop with remainder&quot; ~: &quot;obar&=
quot; @=3D? funcchar 2 &quot;foobar&quot;,</div>
<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop all&quot; ~: &quot;&quot; @=3D? =
funcchar 6 &quot;foobar&quot;,</div><div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;d=
rop past end&quot; ~: [] @=3D? funcint 4 [1,2],</div><div>=A0=A0 =A0 =A0 =
=A0 =A0 =A0 &quot;drop none&quot; ~: [1, 2] @=3D? funcint 0 [1,2],</div>
<div>=A0=A0 =A0 =A0 =A0 =A0 =A0 &quot;drop negative&quot; ~: [1, 2] @=3D? f=
uncint (-7) [1,2]]</div><div><br></div><div>tests =3D TestList[dropTests dr=
op drop]</div><div><br></div><br clear=3D"all"><br>-- <br>David Carlton<br>=
<a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>

</div>

--001636e0b962edcd2f0477e55e63--


From 3BrX3Sg0OAP0mfxpjqq-xyzi3lttlqjhtij.htr@codesite.bounces.google.com Mon Nov 09 00:22:04 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:42324)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3BrX3Sg0OAP0mfxpjqq-xyzi3lttlqjhtij.htr@codesite.bounces.google.com>)
	id 1N7Ndc-000262-L1
	for haskell-study@red-bean.com; Mon, 09 Nov 2009 00:22:04 -0600
Received: by pzk24 with SMTP id 24so7561pzk.7
	for <haskell-study@red-bean.com>; Sun, 08 Nov 2009 22:21:58 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.143.27.39 with SMTP id e39mr1032905wfj.26.1257747718888; Sun, 
	08 Nov 2009 22:21:58 -0800 (PST)
Message-ID: <001636e1f77f005d160477ea36c9@google.com>
Date: Mon, 09 Nov 2009 06:21:58 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - Jim
	showed me how to get Ch02Question.hs to work. on 2009-11-09
	06:21 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 09 Nov 2009 06:22:04 -0000

Revision: 66adc97ae7
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov  8 22:20:53 2009
Log: Jim showed me how to get Ch02Question.hs to work.
http://code.google.com/p/haskell-study/source/detail?r=66adc97ae7

Modified:
  /carlton/Ch02Question.hs

=======================================
--- /carlton/Ch02Question.hs	Sat Nov  7 21:36:47 2009
+++ /carlton/Ch02Question.hs	Sun Nov  8 22:20:53 2009
@@ -1,9 +1,11 @@
  import Test.HUnit

  -- dropTests :: (Int -> [a] -> [a]) -> Test
-dropTests func =
-    TestList["drop with remainder" ~: "obar" @=? func 2 "foobar",
-             "drop all" ~: "" @=? func 6 "foobar",
-             "drop past end" ~: [] @=? func 4 [1,2],
-             "drop none" ~: [1, 2] @=? func 0 [1,2],
-             "drop negative" ~: [1, 2] @=? func (-7) [1,2]]
+dropTests funcchar funcint =
+    TestList["drop with remainder" ~: "obar" @=? funcchar 2 "foobar",
+             "drop all" ~: "" @=? funcchar 6 "foobar",
+             "drop past end" ~: [] @=? funcint 4 [1,2],
+             "drop none" ~: [1, 2] @=? funcint 0 [1,2],
+             "drop negative" ~: [1, 2] @=? funcint (-7) [1,2]]
+
+tests = TestList[dropTests drop drop]


From carlton@bactrian.org Tue Nov 10 22:32:56 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:51322)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1N84t6-000660-Au
	for haskell-study@red-bean.com; Tue, 10 Nov 2009 22:32:56 -0600
Received: by pwj3 with SMTP id 3so484896pwj.39
	for <haskell-study@red-bean.com>; Tue, 10 Nov 2009 20:32:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.143.26.41 with SMTP id d41mr113407wfj.228.1257913970644; Tue, 
	10 Nov 2009 20:32:50 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <90804c6f0910291306r12b1312bud59160b49f2bde07@mail.gmail.com>
References: <8f2776cb0910290911v22dabf53g45466139d78d936c@mail.gmail.com>
	<20091029191026.25D3B1C1DF@topped-with-meat.com>
	<8f2776cb0910291230l27b554a3y43d68dc3d7d3d8c2@mail.gmail.com>
	<90804c6f0910291306r12b1312bud59160b49f2bde07@mail.gmail.com>
Date: Tue, 10 Nov 2009 20:32:50 -0800
Message-ID: <90804c6f0911102032y69bc5f6dh24c84c636bc0cc52@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=001636e0af3260d883047810eb0b
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] Chapter 1
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 11 Nov 2009 04:32:56 -0000

--001636e0af3260d883047810eb0b
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Oct 29, 2009 at 12:06 PM, David Carlton <carlton@bactrian.org>wrote:

> On Thu, Oct 29, 2009 at 12:30 PM, Jim Blandy <jimb@red-bean.com> wrote:
>
>> On Thu, Oct 29, 2009 at 12:10 PM, Roland McGrath <roland@frob.com> wrote:
>> > Holy crap, my book's still in the mail.
>> > Is there a plan about timing and pacing of collective progress?
>>
>> Here's an idea about how to handle this:
>>
>> - If you're sending a message about working on a particular chapter,
>> include that chapter name in the subject.
>>
>> - If your message has spoilers (i.e., answers), mention that
>> prominently at the top of the message.
>>
>> - If you're moving slowly, just join in a given chapter's thread
>> whenever you get there, and watch for spoilers.
>>
>> - If you're moving quickly, be open to discussions on old threads.
>
>
> I agree with all of that; having said that, I'd personally be up for a bit
> more synchronization.  In the Vintage Game Club, we do optional
> synchronization where we suggest a point to not go further than over, say,
> the next week; I think it's worked well in that context, and I don't see
> offhand why it wouldn't work here.  (I would make a concrete proposal along
> those lines but my copy of the book is at home and I'm at work.)


I don't feel particularly strongly about this any more - Jim, Praveen, and I
are all at somewhat different places in the book, and that doesn't seem to
be causing any problems.

And to people who haven't started yet: don't worry, the first couple of
chapters are very short, and I for one don't particularly plan to zoom
through the remaining chapters.

-- 
David Carlton
carlton@bactrian.org

--001636e0af3260d883047810eb0b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 29, 2009 at 12:06 PM, David Carlton <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a>&gt;</span> wrot=
e:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Thu, Oct 29, 2009 at 12:30 PM, Jim Blandy <span dir=3D=
"ltr">&lt;<a href=3D"mailto:jimb@red-bean.com" target=3D"_blank">jimb@red-b=
ean.com</a>&gt;</span> wrote:<br><div class=3D"gmail_quote"><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex">

<div>On Thu, Oct 29, 2009 at 12:10 PM, Roland McGrath &lt;<a href=3D"mailto=
:roland@frob.com" target=3D"_blank">roland@frob.com</a>&gt; wrote:<br>
&gt; Holy crap, my book&#39;s still in the mail.<br>
&gt; Is there a plan about timing and pacing of collective progress?<br>
<br>
</div>Here&#39;s an idea about how to handle this:<br>
<br>
- If you&#39;re sending a message about working on a particular chapter,<br=
>
include that chapter name in the subject.<br>
<br>
- If your message has spoilers (i.e., answers), mention that<br>
prominently at the top of the message.<br>
<br>
- If you&#39;re moving slowly, just join in a given chapter&#39;s thread<br=
>
whenever you get there, and watch for spoilers.<br>
<br>
- If you&#39;re moving quickly, be open to discussions on old threads.</blo=
ckquote></div><div><br></div></div>I agree with all of that; having said th=
at, I&#39;d personally be up for a bit more synchronization. =A0In the Vint=
age Game Club, we do optional synchronization where we suggest a point to n=
ot go further than over, say, the next week; I think it&#39;s worked well i=
n that context, and I don&#39;t see offhand why it wouldn&#39;t work here. =
=A0(I would make a concrete proposal along those lines but my copy of the b=
ook is at home and I&#39;m at work.)</blockquote>
<div><br></div><div>I don&#39;t feel particularly strongly about this any m=
ore - Jim, Praveen, and I are all at somewhat different places in the book,=
 and that doesn&#39;t seem to be causing any problems.</div><div><br></div>
<div>And to people who haven&#39;t started yet: don&#39;t worry, the first =
couple of chapters are very short, and I for one don&#39;t particularly pla=
n to zoom through the remaining chapters.</div></div><br>-- <br>David Carlt=
on<br>
<a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>

--001636e0af3260d883047810eb0b--


From 3jbD7Sg0OAIQpi0smtt-012l6owwotmkwlm.kwu@codesite.bounces.google.com Thu Nov 12 00:52:02 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:50339)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3jbD7Sg0OAIQpi0smtt-012l6owwotmkwlm.kwu@codesite.bounces.google.com>)
	id 1N8TXG-0006JQ-Pp
	for haskell-study@red-bean.com; Thu, 12 Nov 2009 00:52:02 -0600
Received: by pzk24 with SMTP id 24so4688pzk.7
	for <haskell-study@red-bean.com>; Wed, 11 Nov 2009 22:51:57 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.113.21 with SMTP id q21mr475544wam.28.1258008717358; Wed, 
	11 Nov 2009 22:51:57 -0800 (PST)
Message-ID: <0016e64be74cb8ff3c047826fa94@google.com>
Date: Thu, 12 Nov 2009 06:51:57 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by prav...@kumar.in - Add
	various chapter 3 solutions. on 2009-11-12 06:51 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 12 Nov 2009 06:52:02 -0000

Revision: 738d1601e0
Author: Praveen Kumar <praveen+hg@kumar.in>
Date: Wed Nov 11 22:51:32 2009
Log: Add various chapter 3 solutions.
http://code.google.com/p/haskell-study/source/detail?r=738d1601e0

Added:
  /praveen/ch03/BookStore.hs
  /praveen/ch03/Intersperse.hs
  /praveen/ch03/ListADT.hs
  /praveen/ch03/Mean.hs
  /praveen/ch03/Palindrome.hs
  /praveen/ch03/Sort.hs
  /praveen/ch03/Tree.hs
  /praveen/ch03/myLength.hs

=======================================
--- /dev/null
+++ /praveen/ch03/BookStore.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,33 @@
+-- Data types for managing books and magazines.
+
+data BookInfo = Book Int String [String] deriving (Show)
+
+data MagazineInfo = Magazine Int String [String] deriving (Show)
+
+type CustomerID = Int
+type ReviewBody = String
+
+data BookReview = BookReview BookInfo CustomerID String
+data BetterReview = BetterReview BookInfo CustomerID ReviewBody
+
+type BookRecord = (BookInfo, BookReview)
+
+
+type CardHolder = String
+type CardNumber = String
+type Address = [String]
+
+data BillingInfo = CreditCard CardHolder CardNumber Address
+                 | CashOnDelivery
+                 | Invoice CustomerID
+                   deriving (Show)
+
+myInfo = Book 9780135072455 "Algebra of Programming"
+         ["Richard Bird", "Oege de Moor"]
+
+
+data Customer = Customer {
+      customerID :: CustomerID,
+      customerName :: String,
+      customerAddress :: Address
+      } deriving (Show)
=======================================
--- /dev/null
+++ /praveen/ch03/Intersperse.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,8 @@
+-- Intersperse a list of lists.
+
+-- Exercise 7.
+intersperse :: a -> [[a]] -> [a]
+intersperse separator (x:xs)
+    | null xs = x
+    | otherwise = x ++ (separator : (intersperse separator xs))
+intersperse separator _ = []
=======================================
--- /dev/null
+++ /praveen/ch03/ListADT.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,14 @@
+-- Demonstrate recursive types.
+
+data List a = Cons a (List a)
+            | Nil
+              deriving (Show)
+
+-- Pre exercise 1.
+fromList (x:xs) = Cons x (fromList xs)
+fromList [] = Nil
+
+toList (Cons x xs) = x:(toList xs)
+toList Nil = []
+
+
=======================================
--- /dev/null
+++ /praveen/ch03/Mean.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,5 @@
+-- Compute mean of a list.
+
+-- Exercise 3.
+-- Naive version
+mean xs = (sum xs) / (fromIntegral (length xs))
=======================================
--- /dev/null
+++ /praveen/ch03/Palindrome.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,19 @@
+-- Some palindrome functions.
+
+-- Exercise 4.
+-- "1234" -> "12344321", "1" -> "11"
+toPalindrome (x:xs) = x : toPalindrome xs ++ [x]
+toPalindrome _ = []
+
+-- "1234" -> "1234321", "1" -> "1"
+anotherToPalindrome (x:xs)
+    | xs == [] = [x]
+    | otherwise = x : anotherToPalindrome xs ++ [x]
+anotherToPalindrome _ = []
+
+-- Exercise 5.
+-- Naive version.
+isPalindrome (x : xs)
+    | xs == [] = True
+    | otherwise = x == last xs && isPalindrome (take ((length xs) - 1) xs)
+isPalindrome _ = True
=======================================
--- /dev/null
+++ /praveen/ch03/Sort.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,15 @@
+-- Sort a list of list based on list length.
+
+import Data.List
+
+-- Naive version.
+compareListsByLength :: [a] -> [a] -> Ordering
+compareListsByLength as bs
+    | las < lbs = LT
+    | las > lbs = GT
+    | otherwise = EQ
+    where las = length as
+          lbs = length bs
+
+-- Exercise 6.
+sortList xs = sortBy compareListsByLength xs
=======================================
--- /dev/null
+++ /praveen/ch03/Tree.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,15 @@
+-- Demonstrate recursive types.
+
+data Tree a = Node a (Tree a) (Tree a)
+            | Empty
+              deriving (Show)
+
+-- Pre exercise 2.
+data TreeUsingMaybe a = TreeUsingMaybe a (Maybe (TreeUsingMaybe a))
+    (Maybe (TreeUsingMaybe a))
+                        deriving (Show)
+
+-- Exercise 8.
+heightOfTree (Node a left right) =
+    1 + max (heightOfTree left) (heightOfTree right)
+heightOfTree Empty = 0
=======================================
--- /dev/null
+++ /praveen/ch03/myLength.hs	Wed Nov 11 22:51:32 2009
@@ -0,0 +1,8 @@
+-- Compute the number of elements in a list.
+
+-- Exercise 2.
+myLength :: [a] -> Int
+
+-- Exercise 1.
+myLength (_:xs) = 1 + myLength(xs)
+myLength [] = 0


From 3kIEISw0OAGUKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com Sat Nov 21 18:11:01 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:50597)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3kIEISw0OAGUKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com>)
	id 1NC02f-0005AI-K5
	for haskell-study@red-bean.com; Sat, 21 Nov 2009 18:11:01 -0600
Received: by pzk24 with SMTP id 24so18976pzk.3
	for <haskell-study@red-bean.com>; Sat, 21 Nov 2009 16:10:56 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.114.5.28 with SMTP id 28mr821386wae.5.1258848656011; Sat, 21 
	Nov 2009 16:10:56 -0800 (PST)
Message-ID: <0016e64af8a8f7b9f00478ea8aa5@google.com>
Date: Sun, 22 Nov 2009 00:10:56 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org -
	Chapter 3 through exercise 6;
	should have committed this last weekend.... on 2009-11-22 00:10 	GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 22 Nov 2009 00:11:01 -0000

Revision: 4069bfb601
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 16:10:17 2009
Log: Chapter 3 through exercise 6; should have committed this last  
weekend...
http://code.google.com/p/haskell-study/source/detail?r=4069bfb601

Added:
  /carlton/Ch03.hs
  /carlton/Ch03Test.hs
  /carlton/ch03-notes.txt

=======================================
--- /dev/null
+++ /carlton/Ch03.hs	Sat Nov 21 16:10:17 2009
@@ -0,0 +1,25 @@
+module Ch03(safeSecond, tidySecond, myLength, mean, palindrome,
+            isPalindrome, sortByLength) where
+
+import Data.List
+import Data.Function
+
+safeSecond [] = Nothing
+safeSecond xs = if null (tail xs)
+                then Nothing
+                else Just (head (tail xs))
+
+tidySecond (_:x:_) = Just x
+tidySecond _ = Nothing
+
+myLength :: [a] -> Int
+myLength [] = 0
+myLength (_:xs) = 1 + myLength xs
+
+mean xs = (sum xs) / (fromIntegral (length xs))
+
+palindrome xs = xs ++ reverse xs
+
+isPalindrome xs = xs == reverse xs
+
+sortByLength = sortBy (compare `on` length)
=======================================
--- /dev/null
+++ /carlton/Ch03Test.hs	Sat Nov 21 16:10:17 2009
@@ -0,0 +1,49 @@
+module Ch03Test(tests) where
+
+import Test.HUnit
+import Ch03
+
+safeSecondTests func =
+    TestList["empty" ~: Nothing @=? func [],
+             "one" ~: Nothing @=? func [1],
+             "two" ~: Just 2 @=? func [1,2],
+             "three" ~: Just 2 @=? func [1,2,3]]
+
+lengthTests func =
+    TestList["empty" ~: 0 @=? func [],
+             "one" ~: 1 @=? func [1],
+             "many" ~: 5 @=? func [1,3,5,7,9]]
+
+meanTests =
+    TestList["one" ~: 5.0 @=? mean [5],
+             "two" ~: 3.0 @=? mean [1, 5],
+             "fractional" ~: 2.5 @=? mean [1,4],
+             "many" ~: 6.0 @=? mean [1, 3, 7, 13]]
+
+palindromeTests =
+    TestList["empty" ~: ([] :: [Int]) @=? palindrome [],
+             "one" ~: [1, 1] @=? palindrome [1],
+             "many" ~: [1,2,3,3,2,1] @=? palindrome [1,2,3]]
+
+isPalindromeTests =
+    TestList["empty" ~: True @=? isPalindrome ([] :: [Int]),
+             "one" ~: True @=? isPalindrome [1],
+             "two different" ~: False @=? isPalindrome[1, 2],
+             "two equal" ~: True @=? isPalindrome [2, 2],
+             "odd equal" ~: True @=? isPalindrome [1, 5, 3, 5, 1],
+             "odd different" ~: False @=? isPalindrome [1, 5, 3, 2, 1],
+             "even equal" ~: True @=? isPalindrome [1, 2, 6, 6, 2, 1],
+             "even different" ~: False @=? isPalindrome [1, 2, 6, 7, 2, 1]]
+
+sortByLengthTests =
+    TestList["one element" ~: [[1, 2]] @=? sortByLength [[1, 2]],
+             "three in order" ~: [[], [1, 2], [1, 2, 3]] @=?
+                              sortByLength [[], [1, 2], [1, 2, 3]],
+             "three reversed" ~: [[], [1, 2], [1, 2, 3]] @=?
+                              sortByLength [[1, 2, 3], [1, 2], []],
+             "three mixed" ~: [[], [1, 2], [1, 2, 3]] @=?
+                              sortByLength [[1, 2], [1, 2, 3], []]]
+
+tests = TestList[safeSecondTests safeSecond, safeSecondTests tidySecond,
+                 lengthTests length, lengthTests myLength, meanTests,
+                 palindromeTests, isPalindromeTests, sortByLengthTests]
=======================================
--- /dev/null
+++ /carlton/ch03-notes.txt	Sat Nov 21 16:10:17 2009
@@ -0,0 +1,57 @@
+* I read the definition of safeSecond on the top of p. 61, and thought
+  that it was excessively verbose.  And it turns out that there are a
+  couple of trivial refactorings that help there.  And then, reading
+  down further in the page, I realized that the book was presenting
+  the same solution, but actually did it one line shorter than I was.
+  For the record (if any of you like trivial refactorings), here's the
+  steps:
+
+safeSecond [] = Nothing
+safeSecond xs = if null (tail xs)
+                then Nothing
+                else Just (head (tail xs))
+
+=> (Replace conditional with pattern matching)
+
+safeSecond [] = Nothing
+safeSecond [_] = Nothing
+safeSecond xs = Just (head (tail xs))
+
+=> (Replace accessor functions with pattern matching)
+
+safeSecond [] = Nothing
+safeSecond [_] = Nothing
+safeSecond (_:x:_) = Just x
+
+=> (I need a good name for this: reorder patterns to minimize cases?
+Guard clause at end?)
+
+safeSecond (_:x:_) = Just x
+safeSecond _ = Nothing
+
+Unlike the Fowler refactorings, though, I don't think these are
+particularly useful in that most of the time you'd just jump straight
+to the idiomatic form.  (Whereas if you're, say, writing C++ code,
+it's more natural to start with conditionals and extract polymorphism
+at a latter stage.)
+
+
+* Another type weirdness: I had to write a test as
+
+  "empty" ~: ([] :: [Int]) @=? palindrome []
+
+  rather than just
+
+  "empty" ~: [] @=? palindrome []
+
+  Otherwise I get this error:
+
+Ch03Test.hs:24:24:
+    Ambiguous type variable `a' in the constraints:
+      `Show a' arising from a use of `@=?' at Ch03Test.hs:24:24-43
+      `Eq a' arising from a use of `@=?' at Ch03Test.hs:24:24-43
+    Probable fix: add a type signature that fixes these type variable(s)
+
+* I'm curious how the performance of hand-written palindrome functions
+  would compared.  But I'm sleepy tonight, so I'm not going to try to
+  work it out.


From 3WJ0ISw0OAEksl3vpww-345o9rzzrwpnzop.nzx@codesite.bounces.google.com Sat Nov 21 20:09:34 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:50875)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3WJ0ISw0OAEksl3vpww-345o9rzzrwpnzop.nzx@codesite.bounces.google.com>)
	id 1NC1tO-00012V-Et
	for haskell-study@red-bean.com; Sat, 21 Nov 2009 20:09:34 -0600
Received: by pzk24 with SMTP id 24so20061pzk.3
	for <haskell-study@red-bean.com>; Sat, 21 Nov 2009 18:09:28 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.114.237.4 with SMTP id k4mr827838wah.23.1258855768689; Sat, 21 
	Nov 2009 18:09:28 -0800 (PST)
Message-ID: <0016e64cc3ccea9a730478ec3269@google.com>
Date: Sun, 22 Nov 2009 02:09:28 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 4 new revisions pushed by
	carl...@bactrian.org on 2009-11-22 02:08 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 22 Nov 2009 02:09:34 -0000

4 new revisions:

Revision: 3849bdfd58
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 16:18:51 2009
Log: Implement intersperse.
http://code.google.com/p/haskell-study/source/detail?r=3849bdfd58

Revision: e6db2be217
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 16:33:55 2009
Log: Implement height.
http://code.google.com/p/haskell-study/source/detail?r=e6db2be217

Revision: acbb2c3817
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 17:13:19 2009
Log: Whoops, I was overly restrictive in my type declaration for...
http://code.google.com/p/haskell-study/source/detail?r=acbb2c3817

Revision: 4092406539
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 18:08:42 2009
Log: Start working on on the convex hull stuff from chapter 3.
http://code.google.com/p/haskell-study/source/detail?r=4092406539

==============================================================================
Revision: 3849bdfd58
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 16:18:51 2009
Log: Implement intersperse.
http://code.google.com/p/haskell-study/source/detail?r=3849bdfd58

Modified:
  /carlton/Ch03.hs
  /carlton/Ch03Test.hs

=======================================
--- /carlton/Ch03.hs	Sat Nov 21 16:10:17 2009
+++ /carlton/Ch03.hs	Sat Nov 21 16:18:51 2009
@@ -1,7 +1,7 @@
  module Ch03(safeSecond, tidySecond, myLength, mean, palindrome,
-            isPalindrome, sortByLength) where
-
-import Data.List
+            isPalindrome, sortByLength, intersperse) where
+
+import Data.List (sortBy)
  import Data.Function

  safeSecond [] = Nothing
@@ -23,3 +23,7 @@
  isPalindrome xs = xs == reverse xs

  sortByLength = sortBy (compare `on` length)
+
+intersperse _ [] = []
+intersperse _ [x] = x
+intersperse sep (x:xs) = x ++ (sep : intersperse sep xs)
=======================================
--- /carlton/Ch03Test.hs	Sat Nov 21 16:10:17 2009
+++ /carlton/Ch03Test.hs	Sat Nov 21 16:18:51 2009
@@ -44,6 +44,14 @@
               "three mixed" ~: [[], [1, 2], [1, 2, 3]] @=?
                                sortByLength [[1, 2], [1, 2, 3], []]]

+intersperseTests =
+    TestList["empty" ~: "" @=? intersperse ',' [],
+             "one element" ~: "foo" @=? intersperse ',' ["foo"],
+             "two elements" ~: "foo,bar" @=? intersperse ','  
["foo", "bar"],
+             "many elements" ~: "foo,bar,baz,quux" @=?
+                             intersperse ',' ["foo", "bar", "baz", "quux"]]
+
  tests = TestList[safeSecondTests safeSecond, safeSecondTests tidySecond,
                   lengthTests length, lengthTests myLength, meanTests,
-                 palindromeTests, isPalindromeTests, sortByLengthTests]
+                 palindromeTests, isPalindromeTests, sortByLengthTests,
+                 intersperseTests]

==============================================================================
Revision: e6db2be217
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 16:33:55 2009
Log: Implement height.
http://code.google.com/p/haskell-study/source/detail?r=e6db2be217

Modified:
  /carlton/Ch03.hs
  /carlton/Ch03Test.hs

=======================================
--- /carlton/Ch03.hs	Sat Nov 21 16:18:51 2009
+++ /carlton/Ch03.hs	Sat Nov 21 16:33:55 2009
@@ -1,5 +1,5 @@
  module Ch03(safeSecond, tidySecond, myLength, mean, palindrome,
-            isPalindrome, sortByLength, intersperse) where
+            isPalindrome, sortByLength, intersperse, Tree(..), height)  
where

  import Data.List (sortBy)
  import Data.Function
@@ -27,3 +27,10 @@
  intersperse _ [] = []
  intersperse _ [x] = x
  intersperse sep (x:xs) = x ++ (sep : intersperse sep xs)
+
+data Tree a = Node a (Tree a) (Tree a)
+            | Empty
+              deriving (Show)
+
+height Empty = 0
+height (Node _ l r) = 1 + (max (height l) (height r))
=======================================
--- /carlton/Ch03Test.hs	Sat Nov 21 16:18:51 2009
+++ /carlton/Ch03Test.hs	Sat Nov 21 16:33:55 2009
@@ -51,7 +51,25 @@
               "many elements" ~: "foo,bar,baz,quux" @=?
                               intersperse ',' ["foo", "bar", "baz", "quux"]]

+heightTests =
+    TestList["empty" ~: 0 @=? height Empty,
+             "one" ~: 1 @=? height (Node "x" Empty Empty),
+             "two/one" ~: 2 @=? height (Node "x" (Node "y" Empty Empty)
+                                             Empty),
+             "one/two" ~: 2 @=? height (Node "x" Empty
+                                                 (Node "y" Empty Empty)),
+             "two/two" ~: 2 @=? height (Node "x" (Node "y" Empty Empty)
+                                                 (Node "z" Empty Empty)),
+             "large" ~: 4 @=? height (Node "x"
+                                      (Node "y" Empty
+                                       (Node "z" Empty Empty))
+                                      (Node "w"
+                                       (Node "v" Empty
+                                        (Node "u" Empty Empty))
+                                       Empty))]
+
+
  tests = TestList[safeSecondTests safeSecond, safeSecondTests tidySecond,
                   lengthTests length, lengthTests myLength, meanTests,
                   palindromeTests, isPalindromeTests, sortByLengthTests,
-                 intersperseTests]
+                 intersperseTests, heightTests]

==============================================================================
Revision: acbb2c3817
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 17:13:19 2009
Log: Whoops, I was overly restrictive in my type declaration for
assertException.
http://code.google.com/p/haskell-study/source/detail?r=acbb2c3817

Modified:
  /carlton/TestHelper.hs

=======================================
--- /carlton/TestHelper.hs	Sat Nov  7 21:21:29 2009
+++ /carlton/TestHelper.hs	Sat Nov 21 17:13:19 2009
@@ -4,14 +4,14 @@
  import Control.OldException

  -- How do I get this to work with Control.Exception?
-shouldBeException :: (IO (Either a Int)) -> Assertion
+shouldBeException :: (IO (Either a b)) -> Assertion
  shouldBeException x = do
    val <- x
    checkForException val where
        checkForException (Left _) = return ()
        checkForException (Right _) = assertFailure "oops"

-assertException :: String -> Int -> Assertion
+assertException :: String -> a -> Assertion
  assertException msg val = do
    shouldBeException (try (evaluate val))


==============================================================================
Revision: 4092406539
Author: "David Carlton <carlton@bactrian.org>"
Date: Sat Nov 21 18:08:42 2009
Log: Start working on on the convex hull stuff from chapter 3.
http://code.google.com/p/haskell-study/source/detail?r=4092406539

Added:
  /carlton/Plane.hs
  /carlton/PlaneTest.hs
Modified:
  /carlton/Ch03.hs
  /carlton/Ch03Test.hs
  /carlton/ch03-notes.txt

=======================================
--- /dev/null
+++ /carlton/Plane.hs	Sat Nov 21 18:08:42 2009
@@ -0,0 +1,27 @@
+module Plane(bottom, TurnDirection(..), turnDirection) where
+
+import Data.List
+
+bottom :: [(Int, Int)] -> (Int, Int)
+bottom = minimumBy reverseLexicographicalCompare where
+    reverseLexicographicalCompare (a,b) (c,d)
+        | b < d = LT
+        | b > d = GT
+        | otherwise = compare a c
+
+-- I'm fairly sure I'm going to need to further refine Straight into
+-- Forward/Back/Stopped, but when I started implementing that, it got
+-- delicate.  So I'm waiting until I actually need that...
+
+data TurnDirection = LeftTurn | RightTurn | Straight
+                     deriving (Eq, Show)
+
+turnDirection (x1, y1) (x2, y2) (x3, y3) =
+    let (v1, w1) = (x2-x1, y2-y1)
+        (v2, w2) = (x3-x2, y3-y2)
+        det = v1 * w2 - w1 * v2
+    in
+      prodToTurn det where
+          prodToTurn det | det > 0 = LeftTurn
+          prodToTurn det | det < 0 = RightTurn
+          prodToTurn 0 = Straight
=======================================
--- /dev/null
+++ /carlton/PlaneTest.hs	Sat Nov 21 18:08:42 2009
@@ -0,0 +1,26 @@
+module PlaneTest(tests) where
+
+import Plane
+import Test.HUnit
+import TestHelper
+
+bottomTests =
+    TestList["no points" @! bottom [],
+             "one point" ~: (0,0) @=? bottom [(0,0)],
+             "two first lower" ~: (30,0) @=? bottom [(30,0), (0,1)],
+             "two second lower" ~: (30,0) @=? bottom [(0,1), (30,0)],
+             "two same height first left" ~: (0,0) @=? bottom[(0,0),  
(1,0)],
+             "two same height first right" ~: (0,0) @=? bottom[(1,0),  
(0,0)],
+             "many" ~: (10,(-10)) @=?
+                        bottom [((-1),3), (0,0), (10, (-10)), (40, 12),
+                                (100, (-10))]
+            ]
+
+turnDirectionTests =
+    TestList["left" ~: LeftTurn @=? turnDirection (0,0) (2,2) (1,3),
+             "right" ~: RightTurn @=? turnDirection (1,1) (2,3) (4,0),
+             "straight forward" ~: Straight @=? turnDirection (1,1) (2,2)  
(3,3),
+             "straight back" ~: Straight @=? turnDirection (1,1) (3,3)  
(2,2)
+            ]
+
+tests = TestList[bottomTests, turnDirectionTests]
=======================================
--- /carlton/Ch03.hs	Sat Nov 21 16:33:55 2009
+++ /carlton/Ch03.hs	Sat Nov 21 18:08:42 2009
@@ -1,6 +1,8 @@
  module Ch03(safeSecond, tidySecond, myLength, mean, palindrome,
              isPalindrome, sortByLength, intersperse, Tree(..), height)  
where

+-- See also Plane.hs.
+
  import Data.List (sortBy)
  import Data.Function

=======================================
--- /carlton/Ch03Test.hs	Sat Nov 21 16:33:55 2009
+++ /carlton/Ch03Test.hs	Sat Nov 21 18:08:42 2009
@@ -1,5 +1,7 @@
  module Ch03Test(tests) where

+-- See also PlaneTest.hs.
+
  import Test.HUnit
  import Ch03

=======================================
--- /carlton/ch03-notes.txt	Sat Nov 21 16:10:17 2009
+++ /carlton/ch03-notes.txt	Sat Nov 21 18:08:42 2009
@@ -55,3 +55,7 @@
  * I'm curious how the performance of hand-written palindrome functions
    would compared.  But I'm sleepy tonight, so I'm not going to try to
    work it out.
+
+* When doing the convex hull stuff, I wanted to make Point a type
+  synonym for pairs, but I couldn't come up with a syntax where that
+  made sense.


From 3qgsKSw0OAAssl3vpww-345o9rzzrwpnzop.nzx@codesite.bounces.google.com Sun Nov 22 22:12:32 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:43352)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3qgsKSw0OAAssl3vpww-345o9rzzrwpnzop.nzx@codesite.bounces.google.com>)
	id 1NCQHw-00083N-5f
	for haskell-study@red-bean.com; Sun, 22 Nov 2009 22:12:32 -0600
Received: by pzk24 with SMTP id 24so23037pzk.3
	for <haskell-study@red-bean.com>; Sun, 22 Nov 2009 20:12:26 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.75.5 with SMTP id x5mr1000550wfa.7.1258949546304; Sun, 22 
	Nov 2009 20:12:26 -0800 (PST)
Message-ID: <001636e1fd3e7f6e4c047902084c@google.com>
Date: Mon, 23 Nov 2009 04:12:26 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 3 new revisions pushed by
	carl...@bactrian.org on 2009-11-23 04:11 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 04:12:32 -0000

3 new revisions:

Revision: 3b7a8a2f53
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 17:26:18 2009
Log: Not sure what I was thinking when I wrote that comment.
http://code.google.com/p/haskell-study/source/detail?r=3b7a8a2f53

Revision: 946fae8104
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 19:57:05 2009
Log: First implementation of convexHull.
http://code.google.com/p/haskell-study/source/detail?r=946fae8104

Revision: 57b43b0423
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 20:11:35 2009
Log: A few more convex hull comments.
http://code.google.com/p/haskell-study/source/detail?r=57b43b0423

==============================================================================
Revision: 3b7a8a2f53
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 17:26:18 2009
Log: Not sure what I was thinking when I wrote that comment.
http://code.google.com/p/haskell-study/source/detail?r=3b7a8a2f53

Modified:
  /carlton/ch03-notes.txt

=======================================
--- /carlton/ch03-notes.txt	Sat Nov 21 18:08:42 2009
+++ /carlton/ch03-notes.txt	Sun Nov 22 17:26:18 2009
@@ -55,7 +55,3 @@
  * I'm curious how the performance of hand-written palindrome functions
    would compared.  But I'm sleepy tonight, so I'm not going to try to
    work it out.
-
-* When doing the convex hull stuff, I wanted to make Point a type
-  synonym for pairs, but I couldn't come up with a syntax where that
-  made sense.

==============================================================================
Revision: 946fae8104
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 19:57:05 2009
Log: First implementation of convexHull.
http://code.google.com/p/haskell-study/source/detail?r=946fae8104

Modified:
  /carlton/Plane.hs
  /carlton/PlaneTest.hs
  /carlton/ch03-notes.txt

=======================================
--- /carlton/Plane.hs	Sat Nov 21 18:08:42 2009
+++ /carlton/Plane.hs	Sun Nov 22 19:57:05 2009
@@ -1,4 +1,5 @@
-module Plane(bottom, TurnDirection(..), turnDirection) where
+module Plane(bottom, TurnDirection(..), turnDirection, grahamScanSort,
+             convexHull) where

  import Data.List

@@ -13,6 +14,9 @@
  -- Forward/Back/Stopped, but when I started implementing that, it got
  -- delicate.  So I'm waiting until I actually need that...

+-- Update: I'm feeling too lazy to either convince myself that I do
+-- need that or don't.
+
  data TurnDirection = LeftTurn | RightTurn | Straight
                       deriving (Eq, Show)

@@ -25,3 +29,25 @@
            prodToTurn det | det > 0 = LeftTurn
            prodToTurn det | det < 0 = RightTurn
            prodToTurn 0 = Straight
+
+
+grahamScanSort points =
+    let first = bottom points
+    in
+      (first : (sortBy (grahamScanOrdering first) (delete first points)))  
where
+          grahamScanOrdering first x y
+              | turnDirection first x y == LeftTurn = LT
+              | turnDirection first x y == RightTurn = GT
+              | otherwise = EQ
+
+-- I'm not completely convinced this is correct in cases where we
+-- have three points in a row.
+convexHull points =
+    let (first:second:rest) = grahamScanSort points
+    in
+      removeRightTurns first second rest where
+          removeRightTurns first second [] = [first, second]
+          removeRightTurns first second (p:ps)
+              | turnDirection first second p == RightTurn =
+                  removeRightTurns first p ps
+              | otherwise = first : removeRightTurns second p ps
=======================================
--- /carlton/PlaneTest.hs	Sat Nov 21 18:08:42 2009
+++ /carlton/PlaneTest.hs	Sun Nov 22 19:57:05 2009
@@ -23,4 +23,29 @@
               "straight back" ~: Straight @=? turnDirection (1,1) (3,3)  
(2,2)
              ]

-tests = TestList[bottomTests, turnDirectionTests]
+grahamScanSortTests =
+    TestList["abc" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(0,0), (3,1), (2,2)],
+             "acb" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(0,0), (2,2), (3,1)],
+             "bac" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(3,1), (0,0), (2,2)],
+             "bca" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(3,1), (2,2), (0,0)],
+             "cab" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(2,2), (0,0), (3,1)],
+             "cba" ~: [(0,0), (3,1), (2,2)] @=?
+                   grahamScanSort [(2,2), (3,1), (0,0)],
+             "daceb" ~: [(1,-1), (5,0), (2,2), (0,0), (-5,0)] @=?
+                     grahamScanSort [(0,0), (1,-1), (2,2), (-5,0), (5,0)]]
+
+convexHullTests = TestList["caXb" ~: [(0,0), (3,1), (2,2)] @=?
+                                  convexHull [(2,2), (0,0), (2,1), (3,1)],
+                           "abcX" ~: [(0,0), (3,1), (2,2)] @=?
+                                  convexHull [(0,0), (3,1), (2,2), (2,1)],
+                           "aeXdbXc" ~: [(2,0),(4,1),(3,3),(2,3),(0,1)] @=?
+                                     convexHull [(2,0),(0,1),(3,2),(2,3),
+                                                 (4,1),(1,1),(3,3)]]
+
+tests = TestList[bottomTests, turnDirectionTests, grahamScanSortTests,
+                 convexHullTests]
=======================================
--- /carlton/ch03-notes.txt	Sun Nov 22 17:26:18 2009
+++ /carlton/ch03-notes.txt	Sun Nov 22 19:57:05 2009
@@ -55,3 +55,6 @@
  * I'm curious how the performance of hand-written palindrome functions
    would compared.  But I'm sleepy tonight, so I'm not going to try to
    work it out.
+
+* Why aren't outer variables in scope when defining a helper function
+  via a where clause?  I frequently want to do that. :-(

==============================================================================
Revision: 57b43b0423
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 22 20:11:35 2009
Log: A few more convex hull comments.
http://code.google.com/p/haskell-study/source/detail?r=57b43b0423

Modified:
  /carlton/Plane.hs
  /carlton/ch03-notes.txt

=======================================
--- /carlton/Plane.hs	Sun Nov 22 19:57:05 2009
+++ /carlton/Plane.hs	Sun Nov 22 20:11:35 2009
@@ -30,18 +30,18 @@
            prodToTurn det | det < 0 = RightTurn
            prodToTurn 0 = Straight

+compareTurn LeftTurn = LT
+compareTurn RightTurn = GT
+compareTurn Straight = EQ

  grahamScanSort points =
      let first = bottom points
      in
        (first : (sortBy (grahamScanOrdering first) (delete first points)))  
where
-          grahamScanOrdering first x y
-              | turnDirection first x y == LeftTurn = LT
-              | turnDirection first x y == RightTurn = GT
-              | otherwise = EQ
+          grahamScanOrdering first x y = compareTurn (turnDirection first  
x y)

  -- I'm not completely convinced this is correct in cases where we
--- have three points in a row.
+-- have enough points in a row.
  convexHull points =
      let (first:second:rest) = grahamScanSort points
      in
=======================================
--- /carlton/ch03-notes.txt	Sun Nov 22 19:57:05 2009
+++ /carlton/ch03-notes.txt	Sun Nov 22 20:11:35 2009
@@ -57,4 +57,24 @@
    work it out.

  * Why aren't outer variables in scope when defining a helper function
-  via a where clause?  I frequently want to do that. :-(
+  via a where clause?  I frequently want to do that. :-(  Here's an
+  example:
+
+grahamScanSort points =
+    let first = bottom points
+    in
+      (first : (sortBy (grahamScanOrdering first) (delete first points)))  
where
+          grahamScanOrdering first x y = compareTurn (turnDirection first  
x y)
+
+  I have to repeat 'first' in lots of places below, whereas I'd like
+  grahamScanOrdering to be able to refer to the 'first' that's defined
+  in the let clause.
+
+* Also, the definition of grahamScanOrdering is too verbose.  If
+  grahamScanOrdering were a real 3-arg function, then I could just say
+  grahamScanOrdering = compareTurn . turnDirection.  But currying gets
+  in the way of that.  Surely there's a terser way to write that?
+
+* I'm curious to see how the code would have turned out if I'd done
+  exercise 12, but I'm not feeling like doing that myself.  Maybe
+  somebody else will do that?


From carlton@bactrian.org Sun Nov 22 22:14:03 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:41526)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1NCQJP-0008UL-3y
	for haskell-study@red-bean.com; Sun, 22 Nov 2009 22:14:03 -0600
Received: by pxi10 with SMTP id 10so3795831pxi.33
	for <haskell-study@red-bean.com>; Sun, 22 Nov 2009 20:13:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.66.25 with SMTP id o25mr449939wfa.195.1258949637296; Sun, 
	22 Nov 2009 20:13:57 -0800 (PST)
X-Originating-IP: [76.102.15.41]
Date: Sun, 22 Nov 2009 20:13:57 -0800
Message-ID: <90804c6f0911222013y6712dec3sbe6a4fbe6ba2375d@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=001636e0a5a5ebd4b60479020d75
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] chapter 3 and simple refactorings
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 04:14:03 -0000

--001636e0a5a5ebd4b60479020d75
Content-Type: text/plain; charset=ISO-8859-1

Some notes I took when going through chapter 3 of the book:

I read the definition of safeSecond on the top of p. 61, and thought that it
was excessively verbose.  And it turns out that there are a couple of
trivial refactorings that help there.  And then, reading down further in the
page, I realized that the book was presenting the same solution, but
actually did it one line shorter than I was.  For the record (if any of you
like trivial refactorings), here's the steps:

safeSecond [] = Nothing
safeSecond xs = if null (tail xs)
                then Nothing
                else Just (head (tail xs))

=> (Replace conditional with pattern matching)

safeSecond [] = Nothing
safeSecond [_] = Nothing
safeSecond xs = Just (head (tail xs))

=> (Replace accessor functions with pattern matching)

safeSecond [] = Nothing
safeSecond [_] = Nothing
safeSecond (_:x:_) = Just x

=> (I need a good name for this: reorder patterns to minimize cases? Guard
clause at end?)

safeSecond (_:x:_) = Just x
safeSecond _ = Nothing

Unlike the Fowler refactorings, though, I don't think these are particularly
useful in that most of the time you'd just jump straight to the idiomatic
form.  (Whereas if you're, say, writing C++ code, it's more natural to start
with conditionals and extract polymorphism at a latter stage.)

-- 
David Carlton
carlton@bactrian.org

--001636e0a5a5ebd4b60479020d75
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Some notes I took when going through chapter 3 of the book:<br><br>I read t=
he definition of safeSecond on the top of p. 61, and thought that it was ex=
cessively verbose.=A0 And it turns out that there are a couple of trivial r=
efactorings that help there.=A0 And then, reading down further in the page,=
 I realized that the book was presenting the same solution, but actually di=
d it one line shorter than I was.=A0 For the record (if any of you like tri=
vial refactorings), here&#39;s the steps:<br>
<br>safeSecond [] =3D Nothing<br>safeSecond xs =3D if null (tail xs)<br>=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 then Nothing<br>=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 else Just (head (tail xs))<br><br>=3D&gt; (R=
eplace conditional with pattern matching)<br><br>safeSecond [] =3D Nothing<=
br>
safeSecond [_] =3D Nothing<br>safeSecond xs =3D Just (head (tail xs))<br><b=
r>=3D&gt; (Replace accessor functions with pattern matching)<br><br>safeSec=
ond [] =3D Nothing<br>safeSecond [_] =3D Nothing<br>safeSecond (_:x:_) =3D =
Just x<br>
<br>=3D&gt; (I need a good name for this: reorder patterns to minimize case=
s? Guard clause at end?)<br><br>safeSecond (_:x:_) =3D Just x<br>safeSecond=
 _ =3D Nothing<br><br>Unlike the Fowler refactorings, though, I don&#39;t t=
hink these are particularly useful in that most of the time you&#39;d just =
jump straight to the idiomatic form.=A0 (Whereas if you&#39;re, say, writin=
g C++ code, it&#39;s more natural to start with conditionals and extract po=
lymorphism at a latter stage.)<br clear=3D"all">
<br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton=
@bactrian.org</a><br>

--001636e0a5a5ebd4b60479020d75--


From carlton@bactrian.org Sun Nov 22 22:19:20 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:41384)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>) id 1NCQOW-0001QG-0C
	for haskell-study@red-bean.com; Sun, 22 Nov 2009 22:19:20 -0600
Received: by pzk13 with SMTP id 13so3463999pzk.25
	for <haskell-study@red-bean.com>; Sun, 22 Nov 2009 20:19:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.62.12 with SMTP id k12mr461744wfa.138.1258949954270; Sun, 
	22 Nov 2009 20:19:14 -0800 (PST)
X-Originating-IP: [76.102.15.41]
Date: Sun, 22 Nov 2009 20:19:14 -0800
Message-ID: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: haskell-study@red-bean.com
Content-Type: multipart/alternative; boundary=001636e0ae11d0764c047902207a
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] the convex hull exercises at the end of chapter 3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 04:19:20 -0000

--001636e0ae11d0764c047902207a
Content-Type: text/plain; charset=ISO-8859-1

I didn't quite do as much with the convex hull exercises at the end of
chapter 3 as I could have; I'm actually quite curious to see what solutions
other people come up with for those problems.  (Though I don't blame people
who don't work through those problems, either...)  Some notes I took while
working through them:

* Why aren't outer variables in scope when defining a helper function via a
where clause?  I frequently want to do that. :-(  Here's an example:

grahamScanSort points =
    let first = bottom points
    in
      (first : (sortBy (grahamScanOrdering first) (delete first points)))
where
          grahamScanOrdering first x y = compareTurn (turnDirection first x
y)

I have to repeat 'first' in lots of places below, whereas I'd like
grahamScanOrdering to be able to refer to the 'first' that's defined in the
let clause.

* Also, the definition of grahamScanOrdering is too verbose.  If
grahamScanOrdering were a real 3-arg function, then I could just say
"grahamScanOrdering = compareTurn . turnDirection"  But currying gets in the
way of that.  Surely there's a terser way to write that?

* I'm curious to see how the code would have turned out if I'd done exercise
12, but I'm not feeling like doing that myself.  Maybe somebody else will do
that?

* I'm not convinced that my solution works correctly if there are enough
points in a row - it seemed to me like you need to distinguish between going
forward and going back.  I could be wrong, though - I didn't have enough
energy to try to come up with a test that would prove that suspicion correct
or incorrect.

* Actually, to be completely candid, I'm not convinced that my solution
doesn't have other bugs in it, too: I didn't do as thorough testing as I
would like.

-- 
David Carlton
carlton@bactrian.org

--001636e0ae11d0764c047902207a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I didn&#39;t quite do as much with the convex hull exercises at the end of =
chapter 3 as I could have; I&#39;m actually quite curious to see what solut=
ions other people come up with for those problems.=A0 (Though I don&#39;t b=
lame people who don&#39;t work through those problems, either...)=A0 Some n=
otes I took while working through them:<br>
<br>* Why aren&#39;t outer variables in scope when defining a helper functi=
on via a where clause?=A0 I frequently want to do that. :-(=A0 Here&#39;s a=
n example:<br><br>grahamScanSort points =3D<br>=A0=A0=A0 let first =3D bott=
om points<br>
=A0=A0=A0 in<br>=A0=A0=A0=A0=A0 (first : (sortBy (grahamScanOrdering first)=
 (delete first points))) where<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0 grahamScanOrd=
ering first x y =3D compareTurn (turnDirection first x y)<br><br>I have to =
repeat &#39;first&#39; in lots of places below, whereas I&#39;d like graham=
ScanOrdering to be able to refer to the &#39;first&#39; that&#39;s defined =
in the let clause.<br>
<br>* Also, the definition of grahamScanOrdering is too verbose.=A0 If grah=
amScanOrdering were a real 3-arg function, then I could just say &quot;grah=
amScanOrdering =3D compareTurn . turnDirection&quot;=A0 But currying gets i=
n the way of that.=A0 Surely there&#39;s a terser way to write that?<br>
<br>* I&#39;m curious to see how the code would have turned out if I&#39;d =
done exercise 12, but I&#39;m not feeling like doing that myself.=A0 Maybe =
somebody else will do that?<br><br>* I&#39;m not convinced that my solution=
 works correctly if there are enough points in a row - it seemed to me like=
 you need to distinguish between going forward and going back.=A0 I could b=
e wrong, though - I didn&#39;t have enough energy to try to come up with a =
test that would prove that suspicion correct or incorrect.<br>
<br>* Actually, to be completely candid, I&#39;m not convinced that my solu=
tion doesn&#39;t have other bugs in it, too: I didn&#39;t do as thorough te=
sting as I would like.<br clear=3D"all"><br>-- <br>David Carlton<br><a href=
=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a><br>


--001636e0ae11d0764c047902207a--


From jimblandy@gmail.com Mon Nov 23 12:05:34 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:48998)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NCdI6-0006iz-3L
	for haskell-study@red-bean.com; Mon, 23 Nov 2009 12:05:34 -0600
Received: by pxi10 with SMTP id 10so4249558pxi.33
	for <haskell-study@red-bean.com>; Mon, 23 Nov 2009 10:05:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=GR9L0fMMCRRhvIl8xMFkQWDptnLj+wtP7DBsHFZaQzY=;
	b=U2sCPfxYvRgOhAMtAyH2JlVMvQVg3N+Rk0VAcyc/dWQQBNKCN17LYfnIcq86o0N6ni
	LTgxP2IyTYES3bv4fewCojZXELyCih86DOvbg87kLOSAqLj5viGOFXoRj3szeFK8ZRcf
	w3iE0DZ8H9Auhio5aJzPhy89l39GbWh7ZuEMY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=CRkQKPWp/J9TwwrQpIpF8mYxGhIEPBtetnZiS2M3vEYLPYd1hgYolrYM6hmTgoxN0p
	I+ca0lvE3wm3VcCaPuXAPYi96P0LOuDyewHifOZjIvHIt6Vn+v8md74LGBLEBsSNhRnd
	fzT+qHMUg/Xtm59dF5YY3i6BDOgre9kIeOuZ4=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.138.7 with SMTP id q7mr517205wfn.188.1258999528554; Mon, 
	23 Nov 2009 10:05:28 -0800 (PST)
In-Reply-To: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
Date: Mon, 23 Nov 2009 10:05:28 -0800
X-Google-Sender-Auth: 0b18d7976ef78ba0
Message-ID: <8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 18:05:34 -0000

On Sun, Nov 22, 2009 at 8:19 PM, David Carlton <carlton@bactrian.org> wrote=
:
> * Why aren't outer variables in scope when defining a helper function via=
 a
> where clause?=A0 I frequently want to do that. :-(=A0 Here's an example:

They really should be.  Are you sure you're not being tripped up by
the offside rule?


From carlton@bactrian.org Mon Nov 23 12:26:42 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:49050)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1NCdcY-0004Ck-3H; Mon, 23 Nov 2009 12:26:42 -0600
Received: by pxi10 with SMTP id 10so4263897pxi.33
	for <multiple recipients>; Mon, 23 Nov 2009 10:26:36 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.6.11 with SMTP id 11mr519412wff.260.1259000796471; Mon, 23 
	Nov 2009 10:26:36 -0800 (PST)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
	<8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
Date: Mon, 23 Nov 2009 10:26:36 -0800
Message-ID: <90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502b2233ee37104790df738
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 18:26:42 -0000

--00504502b2233ee37104790df738
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Nov 23, 2009 at 10:05 AM, Jim Blandy <jimb@red-bean.com> wrote:

> On Sun, Nov 22, 2009 at 8:19 PM, David Carlton <carlton@bactrian.org>
> wrote:
> > * Why aren't outer variables in scope when defining a helper function via
> a
> > where clause?  I frequently want to do that. :-(  Here's an example:
>
> They really should be.  Are you sure you're not being tripped up by
> the offside rule?
>

Pretty sure, yeah: if I modify the definition of grahamScanSort in
haskell-study/carlton/Plane.hs to the following:

grahamScanSort points =
    let first = bottom points
    in
      (first : (sortBy grahamScanOrdering (delete first points))) where
          grahamScanOrdering x y = compareTurn (turnDirection first x y)

then I get this error:

ghc -e "Test.HUnit.runTestTT PlaneTest.tests" PlaneTest.hs

Plane.hs:41:62: Not in scope: `first'
make: *** [PlaneTest.hs] Error 1

(Where Plane.hs:41:52 is the 'first' mention on the last line of that
definition.)

-- 
David Carlton
carlton@bactrian.org

--00504502b2233ee37104790df738
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 23, 2009 at 10:05 AM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Sun, Nov 22, 2009 at 8:19 PM, David Carlton &lt;<a hre=
f=3D"mailto:carlton@bactrian.org">carlton@bactrian.org</a>&gt; wrote:<br>
&gt; * Why aren&#39;t outer variables in scope when defining a helper funct=
ion via a<br>
&gt; where clause?=A0 I frequently want to do that. :-(=A0 Here&#39;s an ex=
ample:<br>
<br>
</div>They really should be. =A0Are you sure you&#39;re not being tripped u=
p by<br>
the offside rule?<br>
</blockquote></div><br>Pretty sure, yeah: if I modify the definition of gra=
hamScanSort in haskell-study/carlton/Plane.hs to the following:<div><br></d=
iv><div><div>grahamScanSort points =3D</div><div>=A0=A0 =A0let first =3D bo=
ttom points</div>
<div>=A0=A0 =A0in</div><div>=A0=A0 =A0 =A0(first : (sortBy grahamScanOrderi=
ng (delete first points))) where</div><div>=A0=A0 =A0 =A0 =A0 =A0grahamScan=
Ordering x y =3D compareTurn (turnDirection first x y)</div><div><br></div>=
<div>then I get this error:</div>
<div><br></div><div><div>ghc -e &quot;Test.HUnit.runTestTT PlaneTest.tests&=
quot; PlaneTest.hs</div><div><br></div><div>Plane.hs:41:62: Not in scope: `=
first&#39;</div><div>make: *** [PlaneTest.hs] Error 1</div><div><br></div>
<div>(Where Plane.hs:41:52 is the &#39;first&#39; mention on the last line =
of that definition.)</div></div><br>-- <br>David Carlton<br><a href=3D"mail=
to:carlton@bactrian.org">carlton@bactrian.org</a><br>
</div>

--00504502b2233ee37104790df738--


From jimblandy@gmail.com Mon Nov 23 13:00:05 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:37811)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NCe8r-0004lC-SY
	for haskell-study@red-bean.com; Mon, 23 Nov 2009 13:00:05 -0600
Received: by pwi17 with SMTP id 17so3910385pwi.39
	for <haskell-study@red-bean.com>; Mon, 23 Nov 2009 11:00:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=0z5YtuKsUbRPZKQg8y5OaGuUH7EabvgRfbkAg7LfYQA=;
	b=t93tYIYin1JbJb/XSFIC+eQnumMxVnTPxnSX5mwESU/bVvp8xfX+ObgTOxOczyddps
	5+us2Y2I4+Oc1H7vct2OODgLfJKen1DjjSebqtdQCM4OBr996QDyerbOyAA62S0HT+0m
	Iz2iDHTeEkLKEj/YzIlI+crDFX6Spl95TWbWM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=evlb72olu+wxHIIFmBvtNvQbLO8Cw7w+3Q0x/5z18pb/T2LmYxhuOEO1q7KIKQyUZZ
	ZDNmTdTBkN/JtKGRJl7EUuuv5LgXwDMNlTbodHN/XQGSx0v0G9UtLHv4J2HQHX3G65hx
	7rTKRsNkCYQBTa7jMgYaUEUeO9sNfymdOSxwM=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.67.25 with SMTP id p25mr592733wfa.292.1259002800081; Mon, 
	23 Nov 2009 11:00:00 -0800 (PST)
In-Reply-To: <90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
	<8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
	<90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
Date: Mon, 23 Nov 2009 11:00:00 -0800
X-Google-Sender-Auth: cb77b496f2caac7b
Message-ID: <8f2776cb0911231100p7d7a2f94ke63e8a92b5ff4467@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 19:00:06 -0000

What if you use two nested lets instead of a let and a where?


From carlton@bactrian.org Mon Nov 23 14:35:24 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:47411)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1NCfd6-0005M6-K2; Mon, 23 Nov 2009 14:35:24 -0600
Received: by pwi17 with SMTP id 17so3970821pwi.39
	for <multiple recipients>; Mon, 23 Nov 2009 12:35:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.6.10 with SMTP id 10mr588054wff.48.1259008517598; Mon, 23 
	Nov 2009 12:35:17 -0800 (PST)
X-Originating-IP: [64.125.109.66]
In-Reply-To: <8f2776cb0911231100p7d7a2f94ke63e8a92b5ff4467@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
	<8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
	<90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
	<8f2776cb0911231100p7d7a2f94ke63e8a92b5ff4467@mail.gmail.com>
Date: Mon, 23 Nov 2009 12:35:17 -0800
Message-ID: <90804c6f0911231235t5e16ba60q5c22f1a17e2937a2@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502b0ab75ee7404790fc3c1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 20:35:24 -0000

--00504502b0ab75ee7404790fc3c1
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Nov 23, 2009 at 11:00 AM, Jim Blandy <jimb@red-bean.com> wrote:

> What if you use two nested lets instead of a let and a where?
>

Thanks, that works, as does putting both of them in the where clause.  I
guess where must have a really low precedence, or something?

(I thought I'd seen an example not involving a let, instead involving
function arguments, but I'm not finding that right now, so I might be
misremembering things.)

-- 
David Carlton
carlton@bactrian.org

--00504502b0ab75ee7404790fc3c1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 23, 2009 at 11:00 AM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
What if you use two nested lets instead of a let and a where?<br>
</blockquote></div><br>Thanks, that works, as does putting both of them in =
the where clause. =A0I guess where must have a really low precedence, or so=
mething?<div><br></div><div>(I thought I&#39;d seen an example not involvin=
g a let, instead involving function arguments, but I&#39;m not finding that=
 right now, so I might be misremembering things.)<br clear=3D"all">
<br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton=
@bactrian.org</a><br>
</div>

--00504502b0ab75ee7404790fc3c1--


From 3svIKSw0OAPojcumgnn-uvwf0iqqingeqfg.eqo@codesite.bounces.google.com Mon Nov 23 14:38:16 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:55299)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3svIKSw0OAPojcumgnn-uvwf0iqqingeqfg.eqo@codesite.bounces.google.com>)
	id 1NCffs-00061X-0v
	for haskell-study@red-bean.com; Mon, 23 Nov 2009 14:38:16 -0600
Received: by pzk24 with SMTP id 24so26396pzk.3
	for <haskell-study@red-bean.com>; Mon, 23 Nov 2009 12:38:10 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.140.193.13 with SMTP id q13mr1251310rvf.26.1259008690407; Mon, 
	23 Nov 2009 12:38:10 -0800 (PST)
Message-ID: <000e0cd29a22c2ca1004790fcde9@google.com>
Date: Mon, 23 Nov 2009 20:38:10 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - let
	and where don't mix so well. on 2009-11-23 20:37 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 20:38:16 -0000

Revision: 359691bd5b
Author: "David Carlton <carlton@bactrian.org>"
Date: Mon Nov 23 12:37:34 2009
Log: let and where don't mix so well.
http://code.google.com/p/haskell-study/source/detail?r=359691bd5b

Modified:
  /carlton/Plane.hs

=======================================
--- /carlton/Plane.hs	Sun Nov 22 20:11:35 2009
+++ /carlton/Plane.hs	Mon Nov 23 12:37:34 2009
@@ -35,10 +35,9 @@
  compareTurn Straight = EQ

  grahamScanSort points =
-    let first = bottom points
-    in
-      (first : (sortBy (grahamScanOrdering first) (delete first points)))  
where
-          grahamScanOrdering first x y = compareTurn (turnDirection first  
x y)
+    (first : (sortBy grahamScanOrdering (delete first points))) where
+        first = bottom points
+        grahamScanOrdering x y = compareTurn (turnDirection first x y)

  -- I'm not completely convinced this is correct in cases where we
  -- have enough points in a row.


From 3bp4NSw0OAGUKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com Wed Nov 25 15:15:32 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:43512)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3bp4NSw0OAGUKDVNHOO-VWXGbJRRJOHFRGH.FRP@codesite.bounces.google.com>)
	id 1NDPD2-0005Jw-Io
	for haskell-study@red-bean.com; Wed, 25 Nov 2009 15:15:32 -0600
Received: by pzk24 with SMTP id 24so365pzk.3
	for <haskell-study@red-bean.com>; Wed, 25 Nov 2009 13:15:26 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.140.166.4 with SMTP id o4mr1785335rve.19.1259183726855; Wed, 
	25 Nov 2009 13:15:26 -0800 (PST)
Message-ID: <000e0cd2e2febf07460479388edd@google.com>
Date: Wed, 25 Nov 2009 21:15:26 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - I
	realized in the shower this morning that my Graham Scan... on
	2009-11-25 21:14 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 25 Nov 2009 21:15:32 -0000

Revision: 21208e3222
Author: "David Carlton <carlton@bactrian.org>"
Date: Wed Nov 25 13:14:25 2009
Log: I realized in the shower this morning that my Graham Scan
implementation was wrong...
http://code.google.com/p/haskell-study/source/detail?r=21208e3222

Modified:
  /carlton/Plane.hs

=======================================
--- /carlton/Plane.hs	Mon Nov 23 12:37:34 2009
+++ /carlton/Plane.hs	Wed Nov 25 13:14:25 2009
@@ -17,6 +17,9 @@
  -- Update: I'm feeling too lazy to either convince myself that I do
  -- need that or don't.

+-- Update 2: I thought about it a bit more, and I realized that I
+-- actually have a bug in general, see below.
+
  data TurnDirection = LeftTurn | RightTurn | Straight
                       deriving (Eq, Show)

@@ -39,8 +42,9 @@
          first = bottom points
          grahamScanOrdering x y = compareTurn (turnDirection first x y)

--- I'm not completely convinced this is correct in cases where we
--- have enough points in a row.
+-- This is bogus: in the RightTurn case, I can't move on to first p
+-- ps, I have to do (first-1) first p instead.  Which means that I'll
+-- have to structure my data a little differently...
  convexHull points =
      let (first:second:rest) = grahamScanSort points
      in


From 3p2UPSw0OAGcMFXPJQQ-XYZIdLTTLQJHTIJ.HTR@codesite.bounces.google.com Thu Nov 26 23:37:49 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:43358)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3p2UPSw0OAGcMFXPJQQ-XYZIdLTTLQJHTIJ.HTR@codesite.bounces.google.com>)
	id 1NDtWf-0000um-C8
	for haskell-study@red-bean.com; Thu, 26 Nov 2009 23:37:49 -0600
Received: by pzk24 with SMTP id 24so5058pzk.3
	for <haskell-study@red-bean.com>; Thu, 26 Nov 2009 21:37:43 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.8.19 with SMTP id 19mr74864wfh.10.1259300263696; Thu, 26 
	Nov 2009 21:37:43 -0800 (PST)
Message-ID: <00504502b15ce21ed7047953b0d7@google.com>
Date: Fri, 27 Nov 2009 05:37:43 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by carl...@bactrian.org - This
	version of the Graham Scan algorithm is better,
	I hope... on 2009-11-27 05:36 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Fri, 27 Nov 2009 05:37:49 -0000

Revision: a0be2b661d
Author: "David Carlton <carlton@bactrian.org>"
Date: Thu Nov 26 21:36:43 2009
Log: This version of the Graham Scan algorithm is better, I hope...
http://code.google.com/p/haskell-study/source/detail?r=a0be2b661d

Modified:
  /carlton/Plane.hs
  /carlton/PlaneTest.hs

=======================================
--- /carlton/Plane.hs	Wed Nov 25 13:14:25 2009
+++ /carlton/Plane.hs	Thu Nov 26 21:36:43 2009
@@ -10,16 +10,6 @@
          | b > d = GT
          | otherwise = compare a c

--- I'm fairly sure I'm going to need to further refine Straight into
--- Forward/Back/Stopped, but when I started implementing that, it got
--- delicate.  So I'm waiting until I actually need that...
-
--- Update: I'm feeling too lazy to either convince myself that I do
--- need that or don't.
-
--- Update 2: I thought about it a bit more, and I realized that I
--- actually have a bug in general, see below.
-
  data TurnDirection = LeftTurn | RightTurn | Straight
                       deriving (Eq, Show)

@@ -42,15 +32,10 @@
          first = bottom points
          grahamScanOrdering x y = compareTurn (turnDirection first x y)

--- This is bogus: in the RightTurn case, I can't move on to first p
--- ps, I have to do (first-1) first p instead.  Which means that I'll
--- have to structure my data a little differently...
  convexHull points =
-    let (first:second:rest) = grahamScanSort points
-    in
-      removeRightTurns first second rest where
-          removeRightTurns first second [] = [first, second]
-          removeRightTurns first second (p:ps)
-              | turnDirection first second p == RightTurn =
-                  removeRightTurns first p ps
-              | otherwise = first : removeRightTurns second p ps
+    reverse (removeRightTurns rest [second, first])  where
+        (first:second:rest) = grahamScanSort points
+        removeRightTurns [] result = result
+        removeRightTurns (c:ps) (b:a:qs)
+            | turnDirection a b c == RightTurn = removeRightTurns (c:ps)  
(a:qs)
+            | otherwise = removeRightTurns ps (c:b:a:qs)
=======================================
--- /carlton/PlaneTest.hs	Sun Nov 22 19:57:05 2009
+++ /carlton/PlaneTest.hs	Thu Nov 26 21:36:43 2009
@@ -39,13 +39,16 @@
               "daceb" ~: [(1,-1), (5,0), (2,2), (0,0), (-5,0)] @=?
                       grahamScanSort [(0,0), (1,-1), (2,2), (-5,0), (5,0)]]

-convexHullTests = TestList["caXb" ~: [(0,0), (3,1), (2,2)] @=?
-                                  convexHull [(2,2), (0,0), (2,1), (3,1)],
-                           "abcX" ~: [(0,0), (3,1), (2,2)] @=?
-                                  convexHull [(0,0), (3,1), (2,2), (2,1)],
-                           "aeXdbXc" ~: [(2,0),(4,1),(3,3),(2,3),(0,1)] @=?
-                                     convexHull [(2,0),(0,1),(3,2),(2,3),
-                                                 (4,1),(1,1),(3,3)]]
+convexHullTests =
+    TestList["caXb" ~: [(0,0), (3,1), (2,2)] @=?
+                    convexHull [(2,2), (0,0), (2,1), (3,1)],
+             "abcX" ~: [(0,0), (3,1), (2,2)] @=?
+                    convexHull [(0,0), (3,1), (2,2), (2,1)],
+             "aeXdbXc" ~: [(2,0),(4,1),(3,3),(2,3),(0,1)] @=?
+                       convexHull  
[(2,0),(0,1),(3,2),(2,3),(4,1),(1,1),(3,3)],
+             "multiple right turns" ~: [(0,0),(10,1),(17,4)] @=?
+                                    convexHull[(0,0),(10,1),(12,2),
+                                               (13,3),(17,4)]]

  tests = TestList[bottomTests, turnDirectionTests, grahamScanSortTests,
                   convexHullTests]


From jimblandy@gmail.com Sat Nov 28 12:44:14 2009
Received: from mail-px0-f194.google.com ([209.85.216.194]:42035)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NESHG-0005HN-Ol
	for haskell-study@red-bean.com; Sat, 28 Nov 2009 12:44:14 -0600
Received: by pxi32 with SMTP id 32so1630607pxi.15
	for <haskell-study@red-bean.com>; Sat, 28 Nov 2009 10:44:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=v4ghWlUtZIDSb1pjJbEp6Kt82oJhgXvQd9wodCEIsJQ=;
	b=Z7cqrh1suS2t30sPGqYGVW49WsYqHrvfERVLU47vFvlgeomEShnkOW60tWL4VUin3L
	6aAwPNFKNGtmb1UBQJdAd6WMkikuB2WXy9zhqnRkAC7TzTEqqvtIshGZn3OaKnVy0gLv
	gvDt5lXI7m40J0wFkNvHjlA4dwFw2MjqCgLes=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=O6UkZSgnN7+p5RWAjeO2Wx4HNWXvO/vqVa/wL0+v96sTRT0pg6JZZTxHoieU9jVU3u
	u/TcNOE0n/D9YhmLf53SSMDbin25W4wYXiySwbWGw5Sn9NFEFIWT/obvDaWWIdAbGNex
	usRq3tulsQhDNRrfQbEA1RO9M60cA4Zsqx7G8=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.4.24 with SMTP id 24mr239857wfd.109.1259433849102; Sat, 28 
	Nov 2009 10:44:09 -0800 (PST)
In-Reply-To: <90804c6f0911231235t5e16ba60q5c22f1a17e2937a2@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
	<8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
	<90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
	<8f2776cb0911231100p7d7a2f94ke63e8a92b5ff4467@mail.gmail.com>
	<90804c6f0911231235t5e16ba60q5c22f1a17e2937a2@mail.gmail.com>
Date: Sat, 28 Nov 2009 10:44:09 -0800
X-Google-Sender-Auth: e91dd1b91bcf34ee
Message-ID: <8f2776cb0911281044k47cad74fq6517be0dd3d8e5ca@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: David Carlton <carlton@bactrian.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 18:44:14 -0000

What's going on here, I think, is a misunderstanding about how 'where'
fits into the grammar.

My understanding had been that 'where' was just sort of a generic
binding operator that could be mixed in with expressions anywhere:
'EXP where DECLS' evaluated EXP in a scope where DECLS are visible.
In this (mis)understanding, 'where' was just 'let' backwards, in a
sense: 'EXP where DECLS' was the same as 'let DECLS in EXP'.

But that's not right.  In the grammar, a 'where DECLS' clause is
attached to a particular right-hand-side in a series of equations, or
to a particular alternative of a case statement.  It's part of the
grammar for the equation or alternative.  So in

let { PATTERN1 = EXP1 -> EXP1'; PATTERN2 = EXP2 -> EXP2' where DECLS2 } in EXPn

the DECLS2 are scoped only over EXP2', not over EXP1, EXP1', or EXP2.

If there are guard expressions, decls of the appropriate 'where' cover
the guard expressions, too.  I think that's the only sense in which
'where' as done in Haskell is better than 'where' as I originally
imagined it (second paragraph): the 'let in reverse' approach doesn't
let you do definitions that are shared across a series of guards and
their expressions.


From 3a4oRSw0OAFI1uC4y55-CDExI08805yw8xy.w86@codesite.bounces.google.com Sat Nov 28 14:39:13 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:53621)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3a4oRSw0OAFI1uC4y55-CDExI08805yw8xy.w86@codesite.bounces.google.com>)
	id 1NEU4X-0005UG-A2
	for haskell-study@red-bean.com; Sat, 28 Nov 2009 14:39:13 -0600
Received: by pzk24 with SMTP id 24so9214pzk.3
	for <haskell-study@red-bean.com>; Sat, 28 Nov 2009 12:39:07 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.75.1 with SMTP id x1mr395479wfa.4.1259440747573; Sat, 28 
	Nov 2009 12:39:07 -0800 (PST)
Message-ID: <001636e1fdb05ff6be04797466df@google.com>
Date: Sat, 28 Nov 2009 20:39:07 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 2 new revisions pushed by jimblandy
	on 2009-11-28 20:38 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 20:39:13 -0000

2 new revisions:

Revision: efed7d3dde
Author: Jim Blandy <jimb@mozilla.org>
Date: Sat Nov 28 12:36:22 2009
Log: Finished chapter 3 exercises, but not really with the solution the  
boo...
http://code.google.com/p/haskell-study/source/detail?r=efed7d3dde

Revision: 53dabdb096
Author: Jim Blandy <jimb@mozilla.org>
Date: Sat Nov 28 12:36:54 2009
Log: merge jim,david
http://code.google.com/p/haskell-study/source/detail?r=53dabdb096

==============================================================================
Revision: efed7d3dde
Author: Jim Blandy <jimb@mozilla.org>
Date: Sat Nov 28 12:36:22 2009
Log: Finished chapter 3 exercises, but not really with the solution the  
book had in mind.
http://code.google.com/p/haskell-study/source/detail?r=efed7d3dde

Added:
  /jimb/ch03/graham.hs
  /jimb/ch03/poly.hs

=======================================
--- /dev/null
+++ /jimb/ch03/graham.hs	Sat Nov 28 12:36:22 2009
@@ -0,0 +1,65 @@
+-- p. 70 #10--13
+
+import List (delete, sortBy)
+
+-- This type is the solution to exercise 10, but we don't use it; see
+-- turnDirection.
+data Direction = DirLeft | DirStraight | DirRight
+                 deriving (Show)
+
+type Point = (Integer, Integer)
+
+-- 'subtractPoint p1 p2' is the vector from p2 to p1.
+subtractPoint :: Point -> Point -> Point
+subtractPoint (x1,y1) (x2,y2) = (x1-x2, y1-y2)
+
+--- 'crossProductLength p1 p2' is the length of the vector that is the
+--- cross product of p1 and p2.
+crossProductLength :: Point -> Point -> Integer
+crossProductLength (x1,y1) (x2,y2) = x1*y2 - x2*y1
+
+-- p. 70 ex 11
+--
+-- It's more convenient to return the Prelude's Ordering type than
+-- Direction, since that's what 'sortBy' expects. 'LT' indicates a
+-- left turn, 'GT' a right turn, and 'EQ' a straight line.
+--
+-- Counter-clockwise rotation is usually considered 'positive', so
+-- it's a bit odd to return 'LT' for left turns, but we want
+-- (turnDirection pivot) to be a comparison function on points that
+-- directs sortBy to put them in counter-clockwise order.
+turnDirection :: Point -> Point -> Point -> Ordering
+turnDirection p1 p2 p3 =
+    -- Make everything relative to p1.
+    let p2' = subtractPoint p2 p1
+        p3' = subtractPoint p3 p1
+    in compare 0 (crossProductLength p2' p3')
+
+--- p. 70 ex 12
+--- Given a list of three or more points, return a list of the
+--- directions of the turns taken in following the path the points
+--- take.
+turnDirections :: [Point] -> [Ordering]
+turnDirections (p1: ps @ (p2:p3:rest))
+    = turnDirection p1 p2 p3 : turnDirections ps
+turnDirections _ = []
+
+-- 'leftBottomPoint ps' is the leftmost point in ps; if there is more
+-- than one such point, it is the lowest among them.
+leftBottomPoint :: [Point] -> Point
+-- Conveniently, Haskell defines < on tuples, and thus min is defined
+-- as well, with the meaning we need.
+leftBottomPoint (p:ps) = foldr min p ps
+
+scan (p2:p1:cwtail) (p3:ccwtail) =
+    if turnDirection p1 p2 p3 == GT
+    then scan (p1:cwtail) (p3:ccwtail)
+    else scan (p3:p2:p1:cwtail) ccwtail
+scan cw [] = cw
+
+-- convexHull ps is a sequence of points forming a convex hull around ps.
+convexHull :: [Point] -> [Point]
+convexHull ps @ (_:_:_) =
+    let pivot = leftBottomPoint ps
+        (first:rest) = sortBy (turnDirection pivot) (delete pivot ps)
+    in scan [first,pivot] rest
=======================================
--- /dev/null
+++ /jimb/ch03/poly.hs	Sat Nov 28 12:36:22 2009
@@ -0,0 +1,13 @@
+-- Playing around with let-bound polymorphism, as encountered by David.
+
+poly2 = ((f "a"), (f 1))
+        where f x = x
+
+poly4 f = let f' x = f x
+          in ((f' "a"), (f' 1))
+
+poly3 f = ((f' "a"), (f' 1))
+          where f' x = f x
+
+poly f = ((f "a"), (f 1))
+

==============================================================================
Revision: 53dabdb096
Author: Jim Blandy <jimb@mozilla.org>
Date: Sat Nov 28 12:36:54 2009
Log: merge jim,david
http://code.google.com/p/haskell-study/source/detail?r=53dabdb096




From 3tY0RSw0OAJ8G9RJDKK-RSTCXFNNFKDBNCD.BNL@codesite.bounces.google.com Sat Nov 28 14:53:15 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:40451)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3tY0RSw0OAJ8G9RJDKK-RSTCXFNNFKDBNCD.BNL@codesite.bounces.google.com>)
	id 1NEUI7-0000NT-3I
	for haskell-study@red-bean.com; Sat, 28 Nov 2009 14:53:15 -0600
Received: by pzk24 with SMTP id 24so9224pzk.3
	for <haskell-study@red-bean.com>; Sat, 28 Nov 2009 12:53:09 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.75.18 with SMTP id x18mr392906wfa.18.1259441589404; Sat, 
	28 Nov 2009 12:53:09 -0800 (PST)
Message-ID: <001636e1fb238d479f047974984c@google.com>
Date: Sat, 28 Nov 2009 20:53:09 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - Comments on my
	solution, after 	reading David's. on 2009-11-28 20:51 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 20:53:15 -0000

Revision: 7456eda416
Author: Jim Blandy <jimb@mozilla.org>
Date: Sat Nov 28 12:51:31 2009
Log: Comments on my solution, after reading David's.
http://code.google.com/p/haskell-study/source/detail?r=7456eda416

Modified:
  /jimb/ch03/graham.hs

=======================================
--- /jimb/ch03/graham.hs	Sat Nov 28 12:36:22 2009
+++ /jimb/ch03/graham.hs	Sat Nov 28 12:51:31 2009
@@ -51,6 +51,7 @@
  -- as well, with the meaning we need.
  leftBottomPoint (p:ps) = foldr min p ps

+-- p. 70 ex 13
  scan (p2:p1:cwtail) (p3:ccwtail) =
      if turnDirection p1 p2 p3 == GT
      then scan (p1:cwtail) (p3:ccwtail)
@@ -63,3 +64,15 @@
      let pivot = leftBottomPoint ps
          (first:rest) = sortBy (turnDirection pivot) (delete pivot ps)
      in scan [first,pivot] rest
+
+-- Notes, after reading David's solution:
+--
+-- Neither of us wrote the solution to ex 13 using the solution to ex 12.
+--
+-- My leftBottomPoint is Prelude 'minimum'.
+--
+-- removeRightTurns is a better name than 'scan'.
+--
+-- Whereas I treat the pivot as being outside the rest of the dataset,
+-- David's code treats grahamScanSort as returning a non-convex hull
+-- (i.e., the pivot is just another point), and then makes it convex.


From jimblandy@gmail.com Sat Nov 28 15:01:07 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:47747)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NEUPi-00029s-VJ
	for haskell-study@red-bean.com; Sat, 28 Nov 2009 15:01:07 -0600
Received: by pwi17 with SMTP id 17so1627769pwi.39
	for <haskell-study@red-bean.com>; Sat, 28 Nov 2009 13:01:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=JuCpOHFXNIDg8poDLw03Ksqs6/wCfaz7Mm/wNO3wsQo=;
	b=O+wpzyatyZT2jsZHEotEucTLzD1k8Nb519mMrEX9Po5tB+5M9MxTGXmaLzzOSEU01l
	GTjQej0rCQxHN0wikFtarzj/ROv5atCjrmgdNf1ZZ4nE8xfy2PVHM9hdnixqY+TV7rO9
	eWh5QZDTowUzrxPgkcIE6Cm6uH/pad4dejO9g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=ntsMS3LBX+/ODNodUDLGtFUIufugiMsmWbJ9+NrfAx/uJjlv/j2ztH5QjGLWTLsFg0
	y6u56RtkIQ61eP8hIYX2lAGTjOeFGGT55sXDuLu1Gno2/VzXaTzYTO6+Mq5bzLJRhcmp
	fhK3s36IBRLeChdW4/8zBlBiRjRnYJqExm74w=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.59.5 with SMTP id h5mr279649wfa.24.1259442061264; Sat, 28 
	Nov 2009 13:01:01 -0800 (PST)
Date: Sat, 28 Nov 2009 13:01:01 -0800
X-Google-Sender-Auth: ac9aae2262ae9452
Message-ID: <8f2776cb0911281301o2a08af44i20a6cb27200caa24@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] Graham Scan
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 21:01:07 -0000

That was a very interesting exercise.  It took me a while to realize
that new points had the potential to reach back and delete any number
of prior points.

Neither David nor I actually ended up using the solution to exercise
12 in our solution to exercise 13.


From carlton@bactrian.org Sat Nov 28 16:17:01 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:39837)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1NEVbA-0000xS-Ve; Sat, 28 Nov 2009 16:17:01 -0600
Received: by pzk13 with SMTP id 13so1669455pzk.25
	for <multiple recipients>; Sat, 28 Nov 2009 14:16:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.7.38 with SMTP id 38mr243645wfg.339.1259446615116; Sat, 28 
	Nov 2009 14:16:55 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <8f2776cb0911281044k47cad74fq6517be0dd3d8e5ca@mail.gmail.com>
References: <90804c6f0911222019h1b711645y2993e98ca3c8374a@mail.gmail.com>
	<8f2776cb0911231005n79cf5253ke1c64dbb37f9852d@mail.gmail.com>
	<90804c6f0911231026u686c41b1n9f8e6203cda41f6a@mail.gmail.com>
	<8f2776cb0911231100p7d7a2f94ke63e8a92b5ff4467@mail.gmail.com>
	<90804c6f0911231235t5e16ba60q5c22f1a17e2937a2@mail.gmail.com>
	<8f2776cb0911281044k47cad74fq6517be0dd3d8e5ca@mail.gmail.com>
Date: Sat, 28 Nov 2009 14:16:55 -0800
Message-ID: <90804c6f0911281416o6fec1ff0m4b56b5096d340c9c@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502ae8e1b8ba6047975c431
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] the convex hull exercises at the end of chapter
	3
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 22:17:01 -0000

--00504502ae8e1b8ba6047975c431
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Nov 28, 2009 at 10:44 AM, Jim Blandy <jimb@red-bean.com> wrote:

> My understanding had been that 'where' was just sort of a generic
> binding operator that could be mixed in with expressions anywhere:
> 'EXP where DECLS' evaluated EXP in a scope where DECLS are visible.
> In this (mis)understanding, 'where' was just 'let' backwards, in a
> sense: 'EXP where DECLS' was the same as 'let DECLS in EXP'.
>

Yeah, that was my initial assumption too; clearly it didn't hold, but I
hadn't gotten around to teasing out exactly where my assumption was
mistaken.


> But that's not right.  In the grammar, a 'where DECLS' clause is
> attached to a particular right-hand-side in a series of equations, or
> to a particular alternative of a case statement.  It's part of the
> grammar for the equation or alternative.  So in
>
> let { PATTERN1 = EXP1 -> EXP1'; PATTERN2 = EXP2 -> EXP2' where DECLS2 } in
> EXPn
>
> the DECLS2 are scoped only over EXP2', not over EXP1, EXP1', or EXP2.
>
> If there are guard expressions, decls of the appropriate 'where' cover
> the guard expressions, too.  I think that's the only sense in which
> 'where' as done in Haskell is better than 'where' as I originally
> imagined it (second paragraph): the 'let in reverse' approach doesn't
> let you do definitions that are shared across a series of guards and
> their expressions.
>

Interesting; thanks for digging into it!

-- 
David Carlton
carlton@bactrian.org

--00504502ae8e1b8ba6047975c431
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 28, 2009 at 10:44 AM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
My understanding had been that &#39;where&#39; was just sort of a generic<b=
r>
binding operator that could be mixed in with expressions anywhere:<br>
&#39;EXP where DECLS&#39; evaluated EXP in a scope where DECLS are visible.=
<br>
In this (mis)understanding, &#39;where&#39; was just &#39;let&#39; backward=
s, in a<br>
sense: &#39;EXP where DECLS&#39; was the same as &#39;let DECLS in EXP&#39;=
.<br></blockquote><div><br></div><div>Yeah, that was my initial assumption =
too; clearly it didn&#39;t hold, but I hadn&#39;t gotten around to teasing =
out exactly where my assumption was mistaken.</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;">But that&#39;s not right. =A0=
In the grammar, a &#39;where DECLS&#39; clause is<br>
attached to a particular right-hand-side in a series of equations, or<br>
to a particular alternative of a case statement. =A0It&#39;s part of the<br=
>
grammar for the equation or alternative. =A0So in<br>
<br>
let { PATTERN1 =3D EXP1 -&gt; EXP1&#39;; PATTERN2 =3D EXP2 -&gt; EXP2&#39; =
where DECLS2 } in EXPn<br>
<br>
the DECLS2 are scoped only over EXP2&#39;, not over EXP1, EXP1&#39;, or EXP=
2.<br>
<br>
If there are guard expressions, decls of the appropriate &#39;where&#39; co=
ver<br>
the guard expressions, too. =A0I think that&#39;s the only sense in which<b=
r>
&#39;where&#39; as done in Haskell is better than &#39;where&#39; as I orig=
inally<br>
imagined it (second paragraph): the &#39;let in reverse&#39; approach doesn=
&#39;t<br>
let you do definitions that are shared across a series of guards and<br>
their expressions.<br>
</blockquote></div><br>Interesting; thanks for digging into it!<br clear=3D=
"all"><br>-- <br>David Carlton<br><a href=3D"mailto:carlton@bactrian.org">c=
arlton@bactrian.org</a><br>

--00504502ae8e1b8ba6047975c431--


From carlton@bactrian.org Sat Nov 28 16:21:11 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:39622)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <carlton@bactrian.org>)
	id 1NEVfD-0001ZR-M3; Sat, 28 Nov 2009 16:21:11 -0600
Received: by pzk13 with SMTP id 13so1670264pzk.25
	for <multiple recipients>; Sat, 28 Nov 2009 14:21:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.4.4 with SMTP id 4mr286796wfd.214.1259446866109; Sat, 28 
	Nov 2009 14:21:06 -0800 (PST)
X-Originating-IP: [76.102.15.41]
In-Reply-To: <8f2776cb0911281301o2a08af44i20a6cb27200caa24@mail.gmail.com>
References: <8f2776cb0911281301o2a08af44i20a6cb27200caa24@mail.gmail.com>
Date: Sat, 28 Nov 2009 14:21:06 -0800
Message-ID: <90804c6f0911281421l60d6b5ddncc73ffbd7575aeb3@mail.gmail.com>
From: David Carlton <carlton@bactrian.org>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=00504502c0701166e4047975d352
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Graham Scan
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sat, 28 Nov 2009 22:21:11 -0000

--00504502c0701166e4047975d352
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Nov 28, 2009 at 1:01 PM, Jim Blandy <jimb@red-bean.com> wrote:

> That was a very interesting exercise.  It took me a while to realize
> that new points had the potential to reach back and delete any number
> of prior points.
>

Yeah, that was exactly what was wrong with the first solution that I checked
in.

Neither David nor I actually ended up using the solution to exercise
> 12 in our solution to exercise 13.
>

Yup.  Maybe Praveen will give it a try. :-)

I liked your leftBottomPoint definition better than mine.

-- 
David Carlton
carlton@bactrian.org

--00504502c0701166e4047975d352
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 28, 2009 at 1:01 PM, Jim Blandy <span dir=3D"ltr">&lt;<a href=
=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a>&gt;</span> wrote:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
That was a very interesting exercise. =A0It took me a while to realize<br>
that new points had the potential to reach back and delete any number<br>
of prior points.<br></blockquote><div><br></div><div>Yeah, that was exactly=
 what was wrong with the first solution that I checked in.</div><div><br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex;">

Neither David nor I actually ended up using the solution to exercise<br>
12 in our solution to exercise 13.<br></blockquote><div><br></div><div>Yup.=
 =A0Maybe Praveen will give it a try. :-)</div><div><br></div><div>I liked =
your leftBottomPoint definition better than mine.</div></div><br>-- <br>
David Carlton<br><a href=3D"mailto:carlton@bactrian.org">carlton@bactrian.o=
rg</a><br>

--00504502c0701166e4047975d352--


From 3MQkTSw0OAJg92KC6DD-KLM5Q8GG8D64G56.4GE@codesite.bounces.google.com Sun Nov 29 17:52:23 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:54742)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3MQkTSw0OAJg92KC6DD-KLM5Q8GG8D64G56.4GE@codesite.bounces.google.com>)
	id 1NEtZ0-0006Gv-Vx
	for haskell-study@red-bean.com; Sun, 29 Nov 2009 17:52:23 -0600
Received: by pzk24 with SMTP id 24so12241pzk.3
	for <haskell-study@red-bean.com>; Sun, 29 Nov 2009 15:52:17 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.114.83.17 with SMTP id g17mr572407wab.6.1259538737073; Sun, 29 
	Nov 2009 15:52:17 -0800 (PST)
Message-ID: <001636b14834010f5a04798b375d@google.com>
Date: Sun, 29 Nov 2009 23:52:17 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - p. 84 exercises
	1 and 2. on 2009-11-29 23:51 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 29 Nov 2009 23:52:23 -0000

Revision: a4fd5992c2
Author: Jim Blandy <jimb@mozilla.org>
Date: Sun Nov 29 15:51:01 2009
Log: p. 84 exercises 1 and 2.
http://code.google.com/p/haskell-study/source/detail?r=a4fd5992c2

Added:
  /jimb/ch04/p84.hs

=======================================
--- /dev/null
+++ /jimb/ch04/p84.hs	Sun Nov 29 15:51:01 2009
@@ -0,0 +1,27 @@
+-- ex. 1
+safeHead :: [a] -> Maybe a
+safeTail :: [a] -> Maybe [a]
+safeLast :: [a] -> Maybe a
+safeInit :: [a] -> Maybe [a]
+
+ifNullNothingElse f [] = Nothing
+ifNullNothingElse f x = Just (f x)
+
+safeHead = ifNullNothingElse head
+safeTail = ifNullNothingElse tail
+safeLast = ifNullNothingElse last
+safeInit = ifNullNothingElse init
+
+-- ex. 2
+splitWith :: (a -> Bool) -> [a] -> [[a]]
+splitWith isBreak xs = outside xs
+    where outside [] = []
+          outside (x:xs) = if isBreak x
+                           then outside xs
+                           else let (run, runs) = inside x xs
+                                in run : runs
+          inside x1 [] = ([x1],[])
+          inside x1 (x2:xs) = if isBreak x2
+                              then ([x1], outside xs)
+                              else let (run, runs) = inside x2 xs
+                                   in (x1:run, runs)


From 3IQoTSw0OAIkun5xryy-567qBt11tyrp1qr.p1z@codesite.bounces.google.com Sun Nov 29 17:56:23 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:35784)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3IQoTSw0OAIkun5xryy-567qBt11tyrp1qr.p1z@codesite.bounces.google.com>)
	id 1NEtct-0007Aa-1Z
	for haskell-study@red-bean.com; Sun, 29 Nov 2009 17:56:23 -0600
Received: by pzk24 with SMTP id 24so12246pzk.3
	for <haskell-study@red-bean.com>; Sun, 29 Nov 2009 15:56:17 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.142.196.1 with SMTP id t1mr557187wff.2.1259538977471; Sun, 29 
	Nov 2009 15:56:17 -0800 (PST)
Message-ID: <000e0cd32eb8553e5704798b4547@google.com>
Date: Sun, 29 Nov 2009 23:56:17 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - Note future
	work needed on p84 ex 2. on 2009-11-29 23:53 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Sun, 29 Nov 2009 23:56:23 -0000

Revision: f56bd80c94
Author: Jim Blandy <jimb@mozilla.org>
Date: Sun Nov 29 15:53:11 2009
Log: Note future work needed on p84 ex 2.
http://code.google.com/p/haskell-study/source/detail?r=f56bd80c94

Modified:
  /jimb/ch04/p84.hs

=======================================
--- /jimb/ch04/p84.hs	Sun Nov 29 15:51:01 2009
+++ /jimb/ch04/p84.hs	Sun Nov 29 15:53:11 2009
@@ -13,6 +13,9 @@
  safeInit = ifNullNothingElse init

  -- ex. 2
+-- I'm sure I could do this with 'dropWhile' and 'break', too. The
+-- trick is avoiding applying the predicate more than once per
+-- element.
  splitWith :: (a -> Bool) -> [a] -> [[a]]
  splitWith isBreak xs = outside xs
      where outside [] = []


From 3YikTSw0OAOkSLdVPWW-defOjRZZRWPNZOP.NZX@codesite.bounces.google.com Sun Nov 29 20:09:44 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:34123)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3YikTSw0OAOkSLdVPWW-defOjRZZRWPNZOP.NZX@codesite.bounces.google.com>)
	id 1NEvhw-0000xF-9i
	for haskell-study@red-bean.com; Sun, 29 Nov 2009 20:09:44 -0600
Received: by pzk24 with SMTP id 24so13466pzk.3
	for <haskell-study@red-bean.com>; Sun, 29 Nov 2009 18:09:38 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.143.26.6 with SMTP id d6mr569485wfj.5.1259546978443; Sun, 29 
	Nov 2009 18:09:38 -0800 (PST)
Message-ID: <001636e0ad6f3a662f04798d227b@google.com>
Date: Mon, 30 Nov 2009 02:09:38 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - Prelude-based
	solution for p. 84 ex. 2. on 2009-11-30 02:08 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 02:09:44 -0000

Revision: 783b10cb2d
Author: Jim Blandy <jimb@mozilla.org>
Date: Sun Nov 29 18:08:17 2009
Log: Prelude-based solution for p. 84 ex. 2.
http://code.google.com/p/haskell-study/source/detail?r=783b10cb2d

Modified:
  /jimb/ch04/p84.hs

=======================================
--- /jimb/ch04/p84.hs	Sun Nov 29 15:53:11 2009
+++ /jimb/ch04/p84.hs	Sun Nov 29 18:08:17 2009
@@ -13,9 +13,6 @@
  safeInit = ifNullNothingElse init

  -- ex. 2
--- I'm sure I could do this with 'dropWhile' and 'break', too. The
--- trick is avoiding applying the predicate more than once per
--- element.
  splitWith :: (a -> Bool) -> [a] -> [[a]]
  splitWith isBreak xs = outside xs
      where outside [] = []
@@ -28,3 +25,18 @@
                                then ([x1], outside xs)
                                else let (run, runs) = inside x2 xs
                                     in (x1:run, runs)
+
+-- This time, use the Prelude functions.
+-- The real challenge here is avoiding redundant application of isBreak.
+-- A non-empty list returned by dropWhile or break has a head whose
+-- isBreak-ness is known; outside and inside must use that knowledge.
+-- But that means we need to enter the recursion in the first place
+-- with a known head, thus the ugly equations for for splitWith2.
+splitWith2 :: (a -> Bool) -> [a] -> [[a]]
+splitWith2 isBreak [] = []
+splitWith2 isBreak l@(x:_) = (if isBreak x then outside else inside) l
+    where outside [] = []
+          outside (x:xs) = inside (dropWhile isBreak xs)
+          inside [] = []
+          inside (x:xs) = let (run, tail) = break isBreak xs
+                          in (x:run) : outside tail


From 3rmcTSw0OAHQZSkcWdd-klmVqYggYdWUgVW.Uge@codesite.bounces.google.com Mon Nov 30 00:35:31 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:60194)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3rmcTSw0OAHQZSkcWdd-klmVqYggYdWUgVW.Uge@codesite.bounces.google.com>)
	id 1NEzr9-0006Ik-Pd
	for haskell-study@red-bean.com; Mon, 30 Nov 2009 00:35:31 -0600
Received: by pzk24 with SMTP id 24so13874pzk.3
	for <haskell-study@red-bean.com>; Sun, 29 Nov 2009 22:35:26 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.113.21 with SMTP id q21mr798765wam.28.1259562926198; Sun, 
	29 Nov 2009 22:35:26 -0800 (PST)
Message-ID: <0016e64be74cc9d7d2047990d888@google.com>
Date: Mon, 30 Nov 2009 06:35:26 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 2 new revisions pushed by
	carl...@bactrian.org on 2009-11-30 06:34 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 06:35:32 -0000

2 new revisions:

Revision: a7a5123bc2
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 29 20:46:58 2009
Log: Final (?) comments about collinear points and the Graham Scan...
http://code.google.com/p/haskell-study/source/detail?r=a7a5123bc2

Revision: cdbb4ed9f0
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 29 22:34:25 2009
Log: Start working on Chapter 4 exercises, though I'm not yet happy with  
my...
http://code.google.com/p/haskell-study/source/detail?r=cdbb4ed9f0

==============================================================================
Revision: a7a5123bc2
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 29 20:46:58 2009
Log: Final (?) comments about collinear points and the Graham Scan
algorithm.
http://code.google.com/p/haskell-study/source/detail?r=a7a5123bc2

Modified:
  /carlton/Plane.hs

=======================================
--- /carlton/Plane.hs	Thu Nov 26 21:36:43 2009
+++ /carlton/Plane.hs	Sun Nov 29 20:46:58 2009
@@ -32,6 +32,13 @@
          first = bottom points
          grahamScanOrdering x y = compareTurn (turnDirection first x y)

+-- This doesn't work if there are enough points in a row stretching
+-- out from the first point - in that case, you only want to include
+-- the outermost point on the line (at most), but, depending on the
+-- order, you can end up including internal points as well.  You could
+-- fix this by having a more refined notion of turnDirection or by
+-- having grahamOrdering take into account the distance from the first
+-- point when ordering collinear points.
  convexHull points =
      reverse (removeRightTurns rest [second, first])  where
          (first:second:rest) = grahamScanSort points

==============================================================================
Revision: cdbb4ed9f0
Author: "David Carlton <carlton@bactrian.org>"
Date: Sun Nov 29 22:34:25 2009
Log: Start working on Chapter 4 exercises, though I'm not yet happy with my
solution to the second problem.
http://code.google.com/p/haskell-study/source/detail?r=cdbb4ed9f0

Added:
  /carlton/Ch04.hs
  /carlton/Ch04Test.hs
  /carlton/cho04-notes.txt

=======================================
--- /dev/null
+++ /carlton/Ch04.hs	Sun Nov 29 22:34:25 2009
@@ -0,0 +1,31 @@
+module Ch04(safeHead, safeTail, safeLast, safeInit, splitWith) where
+
+safeHead [] = Nothing
+safeHead (x:_) = Just x
+
+safeTail [] = Nothing
+safeTail (_:xs) = Just xs
+
+safeLast [] = Nothing
+safeLast [x] = Just x
+safeLast (x:xs) = safeLast xs
+
+safeInit [] = Nothing
+safeInit [x] = Just []
+safeInit (x:xs) = Just (x:rest) where
+    Just rest = safeInit xs
+
+-- FIXME (2009-11-29, carlton): I'm not sure this works right, but
+-- it's passing all the tests, it's late, and I want to check
+-- something in; I'll think harder about this some other day.
+splitWith _ [] = []
+splitWith pred (x:xs)
+    | pred x = splitWith pred xs
+    | otherwise = ((x:acc):rest) where
+    (acc,rest) = splitWithAccumulator pred xs
+
+splitWithAccumulator _ [] = ([],[])
+splitWithAccumulator pred (x:xs)
+    | pred x = ([], splitWith pred xs)
+    | otherwise = ((x:acc),rest) where
+    (acc,rest) = splitWithAccumulator pred xs
=======================================
--- /dev/null
+++ /carlton/Ch04Test.hs	Sun Nov 29 22:34:25 2009
@@ -0,0 +1,44 @@
+module Ch04Test(tests) where
+
+import Test.HUnit
+import Ch04
+
+safeHeadTests =
+    TestList["empty" ~: (Nothing :: Maybe Int) @=? safeHead [],
+             "one" ~: Just 1 @=? safeHead [1],
+             "many" ~: Just 3 @=?safeHead [3,4,5]]
+
+safeTailTests =
+    TestList["empty" ~: (Nothing :: Maybe [Int]) @=? safeTail [],
+             "one" ~: (Just [] :: Maybe [Int]) @=? safeTail [1],
+             "two" ~: Just [2] @=? safeTail [1,2],
+             "many" ~: Just [7,6,5] @=? safeTail [8,7,6,5]]
+
+safeLastTests =
+    TestList["empty" ~: (Nothing :: Maybe Int) @=? safeLast [],
+             "one" ~: Just 1 @=? safeLast [1],
+                       "many" ~: Just 5 @=?safeLast [3,4,5]]
+
+safeInitTests =
+    TestList["empty" ~: (Nothing :: Maybe [Int]) @=? safeInit [],
+             "one" ~: (Just [] :: Maybe [Int]) @=? safeInit [1],
+             "two" ~: Just [1] @=? safeInit [1,2],
+             "many" ~: Just [8,7,6] @=? safeInit [8,7,6,5]]
+
+splitWithTests =
+    TestList["empty" ~: ([] :: [[Int]]) @=? splitWith even [],
+             "no match" ~: [[1,3,5,7]] @=? splitWith even [1,3,5,7],
+             "first matches" ~: [[3,5]] @=? splitWith even [2,3,5],
+             "second matches" ~: [[1],[3,5]] @=? splitWith even [1,2,3,5],
+             "two matches" ~: [[1],[3],[5]] @=?
+                           splitWith even [1,2,3,4,5],
+             "multiple matches" ~: [[1],[3],[5],[7]] @=?
+                                splitWith even [1..7],
+             "two misses between match" ~: [[1,1],[3,3,3],[5,5]] @=?
+                                        splitWith even [1,1,2,3,3,3,4,5,5],
+             "consecutive matches" ~: [[1],[5]] @=? splitWith even  
[1,2,4,5],
+             "matches at end" ~: [[1]] @=? splitWith even [1,2,4],
+             "everything matches" ~: [] @=? splitWith even [2,4,6]]
+
+tests = TestList[safeHeadTests, safeTailTests, safeLastTests,  
safeInitTests,
+                 splitWithTests]
=======================================
--- /dev/null
+++ /carlton/cho04-notes.txt	Sun Nov 29 22:34:25 2009
@@ -0,0 +1,3 @@
+* p. 80: I don't think it's possible to define a total equivalent of
+     Head?  (Hmm, I guess you can use Maybe if you want that.  And,
+     indeed, that's what Exercise 1 on p. 84 does.)


From 3PhwUSw0OALkgZrjdkk-rstcxfnnfkdbncd.bnl@codesite.bounces.google.com Mon Nov 30 13:25:56 2009
Received: from mail-pz0-f207.google.com ([209.85.222.207]:44901)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3PhwUSw0OALkgZrjdkk-rstcxfnnfkdbncd.bnl@codesite.bounces.google.com>)
	id 1NFBsi-0002If-Gv
	for haskell-study@red-bean.com; Mon, 30 Nov 2009 13:25:56 -0600
Received: by pzk24 with SMTP id 24so16543pzk.3
	for <haskell-study@red-bean.com>; Mon, 30 Nov 2009 11:25:50 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.115.66.39 with SMTP id t39mr970636wak.3.1259609150889; Mon, 30 
	Nov 2009 11:25:50 -0800 (PST)
Message-ID: <0016e64dc8eafea0f004799b9bea@google.com>
Date: Mon, 30 Nov 2009 19:25:50 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - p. 84 ex. 2,
	third solution. on 	2009-11-30 19:24 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 19:25:56 -0000

Revision: 9bdf94ad2f
Author: Jim Blandy <jimb@mozilla.org>
Date: Mon Nov 30 11:24:22 2009
Log: p. 84 ex. 2, third solution.
http://code.google.com/p/haskell-study/source/detail?r=9bdf94ad2f

Modified:
  /jimb/ch04/p84.hs

=======================================
--- /jimb/ch04/p84.hs	Sun Nov 29 18:08:17 2009
+++ /jimb/ch04/p84.hs	Mon Nov 30 11:24:22 2009
@@ -40,3 +40,16 @@
            inside [] = []
            inside (x:xs) = let (run, tail) = break isBreak xs
                            in (x:run) : outside tail
+
+-- This solution has a single loop, which is always accumulating a
+-- run. It's kind of dumb to be testing whether 'run' is null all the
+-- time when the iteration that handed it to us already knew whether
+-- it was null or not.
+splitWith3 :: (a -> Bool) -> [a] -> [[a]]
+splitWith3 isBreak xs = case scan xs of
+                          ([],  runs) -> runs
+                          (run, runs) -> run:runs
+    where scan [] = ([],[])
+          scan (x:xs) | isBreak x = [] : (if null run then runs else  
run:runs)
+                      | otherwise = (x:run):runs
+                      where (run,runs) = scan xs


From jimblandy@gmail.com Mon Nov 30 13:32:58 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:44215)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NFBzW-0003oL-4o
	for haskell-study@red-bean.com; Mon, 30 Nov 2009 13:32:58 -0600
Received: by pxi10 with SMTP id 10so3183357pxi.33
	for <haskell-study@red-bean.com>; Mon, 30 Nov 2009 11:32:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=r7sjl9y6dFgnZOu2FrWvjnfLdHravwVZvsejOgp3kXU=;
	b=xve0kYQuR/nlBVj/NQdPLiPoWHvnYDFH4pnKdiyXyYHiiJIIHb5ugoGg6Ikm2Lv1DX
	BDU4w8XpKjzBnpfhqpaSpIhG90owMUqu3lxHNed5tiaiibU/gnr5q1W3+bj8QZkTz69v
	dcT6mIs/3gc8TC6MmgdqgD5F/pNeqTnfc4vgw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	b=fPIMMXvZ066PdiWi4NqhoAGu+/rqj+5ewn5fO1H1BsDpIcH/wtzcG9KCKHAJc+sHET
	Q3Hx0PZP3Ly82pf3kI1umYYyGIX/lHpsu2a8AkzaOcqTFjlm/I6dW/zu3Ip0qT+eigxF
	2zo7llD488PPguL6VA+b5YDgt6dUxZpl9cpos=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.26.37 with SMTP id d37mr558851wfj.222.1259609572405; Mon, 
	30 Nov 2009 11:32:52 -0800 (PST)
Date: Mon, 30 Nov 2009 11:32:52 -0800
X-Google-Sender-Auth: 8fe4c57bbec2f7c1
Message-ID: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Mon, 30 Nov 2009 19:32:58 -0000

It was initially a surprise to me that f's definition is not
permitted, while g's is:

type Point = (Num n) => (n,n)

f :: Point -> Point
f x = x

g :: (Num n) => (n,n) -> (n,n)
g x = x

Basically, f would need to get a polymorphic type with a type variable
qualified with (Num n): the qualification would have to "float up"
from Point to f.  And that doesn't happen.  The following is okay,
too:

type Point n => (n,n)

h :: (Num n) => Point n -> Point n
h x = x

But at some point (hah!) you just don't care.

Taken together with the let-bound polymorphism thing David ran into,
the types have been more invasive than I expected them to be.
However, I write 'x:y:z' instead of '(x:y):z' often enough that I
expect I come out ahead.


From jason.orendorff@gmail.com Tue Dec 01 12:15:05 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:45819)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jason.orendorff@gmail.com>) id 1NFXFg-0006Kz-Ur
	for haskell-study@red-bean.com; Tue, 01 Dec 2009 12:15:05 -0600
Received: by pzk13 with SMTP id 13so3727018pzk.25
	for <haskell-study@red-bean.com>; Tue, 01 Dec 2009 10:14:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:content-type;
	bh=eTx+gR+n3JrL7KzAv84vTO1iT1h901oUt95JOkf5T6o=;
	b=Nfrf1YrWP9Ckaf4WY6X46ELE5U+CyXdLd8Y/jutsgnIRPRilzG6LU7OYUFMeqhfLe/
	gKAQPtn+VtUEiPaVs467NQXUoXTwVQncOc96YGxAkP5OlfYCmwwCXIdj3RDDkLQ+m4Yc
	q05fqROsAFtskZW9gwIpFImuZK26FWc4c/5f8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type;
	b=RqSgMq4/gzkOODeS3VbhtNkOgKk8Le4vCRO7cSFgfe1KaR0Q3jujnxApVkpsomBSla
	pxPG7RKik+I7ScKoPFDHMGalr9dGH/iewW6H4Cqs3lOamMCNhQMA8AwuSAN72ce+Qqhb
	xzjRaetXZNyh72rAZLYNG9NrFjI6P1hIKvDXY=
MIME-Version: 1.0
Received: by 10.143.27.35 with SMTP id e35mr664940wfj.185.1259691298966; Tue, 
	01 Dec 2009 10:14:58 -0800 (PST)
In-Reply-To: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
Date: Tue, 1 Dec 2009 12:14:58 -0600
Message-ID: <bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
From: Jason Orendorff <jason.orendorff@gmail.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=UTF-8
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 18:15:05 -0000

On Mon, Nov 30, 2009 at 1:32 PM, Jim Blandy <jimb@red-bean.com> wrote:
> Taken together with the let-bound polymorphism thing David ran into,
> the types have been more invasive than I expected them to be.

The error messages still kill me. I know how to read them and fix my
mistakes, but I'm at a point now where I doubt it's ever going to
become subliminal, and the compiler's oracular prose style is starting
to chafe. I am considering hacking ghc so that instead of this

    ch3.hs:20:19:
        Couldn't match expected type `Tree a'
               against inferred type `Tree a -> a -> Tree a'
        In the third argument of `Tree', namely `treeAdd'
        In the expression: Tree v l treeAdd r x
        In a case alternative: GT -> Tree v l treeAdd r x

it just says:

    ch3.hs:20:19: HUURURRRRRRRRGGGGHH!!!

which seems about as helpful in the common case; or even (and I don't
know why this would be hard):

    ch3.hs:20:19:
        `Tree' takes 3 arguments, you're passing 5
        In the expression: Tree v l treeAdd r x

The cause of this particular error is that I missed out some
parentheses--the first trivial change I happened to think of.

I feel the same way about "Cannot construct the infinite type: a = Foo
a". I understand what this means, really I do. I'm just skeptical that
it's ever an appropriate thing for a compiler to say to a programmer.
It might as well say "Cannot give your cat a wedgie in the expression
[x, y z]". Of course I didn't mean *that*. I'm not an idiot. It was a
typo. Jerk. Stay away from my cat.

-j


From bos@serpentine.com Tue Dec 01 12:38:37 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:65336)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>) id 1NFXcT-0002xr-JO
	for haskell-study@red-bean.com; Tue, 01 Dec 2009 12:38:37 -0600
Received: by pzk13 with SMTP id 13so3752630pzk.25
	for <haskell-study@red-bean.com>; Tue, 01 Dec 2009 10:38:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.114.215.36 with SMTP id n36mr11704716wag.110.1259692711180; 
	Tue, 01 Dec 2009 10:38:31 -0800 (PST)
In-Reply-To: <bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
Date: Tue, 1 Dec 2009 10:38:31 -0800
Message-ID: <c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jason Orendorff <jason.orendorff@gmail.com>
Content-Type: multipart/alternative; boundary=0016e64dbdf4937a890479af108a
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 18:38:37 -0000

--0016e64dbdf4937a890479af108a
Content-Type: text/plain; charset=UTF-8

On Tue, Dec 1, 2009 at 10:14 AM, Jason Orendorff
<jason.orendorff@gmail.com>wrote:


> The error messages still kill me. I know how to read them and fix my
> mistakes, but I'm at a point now where I doubt it's ever going to
> become subliminal, and the compiler's oracular prose style is starting
> to chafe. I am considering hacking ghc so that instead of this
>
>    ch3.hs:20:19:
>        Couldn't match expected type `Tree a'
>               against inferred type `Tree a -> a -> Tree a'
>        In the third argument of `Tree', namely `treeAdd'
>        In the expression: Tree v l treeAdd r x
>        In a case alternative: GT -> Tree v l treeAdd r x
>
> it just says:
>
>    ch3.hs:20:19: HUURURRRRRRRRGGGGHH!!!
>
> which seems about as helpful in the common case; or even (and I don't
> know why this would be hard):
>
>    ch3.hs:20:19:
>        `Tree' takes 3 arguments, you're passing 5
>        In the expression: Tree v l treeAdd r x
>

The trouble is, Tree *doesn't* take 3 arguments, it takes 1, which is in
turn a function of 1 argument, etc, etc.

Why is this significant? Suppose that the expression "Tree v l treeAdd" had
the type "function of two arguments". In that case, the expression "Tree v l
treeAdd r x" *could* actually be correctly typed, because you're first
constructing a function, then applying it to the two arguments r and x.

Ideally, your compiler can determine what your intention really was and give
you an error message of the line "ha *haaa*, you thought you were doing X,
but you actually did Y, which makes no sense here, but you can fix it by way
of Z". Unfortunately, the little compiler homunculus isn't so smart and in
your particular case above it would be extremely hard to figure out a more
appropriate error message. IOW, some of these utterances are gnomic
precisely because the language is so powerful.

I feel the same way about "Cannot construct the infinite type: a = Foo
> a". I understand what this means, really I do. I'm just skeptical that
> it's ever an appropriate thing for a compiler to say to a programmer.
>

Same class of problem. The compiler authors are actually extremely
thoughtful people, and when they cause the compiler to issue an error that
is hard to understand, it's not for want of cogitation on the subject. They
are very responsive to constructive feedback about error messages, and in
many cases their hands are bound not by lack of imagination, but by the
difficulty of figuring out how to report an obviously better message.

--0016e64dbdf4937a890479af108a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Dec 1, 2009 at 10:14 AM, Jason Orendorff=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:jason.orendorff@gmail.com">jason.o=
rendorff@gmail.com</a>&gt;</span> wrote:<br><div>=C2=A0</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex;">
<div class=3D"im">The error messages still kill me. I know how to read them=
 and fix my</div>
mistakes, but I&#39;m at a point now where I doubt it&#39;s ever going to<b=
r>
become subliminal, and the compiler&#39;s oracular prose style is starting<=
br>
to chafe. I am considering hacking ghc so that instead of this<br>
<br>
 =C2=A0 =C2=A0ch3.hs:20:19:<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0Couldn&#39;t match expected type `Tree a&#39;<b=
r>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 against inferred type `Tr=
ee a -&gt; a -&gt; Tree a&#39;<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0In the third argument of `Tree&#39;, namely `tr=
eeAdd&#39;<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0In the expression: Tree v l treeAdd r x<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0In a case alternative: GT -&gt; Tree v l treeAd=
d r x<br>
<br>
it just says:<br>
<br>
 =C2=A0 =C2=A0ch3.hs:20:19: HUURURRRRRRRRGGGGHH!!!<br>
<br>
which seems about as helpful in the common case; or even (and I don&#39;t<b=
r>
know why this would be hard):<br>
<br>
 =C2=A0 =C2=A0ch3.hs:20:19:<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0`Tree&#39; takes 3 arguments, you&#39;re passin=
g 5<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0In the expression: Tree v l treeAdd r x<br></bl=
ockquote><div><br></div><div>The trouble is, Tree <i>doesn&#39;t</i>=C2=A0t=
ake 3 arguments, it takes 1, which is in turn a function of 1 argument, etc=
, etc.</div><div><br>
</div><div>Why is this significant? Suppose that the expression &quot;Tree =
v l treeAdd&quot; had the type &quot;function of two arguments&quot;. In th=
at case, the expression &quot;Tree v l treeAdd r x&quot; <i>could</i>=C2=A0=
actually be correctly typed, because you&#39;re first constructing a functi=
on, then applying it to the two arguments r and x.</div>
<div><br></div><div>Ideally, your compiler can determine what your intentio=
n really was and give you an error message of the line &quot;ha <i>haaa</i>=
, you thought you were doing X, but you actually did Y, which makes no sens=
e here, but you can fix it by way of Z&quot;. Unfortunately, the little com=
piler homunculus isn&#39;t so smart and in your particular case above it wo=
uld be extremely hard to figure out a more appropriate error message. IOW, =
some of these utterances are gnomic precisely because the language is so po=
werful.</div>
<div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">I feel the same way about &q=
uot;Cannot construct the infinite type: a =3D Foo<br>
a&quot;. I understand what this means, really I do. I&#39;m just skeptical =
that<br>
it&#39;s ever an appropriate thing for a compiler to say to a programmer.<b=
r></blockquote><div><br></div><div>Same class of problem. The compiler auth=
ors are actually extremely thoughtful people, and when they cause the compi=
ler to issue an error that is hard to understand, it&#39;s not for want of =
cogitation on the subject. They are very responsive to constructive feedbac=
k about error messages, and in many cases their hands are bound not by lack=
 of imagination, but by the difficulty of figuring out how to report an obv=
iously better message.</div>
</div>

--0016e64dbdf4937a890479af108a--


From bos@serpentine.com Tue Dec 01 12:41:11 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:52319)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>) id 1NFXex-0003Wl-KQ
	for haskell-study@red-bean.com; Tue, 01 Dec 2009 12:41:11 -0600
Received: by pxi10 with SMTP id 10so4214118pxi.33
	for <haskell-study@red-bean.com>; Tue, 01 Dec 2009 10:41:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.114.252.14 with SMTP id z14mr11737948wah.84.1259692865803; 
	Tue, 01 Dec 2009 10:41:05 -0800 (PST)
In-Reply-To: <c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
	<c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
Date: Tue, 1 Dec 2009 10:41:05 -0800
Message-ID: <c290c4f20912011041t7deb5609r63b88bd4ca4a12a@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jason Orendorff <jason.orendorff@gmail.com>
Content-Type: multipart/alternative; boundary=0016e687872acad5aa0479af1927
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 18:41:11 -0000

--0016e687872acad5aa0479af1927
Content-Type: text/plain; charset=UTF-8

On Tue, Dec 1, 2009 at 10:38 AM, Bryan O'Sullivan <bos@serpentine.com>wrote:


> Same class of problem.
>

By the way, I'm not trying to downplay your frustration, just to make it
clear how difficult the problem is. I get that same sense of frustration at
times, in which cases it usually helps to go "wow, I'd send them a patch,
only I've no idea how to do a better job".

If it's any comfort, I prefer GHC's politely inscrutable error messages to
the vast volumes of useless shit that g++ shovels at me any time a
template-related error occurs :-)

--0016e687872acad5aa0479af1927
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Dec 1, 2009 at 10:38 AM, Bryan O&#39;Sul=
livan <span dir=3D"ltr">&lt;<a href=3D"mailto:bos@serpentine.com">bos@serpe=
ntine.com</a>&gt;</span> wrote:<br><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex;">
<div class=3D"gmail_quote"><div>Same class of problem.</div></div></blockqu=
ote><div><br></div><div>By the way, I&#39;m not trying to downplay your fru=
stration, just to make it clear how difficult the problem is. I get that sa=
me sense of frustration at times, in which cases it usually helps to go &qu=
ot;wow, I&#39;d send them a patch, only I&#39;ve no idea how to do a better=
 job&quot;.</div>
<div><br></div><div>If it&#39;s any comfort, I prefer GHC&#39;s politely in=
scrutable error messages to the vast volumes of useless shit that g++ shove=
ls at me any time a template-related error occurs :-)</div></div>

--0016e687872acad5aa0479af1927--


From jimblandy@gmail.com Tue Dec 01 12:43:05 2009
Received: from mail-pz0-f183.google.com ([209.85.222.183]:58597)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NFXgn-00045G-3S
	for haskell-study@red-bean.com; Tue, 01 Dec 2009 12:43:05 -0600
Received: by pzk13 with SMTP id 13so3757488pzk.25
	for <haskell-study@red-bean.com>; Tue, 01 Dec 2009 10:42:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=/o1Xft5o9CngpLG6GRzHfIaexZ6/ETWvm2hjyEng9hM=;
	b=gi20SRQ6I0Pj+/dF4uo9Jx2Iht76r+UeRfnigHRJYq3cetoLd1NekfKsvpX77VMBoB
	KaHShZCtCopsfdQYcWDLmFdWoAxpQtxm40KbAcRik2brG27h2cpFnVMPkg6/0k1PnL9S
	13xyPjsiUFHVzz/3DelVru2ZmMnOoILUXfA58=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=ViVtvQEjf7cIQbXGSCDcC43sCFhHyocx6r/b0+J7uO2uVJhx3GyOJ/2d8XfD0nG9Hx
	i3/OGGyrfdncF9wpOQbeQgfePhbCQ4fDZPOvwVbIa0pQ7jW2WcPcr4vV9QCKPcOB2Npc
	L3jBvO7nxaNgIXkMbNHP6z668hVm+VK4Dt038=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.142.7.10 with SMTP id 10mr676248wfg.137.1259692979424; Tue, 01 
	Dec 2009 10:42:59 -0800 (PST)
In-Reply-To: <c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
	<c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
Date: Tue, 1 Dec 2009 10:42:59 -0800
X-Google-Sender-Auth: fac9572f74a7504c
Message-ID: <8f2776cb0912011042s369ce9adv9d4257bed6049024@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 18:43:05 -0000

On Tue, Dec 1, 2009 at 10:38 AM, Bryan O'Sullivan <bos@serpentine.com> wrot=
e:
>> =A0 =A0ch3.hs:20:19:
>> =A0 =A0 =A0 =A0`Tree' takes 3 arguments, you're passing 5
>> =A0 =A0 =A0 =A0In the expression: Tree v l treeAdd r x
>
> The trouble is, Tree doesn't=A0take 3 arguments, it takes 1, which is in =
turn
> a function of 1 argument, etc, etc.
> Why is this significant? Suppose that the expression "Tree v l treeAdd" h=
ad
> the type "function of two arguments". In that case, the expression "Tree =
v l
> treeAdd r x" could=A0actually be correctly typed, because you're first
> constructing a function, then applying it to the two arguments r and x.

I'm gonna jump in here (after wiping away the tears rolling down my
face from laughing at Jason's post) and speculate that Jason knows
perfectly well how curried functions work.

But it's a *constructor*.  The compiler knows darned well it can't do
five applications in succession there.

Being helpful isn't the same as being theoretically complete.  It's
about identifying common cases and handling them specially.


From bos@serpentine.com Tue Dec 01 13:03:29 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:38487)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <bos@serpentine.com>)
	id 1NFY0X-00070s-Jz; Tue, 01 Dec 2009 13:03:29 -0600
Received: by mail-px0-f180.google.com with SMTP id 10so4240347pxi.33
	for <multiple recipients>; Tue, 01 Dec 2009 11:03:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.114.237.18 with SMTP id k18mr944894wah.63.1259694209126; Tue, 
	01 Dec 2009 11:03:29 -0800 (PST)
In-Reply-To: <8f2776cb0912011042s369ce9adv9d4257bed6049024@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
	<c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
	<8f2776cb0912011042s369ce9adv9d4257bed6049024@mail.gmail.com>
Date: Tue, 1 Dec 2009 11:03:29 -0800
Message-ID: <c290c4f20912011103u354310a0udb6edd91d40708e9@mail.gmail.com>
From: "Bryan O'Sullivan" <bos@serpentine.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: multipart/alternative; boundary=0016e64c3ebcdc535c0479af6939
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 19:03:29 -0000

--0016e64c3ebcdc535c0479af6939
Content-Type: text/plain; charset=UTF-8

On Tue, Dec 1, 2009 at 10:42 AM, Jim Blandy <jimb@red-bean.com> wrote:

>
> I'm gonna jump in here (after wiping away the tears rolling down my
> face from laughing at Jason's post) and speculate that Jason knows
> perfectly well how curried functions work.
>

Hold it on the harshin', dude. I don't know Jason, so I'm just doing what I
can to be helpful without making assumptions about what he does or doesn't
know.

But it's a *constructor*.  The compiler knows darned well it can't do
> five applications in succession there.
>

I can definitely imagine that the compiler could determine for some specific
cases that there really is an arity problem, and hence issue a more
appropriate error message. The kicker is that I don't know how difficult
that would be in practice.

--0016e64c3ebcdc535c0479af6939
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Dec 1, 2009 at 10:42 AM, Jim Blandy <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:jimb@red-bean.com">jimb@red-bean.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im"><br></div>I&#39;m gonna jump in here (after wiping away t=
he tears rolling down my<br>
face from laughing at Jason&#39;s post) and speculate that Jason knows<br>
perfectly well how curried functions work.<br></blockquote><div><br></div><=
div>Hold it on the harshin&#39;, dude. I don&#39;t know Jason, so I&#39;m j=
ust doing what I can to be helpful without making assumptions about what he=
 does or doesn&#39;t know.</div>
<div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
But it&#39;s a *constructor*. =C2=A0The compiler knows darned well it can&#=
39;t do<br>
five applications in succession there.<br></blockquote><div><br></div><div>=
I can definitely imagine that the compiler could determine for some specifi=
c cases that there really is an arity problem, and hence issue a more appro=
priate error message. The kicker is that I don&#39;t know how difficult tha=
t would be in practice.</div>
</div>

--0016e64c3ebcdc535c0479af6939--


From jimblandy@gmail.com Tue Dec 01 13:21:37 2009
Received: from mail-px0-f180.google.com ([209.85.216.180]:48788)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jimblandy@gmail.com>) id 1NFYI5-0001FQ-2F
	for haskell-study@red-bean.com; Tue, 01 Dec 2009 13:21:37 -0600
Received: by pxi10 with SMTP id 10so4261614pxi.33
	for <haskell-study@red-bean.com>; Tue, 01 Dec 2009 11:21:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type; bh=4P7AfcXz9i5WiG2MCLoSbhWnlKQgChVuvKDMtknq26c=;
	b=LzVyVzzpE0UHI3Dejxd6GO50MPULjlmWcFywZ2u6LbqmMgkjnGV+v+4Squt7PQfAHy
	kfzdPeH6MiaBBTT+7TMClKMW19J3Ov00N1/UFA0n81x7O6knihFTqN3t7/svjRTTqAsL
	I/z8AMy1Mbx6aMsU5onNUxT5K+CoNjjew1iNw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	b=mxBpXQunX7UyJ6u8rrbhCYWfRIRNiWyQ+u1QJDck52q6mKbAlZNQTSYGaLRKasUfOR
	RzqFZ+92n//37IEs1jvxug7B/pv+zL3CYYCEUNhzIPioUMmv6ktNE90FBIsMiS6uLxx6
	oQVP33Ez96677sGJA7C3Lapz/wXHLV6MP8/eA=
MIME-Version: 1.0
Sender: jimblandy@gmail.com
Received: by 10.143.26.37 with SMTP id d37mr742312wfj.222.1259695291571; Tue, 
	01 Dec 2009 11:21:31 -0800 (PST)
In-Reply-To: <c290c4f20912011103u354310a0udb6edd91d40708e9@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
	<c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
	<8f2776cb0912011042s369ce9adv9d4257bed6049024@mail.gmail.com>
	<c290c4f20912011103u354310a0udb6edd91d40708e9@mail.gmail.com>
Date: Tue, 1 Dec 2009 11:21:31 -0800
X-Google-Sender-Auth: 0ef4da64b9701de6
Message-ID: <8f2776cb0912011121l3c48bbd3t7549d3bc8290e3f1@mail.gmail.com>
From: Jim Blandy <jimb@red-bean.com>
To: "Bryan O'Sullivan" <bos@serpentine.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2009 19:21:37 -0000

On Tue, Dec 1, 2009 at 11:03 AM, Bryan O'Sullivan <bos@serpentine.com> wrote:
> Hold it on the harshin', dude. I don't know Jason, so I'm just doing what I
> can to be helpful without making assumptions about what he does or doesn't
> know.

Fair point.  I do appreciate you helping us out.

> I can definitely imagine that the compiler could determine for some specific
> cases that there really is an arity problem, and hence issue a more
> appropriate error message. The kicker is that I don't know how difficult
> that would be in practice.

Yeah.  I wrote a Hindley-Milner type checker for a grad school class
before (woop de doo), and an artifact of the way the algorithm gathers
constraints on everything's types as it walks the tree is that it's
hard to attribute a failure to type to any specific parse node; the
best you can say in general is, "these two things aren't consistent",
but even then it may not be obvious why they would be expected to be.
Each parse node contributes an equation, and all the parse nodes'
equations taken together fail to have a solution --- which equation's
fault is that?

I have some ideas about how to fix it, but yeah, a patch would be the proof.


From jason.orendorff@gmail.com Wed Dec 02 16:44:42 2009
Received: from mail-pz0-f179.google.com ([209.85.222.179]:50930)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jason.orendorff@gmail.com>) id 1NFxwA-0006bN-8u
	for haskell-study@red-bean.com; Wed, 02 Dec 2009 16:44:42 -0600
Received: by pzk9 with SMTP id 9so574220pzk.16
	for <haskell-study@red-bean.com>; Wed, 02 Dec 2009 14:44:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:content-type;
	bh=DKwWzt8PW4GJDWFLN831qO3F7WP1xfl4jBin3l1VHJk=;
	b=AkMVtMAo0qlnnJI9TbH8I6hZMbj9bpRCtCuQCuHsWxTQnkANqObctMLBSh2oTmIAsj
	Y/ViXmivLMX9AS9mQyZR/LVkd99jo+LyEYWg5E01Q7NDp3famccQX/EZ31SpUhkutQ1K
	C9x4IyZ1KTHa4SUdziOWHuFcWMApCEaltWwEI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type;
	b=tfq/g2IueSbEijFNPqvAr2Sq48gne+me+rnWy42wwZXQZztTJBLYwS4tTd/icu6VoU
	iHFl+53RghXKKfJv4/3BlUcbBYSF+CieDl002NgNppOl/vZn12jrh6YyoA4F6lvXCHCK
	GCy4qKosQG6lZdqmcpMXEBkNHkxSRNmx1iek4=
MIME-Version: 1.0
Received: by 10.142.75.10 with SMTP id x10mr80837wfa.153.1259793876456; Wed, 
	02 Dec 2009 14:44:36 -0800 (PST)
In-Reply-To: <8f2776cb0912011121l3c48bbd3t7549d3bc8290e3f1@mail.gmail.com>
References: <8f2776cb0911301132v7eecf6e1h90e60792c4eb9157@mail.gmail.com>
	<bb8868b90912011014l3d960e79hf7ba5a80e23446d5@mail.gmail.com>
	<c290c4f20912011038x637df0dp2e7e0facc21f7e24@mail.gmail.com>
	<8f2776cb0912011042s369ce9adv9d4257bed6049024@mail.gmail.com>
	<c290c4f20912011103u354310a0udb6edd91d40708e9@mail.gmail.com>
	<8f2776cb0912011121l3c48bbd3t7549d3bc8290e3f1@mail.gmail.com>
Date: Wed, 2 Dec 2009 16:44:36 -0600
Message-ID: <bb8868b90912021444n3d7c5ad1jbd6d05607013e73a@mail.gmail.com>
From: Jason Orendorff <jason.orendorff@gmail.com>
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=UTF-8
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: Re: [Haskell-study] Ch. 3: Named types and type classes
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Dec 2009 22:44:42 -0000

On Tue, Dec 1, 2009 at 1:21 PM, Jim Blandy <jimb@red-bean.com> wrote:
> I have some ideas about how to fix it, but yeah, a patch would be the proof.

Just to clarify what I was talking about, I felt the amount of detail
present in the current error message demonstrated that the compiler
has all the information it needs, once the error is detected, to
produce an even better error message in this special case.

       Couldn't match expected type `Tree a'
              against inferred type `Tree a -> a -> Tree a'
       In the third argument of `Tree', namely `treeAdd'
       In the expression: Tree v l treeAdd r x
       In a case alternative: GT -> Tree v l treeAdd r x

Having looked at the source a little bit (in ghc/compiler/typecheck)
I'm not sure anymore. The first two lines of that error message are
emitted in misMatchMsg (in TcTyFuns.lhs), which does not have access
to the expressions. The last three lines are emitted by examining the
list returned by getErrCtxt. But it looks like those ErrCtxt values
are completely opaque. They are (Bool, TidyEnv -> Tcm (TidyEnv,
Message)) pairs, so really the only thing they can do is spit out a
line for an error message.

In short, the way the error paths in the typechecker are currently
written, the necessary information is being thrown away (lossily
converted to mere strings) too soon.

Alas, I can't get GHC to compile all the way through, as tip seems to
have been broken recently. So I'm giving up for now.

-j


From jason.orendorff@gmail.com Wed Dec 02 17:19:07 2009
Received: from mail-pw0-f60.google.com ([209.85.160.60]:32889)
	by sanpietro.red-bean.com with esmtp (Exim 4.69)
	(envelope-from <jason.orendorff@gmail.com>)
	id 1NFyTT-0003t2-1v; Wed, 02 Dec 2009 17:19:07 -0600
Received: by pwi17 with SMTP id 17so564803pwi.39
	for <multiple recipients>; Wed, 02 Dec 2009 15:19:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type;
	bh=jfoP/sbiS5cYYzaXZDKtyI+9RRKFUnaJ2oocpn7xQLg=;
	b=V9abt8PoUZtcjJGH3XJy/Rwtkxd6a/WR7B2G3d2ua/V7KgKwbmqtdZYG2tiA60zVv5
	dQY4rvRkPiuk5B3YK6VAHPoogRYc2eK459Q5/s2+veGuw7uWvm4eqyc/XASZ1V1OmYr8
	A/zAEbFXDiHmN+LQMFQNnwc4L1gX8ZXSNYbww=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=T86rStXn5Y0Wr086Psm+KeabzSwHFABEtTPeDaDGrjqha45yj0pOE9ATWX8BvtWwt/
	JC+iDjrPLRZlh1EQeIelZ3pKRDhtn/LxWD9FmMegc8YHLv0f6l0vRT6uHdA/igTlggx0
	1ntu9E/4COWriDKVD4eusPzH1HvzYqc/jT/cY=
MIME-Version: 1.0
Received: by 10.142.121.3 with SMTP id t3mr93234wfc.246.1259795940777; Wed, 02 
	Dec 2009 15:19:00 -0800 (PST)
In-Reply-To: <8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
References: <90804c6f0911072143h687f90ceg6a1fb60593b9397a@mail.gmail.com>
	<c290c4f20911072146x6708ac41t8140bb6aa6706c09@mail.gmail.com>
	<90804c6f0911072203k2fc449b2s9f087881a0972f3f@mail.gmail.com>
	<8f2776cb0911072349x62f71038ya455563a781cd5ef@mail.gmail.com>
Date: Wed, 2 Dec 2009 17:19:00 -0600
Message-ID: <bb8868b90912021519o425f7c9fw8f8f8b26bfd9fed8@mail.gmail.com>
From: Jason Orendorff <jason.orendorff@gmail.com>
To: Jim Blandy <jimb@red-bean.com>
Content-Type: text/plain; charset=UTF-8
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Cc: haskell-study@red-bean.com
Subject: Re: [Haskell-study] trouble testing a generic function in haskell
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Wed, 02 Dec 2009 23:19:07 -0000

On Sun, Nov 8, 2009 at 1:49 AM, Jim Blandy <jimb@red-bean.com> wrote:
> Here's a simpler example that shows (I think) the same issue:
>
> poly f = ((f "a"), (f 1))

If you compile with the -XRankNTypes flag, you can explicitly ask for this.

poly :: (forall x . x -> x) -> (String, Integer)
poly f = (f "a", f 1)

main = print (poly id)  -- prints ("a",1)

-j


From 3DkQXSw0OALQbUmeYff-mnoXsaiiafYWiXY.Wig@codesite.bounces.google.com Wed Dec 02 22:52:35 2009
Received: from mail-gx0-f240.google.com ([209.85.217.240]:39892)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3DkQXSw0OALQbUmeYff-mnoXsaiiafYWiXY.Wig@codesite.bounces.google.com>)
	id 1NG3gB-0005kf-Od
	for haskell-study@red-bean.com; Wed, 02 Dec 2009 22:52:35 -0600
Received: by gxk18 with SMTP id 18so10192gxk.3
	for <haskell-study@red-bean.com>; Wed, 02 Dec 2009 20:52:30 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.90.19.19 with SMTP id 19mr1419935ags.3.1259815950205; Wed, 02 
	Dec 2009 20:52:30 -0800 (PST)
Message-ID: <0016361e7d6e31c8d70479cbc28a@google.com>
Date: Thu, 03 Dec 2009 04:52:30 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] 2 new revisions pushed by
	carl...@bactrian.org on 2009-12-03 04:51 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2009 04:52:35 -0000

2 new revisions:

Revision: b3d0f81d50
Author: "David Carlton <carlton@bactrian.org>"
Date: Wed Dec  2 20:35:30 2009
Log: Fix filename typo.
http://code.google.com/p/haskell-study/source/detail?r=b3d0f81d50

Revision: 0fd03b33fc
Author: "David Carlton <carlton@bactrian.org>"
Date: Wed Dec  2 20:51:29 2009
Log: Add some notes about splitWith.
http://code.google.com/p/haskell-study/source/detail?r=0fd03b33fc

==============================================================================
Revision: b3d0f81d50
Author: "David Carlton <carlton@bactrian.org>"
Date: Wed Dec  2 20:35:30 2009
Log: Fix filename typo.
http://code.google.com/p/haskell-study/source/detail?r=b3d0f81d50

Added:
  /carlton/ch04-notes.txt
Deleted:
  /carlton/cho04-notes.txt

=======================================
--- /dev/null
+++ /carlton/ch04-notes.txt	Wed Dec  2 20:35:30 2009
@@ -0,0 +1,3 @@
+* p. 80: I don't think it's possible to define a total equivalent of
+     Head?  (Hmm, I guess you can use Maybe if you want that.  And,
+     indeed, that's what Exercise 1 on p. 84 does.)
=======================================
--- /carlton/cho04-notes.txt	Sun Nov 29 22:34:25 2009
+++ /dev/null
@@ -1,3 +0,0 @@
-* p. 80: I don't think it's possible to define a total equivalent of
-     Head?  (Hmm, I guess you can use Maybe if you want that.  And,
-     indeed, that's what Exercise 1 on p. 84 does.)

==============================================================================
Revision: 0fd03b33fc
Author: "David Carlton <carlton@bactrian.org>"
Date: Wed Dec  2 20:51:29 2009
Log: Add some notes about splitWith.
http://code.google.com/p/haskell-study/source/detail?r=0fd03b33fc

Modified:
  /carlton/Ch04.hs
  /carlton/ch04-notes.txt

=======================================
--- /carlton/Ch04.hs	Sun Nov 29 22:34:25 2009
+++ /carlton/Ch04.hs	Wed Dec  2 20:51:29 2009
@@ -15,9 +15,6 @@
  safeInit (x:xs) = Just (x:rest) where
      Just rest = safeInit xs

--- FIXME (2009-11-29, carlton): I'm not sure this works right, but
--- it's passing all the tests, it's late, and I want to check
--- something in; I'll think harder about this some other day.
  splitWith _ [] = []
  splitWith pred (x:xs)
      | pred x = splitWith pred xs
=======================================
--- /carlton/ch04-notes.txt	Wed Dec  2 20:35:30 2009
+++ /carlton/ch04-notes.txt	Wed Dec  2 20:51:29 2009
@@ -1,3 +1,13 @@
  * p. 80: I don't think it's possible to define a total equivalent of
       Head?  (Hmm, I guess you can use Maybe if you want that.  And,
       indeed, that's what Exercise 1 on p. 84 does.)
+
+* p. 84 ex. 2: Writing splitWith was surprisingly weird: I tried to
+     solve the problem without thinking too much about it in advance;
+     tests failed right and left, and trying to fix the problem just
+     made things work.  So I deleted everything and started over; that
+     time, for whatever reason, I happened across a solution which
+     passed my first nontrivial test, but which seemed similar enough
+     to my previous solutions that I was shocked when I added another
+     5 tests and they all passed without modification.  Cute-looking
+     solution, too.  Not sure what happened.


From 3NI8XSw0OACYJCUMGNN-UVWFaIQQINGEQFG.EQO@codesite.bounces.google.com Thu Dec 03 04:13:13 2009
Received: from mail-gx0-f240.google.com ([209.85.217.240]:62364)
	by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from
	<3NI8XSw0OACYJCUMGNN-UVWFaIQQINGEQFG.EQO@codesite.bounces.google.com>)
	id 1NG8gT-0008Q6-MI
	for haskell-study@red-bean.com; Thu, 03 Dec 2009 04:13:13 -0600
Received: by gxk18 with SMTP id 18so13108gxk.3
	for <haskell-study@red-bean.com>; Thu, 03 Dec 2009 02:13:08 -0800 (PST)
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.100.24.33 with SMTP id 33mr1436290anx.1.1259835188154; Thu, 03 
	Dec 2009 02:13:08 -0800 (PST)
Message-ID: <0016e646a2fedd94080479d03c3e@google.com>
Date: Thu, 03 Dec 2009 10:13:08 +0000
From: haskell-study@googlecode.com
To: haskell-study@red-bean.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
X-Virus-Scanned: No virus found by ClamAV at red-bean.com
Subject: [Haskell-study] [haskell-study] push by jimblandy - Make an obvious
	cleanup to splitWith. Fix splitWith3. on 2009-12-03 10:12 GMT
X-BeenThere: haskell-study@red-bean.com
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Study group for Real-World Haskell <haskell-study.red-bean.com>
List-Unsubscribe: <http://www.red-bean.com/mailman/options/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=unsubscribe>
List-Archive: <http://www.red-bean.com/pipermail/haskell-study>
List-Post: <mailto:haskell-study@red-bean.com>
List-Help: <mailto:haskell-study-request@red-bean.com?subject=help>
List-Subscribe: <http://www.red-bean.com/mailman/listinfo/haskell-study>,
	<mailto:haskell-study-request@red-bean.com?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2009 10:13:13 -0000

Revision: 64f74bf060
Author: Jim Blandy <jimb@mozilla.org>
Date: Thu Dec  3 02:12:14 2009
Log: Make an obvious cleanup to splitWith.  Fix splitWith3.
http://code.google.com/p/haskell-study/source/detail?r=64f74bf060

Modified:
  /jimb/ch04/p84.hs

=======================================
--- /jimb/ch04/p84.hs	Mon Nov 30 11:24:22 2009
+++ /jimb/ch04/p84.hs	Thu Dec  3 02:12:14 2009
@@ -18,13 +18,13 @@
      where outside [] = []
            outside (x:xs) = if isBreak x
                             then outside xs
-                           else let (run, runs) = inside x xs
-                                in run : runs
-          inside x1 [] = ([x1],[])
-          inside x1 (x2:xs) =
