Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make afew idempotent #308

Open
xaltsc opened this issue Sep 20, 2021 · 1 comment
Open

make afew idempotent #308

xaltsc opened this issue Sep 20, 2021 · 1 comment

Comments

@xaltsc
Copy link

xaltsc commented Sep 20, 2021

One of the most annoying aspects of afew for me is that it requires several runs to get the desired tags attached to mails or to get mails moved to the right folder.

As a feature, I believe afew should achieve two/three goals, both being rather rewriting-theoretic.

  1. Being able to detect if the tagging process/configuration is "well-behaved", i.e. convergent, i.e. the rewriting directed graph does not contain any cycle, i.e. exists only one normal form (on the commutative monoid generated by the possible tags).
  2. When the configuration is well-behaved, achieve the final step in one run only.
  3. When the configuration is well-behaved, "compile" it to a better configuration that is both legible and is the identity on a second run.

I think that the hardest part of achieving this is to take Python filters into account, but this may be dismissed in the first approach, since this may require some changes in the API and break stuff.

I may task myself to submit a PR for that in the (hopefully near) future, I had discussed about that with @GuillaumeSeren on the IRC channel in Spring 2020, but any help, remarks, whatever kind of input is very much welcome.

@GuillaumeSeren
Copy link
Collaborator

Hey @xaltsc
I remember you !

  1. Being able to detect if the tagging process/configuration is "well-behaved", i.e. convergent, i.e. the rewriting directed graph does not contain any cycle, i.e. exists only one normal form (on the commutative monoid generated by the possible tags).
  2. When the configuration is well-behaved, achieve the final step in one run only.
  3. When the configuration is well-behaved, "compile" it to a better configuration that is both legible and is the identity on a second run.

I like challenge too so if I can help having this done would be awesome,
but it may be quite a long shot to go from the actual code to this.

I think the first part like calculating the expected state may be doable without rewriting everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants