musikinformatik / Steno

Concatenative little metalanguage for live coding
GNU General Public License v2.0
65 stars 7 forks source link

Topic/variableDiff #40

Closed rkuivila closed 7 years ago

telephon commented 7 years ago

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 the Steno1 variant, if that looks safer.

rkuivila commented 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.

telephon commented 7 years ago

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.

rkuivila commented 7 years ago

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?

rkuivila commented 7 years ago

Hi again,

I think this is what Till had in mind in his earlier comment.

telephon commented 7 years ago

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.

telephon commented 7 years ago

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.

telephon commented 7 years ago

VarDiffString now looks for "/" and treats whatever precedes it as a message selector. So you can write t.("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.

rkuivila commented 7 years ago

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.

telephon commented 7 years ago

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 …