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: Re: [Haskell-beginners] space leak (Uchida Yasuo)
2. Re: space leak (Daniel Fischer)
3. Equivalent of FOOLANGUAGEPATH environment variable? (Tom Tobin)
4. Loading QuickCheck in GHCi. (Kwanghoon Choi)
5. Re: Loading QuickCheck in GHCi. (Dave Bayer)
6. Linux install walkthrough (Adrian Adshead)
7. Re: Linux install walkthrough (Stephen Tetley)
8. Re: Linux install walkthrough (Lakshmi Narasimhan)
----------------------------------------------------------------------
Message: 1
Date: Tue, 16 Feb 2010 07:42:03 +0900 (JST)
From: Uchida Yasuo <[email protected]>
Subject: Re: Re: [Haskell-beginners] space leak
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ascii
That's right! You solved the mystery of the magic number!
--- Felipe Lessa wrote:
> You can try to verify this by using L.toChunks and noting how
> many chunks are being created.
-- test.hs
module Main where
import System
import System.IO
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.ByteString.Char8 as S
main = do args <- getArgs
let n = read $ args !! 0
cs <- L.getContents
let !a = L.take n cs
!l = L.length a
hPutStrLn stderr $ "first chunk : "
++ show (S.length $ head $ L.toChunks cs)
mapM_ (print . L.length) $ L.lines cs
print a
$ ./gen | head -1000 | ./test 17000 +RTS -sstderr > /dev/null
./test 17000 +RTS -sstderr
first chunk : 16384
gen: <stdout>: commitAndReleaseBuffer: resource vanished (Broken pipe)
4,085,671,308 bytes allocated in the heap
7,659,656 bytes copied during GC
1,091,072 bytes maximum residency (1001 sample(s))
540,552 bytes maximum slop
5 MB total memory in use (1 MB lost due to fragmentation)
Generation 0: 6507 collections, 0 parallel, 0.10s, 0.13s elapsed
Generation 1: 1001 collections, 0 parallel, 0.09s, 0.10s elapsed
INIT time 0.00s ( 0.00s elapsed)
MUT time 2.62s ( 23.11s elapsed)
GC time 0.19s ( 0.23s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 2.81s ( 23.34s elapsed)
%GC time 6.8% (1.0% elapsed)
Alloc rate 1,558,678,834 bytes per MUT second
Productivity 93.2% of total user, 11.2% of total elapsed
--
Regards,
Yasuo Uchida
------------------------------
Message: 2
Date: Tue, 16 Feb 2010 00:16:09 +0100
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] space leak
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Am Montag 15 Februar 2010 23:42:03 schrieb Uchida Yasuo:
> That's right! You solved the mystery of the magic number!
>
> --- Felipe Lessa wrote:
> > You can try to verify this by using L.toChunks and noting how
> > many chunks are being created.
>
> $ ./gen | head -1000 | ./test 17000 +RTS -sstderr > /dev/null
> ./test 17000 +RTS -sstderr
> first chunk : 16384
It's not so easy, I get varying values: 4096, 8192, 32760, 28658, 16376,
12288, ...
It may be different on other machines, but on my box, there's no hard
"magic number", just a tendency to get 1xbuffer size or 2xbuffer size, or
defaultChunkSize, the other values are rarer.
> --
> Regards,
> Yasuo Uchida
------------------------------
Message: 3
Date: Mon, 15 Feb 2010 21:23:38 -0600
From: Tom Tobin <[email protected]>
Subject: [Haskell-beginners] Equivalent of FOOLANGUAGEPATH environment
variable?
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=UTF-8
Is there an easy way to declare a particular directory as a location
for finding Haskell modules, similar to PYTHONPATH and similar
environment variables for other languages? The GHC_PACKAGE_PATH
doesn't seem to be quite the same thing. There's the option of
setting -iSOMEPATH in one's .ghci file, but that doesn't seem to allow
declaring a relative path via ~ or $HOME, making it a bit of a pain to
maintain separate versions of one's .ghci across different machines.
------------------------------
Message: 4
Date: Mon, 15 Feb 2010 20:26:58 +0900
From: Kwanghoon Choi <[email protected]>
Subject: [Haskell-beginners] Loading QuickCheck in GHCi.
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Dear All,
Whenever I tried to load QuickCheck in GHCi, I met the following problem:
Prelude> :l Test.QuickCheck
<no location info>: module `Test.QuickCheck' is a package module
Failed, modules loaded: none.
Test.QuickCheck seems to be a module anyway, bit it couldn't be loaded
directly by issuing the command. I don't understand why.
Thanks in advance.
Kwanghoon
PS. Of course, I installed QuickCheck-2.1.0.3, and I can use it when I load
it by loading some haskell program having "import Test.QuickCheck".
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100215/bb490276/attachment-0001.html
------------------------------
Message: 5
Date: Tue, 16 Feb 2010 08:25:40 -0500
From: Dave Bayer <[email protected]>
Subject: Re: [Haskell-beginners] Loading QuickCheck in GHCi.
To: Kwanghoon Choi <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Try
:m Test.QuickCheck
The GHC manual explains the difference between :l and :m.
:l Data.Char gives me the same error, but :m Data.Char works. Same with other
system packages. In general, when I have a problem I like to make it as big as
I can, to see the shape of what's going wrong. Is Test.QuickCheck broken? Or am
I using the wrong command in ghci?
On Feb 15, 2010, at 6:26 AM, Kwanghoon Choi wrote:
> Prelude> :l Test.QuickCheck
------------------------------
Message: 6
Date: Wed, 17 Feb 2010 12:22:39 +0000 (GMT)
From: Adrian Adshead <[email protected]>
Subject: [Haskell-beginners] Linux install walkthrough
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
What I am looking for is a HOWTO for installing haskell on linux, specifically
aGHC 6.10.4 haskell-platform-2.0.2 on Centos 5.4 using Leksah as the IDE, and
developinga wx application for running on linux and windows. If anyone could
point me towardssomething like that showing libraries needed and hoops to jump
through then that would be great. But if not here's a rant about the problems:-
I read an article recently (from 2006 I think, so rather outdated) which was
talking aboutwhy there were more problems with haskell on windows than with
haskell on linux andthe conclusion said that it is because more people develop
haskell on linux than onwindows.
I thought great, I'd rather use linux anyway so I'll give it a try. What I
found was a hugeheadache and not much to help out with any problems.
My linux of choice is centos (I want stability over features) and I use
the first CD onlyof the latest 5.4 to install a minimal system, then use yum to
put on only what I need.That formula has worked well for many other systems I
have set up, so that is whatI want to do again. I do that so all my systems
start from the same place and I canscript the necessary install steps to get to
a working system for whatever the purpose.
I found the whole need to jump through so many hoops frustrating and rather a
wasteof my time. The developers of the libraries are the people who know what
you need torun their libraries so a little help from them wouldn't be missed.
Comparing my headacheto the installation of the latest GHC 6.12.1 and
cabal-install was a breeze mainly becauseof the bootstrap.sh which does the
heavy lifting for you. That would be nice in every library.
If each library developer could include something like that which would install
necessaryexternal libraries, preferably which could be called as a prerequisite
in the Cabal installprocess, then it really would make a huge difference.
So far I am finding haskell to be a wonderful language and am really enjoying
learningit, but my experience compared to when I was looking at Erlang is that
the benefits ofthe language are diminished by the hassle of the infrastructure
around the platform.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100217/f7286580/attachment-0001.html
------------------------------
Message: 7
Date: Wed, 17 Feb 2010 13:04:19 +0000
From: Stephen Tetley <[email protected]>
Subject: Re: [Haskell-beginners] Linux install walkthrough
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi Adrian
Is Centos close enough to RedHat to use Fedora packages?
The Haskell-Platform seemingly is available as a package:
https://admin.fedoraproject.org/pkgdb/users/packages/haskell-sig
Leksah has a fairly large set of dependencies so installing it might
take some work - particularly where it depends on packages outside the
Haskell Plaform (GTK, etc...) you might well want versions from
Hackage rather than ones prepackaged for Fedora. It might be worth
asking on the Fedora-Haskell-devel mailing list for better advice.
Best wishes
Stephen
------------------------------
Message: 8
Date: Wed, 17 Feb 2010 19:00:13 +0530
From: Lakshmi Narasimhan <[email protected]>
Subject: Re: [Haskell-beginners] Linux install walkthrough
To: [email protected]
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="utf-8"
Hi Adrian,
Were you able to get the installation of Leksah done ? I haven't tried
installing leksah from cabal in centos myself but it would be good to know
whether it is possible to get leksah built without having to upgrade gtk and
glib in Centos 5.4. In that case, we might be able to use some rpms from
fedora haskell platform.
On Wed, Feb 17, 2010 at 6:34 PM, Stephen Tetley <[email protected]>wrote:
> Hi Adrian
>
> Is Centos close enough to RedHat to use Fedora packages?
>
> The Haskell-Platform seemingly is available as a package:
>
> https://admin.fedoraproject.org/pkgdb/users/packages/haskell-sig
>
> Leksah has a fairly large set of dependencies so installing it might
> take some work - particularly where it depends on packages outside the
> Haskell Plaform (GTK, etc...) you might well want versions from
> Hackage rather than ones prepackaged for Fedora. It might be worth
> asking on the Fedora-Haskell-devel mailing list for better advice.
>
> Best wishes
>
> Stephen
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
--
Regards
Lakshmi Narasimhan T V
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.haskell.org/pipermail/beginners/attachments/20100217/69cb131c/attachment.html
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 20, Issue 27
*****************************************