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

What is the semantics of recurring vs repeating? #32

Open
Profpatsch opened this issue Sep 25, 2020 · 7 comments
Open

What is the semantics of recurring vs repeating? #32

Profpatsch opened this issue Sep 25, 2020 · 7 comments

Comments

@Profpatsch
Copy link

I experimented with rec(urrence)/rep(etition) a little bit, trying to figure out how they interact.

What I noted so far:

  • You can set none, either, or both on the CLI
  • They seem to only update when marking the previous task as done, according to this code:

else do
logMessageMaybe <-
if Task.repetition_duration task /= Nothing
then createNextRepetition conf connection task
else
if Task.recurrence_duration task /= Nothing
then createNextRecurrence conf connection task
else pure Nothing

No other code seems look at the rec/rep fields (apart from the info and unrecur stuff).
The code also suggests that if both fields are set, rec won’t be looked at because rep takes priority.

Is that the idea? What is the intended workflow/semantics here?

The manual describes rec as:

Recurring - Task which needs to be done every day, week, etc. I.e. missed completions must be caught up immediately. (e.g. paying rent) The number of tasks which will be created in advance can be set via a config.

But I don’t see any code which would create a number of tasks in advance, maybe I’m missing a detail here. There is only a createNextRecurrence function, but none that would create multiple tasks. Also, there is no config option.


Comparing to taskwarrior (which I’m trying to migrate from), they do it a little bit differently. They don’t support repetition, rather recurrence with a config of how many tasks should be generated in advance; they run their task generation logic each time you run the command, regardless of whether that command changes something else. It’s certainly convenient, but not super easy to reason about (since random tasks could change at random times).

I don’t expect tl to be the same as tw, or even support recurrence feature that tw supports.

@ad-si
Copy link
Owner

ad-si commented Oct 9, 2020

  • You can set none, either, or both on the CLI

To prevent setting both simultaneously is an outstanding issue.

Is that the idea? What is the intended workflow/semantics here?

Mh, do you have another scenario in mind where they should be taken into account?

But I don’t see any code which would create a number of tasks in advance, maybe I’m missing a detail here. There is only a createNextRecurrence function, but none that would create multiple tasks. Also, there is no config option.

Sorry, the documentation is not up to date. Currently it only creates the next task. I'm still pondering the implications of creating several in advance and how this would be used. If you have any thoughts / insights on this, I'd be happy to hear them =).

Comparing to taskwarrior (which I’m trying to migrate from), they do it a little bit differently. They don’t support repetition, rather recurrence with a config of how many tasks should be generated in advance; they run their task generation logic each time you run the command, regardless of whether that command changes something else. It’s certainly convenient, but not super easy to reason about (since random tasks could change at random times).

I don’t expect tl to be the same as tw, or even support recurrence feature that tw supports.

This feature was actually one of the main reasons I abandoned Taskwarrior. It never worked like I thought it would. But I admit, that TaskLite is not much better yet. At least it is easy to reason about and it differentiates between recurrence and repetition. But it's definitely still a work in progress.

@gour
Copy link

gour commented Oct 10, 2020

Hello,

Sorry, the documentation is not up to date. Currently it only creates the next task. I'm still pondering the implications of creating several in advance and how this would be used. If you have any thoughts / insights on this, I'd be happy to hear them =).

See my comment...

This feature was actually one of the main reasons I abandoned Taskwarrior. It never worked like I thought it would. But I admit, that TaskLite is not much better yet. At least it is easy to reason about and it differentiates between recurrence and repetition. But it's definitely still a work in progress.

I have tried to create two tasks, each having the same due date, but one as repeating task and another as recurring task, but upon completing them, TaskLite simply created a new tasks not considering different semantic, iow. that new instance of recurring task (e.g. wash the car) should be relative to completion date.

Otherwise, I'm very pleased with everything (e.g. using Sqlite3 etc.) in TaskLite, but at the moment, only Etm does handle date arithmetic properly...

@ad-si
Copy link
Owner

ad-si commented Oct 12, 2020

I have tried to create two tasks, each having the same due date, but one as repeating task and another as recurring task, but upon completing them, TaskLite simply created a new tasks not considering different semantic, iow. that new instance of recurring task (e.g. wash the car) should be relative to completion date.

Dang, I broke it while unifying the duration parser. Thanks a lot for the heads up, it's fixed in master. I also added an extra page in the documentation https://tasklite.org/repetition_and_recurrence.html with some examples

only Etm does handle date arithmetic properly...

With the new duration parser it should handle all date arithmetic correctly! =)

@gour
Copy link

gour commented Oct 12, 2020

Why I get Python test printed in the output?

$ tl all
Python test

Id   Prio  Opened UTC  Body        
t88   0    2020-10-12  Mow the lawn  2020-10-12 15:08:30
r9d   3    2020-10-12  Mow the lawn  2020-10-19 15:08:29

@gour
Copy link

gour commented Oct 13, 2020

With the new duration parser it should handle all date arithmetic correctly! =)

I also wonder parser can handle things like: monthly properly considering length of the month, or last tuesday in the month etc. ?

Otherwise, I'm very pleased with TaskLite's functionality, congrats!!

@ad-si
Copy link
Owner

ad-si commented Oct 13, 2020

Why I get Python test printed in the output?

Uhm sorry, I committed a little too experimental code in the master branch. It's a hook defined in your auto generated config file. Simply comment the corresponding part out and it won't be printed anymore.

I also wonder parser can handle things like: monthly properly considering length of the month

monthly is P1M and it correctly handles different month lengths.

or last Tuesday in the month etc. ?

I don't think this is possible, yet (https://en.wikipedia.org/wiki/ISO_8601#Durations). You could do P4W, which would mean "every 4 weeks". I opened a new issue for it: #35

Otherwise, I'm very pleased with TaskLite's functionality, congrats!!

Thank you! ☺️

@gour
Copy link

gour commented Oct 13, 2020

Uhm sorry, I committed a little too experimental code in the master branch. It's a hook defined in your auto generated config file. Simply comment the corresponding part out and it won't be printed anymore.

Ok.

monthly is P1M and it correctly handles different month lengths.

Thanks.

I don't think this is possible, yet (https://en.wikipedia.org/wiki/ISO_8601#Durations). You could do P4W, which would mean "every 4 weeks". I opened a new issue for it: #35

OK, that was (one) problem with taskwarrior defaulting to 30days...

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

3 participants