Diff/Merge in Rebol?
[1/7] from: robert::muench::robertmuench::de at: 12-Dec-2001 19:37
Hi, has someone written a diff & merge (something like PMDiff http://www.araxis.com) that can be pluged into an application? -- Robert M. Münch IT & Management Freelancer Mobile: +49 (0)177 2452 802 Fax : +49 (0)721 8408 9112 Web : http://www.robertmuench.de
[2/7] from: gchiu::compkarori::co::nz at: 7-Oct-2002 9:09
diff or compare
Has anyone written a compare utility that reports where two text files are the same? -- Graham Chiu
[3/7] from: al:bri:xtra at: 7-Oct-2002 21:59
> Has anyone written a compare utility that reports where two text files are
the same? Also, it would be very nice if it worked with directories and Rebol block! values as well. Andrew Martin I've got my fingers crossed... ICQ: 26227169 http://valley.150m.com/
[4/7] from: greggirwin:mindspring at: 7-Oct-2002 9:47
Hi Graham, << Has anyone written a compare utility that reports where two text files are the same? >> I have a working LCS/DIFF engine on IOS developer. I don't think it's ready for general publication yet, and it's slow on large datum, but it does work. I think I have it in a private folder right now. Let me know if you're interested and I'll put it in a public one. --Gregg
[5/7] from: rebol-list2:seznam:cz at: 21-Oct-2002 17:41
Hello Graham, Sunday, October 6, 2002, 10:09:04 PM, you wrote: GC> Has anyone written a compare utility that reports where GC> two text files are the same? GC> -- GC> Graham Chiu I wanted to make it but didn't started yet:-(
[6/7] from: maximo::meteorstudios::com at: 19-Jun-2003 18:33
Are there any rebol diff functions or objects available, that: given two strings: return a block with text strings id pairs which identify if the text was in one, the other or both strings... something like:
>>a: "my very insane momy likes to cook her boots before washing them" >>b: "my not so sane momy really likes to cook boots" >>blk: diff a b
;which would result in a block like (or something similar)
>> probe blk
[ both "my " first "very in" second "not so " both "sane momy " second "really " both "likes to cook boots" first " before washing them" ]
TIA... -max PS: sorry for today's badly written messages... I was doing all sorts of stuff at the same time... ----------- meteor Studios, T.D. ----------- Strong enough for a man, but made for a woman
[7/7] from: carl::cybercraft::co::nz at: 24-Dec-2003 22:21
On 20-Jun-03, Maxim Olivier-Adlhoch wrote:
> Are there any rebol diff functions or objects available, that: > given two strings:
<<quoted lines omitted: 14>>> first " before washing them" > ]
There's no function I know of that would work directly on a string like that, (other than writing a specific parse rule), but you could do something like this... First convert your strings to blocks containing your words like so...
>> aa: parse a none
== ["my" "very" "insane" "momy" "likes" "to" "cook" "her" "boots" before "washing" "them"]
>> bb: parse b none
== ["my" "not" "so" "sane" "momy" "really" "likes" "to" "cook" boots ] Then use intersect to get the words that are in both blocks...
>> both: intersect aa bb
== ["my" "momy" "likes" "to" "cook" "boots"] Then use difference to compare the both block with the original blocks to get the words that are only in one block...
>> a-only: difference both aa
== ["very" "insane" "her" "before" "washing" "them"]
>> b-only: difference both bb
== ["not" "so" "sane" "really"] Which may or may not be quite the type of results you want, but shows one approach you might find useful. (Along with intersect and difference, unique, union and exclude can also be used to work on data sets.) Hope that's of some help. -- Carl Read
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted