Re[2]: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Bulat Ziganshin
Hello Jeremy, Saturday, August 1, 2009, 3:15:02 AM, you wrote: > So, the desired experience would be: > 1. A program starts running and populates an IxSet. At this point in > time n MB of RAM are being used. > 2. We use Binary to snapshot the entire IxSet to disk. Since encode > outputs

[Haskell-cafe] Database written in Haskell?

2009-07-31 Thread Günther Schmidt
Hi, is there an SQL database written in Haskell like HSQLDB which is written in Java? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANNOUNCE: The Haskell Platform 2009.2.0.2

2009-07-31 Thread Don Stewart
We're pleased to announce the third release of the Haskell Platform: a single, standard Haskell distribution for everyone. The specification, along with installers (including Windows and Unix installers for a full Haskell environment) are available. Download the Haskell Platform 2009.2.0.2:

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Deniz Dogan
2009/8/1 Paul Moore : > BTW, I did know that Haskell had an efficient map implementation, I > just wasn't sure how to use it "functionally" - I probably should have > searched a bit harder for examples before posting. Thanks for the help > in any case. Know that Data.Map uses size balanced trees a

[Haskell-cafe] Re: Strange memory usage problem

2009-07-31 Thread John Lato
> From: Ketil Malde > > Hi, > > I'm observing something I find quite strange.  I have a program that > normally streams through a file, and it runs in the expected constant > space, consuming about 5MB, according to 'top'.  When I uncomment a > certain block of code in the library it uses, space c

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
Ok, I fixed my test program, and now things seem more reasonable. The original version was allowing the GC to collect the list in the first case, but not the second. However, I don't want the list to be collected. The new version seems to fix that issue. Now the control uses 40MB and when I chang

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
Hrm, I think actually, that my test program was a bit bogus... investigating now. - jeremy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
At Fri, 31 Jul 2009 15:43:49 -0700, Don Stewart wrote: > Oh, it is entirely possible to use a different instance, that has > different semantics for lists. You want to write the list > incrementally? I don't think so. In happstack, the idea is to have all your state in RAM. But, since your mac

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGL 2.3.0.0

2009-07-31 Thread Carter Schonwald
pardon if this is the wrong context to ask, but whats the approriate way to do that on os x? 2009/7/31 Rafael Gustavo da Cunha Pereira Pinto > Carter, > > It seems you need to install opengl-dev or something like that in your > Linux instalation (using apt-get, yum or similar tool). > > Regards

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Don Stewart
jeremy: > At Fri, 31 Jul 2009 14:49:03 -0700, > Don Stewart wrote: > > > > Why don't you use your own instance to serialize IxSet lazily (or > > however you would like?) > > > > There's no reason to be constrained to use the [a] instance. > > Well, the Set instance might actually be a better cho

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGL 2.3.0.0

2009-07-31 Thread Rafael Gustavo da Cunha Pereira Pinto
Carter, It seems you need to install opengl-dev or something like that in your Linux instalation (using apt-get, yum or similar tool). Regards, Rafael On Fri, Jul 31, 2009 at 17:24, Carter Schonwald wrote: > I just the the rebuild of the haskell glut / opengl libs and I got the > following mes

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Paul Moore
2009/7/31 Gregory Collins : > Paul Moore writes: > >> How would I efficiently write a function in Haskell to count >> occurrences of unique elements in a (potentially very large) list? For >> example, given the list [1,2,3,4,5,3,4,2,4] I would like the output >> [[1,1], [2,2], [3,2], [4,3], [5,1]]

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
At Fri, 31 Jul 2009 14:49:03 -0700, Don Stewart wrote: > > Why don't you use your own instance to serialize IxSet lazily (or > however you would like?) > > There's no reason to be constrained to use the [a] instance. Well, the Set instance might actually be a better choice. But the Set instance

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Don Stewart
jason.dusek: > 2009/07/31 Jeremy Shaw : > > ...why doesn't the stuff get freed eventually? > > It is my understanding that the GHC runtime never lets go of > memory once it has requested it. (Confirmation either way > would be informative.) It doesn't return memory to the OS. -- Don __

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jason Dusek
2009/07/31 Jeremy Shaw : > ...why doesn't the stuff get freed eventually? It is my understanding that the GHC runtime never lets go of memory once it has requested it. (Confirmation either way would be informative.) -- Jason Dusek ___ Haskell-Cafe

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Don Stewart
Why don't you use your own instance to serialize IxSet lazily (or however you would like?) There's no reason to be constrained to use the [a] instance. -- Don jeremy: > Hello, > > Is there a work-around? This is killer for Happstack. Most Happstack > applications use IxSet, which in turn uses l

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
Hello, Is there a work-around? This is killer for Happstack. Most Happstack applications use IxSet, which in turn uses lists to serialize the data to/from disk. Also, why doesn't the stuff get freed eventually? - jeremy At Fri, 31 Jul 2009 14:27:30 -0700, Don Stewart wrote: > > bos: > > On Fri

