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. Re:  two System.IO.Strict modules (Brandon Allbery)
   2. Re:  two System.IO.Strict modules (Hong Yang)
   3.  sequential code linked against nonthreaded lib vs.
      concurrent/parallel code linked against threaded runtime lib,
      both on one core (Hong Yang)


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

Message: 1
Date: Fri, 26 Apr 2013 09:33:11 -0400
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] two System.IO.Strict modules
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <cakfcl4ufg1kvmldsuet7bh9dyyuer1dg7vfqdztbcfnj0zz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Thu, Apr 25, 2013 at 11:12 PM, Hong Yang <[email protected]> wrote:

> There are two modules called the same name: System.IO.Strict, documented
> respectively at
>
> http://hackage.haskell.org/packages/archive/strict-io/0.2.1/doc/html/System-IO-Strict.html
>     http://hackage.haskell.org/package/strict-0.3.2
>
> My questions are:
>
> 1)    Will these two modules coexist in the same version of GHC? Or put it
> another way, both modules' .tar.gz files have System/IO/Strict.hs inside,
> will they overlap in physical disk? From where can I tell which locations
> they will be installed to?
>

Each module gets its own directory tree under /usr/lib/ghc or ~/.ghc.


> 2)    If yes, which module will "import System.IO.Strict" actually use?
>

This is a bit harder; it will try to pick one, but I don't know the rules.
Ultimately it's best to use -package parameters to tell it which package to
take it from.

This is where building with cabal-install helps, as you specify the package
to use in the manifest and only the packages listed in the manifest will be
visible to ghc.

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130426/dac70b64/attachment-0001.htm>

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

Message: 2
Date: Fri, 26 Apr 2013 22:10:08 -0500
From: Hong Yang <[email protected]>
Subject: Re: [Haskell-beginners] two System.IO.Strict modules
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CA+_A4U56G5nuUGCFG8KyBp2BsPMcpbEij=xmzmdzh0ht_-9...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thanks.


On Fri, Apr 26, 2013 at 8:33 AM, Brandon Allbery <[email protected]>wrote:

> On Thu, Apr 25, 2013 at 11:12 PM, Hong Yang <[email protected]> wrote:
>
>> There are two modules called the same name: System.IO.Strict, documented
>> respectively at
>>
>> http://hackage.haskell.org/packages/archive/strict-io/0.2.1/doc/html/System-IO-Strict.html
>>     http://hackage.haskell.org/package/strict-0.3.2
>>
>> My questions are:
>>
>> 1)    Will these two modules coexist in the same version of GHC? Or put
>> it another way, both modules' .tar.gz files have System/IO/Strict.hs
>> inside, will they overlap in physical disk? From where can I tell which
>> locations they will be installed to?
>>
>
> Each module gets its own directory tree under /usr/lib/ghc or ~/.ghc.
>
>
>> 2)    If yes, which module will "import System.IO.Strict" actually use?
>>
>
> This is a bit harder; it will try to pick one, but I don't know the rules.
> Ultimately it's best to use -package parameters to tell it which package to
> take it from.
>
> This is where building with cabal-install helps, as you specify the
> package to use in the manifest and only the packages listed in the manifest
> will be visible to ghc.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> [email protected]
> [email protected]
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130426/12845f96/attachment-0001.htm>

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

Message: 3
Date: Fri, 26 Apr 2013 23:39:27 -0500
From: Hong Yang <[email protected]>
Subject: [Haskell-beginners] sequential code linked against
        nonthreaded lib vs. concurrent/parallel code linked against threaded
        runtime lib, both on one core
To: [email protected]
Message-ID:
        <ca+_a4u7pn5r9rulco7+-f2eswhno4ntgjhegmhv0u9b4_uq...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

I am reading "Choosing the Right Runtime" section of the "Real World
Haskell" book, and having a question.

There are typically four cases as follows:
   case # code linking RTS -N  1 sequential non-threaded 1  2
concurrent/parallel non-threaded 1  3 concurrent/parallel threaded 1  4
concurrent/parallel threaded > 1
Case #4 may or may not be faster than #3. But #3 is definitely slower than
#1 and #2, due to overhead from threaded runtime lib.

Now my question is, how does #2 compare with #1? (#2 must make sense,
otherwise it would not be an option, and the book authors would not have
specifically talked about it in one section.) Are the authors implying #2
may be potentially much faster than #1? If there were no such potential,
one would just write sequential codes without attempting
concurrent/parallel style, under the circumstances where his job is limited
to one core.

Thanks,

Hong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130426/2c899e1c/attachment-0001.htm>

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

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 58, Issue 40
*****************************************

Reply via email to