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

add an alternative logic #1

Merged
merged 3 commits into from
Mar 12, 2022
Merged

add an alternative logic #1

merged 3 commits into from
Mar 12, 2022

Conversation

zcsahok
Copy link
Contributor

@zcsahok zcsahok commented Mar 10, 2022

(will add description later)

@airween
Copy link
Owner

airween commented Mar 10, 2022

Thank you Zoli, you convinced me :).

@zcsahok
Copy link
Contributor Author

zcsahok commented Mar 10, 2022

The goal is to make clear on the air what is actually confirmed.
The logic is as follows:

  • calls are split into 5 parts: alt-prefix, prefix, area, suffix, alt-area. The alt-x parts are optional.
  • if one of these or two consecutive change, then send it/them. Always send a changed part fully.
  • always send at least 2 chars. If needed pad from a neighboring field.
  • if more than two or non consecutive parts change, then send full call.
  • some special handling is added for the optional alt-x parts, as they can either appear or get removed.

Added a bunch of examples to see how it behaves. The trailing * shows that the result is different from the original algorithm.

@airween
Copy link
Owner

airween commented Mar 10, 2022

Hi Zoli,

The goal is to make clear on the air what is actually confirmed. The logic is as follows:

* calls are split into 5 parts: alt-prefix, prefix, area, suffix, alt-area. The alt-x parts are optional.
* if one of these or two consecutive change, then send it/them. Always send a changed part fully.
* always send at least 2 chars. If needed pad from a neighboring field.
* if more than two or non consecutive parts change, then send full call.
* some special handling is added for the optional alt-x parts, as they can either appear or get removed.

yes, I reviewed the code and understood completely. Nice idea and nice solution, congrats!

Added a bunch of examples to see how it behaves. The trailing * shows that the result is different from the original algorithm.

yes, that was clear for me too. I added yet another example in the comment under the original PR, just check how the function behaviors with a single shorter call.

Thanks for all, I'll update my PR soon, considering your other comments too.

@zcsahok
Copy link
Contributor Author

zcsahok commented Mar 10, 2022

OK. I'll still rework it a bit, introducing a struct for the split call parts. But that I can add to the other PR directly, too.

@airween
Copy link
Owner

airween commented Mar 12, 2022

Thanks Zoli, I'm going to merge it, and replace my PR under the tlf too.

@airween airween merged commit 80421b5 into airween:main Mar 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants