Re: diff in Haskell: clarification

2002-12-16 Thread George Russell
Gertjan Kamsteeg wrote: Ok, here is an attempt. I don't have time to explain, but it's not Myer's algorithm. [snip] Yes thanks. But it doesn't seem dramatically faster, on my test cases, than the Myers algorithm version I have developed; indeed I think it's slightly slower. However my Myers

Re: diff in Haskell: clarification

2002-12-15 Thread Gertjan Kamsteeg
k2 = p:h3 us qs | k1 == k2 = if n1 = n2 then p:h3 us vs else q:h3 us vs | otherwise = q:h3 ps vs - Original Message - From: George Russell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 21, 2002 6:39 PM Subject: diff in Haskell: clarification Since

Re: diff in Haskell: clarification

2002-11-25 Thread George Russell
Francis Girard wrote: You caught my attention. It would be nice if you write your own version from scratch to make all of us profit of this. I have a confession to make. Andrew Bromage's list-based code is much faster than my array-based code. So I think I shall end up adapting Andrew

Re: diff in Haskell: clarification

2002-11-25 Thread Andrew J Bromage
G'day all. On Mon, Nov 25, 2002 at 12:19:10PM +0100, George Russell wrote: I have a confession to make. Andrew Bromage's list-based code is much faster than my array-based code. So I think I shall end up adapting Andrew Bromage's code, even though I do not understand it. You mean you did

Re: diff in Haskell: clarification

2002-11-24 Thread Francis Girard
You caught my attention. It would be nice if you write your own version from scratch to make all of us profit of this. Thank you. Francis Girard Le Conquet France Le 22 Novembre 2002 16:03, George Russell a écrit : I think in fact I'm going to give up on stealing other people's code and

Re: diff in Haskell: clarification

2002-11-22 Thread Yoann Padioleau
George Russell [EMAIL PROTECTED] writes: This is a well-known problem. The most helpful Web page I could find about it is here: http://apinkin.net/space/DifferenceEngine There is an algorithm known as Myer's algorithm, but obviously I want it in Haskell rather than C, and it would

Re: diff in Haskell: clarification

2002-11-22 Thread George Russell
Yoann Padioleau wrote: George Russell [EMAIL PROTECTED] writes: This is a well-known problem. The most helpful Web page I could find about it is here: http://apinkin.net/space/DifferenceEngine There is an algorithm known as Myer's algorithm, but obviously I want it in Haskell

Re: diff in Haskell: clarification

2002-11-22 Thread George Russell
Yoann Padioleau wrote: there is the perl version of the diff algorithm on CPAN that may be a better starting point than the C version. I think in fact I'm going to give up on stealing other people's code and write my own version from Myer's paper. George

Re: diff in Haskell: clarification

2002-11-22 Thread Yoann Padioleau
George Russell [EMAIL PROTECTED] writes: Yoann Padioleau wrote: George Russell [EMAIL PROTECTED] writes: This is a well-known problem. The most helpful Web page I could find about it is here: http://apinkin.net/space/DifferenceEngine There is an algorithm known as

Re: diff in Haskell: clarification

2002-11-22 Thread Yoann Padioleau
there is the perl version of the diff algorithm on CPAN that may be a better starting point than the C version. -- Yoann Padioleau, INSA de Rennes, France, Opinions expressed here are only mine. Je n'écris qu'à titre personnel. ** Get Free. Be Smart. Simply use Linux and

diff in Haskell: clarification

2002-11-21 Thread George Russell
Since various people seem to have misunderstood the problem, I shall try to state it more precisely. What is required is a function diff :: Ord a - [a] - [a] - [DiffElement a] for the type data DiffElement a = InBoth a | InFirst a | InSecond a such that given

Re: diff in Haskell: clarification

2002-11-21 Thread Fergus Henderson
On 21-Nov-2002, George Russell [EMAIL PROTECTED] wrote: There is an algorithm known as Myer's algorithm, but obviously I want it in Haskell rather than C, and it would be nice if someone else had written it so I don't have to. Would a Mercury version help? The Mercury distribution includes a

Re: diff in Haskell: clarification

2002-11-21 Thread Andrew J Bromage
G'day all. On Fri, Nov 22, 2002 at 05:13:07AM +1100, Fergus Henderson wrote: Would a Mercury version help? The Mercury distribution includes a Mercury version of Myer's algorithm: it's in the directory `samples/diff'. Disclaimer: I wrote the Mercury version. That particular algorithm