Closed rkuivila closed 7 years ago
Hi Julian
Steno1 redefines initDiff to use VarDiffString instead of DiffString. VarDiffString is not compatible with DiffString as it does not implement swapFunc.
I have not yet given any thought to how to support the Unix diff in VarDiffString.
Ah ok, I see. Yes, then it might be better as a first step to just have this variant. As soon as I get round to it, I'll refactor both variants so we don't need subclassing.
A part of the functions that are now in the diff could perhaps be in the public interface of Steno, then the diff (or in fact any system) can change things externally. You could then just operate on the synths via indices directly. Let's see if that makes things a little simpler.
Hi Julian,
It might also be useful to allow the user to define their own substitution rules.
Instead of adding interface to Steno, selection of substitution rules could be embedded in the string itself. Take a look at the most recent pull request. VarDiffString now looks for "/" and treats whatever precedes it as a message selector. So you can write t.("diff1/abc") to select diff1.
Cheers,
RJK
BTW: why didn't you use the edit script option on the Unix diff?
Hi again,
I think this is what Till had in mind in his earlier comment.
Hi Ron, just so you know, I am editing your comments here on github. The email forwarding is kind of primitive - maybe it is actually not so inconvenient to directly enter them here. Even for a serious believer in email like me, it has turned out well.
BTW: why didn't you use the edit script option on the Unix diff?
AFAIR, I tried, but something didn't work properly. Maybe my fault.
VarDiffString
now looks for "/" and treats whatever precedes it as a message selector. So you can writet.("diff1/abc")
I am very cheeseparing with letters, but this makes sense. Perhaps a message to steno might be even more general. In the future, this shouldn't be in the diff but in the defaultPreProcessor
.
More tyro questions: I cannot find the comment exchanges on either Github desktop or Sourcetree (they have been there before, so I must have flipped a bit somewhere). Any clues.
The comment exchanges are not mirrored in any of the GUI apps. They are not part of git as such, but a feature of github. So you have to open the link in your browser …
are the changes to
Steno::initDiff
backward compatible? We could then just replace the old one. I am fine, however to first develop it in theSteno1
variant, if that looks safer.