Article View: sci.logic
Article #762Re: The only decent mathematicians here are accomplished PROGRAMMERS
From: David C. Ullrich
Date: Wed, 21 Sep 2011 12:45
Date: Wed, 21 Sep 2011 12:45
55 lines
3735 bytes
3735 bytes
On Wed, 21 Sep 2011 00:26:32 -0400, Owen Jacobson <angrybaldguy@gmail.com> wrote: >On 2011-09-20 12:05:37 +0000, David C. Ullrich said: > >> On Tue, 20 Sep 2011 03:35:39 -0700 (PDT), scaaahu <scaaahu@gmail.com> >> wrote: >> >>> I fail to see how to store an irrational number like Pi. >> >> What's the difference? You store code that calculates >> the first n digits on request... >> >> Heh. As it happens I just got this book on Haskell. I haven't >> been able to install Haskell, however, so I have no idea whether >> the following code is correct. [...] > >Looks pretty good to me, plus or minus the module preamble: Keen. I can learn me a Haskell for great good without having to actually install it! I just post code here and the result appears a day later. Heh-heh. >---- transcript begins ---- >:)owen@nj1:~/dcu$ cat Dcu.hs >module Dcu where > >zeroes 0 = [] >zeroes j = 0 : (zeroes (j-1)) > >x j = [1] ++ (zeroes j) ++ (x (j+1)) > >:)owen@nj1:~/dcu$ ghci >GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help >Loading package ghc-prim ... linking ... done. >Loading package integer-gmp ... linking ... done. >Loading package base ... linking ... done. > >Prelude> :add Dcu >[1 of 1] Compiling Dcu ( Dcu.hs, interpreted ) >Ok, modules loaded: Dcu. > >*Dcu> take 20 $ x 1 >[1,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0] >---- transcript ends ---- > >(The dollar sign there is a notational convenience; that last >expression is equivalent to 'take 20 (x 1)'.) > >Take care, > >-o
Technical Details
Message-ID:
<itmj77pjm03s8hlqkcp2s7i8gl0e5snoa7@4ax.com>Path:
arc1-ca.pugleaf.net!lh7ni1830pbb.0!nntp.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<2dac6b8b-fe96-4388-947e-b9c1f22ff00d@m38g2000vbn.googlegroups.com> <5c0efb66-7ffc-412e-a4f0-fcb2f349d359@et6g2000vbb.googlegroups.com> <447a7e82-0d9c-422b-be70-47430609d3a2@8g2000yqm.googlegroups.com> <87ty87wm93.fsf@aatuk-AOA150.i-did-not-set--mail-host-address--so-tickle-me> <8da79b5f-d168-484c-a7b7-edcefd94bbf3@8g2000yqm.googlegroups.com> <8qvg77ls3bsjlkjoe0ss7rcpab5v8t0tj7@4ax.com> <2011092100263283965-angrybaldguy@gmailcom>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc56,7378e085548607ba
X-Google-NewGroupId: yes
X-Google-Thread: 109d8a,7378e085548607ba
X-Google-NewGroupId: yes
X-Google-Thread: fd648,eb453206be5eeda4
X-Google-NewGroupId: yes
X-Google-Thread: 106b5d,eb453206be5eeda4
X-Google-NewGroupId: yes
X-Google-Attributes: gide4b186767d,gid9ef9b79ae9,giddb42311052,gid3b9c5691a5,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.68.25.8 with SMTP id y8mr617737pbf.16.1316609142326;
Wed, 21 Sep 2011 05:45:42 -0700 (PDT)
Path: arc1-ca.pugleaf.net!lh7ni1830pbb.0!nntp.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 21 Sep 2011 07:45:41 -0500
From: David C. Ullrich <ullrich@math.okstate.edu>
Newsgroups: sci.logic,sci.math,aus.science,rec.org.mensa
Subject: Re: The only decent mathematicians here are accomplished PROGRAMMERS
Date: Wed, 21 Sep 2011 07:45:41 -0500
Message-ID: <itmj77pjm03s8hlqkcp2s7i8gl0e5snoa7@4ax.com>
References: <2dac6b8b-fe96-4388-947e-b9c1f22ff00d@m38g2000vbn.googlegroups.com> <5c0efb66-7ffc-412e-a4f0-fcb2f349d359@et6g2000vbb.googlegroups.com> <447a7e82-0d9c-422b-be70-47430609d3a2@8g2000yqm.googlegroups.com> <87ty87wm93.fsf@aatuk-AOA150.i-did-not-set--mail-host-address--so-tickle-me> <8da79b5f-d168-484c-a7b7-edcefd94bbf3@8g2000yqm.googlegroups.com> <8qvg77ls3bsjlkjoe0ss7rcpab5v8t0tj7@4ax.com> <2011092100263283965-angrybaldguy@gmailcom>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Lines: 56
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-5I1tyHSeq+/B4N+M+9RNTfckHwKvmngYgmKSQTAHR2ZnzCnIKPYRhrKbl4OVRuXctzPBDbuFzQZQ2JQ!83hqiwiPANz9o9iJezN1HBMlJeoJ+JRlFCGaUn79HGLkojCXfr3+NHbNyeWAaDyYTK1S2Uo=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 3064
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit