Hi Josiah! Commander now accepts the cleanup option in Setting tab! Have a look at the latest update.
--Mohammad On Saturday, March 23, 2019 at 2:14:14 AM UTC+4:30, @TiddlyTweeter wrote: > > Thanks Mohammad > > I enjoy it as I really like regular expressions. > > Today I experimented with the DiffTextWidget attributes and think for SNR > that attribute *cleanup="none"* is likely best default. > > In a few days I'll make a demo so we can look at it closer. > > Best wishes > Josiah > > On Friday, 22 March 2019 06:18:30 UTC+1, Mohammad wrote: >> >> Hi Josiah, >> Many thanks for your efforts. It is possible to set cleanup parameter of >> diff-text to other value or add settings to lets user choose among them. >> >> --Mohammad >> >> On Friday, March 22, 2019 at 3:31:32 AM UTC+4:30, @TiddlyTweeter wrote: >>> >>> Ciao Jeremy, Mohammad and all interested >>> >>> I spent a day trying to get my head round this to get clearer. >>> >>> It was productive. >>> >>> I realised after a few hours of noodling about that the default in TW >>> for the diff engine--as well documented in DiffTextWidget >>> <https://tiddlywiki.com/#DiffTextWidget> I only then understood--is the >>> library's default "semantic" styling was part of the issue. And some of the >>> issues I commented and displayed on do come from that. >>> >>> I think that for *regular expressions* one of the other two attributes >>> might be better--"efficient" or "none". >>> >>> I am talking with Mohammad to figure that out and test alternatives. >>> >>> Many thanks Jeremy. >>> Not least because after a day of testing elsewhere I see your TW >>> implementation is exactly the same as the "diff-match-patch" JS version >>> everywhere else. >>> >>> Best wishes >>> Josiah >>> >>> >>> >>> On Tuesday, 19 March 2019 22:24:17 UTC+1, Jeremy Ruston wrote: >>>> >>>> Hi Josiah >>>> >>>> To explain it another way, the example diff you quoted earlier was >>>> "correct", in that it is an accurate depiction of a set of modifications >>>> which will turn the first string into the second. The problem is that what >>>> an algorithm sees as a reasonable way to display the differences may not >>>> match a human narrative of the changes. It's a general problem with diff >>>> engines, and they all devote a lot of attention to trying to improve human >>>> readability. The diff engine we're using is pretty much the state of the >>>> art. There's no magic solution: we can tweak the parameters that drive the >>>> heuristics used for diffing, but we will find that any given set of >>>> parameters will be good in some scenarios but not others. There's no magic >>>> solution which will work in all situations; that's what I meant by saying >>>> that it's one of those tricky problems of computer science :) >>>> >>>> Best wishes >>>> >>>> Jeremy >>>> >>>> >>>> -- >>>> Jeremy Ruston >>>> jer...@jermolene.com >>>> https://jermolene.com >>>> >>>> On 19 Mar 2019, at 20:36, @TiddlyTweeter <tiddly...@assays.tv> wrote: >>>> >>>> Jeremy >>>> >>>> I definitely think access to change parameters could be helpful. >>>> >>>> In the case of SNR one needs a logical consistent representation. It >>>> doesn't matter if its very long--so long as its consistent. >>>> >>>> The biggest problem at the moment is the Diff. Engine creates a mix of >>>> representations that can quickly get visually inconsistent. >>>> >>>> That is seriously confusing for the end user who is already grappling >>>> with learning regular expression syntax. >>>> >>>> Best wishes >>>> Josiah >>>> >>>> On Tuesday, 19 March 2019 20:45:00 UTC+1, Jeremy Ruston wrote: >>>>> >>>>> Hi Josiah, Mohammad, >>>>> >>>>> The core uses Google's Diff-Match-Patch library by Neil Fraser: >>>>> >>>>> https://github.com/google/diff-match-patch >>>>> >>>>> It turns out that reliably creating human-readable diffs is one of >>>>> those tricky problems in computer science that doesn't have a clean >>>>> solution. The docs for the library discuss some parameters that can be >>>>> tweaked to control things: >>>>> >>>>> https://github.com/google/diff-match-patch/wiki/API >>>>> >>>>> Maybe we should expose all of the parameters as attributes on the >>>>> DiffTextWidget, making it easier for people to experiment with different >>>>> settings. >>>>> >>>>> Best wishes >>>>> >>>>> Jeremy >>>>> >>>>> -- >>>>> Jeremy Ruston >>>>> jer...@jermolene.com >>>>> https://jermolene.com >>>>> >>>>> On 19 Mar 2019, at 15:13, Mohammad <mohammad...@gmail.com> wrote: >>>>> >>>>> What Josiah said can be tested on SNR at >>>>> >>>>> https://kookma.github.io/TW-Commander/ >>>>> >>>>> It seems the Tiddlywiki diff-text works fine for simple cases like >>>>> alphanumeric but working with more complex cases like regexp, it >>>>> encounter >>>>> difficulties. >>>>> >>>>> --Mohammad >>>>> >>>>> On Tuesday, March 19, 2019 at 5:08:54 PM UTC+3:30, @TiddlyTweeter >>>>> wrote: >>>>>> >>>>>> The Difference Engine is an incredibly useful feature of TW. For >>>>>> writers, for coders, for versioning systems that are now commonly used. >>>>>> And, more recently, in tools like Mohammad's regular expressions based >>>>>> Search-n-Replace. >>>>>> >>>>>> The problem is its visual presentation (it does not harm the writing, >>>>>> it just) under some circumstances is extremely misleading. >>>>>> >>>>>> For instance ... Actually the edit here was only to remove *<* & > but >>>>>> the differences shown are very confusing with many items in green and >>>>>> pink >>>>>> that should not be, and with inconsistent presentation that is even more >>>>>> confusing. >>>>>> >>>>>> I wonder if it can be made more accurate? >>>>>> >>>>>> [image: diff-view-5.jpg] >>>>>> >>>>>> >>>>>> Best wishes >>>>>> Josiah >>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "TiddlyWiki" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to tiddlywiki+...@googlegroups.com. >>>>> To post to this group, send email to tiddl...@googlegroups.com. >>>>> Visit this group at https://groups.google.com/group/tiddlywiki. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/tiddlywiki/f66e485c-50c8-4ca0-9c92-47c1363c9ca3%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/tiddlywiki/f66e485c-50c8-4ca0-9c92-47c1363c9ca3%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "TiddlyWiki" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to tiddlywiki+...@googlegroups.com. >>>> To post to this group, send email to tiddl...@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/tiddlywiki. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/tiddlywiki/b20a5e11-8a1e-4b69-931d-2f58bce7da60%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/tiddlywiki/b20a5e11-8a1e-4b69-931d-2f58bce7da60%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a7a82818-e00a-4940-a465-2e1bd05e21ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.