[Haskell-cafe] Incremental array updates

2009-02-26 Thread Daniel Kraft
Hi, I seem to be a little stuck with incremental array updates... I've got an array of few (some thousand) integers, but have to do a calculation where I incrementally build up the array. For sake of simplicity, for now I don't use a State-Monad but simply pass the array as state down the

[Haskell-cafe] Re: Incremental array updates

2009-02-26 Thread Daniel Kraft
of concern is not that the program may run slowly, but that it uses that much memory. But of course for the real program this hint is surely very useful! I'll give it a try... Thanks, Daniel 2009/2/26 Daniel Kraft d...@domob.eu: Hi, I seem to be a little stuck with incremental array updates

[Haskell-cafe] Re: Incremental array updates

2009-02-26 Thread Daniel Kraft
Daniel Fischer wrote: Am Donnerstag, 26. Februar 2009 14:53 schrieb Daniel Kraft: Hi, I seem to be a little stuck with incremental array updates... I've got an array of few (some thousand) integers, but have to do a calculation where I incrementally build up the array. For sake of simplicity

[Haskell-cafe] Re: Incremental array updates

2009-02-26 Thread Daniel Kraft
Ross Paterson wrote: On Thu, Feb 26, 2009 at 02:53:42PM +0100, Daniel Kraft wrote: I seem to be a little stuck with incremental array updates... I've got an array of few (some thousand) integers, but have to do a calculation where I incrementally build up the array. For sake of simplicity

[Haskell-cafe] Re: Incremental array updates

2009-02-26 Thread Daniel Kraft
Ross Paterson wrote: On Thu, Feb 26, 2009 at 05:31:34PM +0100, Daniel Kraft wrote: Well, my main problem was the lazy evaluation... No, your main problem was that you were creating 100,000 arrays, each only a little different from the one before. Here I have to disagree (in my particular

Re: [Haskell-cafe] Haskell.org GSoC

2009-02-18 Thread Daniel Kraft
Hi, sylvain wrote: In my humble opinion, Haskell presently fall short of its promises because it does not embed theorem proving. Quickcheck-like testing is truly great, but can not replace proofs to produce bug free software. With use of equational reasoning + induction, one can already prove

[Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Colin Adams wrote: If you have two functions that do two different things, then they certainly OUGHT to have different names. Well, they do the same thing but for different arguments; it's like this: Table is a table of name-value pairs I want to substitute in a tree-like structure using:

[Haskell-cafe] Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Hi, I just came across a problem like this: Suppose I've got two related functions that do similar things, and I want to call them the same... Like in: foobar :: String - Int - Int foobar :: Int - String - Int (Bad example, but I hope you got the point.) Is this kind of overloading

[Haskell-cafe] Re: Overloading functions based on arguments?

2009-02-13 Thread Daniel Kraft
Daniel Kraft wrote: Is this kind of overloading (instead of the polymorphism based overloading) possible in Haskell? Namely to have two functions with the same name but different signatures so they could be distinguished by a call's parameters? I fear not... So I guess I have to name

[Haskell-cafe] Re: Haskell.org GSoC

2009-02-13 Thread Daniel Kraft
Hi, Henning Thielemann wrote: Daniel Kraft wrote: I noticed last year Haskell.org was a mentoring organization for Google's Summer of Code, and I barely noticed some discussion about it applying again this year :) I participated for GCC in 2008 and would like to try again this year; while

[Haskell-cafe] Graph library, was: Haskell.org GSoC

2009-02-12 Thread Daniel Kraft
Don Stewart wrote: - Graphs. True graphs (the data structure) are still a weak point! There's no canonical graph library for Haskell. That sounds interesting... What do you mean by no canonical library? Are there already ones but just no standard one? But in this case, I don't think

[Haskell-cafe] Re: Graph library, was: Haskell.org GSoC

2009-02-12 Thread Daniel Kraft
Benedikt Huber wrote: I would also like to see a project working on a new graph library. Currently, there is at least Data.Graph (just one Module, package containers), based on Array - adjacency lists, and the functional graph library (package fgl). I don't know those, but functional graph

[Haskell-cafe] Haskell.org GSoC

2009-02-11 Thread Daniel Kraft
Hi, I noticed last year Haskell.org was a mentoring organization for Google's Summer of Code, and I barely noticed some discussion about it applying again this year :) I participated for GCC in 2008 and would like to try again this year; while I'm still active for GCC and will surely stay

[Haskell-cafe] Data analysis with Haskell

2009-01-12 Thread Daniel Kraft
Hi all, I'm going to start a project where I'll have to do some data analysis (statistics about product orders) based on database entries; it will mostly be some very basic stuff like grouping by certain rules and finding averages as well as summing up and such. It will however be more than

[Haskell-cafe] sort and lazyness (?)

2008-12-19 Thread Daniel Kraft
Hi, I'm just a beginner trying to learn a little about Haskell, and as such write some toy programs (e.g. for projecteuler.net) in Haskell. Currently, I'm experiencing what I would call strange behaviour: I've got a data-type data Fraction = Fraction Int Int to hold rational numbers (maybe

[Haskell-cafe] Re: sort and lazyness (?)

2008-12-19 Thread Daniel Kraft
Bayley, Alistair wrote: Currently, I'm experiencing what I would call strange behaviour: I've got a data-type data Fraction = Fraction Int Int to hold rational numbers (maybe there's already some built-in type for this in Haskell,