Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

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


Today's Topics:

   1. Re:  cmath Install troubles (Brandon Allbery)
   2. Re:  Seq question (Tim Perry)
   3. Re:  Seq question (Daniel Fischer)
   4. Re:  cmath Install troubles (Tom Murphy)
   5.  Two questions for a production project... (Mike Meyer)
   6. Re:  cmath Install troubles (Tom Murphy)
   7. Re:  Two questions for a production project... (Michael Orlitzky)


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

Message: 1
Date: Thu, 19 Apr 2012 16:31:33 -0400
From: Brandon Allbery <allber...@gmail.com>
Subject: Re: [Haskell-beginners] cmath Install troubles
To: Tom Murphy <amin...@gmail.com>
Cc: beginners <beginners@haskell.org>
Message-ID:
        <CAKFCL4WSHJz9Vn6t1cc_5QU67j=immuscgczfujlawkobk8...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Thu, Apr 19, 2012 at 06:31, Tom Murphy <amin...@gmail.com> wrote:

> So does nobody use cmath anymore? I'm trying to install the latest
> version (which is from 2008).


At a guess, it's well supported on Linux and (since it's dons) NetBSD.  OS
X and Windows, probably not so well tested.

-- 
brandon s allbery                                      allber...@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120419/09d82b8a/attachment-0001.htm>

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

Message: 2
Date: Thu, 19 Apr 2012 14:13:48 -0700
From: Tim Perry <tim.v...@gmail.com>
Subject: Re: [Haskell-beginners] Seq question
To: beginners@haskell.org
Message-ID:
        <CAFVgASUyEfyRbarCpSUQfAPz1wCmdEPTk09DSp7b6Oc=xk1...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Henk-Jan van Tuly is correct. Oops! Sorry I was mis-informed. By the way,
there is an excellent post about this topic on StackOverflow.com. It
covers, seq, weak-head-normal-form, normal form, and thunks. See here:
http://stackoverflow.com/questions/6872898/haskell-what-is-weak-head-normal-form/6889335#6889335


Hope that makes up for my earlier comment.

Tim


On Thu, Apr 19, 2012 at 2:31 AM, Henk-Jan van Tuyl <hjgt...@chello.nl>wrote:

> On Wed, 18 Apr 2012 16:45:05 +0200, Brent Yorgey <byor...@seas.upenn.edu>
> wrote:
>
>  On Tue, Apr 17, 2012 at 02:41:15PM -0700, Tim Perry wrote:
>>
>>> seq evaluates to Weak Head Normal Form (WHNF). WHNF is the first
>>> contructor. So your use of seq only evaluates the first number and the
>>> cons. I.E., it evaluates to:
>>> s:(Thunk)
>>>
>>
>> Actually, it doesn't even force the first number.  You just get
>>
>> Thunk : Thunk
>>
>>
> A nice way to demonstrate this, is the following GHCi session:
>  Prelude> undefined `seq` print "OK"
>  *** Exception: Prelude.undefined
>  Prelude> [undefined] `seq` print "OK"
>  "OK"
>
>
> Regards,
> Henk-Jan van Tuyl
>
>
> --
> http://Van.Tuyl.eu/
> http://members.chello.nl/**hjgtuyl/tourdemonad.html<http://members.chello.nl/hjgtuyl/tourdemonad.html>
> Haskell programming
> --
>
>
> ______________________________**_________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/**mailman/listinfo/beginners<http://www.haskell.org/mailman/listinfo/beginners>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120419/7747d7bd/attachment-0001.htm>

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

Message: 3
Date: Fri, 20 Apr 2012 00:23:22 +0200
From: Daniel Fischer <daniel.is.fisc...@googlemail.com>
Subject: Re: [Haskell-beginners] Seq question
To: beginners@haskell.org
Message-ID: <201204200023.22171.daniel.is.fisc...@googlemail.com>
Content-Type: Text/Plain;  charset="utf-8"

On Thursday 19 April 2012, 23:13:48, Tim Perry wrote:
> Henk-Jan van Tuly is correct. Oops! Sorry I was mis-informed.

Note, however, that in the case here, the data-dependencies force the 
evaluation of the first number in order to determine the outermost 
constructor.

So actually, your

> So your use of seq only evaluates the first number and
> the cons. I.E., it evaluates to:
> s:(Thunk)

was factually correct (in this special case).

> By the
> way, there is an excellent post about this topic on StackOverflow.com.
> It covers, seq, weak-head-normal-form, normal form, and thunks. See
> here:
> http://stackoverflow.com/questions/6872898/haskell-what-is-weak-head-no
> rmal-form/6889335#6889335
> 
> 
> Hope that makes up for my earlier comment.
> 
> Tim
> 
> On Thu, Apr 19, 2012 at 2:31 AM, Henk-Jan van Tuyl 
<hjgt...@chello.nl>wrote:
> > On Wed, 18 Apr 2012 16:45:05 +0200, Brent Yorgey
> > <byor...@seas.upenn.edu>
> > 
> > wrote:
> >  On Tue, Apr 17, 2012 at 02:41:15PM -0700, Tim Perry wrote:
> >>> seq evaluates to Weak Head Normal Form (WHNF). WHNF is the first
> >>> contructor. So your use of seq only evaluates the first number and
> >>> the cons. I.E., it evaluates to:
> >>> s:(Thunk)
> >> 
> >> Actually, it doesn't even force the first number.  You just get
> >> 
> >> Thunk : Thunk
> > 
> > A nice way to demonstrate this, is the following GHCi session:
> >  Prelude> undefined `seq` print "OK"
> >  *** Exception: Prelude.undefined
> >  Prelude> [undefined] `seq` print "OK"
> >  "OK"
> > 
> > Regards,
> > Henk-Jan van Tuyl



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

Message: 4
Date: Thu, 19 Apr 2012 18:29:39 -0400
From: Tom Murphy <amin...@gmail.com>
Subject: Re: [Haskell-beginners] cmath Install troubles
To: Brandon Allbery <allber...@gmail.com>
Cc: beginners <beginners@haskell.org>
Message-ID:
        <cao9q0tvzxtsj_bf5hpul5g5ojyxcuq-vhzzu9wd3gixzx0g...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

cmath doesn't build now, but I successfully installed hsc3 (which
depends on cmath) on my computer less than 6 months ago. Same CPU and
OS version, but different ghc/HP, and possibly different XCode.

Also:

Some other packages which have the same FFI C-include style build fine
on my machine. Some which even include math.h. For example:
- strptime
- mp3decoder

So maybe it's not a problem involving not having -fvia-c?


Tom

On 4/19/12, Brandon Allbery <allber...@gmail.com> wrote:
> On Thu, Apr 19, 2012 at 06:31, Tom Murphy <amin...@gmail.com> wrote:
>
>> So does nobody use cmath anymore? I'm trying to install the latest
>> version (which is from 2008).
>
>
> At a guess, it's well supported on Linux and (since it's dons) NetBSD.  OS
> X and Windows, probably not so well tested.
>
> --
> brandon s allbery                                      allber...@gmail.com
> wandering unix systems administrator (available)     (412) 475-9364 vm/sms
>



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

Message: 5
Date: Thu, 19 Apr 2012 19:40:02 -0400
From: Mike Meyer <m...@mired.org>
Subject: [Haskell-beginners] Two questions for a production project...
To: beginners@haskell.org <beginners@haskell.org>
Message-ID: <20120419194002.6f155...@bhuda.mired.org>
Content-Type: text/plain; charset=US-ASCII

I've got a project coming up that I could use haskell for, providing I
can convince myself that it's appropriate. The critical question is:

Anyone using Haskell in a long-running production application? I'm
talking about something where the program would run for weeks or
months non-stop, with either multiple threads or multiple copies.

       <mike
-- 
Mike Meyer <m...@mired.org>             http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



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

Message: 6
Date: Thu, 19 Apr 2012 22:03:18 -0400
From: Tom Murphy <amin...@gmail.com>
Subject: Re: [Haskell-beginners] cmath Install troubles
To: Brandon Allbery <allber...@gmail.com>
Cc: beginners <beginners@haskell.org>
Message-ID:
        <CAO9Q0tUq+UorWfmTNFf=Am=kt4kq1hrlf1f61ezazitajet...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Also, is there a way that I could "short circuit" (in the "True || _ =
True" sense) the whole process of fixing this?

For example, cabal-install cmath on a machine with similar
architecture and OS, break out my SICP [0], and try to replicate
cabal's storage methods by hand?

Tom


[0] http://www.vex.net/~trebla/haskell/sicp.xhtml

On 4/19/12, Tom Murphy <amin...@gmail.com> wrote:
> cmath doesn't build now, but I successfully installed hsc3 (which
> depends on cmath) on my computer less than 6 months ago. Same CPU and
> OS version, but different ghc/HP, and possibly different XCode.
>
> Also:
>
> Some other packages which have the same FFI C-include style build fine
> on my machine. Some which even include math.h. For example:
> - strptime
> - mp3decoder
>
> So maybe it's not a problem involving not having -fvia-c?
>
>
> Tom
>
> On 4/19/12, Brandon Allbery <allber...@gmail.com> wrote:
>> On Thu, Apr 19, 2012 at 06:31, Tom Murphy <amin...@gmail.com> wrote:
>>
>>> So does nobody use cmath anymore? I'm trying to install the latest
>>> version (which is from 2008).
>>
>>
>> At a guess, it's well supported on Linux and (since it's dons) NetBSD.
>> OS
>> X and Windows, probably not so well tested.
>>
>> --
>> brandon s allbery
>> allber...@gmail.com
>> wandering unix systems administrator (available)     (412) 475-9364
>> vm/sms
>>
>



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

Message: 7
Date: Thu, 19 Apr 2012 22:43:13 -0400
From: Michael Orlitzky <mich...@orlitzky.com>
Subject: Re: [Haskell-beginners] Two questions for a production
        project...
To: beginners@haskell.org
Message-ID: <4f90cd41.2010...@orlitzky.com>
Content-Type: text/plain; charset=ISO-8859-1

On 04/19/2012 07:40 PM, Mike Meyer wrote:
> I've got a project coming up that I could use haskell for, providing I
> can convince myself that it's appropriate. The critical question is:
> 
> Anyone using Haskell in a long-running production application? I'm
> talking about something where the program would run for weeks or
> months non-stop, with either multiple threads or multiple copies.

I have a rather stupid application that parses feeds from the Twitter
API. For each username given on the command line, it calls forkIO and
the new thread enters a recursive loop:

  recurse x y z = do
    ...
    recurse x y z

forever and ever.

Contrary to my expectations (I still basically don't know what I'm doing
in Haskell) it seems to run in constant space for months at a time.



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

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 46, Issue 35
*****************************************

Reply via email to