Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. how to update cabal? (Rohit M.)
2. Re: how to update cabal? (Daniel Fischer)
3. DPH (Luca Ciciriello)
4. Re: DPH (Stephen Tetley)
5. Re: DPH (Daniel Fischer)
6. DPH (Luca Ciciriello)
----------------------------------------------------------------------
Message: 1
Date: Thu, 10 Jun 2010 04:49:08 -0500
From: "Rohit M." <[email protected]>
Subject: [Haskell-beginners] how to update cabal?
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
I just installed the .dmg fore the Haskell platform.
When I run "cabal update" in terminal I get the following:
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
I then ran "cabal -V":
cabal-install version 0.8.0
using version 1.8.0.2 of the Cabal library
The latest version of cabal install is 0.8.2. When I run "cabal install
cabal-install" it seems to work fine, without any errors but when I go back
and check i.e. "cabal -V" i still get version 0.8.0.
I tried "cabal list cabal-install":
Synopsis: The command-line interface for Cabal and Hackage.
Latest version available: 0.8.2
Latest version installed: [ Not installed ]
Homepage: http://www.haskell.org/cabal/
License: BSD3
What am I missing? It is really annoying that cabal update keeps telling me
about a new version of cabal-install that I can't actually get to work!
Thanks
Rohit
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100610/584ebf96/attachment-0001.html
------------------------------
Message: 2
Date: Thu, 10 Jun 2010 12:18:02 +0200
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] how to update cabal?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Thursday 10 June 2010 11:49:08, Rohit M. wrote:
> I just installed the .dmg fore the Haskell platform.
> When I run "cabal update" in terminal I get the following:
>
> Note: there is a new version of cabal-install available.
> To upgrade, run: cabal install cabal-install
>
> I then ran "cabal -V":
> cabal-install version 0.8.0
> using version 1.8.0.2 of the Cabal library
>
> The latest version of cabal install is 0.8.2. When I run "cabal install
> cabal-install" it seems to work fine, without any errors but when I go
> back and check i.e. "cabal -V" i still get version 0.8.0.
>
> I tried "cabal list cabal-install":
> Synopsis: The command-line interface for Cabal and Hackage.
> Latest version available: 0.8.2
> Latest version installed: [ Not installed ]
> Homepage: http://www.haskell.org/cabal/
> License: BSD3
>
> What am I missing? It is really annoying that cabal update keeps
> telling me about a new version of cabal-install that I can't actually
> get to work!
The new cabal-0.8.2 is probably installed in $HOME/.cabal/bin and that
directory isn't in your $PATH. Add it to your path (if it isn't in) before
the directory where cabal-0.8.0 is in, so version 0.8.2 is found first.
>
> Thanks
> Rohit
------------------------------
Message: 3
Date: Thu, 10 Jun 2010 12:28:36 +0100
From: Luca Ciciriello <[email protected]>
Subject: [Haskell-beginners] DPH
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hi All.
I've two question about Data Parallel Haskell.
I'm trying some experiment using DPH and I've wrote a little program using the
functions lengthP and mapP. I've imported the module GHC.PArr and I've informed
the compiler that I want to use some language extension using the line {-#
LANGUAGE PArr #-}. All works fine. Looking around I've saw that some code
examples use {-# LANGUAGE PArr, ParallelListComp #-} instead.
The my first question is: Which is the difference in using or not the extension
ParallelListComp? Seems that my program works fine with or without this
extension (if I omit the extension PArr I've some compilation errors).
The second question is: Have I to use the option -threaded when compile my
program?
I'm using Haskell Platform (GHC 6.12.1) on MacOS X 10.6.3
Thanks in advance for any answer.
Luca.
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100610/b8baeb53/attachment-0001.html
------------------------------
Message: 4
Date: Thu, 10 Jun 2010 13:05:12 +0100
From: Stephen Tetley <[email protected]>
Subject: Re: [Haskell-beginners] DPH
To: Luca Ciciriello <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi Luca
if you don't use (data parallel) list comprehensions you shouldn't
need the {-# LANGUAGE ParallelListComp #-} annotation.
Here's and example from the DPH page that uses them:
dotp_double :: [:Double:] -> [:Double:] -> Double
dotp_double xs ys = sumP [:x * y | x <- xs | y <- ys:]
http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell
If you are just using the DPH functionals mapP, zipP etc. {-# LANGUAGE
PArr #-} should be all you need. GHC will need this extension to
handle the [: :] type notation.
I don't know about your second question, from the DPH page it looks
like you need -threaded for multicore, but you can still run DPH code
on single core (if you don't supply -threaded and link to the right
library), see 1.5.6 Parallel execution.
Best wishes
Stephen
------------------------------
Message: 5
Date: Thu, 10 Jun 2010 14:09:55 +0200
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] DPH
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Thursday 10 June 2010 13:28:36, Luca Ciciriello wrote:
> Hi All.
>
> I've two question about Data Parallel Haskell.
>
> I'm trying some experiment using DPH and I've wrote a little program
> using the functions lengthP and mapP. I've imported the module GHC.PArr
> and I've informed the compiler that I want to use some language
> extension using the line {-# LANGUAGE PArr #-}. All works fine. Looking
> around I've saw that some code examples use {-# LANGUAGE PArr,
> ParallelListComp #-} instead.
>
Parallel list-comprehensions are something different from parallel arrays.
I think it's not implied by PArr, so if you use both features, you need to
specify both.
>
>
> The my first question is: Which is the difference in using or not the
> extension ParallelListComp? Seems that my program works fine with or
> without this extension (if I omit the extension PArr I've some
> compilation errors).
Then you probably only use parallel arrays and not parallel list-
comprehensions (which are just syntactic sugar for the families of
zip[With]N functions).
>
>
>
> The second question is: Have I to use the option -threaded when compile
> my program?
>
Would make sense. It wouldn't be able to profit from multiple cores
without. Compile with -threaded and run with +RTS -Nk (for a reasonable
value of k on your box).
>
>
> I'm using Haskell Platform (GHC 6.12.1) on MacOS X 10.6.3
>
>
>
> Thanks in advance for any answer.
>
>
>
> Luca.
------------------------------
Message: 6
Date: Thu, 10 Jun 2010 13:48:52 +0100
From: Luca Ciciriello <[email protected]>
Subject: [Haskell-beginners] DPH
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Thanks Stephen and Daniel.
Your explanation is clear to me.
Luca.
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100610/d1e92701/attachment-0001.html
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 24, Issue 10
*****************************************