[plt-scheme] s-expr differ

From: John Clements (clements at brinckerhoff.org)
Date: Thu Oct 1 18:37:51 EDT 2009

On Oct 1, 2009, at 3:04 PM, Jon Rafkind wrote:

> I wrote a little program to highlight the differences in s- 
> expressions. Right now it only works in xterm but if anyone cares  
> about it I can probably get it to work in other terms and drscheme.
>
> Here it is working in xterm (yes my theme is xp):
>
> http://www.cs.utah.edu/~rafkind/tmp/diff/diff.png
>
> Code is there too
>
> http://www.cs.utah.edu/~rafkind/tmp/diff/

Could be very useful in displaying results of test cases, no?

E.G.

expected:  
oesthaoesntuhansoehuatehstsomehugehorriblethingasoteuhsantoehusntahoestuhaoesntuhaseont
got:  
oesthaoesntuhansoehuatehstsomehugehorriblethingwithanAasoteuhsantoehusntahoestuhaoesntuhaseont

Well, if those were s-expressions, that is.

Also, this could be a hard problem: Suppose I'm comparing these two:

(a
  b
  (c (d e) (f g) ((h YY) (i)))
  (c (d e) (f g) ((h XX) (i))))

(a
  b
  (c (d e) (f g) ((h XX) (i))))

Does your diff tell me that I changed the YY into an XX and removed  
the fourth list element, or that I deleted the third element? I think  
I would prefer the latter, but that could be tricky.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20091001/e103cef8/attachment.p7s>

Posted on the users mailing list.