Re: [Haskell-cafe] ANN: atom 0.1.0

2009-07-31 Thread Don Stewart
We've had a few people playing with Atom to program the Arduino, and John van Enk's been hacking too, Atom & Arduino :: Some Hacking (pt. 1) http://blog.sw17ch.com/wordpress/?p=84 An Atomic Fibonacci Server: Exploring the Atom (Haskell) DSL http://leepike.wordpress.com/2009/05/0

Re: [Haskell-cafe] ANN: atom 0.1.0

2009-07-31 Thread Thomas DuBuisson
Tom, I was asking earlier about any good sources of information for atom. It seems the once-good wiki is gone - are there tutorials for Atom hiding in forgotten corners? Thomas On Fri, Jul 31, 2009 at 1:49 PM, Tom Hawkins wrote: > Atom is a Haskell DSL for hard realtime applications.  This releas

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Don Stewart
bos: > On Fri, Jul 31, 2009 at 1:56 PM, Jeremy Shaw wrote: > > > Using encode/decode from Binary seems to permamently increase my > memory consumption by 60x fold. I am wonder if I am doing something > wrong, or if this is an issue with Binary. > > > It's an issue with the Binary i

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Bryan O'Sullivan
On Fri, Jul 31, 2009 at 1:56 PM, Jeremy Shaw wrote: > > Using encode/decode from Binary seems to permamently increase my > memory consumption by 60x fold. I am wonder if I am doing something > wrong, or if this is an issue with Binary. > It's an issue with the Binary instance for lists, which fo

