Hello Ki,
Tuesday, August 8, 2006, 6:34:51 AM, you wrote:
Unfortunately seq and the strict data declaration is not helpful in general.
They are only helpful on base values such as Int or Bool.
What they do is just making sure that it is not a thunk.
That is if it was a list it would just
Ahn, Ki Yung wrote:
Recently, I'm facing the dark side of laziness
-- the memory leak because of laziness.
Typical pattern that I encounter the problem is like this.
My code was working fine and I was happy.
I just wanted to inspect some properties of my code so
I made a slight chage go the
Ahn, Ki Yung wrote:
Recently, I'm facing the dark side of laziness
-- the memory leak because of laziness.
Are there standardized approaches for detecting and fixing
these kind of problems?
Not really. As Don S. already said, try heap profiling. The function
that is too lazy will show up
Recently, I'm facing the dark side of laziness
-- the memory leak because of laziness.
Typical pattern that I encounter the problem is like this.
My code was working fine and I was happy.
I just wanted to inspect some properties of my code so
I made a slight chage go the code such as adding
On 8/7/06, Ahn, Ki Yung [EMAIL PROTECTED] wrote:
I have posted an wiki article including one example of adding
a counter to count the number of basic operations in sorting algorithm.
http://www.haskell.org/haskellwiki/Physical_equality
This was a rather simple situation and we figured out how
Perhaps your instances will work correctly with this data declaration?
Perhaps it might. But that misses an important point.
The biggest impediment to developing large robust applications with
Haskell is the opacity of its performance model. Haskell is fantastic
in very many ways, but this
On 8/7/06, Spencer Janssen [EMAIL PROTECTED] wrote:
Forcing evaluation using (==) is a bit of a hack. Luckily, we have a
better function to force evaluation: seq (which has type a - b - b).
seq x y evaluates x to weak head normal form before returning
y.
Let's try another feature of Haskell
kyagrd:
On 8/7/06, Spencer Janssen [EMAIL PROTECTED] wrote:
Forcing evaluation using (==) is a bit of a hack. Luckily, we have a
better function to force evaluation: seq (which has type a - b - b).
seq x y evaluates x to weak head normal form before returning
y.
Let's try another