From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1251918651.30178.12.camel@jcchost> References: <5db2df69e768a7259b8a1e698abddd3f@coraid.com> <32125c2033c0f63e5bb24548c7bc934f@hamnavoe.com> <3e1162e60909021127m7c22b518hf2255495dce5ee30@mail.gmail.com> <1251918651.30178.12.camel@jcchost> Date: Wed, 2 Sep 2009 13:02:25 -0700 Message-ID: <3e1162e60909021302m56cb1039tb32d88512d9b541e@mail.gmail.com> From: David Leimbach To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd4d240ebff4704729dbef9 Subject: Re: [9fans] nice quote Topicbox-Message-UUID: 5fc81b2a-ead5-11e9-9d60-3106f5b1d025 --000e0cd4d240ebff4704729dbef9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Sep 2, 2009 at 12:10 PM, Jonathan Cast w= rote: > On Wed, 2009-09-02 at 11:27 -0700, David Leimbach wrote: > > On Wed, Sep 2, 2009 at 11:08 AM, Richard Miller <9fans@hamnavoe.com> > > wrote: > > >> > > > http://graphics.cs.williams.edu/archive/SweeneyHPG2009/TimHPG2009.pdf > > >> > > > on p. 43/44 i believe it is claimed that one > > > cannot do CSP without pure functional > > > programming. > > > (p =E2=87=92 q) =E2=87=8F (=C2=ACp =E2=87=92 =C2=ACq) > > > > That's interesting because pure functional programming doesn't exist > > at all in the strictest sense on a computer. One MUST be able to > > cause side effects during computation or your CPU will just get hot... > > if even that. > > *delurk* > > That's an excessively strict view. You need *output* for a program to > be useful, but producing that output doesn't need to be intermixed with > the program's algorithm to be useful; you can compute first, then output > the results. > Compute what first? You compute input, to produce output. You have no choice really. In haskell the entry point is main :: IO (). I rest my case. Note that I didn't say "some code can't be pure", that's for the most part false (some would argue that even floating point math must be done in an impure way because one can set up the representation of floats differently, and that changes the purity of what would have been a pure function). Some code certainly can be executed in a pure sense, but at some point those values came in via a very dirty input process. The best part about Haskell is you can know by a functions type that no impure actions took place in a subset of your code. This does not falsify my claim that even pure functional programming languages require impure code. And if you prefer a plea to authority over logic, I haven't said anything that Simon Peyton Jones hasn't himself said about Haskell. Dave --000e0cd4d240ebff4704729dbef9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Wed, Sep 2, 2009 at 12:10 PM, Jonatha= n Cast <j= onathanccast@fastmail.fm> wrote:
On Wed, 2009-09-02 at 11:27 -0700, David Leimbach wrote:
> On Wed, Sep 2, 2009 at 11:08 AM, Richard Miller <9fans@hamnavoe.com>
> wrote:
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://graphics.c= s.williams.edu/archive/SweeneyHPG2009/TimHPG2009.pdf
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 > on p. 43/44 i believe it is claimed t= hat one
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 > cannot do CSP without pure functional=
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 > programming.

> =C2=A0 =C2=A0 =C2=A0 =C2=A0 (p =E2=87=92 q) =E2=87=8F (=C2=ACp =E2=87= =92 =C2=ACq)


> That's interesting because pure functional programming doesn't= exist
> at all in the strictest sense on a computer. =C2=A0One MUST be able to=
> cause side effects during computation or your CPU will just get hot...=
> if even that.

*delurk*

That's an excessively strict view. =C2=A0You need *output* for a progra= m to
be useful, but producing that output doesn't need to be intermixed with=
the program's algorithm to be useful; you can compute first, then outpu= t
the results.

Compute what first? =C2=A0= You compute input, to produce output. =C2=A0You have no choice really. =C2= =A0In haskell the entry point is=C2=A0

main :: IO = ().

I rest my case. =C2=A0

Note that I didn= 't say =C2=A0"some code can't be pure", that's for th= e most part false (some would argue that even floating point math must be d= one in an impure way because one can set up the representation of floats di= fferently, and that changes the purity of what would have been a pure funct= ion). =C2=A0Some code certainly can be executed in a pure sense, but at som= e point those values came in via a very dirty input process.

The best part about Haskell is you can know by a functi= ons type that no impure actions took place in a subset of your code. =C2=A0= This does not falsify my claim that even pure functional programming langua= ges require impure code.

And if you prefer a plea to authority over logic, I hav= en't said anything that Simon Peyton Jones hasn't himself said abou= t Haskell.

Dave
--000e0cd4d240ebff4704729dbef9--