Re: [Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Don Stewart
I just need a small test case to reproduce the problem. Thanks! -- Don jeremy: > Hello, > > Using encode/decode from Binary seems to permamently increase my > memory consumption by 60x fold. I am wonder if I am doing something > wrong, or if this is an issue with Binary. > > If I run the follo

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Daniel Fischer
Am Freitag 31 Juli 2009 22:39:53 schrieb Paul Moore: > How would I efficiently write a function in Haskell to count > occurrences of unique elements in a (potentially very large) list? For > example, given the list [1,2,3,4,5,3,4,2,4] I would like the output > [[1,1], [2,2], [3,2], [4,3], [5,1]] (o

[Haskell-cafe] why does the binary library require so much memory?

2009-07-31 Thread Jeremy Shaw
Hello, Using encode/decode from Binary seems to permamently increase my memory consumption by 60x fold. I am wonder if I am doing something wrong, or if this is an issue with Binary. If I run the following program, it uses sensible amounts of memory (1MB) (note that the bin and list' thunks won't

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Malcolm Wallace
In an imperative language like Python, I'd use a dictionary as an accumulator - something like for el in input: accums[i] = accums.get(i, 0) + 1 Haskell has efficient dictionary structures too, e.g. Data.Map List.foldl' (\m x-> Map.insertWith' (+) x 1 m) Map.empty Regards, Mal

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Gregory Collins
Gregory Collins writes: > Paul Moore writes: > >> How would I efficiently write a function in Haskell to count >> occurrences of unique elements in a (potentially very large) list? For >> example, given the list [1,2,3,4,5,3,4,2,4] I would like the output >> [[1,1], [2,2], [3,2], [4,3], [5,1]] (

Re: [Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Gregory Collins
Paul Moore writes: > How would I efficiently write a function in Haskell to count > occurrences of unique elements in a (potentially very large) list? For > example, given the list [1,2,3,4,5,3,4,2,4] I would like the output > [[1,1], [2,2], [3,2], [4,3], [5,1]] (or some equivalent > representati

[Haskell-cafe] ANN: atom 0.1.0

2009-07-31 Thread Tom Hawkins
Atom is a Haskell DSL for hard realtime applications. This release includes support for assertions and functional coverage to aid simulation and testing. The rev of the minor version indicates a bit of library stability. This is the version we're using for our application, which officially went

[Haskell-cafe] Efficient functional idiom for histogram

2009-07-31 Thread Paul Moore
How would I efficiently write a function in Haskell to count occurrences of unique elements in a (potentially very large) list? For example, given the list [1,2,3,4,5,3,4,2,4] I would like the output [[1,1], [2,2], [3,2], [4,3], [5,1]] (or some equivalent representation). Clearly, this won't be po

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGL 2.3.0.0

2009-07-31 Thread Carter Schonwald
I just the the rebuild of the haskell glut / opengl libs and I got the following message Configuring OpenGLRaw-1.0.1.0... cabal: Missing dependency on a foreign library: * Missing C library: GL This problem can usually be solved by installing the system package that provides this library (you may n

Re: [Haskell-cafe] ANN: tkhs-0.1.* Presentation Utility

2009-07-31 Thread Roman Cheplyaka
* Yusaku Hashimoto [2009-07-31 22:56:57+0900] > Hi, > > I'm pleased to announce the release of tkhs-0.1.*, Simple presentation > utility. If you are thinking PowerPoint is overkill for your > presentation, > Tkhs may fit the purpose. For real presentations one would probably use beamer or simil

[Haskell-cafe] ANN: tkhs-0.1.* Presentation Utility

2009-07-31 Thread Yusaku Hashimoto
Hi, I'm pleased to announce the release of tkhs-0.1.*, Simple presentation utility. If you are thinking PowerPoint is overkill for your presentation, Tkhs may fit the purpose. See screenshot of running tkhs in my terminal: http://nonowarn.tumblr.com/post/152324109 When you invoke tkhs with s

Re: [Haskell-cafe] Need feedback on my Haskell code

2009-07-31 Thread Chaddaï Fouché
On Fri, Jul 31, 2009 at 2:12 PM, CK Kashyap wrote: > I personally find > map maySwitch (unfoldr go (x1,y1,0)) and map maySwitch $ unfoldr go > (x1,y1,0) more intuitive. > > I can read it as map the maySwitch function over the list generated from the > unfolding. > > Is there any difference in the e

Re: [Haskell-cafe] Need feedback on my Haskell code

2009-07-31 Thread CK Kashyap
I personally find map maySwitch (unfoldr go (x1,y1,0)) and map maySwitch $ unfoldr go (x1,y1,0) more intuitive. I can read it as map the maySwitch function over the list generated from the unfolding. Is there any difference in the evaluation steps between the composition version and the non-c

[Haskell-cafe] Re: Proposal: TypeDirectedNameResolution

2009-07-31 Thread Heinrich Apfelmus
Ketil Malde wrote: > Cale Gibbard writes: > >> There was a great related idea on #haskell the other day: Make >> explicit qualification unnecessary whenever there is a *unique* choice >> of module qualifications from those imported which would make the >> expression typecheck. > > My favorite ann

[Haskell-cafe] Re: Proposal: TypeDirectedNameResolution

2009-07-31 Thread Heinrich Apfelmus
Ryan Ingram wrote: > Heinrich wrote: >> While I do agree that qualified names are annoying at times, I think >> that type directed name disambiguation is a Pandora's box. > > I see where you are going, but I'm not sure I agree. Let me give an > example from another language with this kind of reso

[Haskell-cafe] Strange memory usage problem

2009-07-31 Thread Ketil Malde
Hi, I'm observing something I find quite strange. I have a program that normally streams through a file, and it runs in the expected constant space, consuming about 5MB, according to 'top'. When I uncomment a certain block of code in the library it uses, space consumption appears to grow linear

[Haskell-cafe] gtksourceview link problem with leksah on windows

2009-07-31 Thread Bart De Vylder
Dear Haskellers, i'm having troubles linking Leksah against gtksourceview on windows (XP). I've installed gtk2hs (using the windows installer) but am not sure whether/where to specify the library search path for ld. Here is the output I get: C:\Documents and Settings\bartdv>cabal install leksah

Re[2]: [Haskell-cafe] Deepest polymorphic functor

2009-07-31 Thread Bulat Ziganshin
Hello Eduard, Friday, July 31, 2009, 10:26:08 AM, you wrote: >>> instance Num a => Num [a] where ... > But why then the following snippet doesn't cause ambiguity: > deep_fmap (++"a") "b" // -> "ba" > deep_fmap (++"a") ["b"] // -> ["ba"] > deep_fmap (++"a") [["b"]] // -> [["ba"]] because it

Re: [Haskell-cafe] Deepest polymorphic functor

2009-07-31 Thread Eduard Sergeev
Ryan Ingram wrote: > >> instance Num a => Num [a] where ... > O... I see what you mean. So... no way around? e.g. no way to define deep_fmap for not grounded types? -- View this message in context: http://www.nabble.com/Deepest-polymorphic-functor-tp24709303p24752047.html Sent from the Hask