-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Questions] Plans and design #2
Comments
Hi @ngortheone, glad to hear 😁.
Rust as a gateway drug to Haskell 😉
At the moment I simply have the SQLite database in Dropbox, and so far it worked astonishingly well. 😅Mid term I plan to include a file mode (where each task is stored in a file) and git sync (git pull before and git push after changes). Or host it as a webapp (PureScript is a really good solution for it nowadays), which makes syncing unnecessary (but of course reduces it to online only). Long term I hope to be able to use something like https://github.com/canonical/dqlite.
For mobile my short term plan is to use a Telegram bot, an iOS shortcuts app (https://support.apple.com/guide/shortcuts), or a webapp. I'm still trying out what works best. Mid term a Flutter app might maybe be a good solution. Long term some companies are nowadays even writing mobile apps with Haskell (http://keera.co.uk/blog/2017/06/01/haskell-android-ios/), so this would of course be awesome 😁.
Learning Haskell was one of my most satisfying developer experiences. You should give it a try. 😉. Let me know if you need any help! |
What about support for complex priorities (combination of priorities for the task and tags) or urgency similar to TaskWarrior? |
Also, is there plans for support for notes? |
Is already implemented to a large part: https://tasklite.org/concepts.html#priority 😁
Already supported! => https://tasklite.org/concepts.html#notes 😁 |
Great! I am considering a use-case, where I can specify priority boost value for different tags. And then have a possibility to define a custom final task priority formula via configuration. By notes I am referring to functionality similar to taskopen, being able to edit the attached notes in any text editor, etc. |
Well, that's not easily available yet. However, the code for priority calculation is embedded in the SQLite database as SQL. Therefore you can change it via the
|
Are you planning on adding some kind of time tracking? |
@LeonB It already includes rudimentary time tracking support:
But there isn't any integrated way to analyze the data yet 😅 |
@ad-si aweseome! I'm looking for some kind of timesheet reporting for my boss. To show how much time was spent on certain tasks. |
Well it definitely works already: $ tl start mn1
🗒 Added a note to task "buy milk" with id "01dqqc19m7kyv8z4fd6g116mn1"
$ tl stop mn1
🗒 Added a note to task "buy milk" with id "01dqqc19m7kyv8z4fd6g116mn1"
$ tl info mn1
awake_utc: null
review_utc: null
state: null
repetition_duration: null
recurrence_duration: null
body: buy milk
user: adrian
ulid: 01dqqc19m7kyv8z4fd6g116mn1
modified_utc: 2019-10-21 14:38:11
group_ulid: null
closed_utc: null
priority_adjustment: null
metadata: null
waiting_utc: null
ready_utc: null
due_utc: null
priority: 1.0
tags:
notes:
- note: start
ulid: 01dqqc1gd88fef71cwttbrv3bz
- note: stop
ulid: 01dqqc22bgktwy6c5ek07pd2s4 So feel free to use it 😁. For better reporting you can either submit a PR with an implementation (😉), convince me that it's really high prio and I should implement it ASAP (😛), hack together a small SQL query to analyze it (run with |
Are there any plans to add hooks? I use them pretty extensively to extend Taskwarrior's functionality and sync with other services. |
@robwhitaker Definitely! I might implement details a little different than Taskwarrior (e.g. What kind of scripts do you currently use? Would be cool to have a list of good ones to keep in mind while implementing it! |
@ad-si I actually have all my hooks in my dotfiles repo if you want to check them out, but in short, I use hooks for the following:
|
Great! Definitely will have them as reference during implementation.
I actually want to provide first class support for this since it's such a common use case. But a implementation with hooks could probably be a good stepping stone (or maybe even the better solution, since it allows it to be more customizable by the user 🤔). Hooks has a higher priority so we can try it out then how it works...
Nice stuff! I haven't gotten much into hooks with Taskwarrior, but definitely looks like I should when its implemented with TaskLite 😁 One thing I'm still contemplating is whether I should add support for hooks to be stored in the database in a scripting language which are then executed by Taskwarrior. They could e.g. be written in Lua (https://hackage.haskell.org/package/hslua) or Dhall (https://dhall-lang.org/). I always disliked the system for git hooks, in which they are not part of the project and everybody had to install them themselves. |
The more I think about it the better I like the idea of storing them in the database and using Dhall as hook language. It can even be extended with custom functions: https://docs.dhall-lang.org/howtos/How-to-add-a-new-built-in-function.html. This could lead to a collection of useful Dhall hook scripts that anyone can use, since they are executed by TaskLite and have no additional requirements for the system setup like installed interpreters and so on. |
@ad-si Dhall is very cool as a configuration language, but I can't say I like the idea of trying to use it for general purpose scripting. Maybe it's just inexperience talking, but from the bit I've used Dhall, it feels like things that would be very basic in a general purpose language become very hard to do in Dhall because it's not designed for that purpose. I think Lua would be the better option, if you want to go with only having hooks in one language. Incidentally, I've been toying with the idea of using Nix as the basis for a Taskwarrior plugin manager. That approach would allow writing hooks and other Taskwarrior scripts in any language with whatever dependencies they require. As long as each plugin defines a |
Dhall has become quite powerful by now, but yeah, there will definitely a few custom functions be needed to make it complete. But as far as I can tell there is no fundamental limit!
Also there is always the option to distribute Docker images… So yeah, going with an external hook system, is probably the better solution for the beginning. If we find a way to integrate Dhall or Lua natively later, also cool, but at least we don't unnecessarily postpone the feature right now… Expect a first implementation soon! 😊…or if you've got some time I'd of course also be happy about a merge request 😉 |
I don't know too much about extending Dhall. I'd like to look into that when I get some time. But even so, the other issue I see with (exclusively) using a language like Dhall is potentially alienating would-be hook developers (I suspect a lot of people would find Dhall intimidating) and accidentally decreasing the number of shared hook scripts instead of building up a nice collection.
True! Docker is another option and certainly one more people would be familiar with. Maybe, with some cleverness, TaskLite could even use Docker under the hood to handle different hook script dependencies.
Looking forward to it! I'd actually love to contribute to TaskLite at some point, but I think you'll probably beat me to this feature 😆 |
First off, this project looks great; thank you for putting it together. I'll throw in a few questions of my own (/feature requests, I suppose) that pertain to my workflow. Do you have any plans to add something akin to Taskwarrior's user defined attributes? I use a Pomodoro-style workflow in which I track the number of pomodoros it takes to finish a given task. With Taskwarrior I define a numeric UDA to capture this. I suppose I could use a number of tags:
You've inspired me. I've always written CLI apps in Python but was considering something else for my next side-project. Is Learn You A Haskell for Great Good still the best learning resource? |
Thank you for the kind words @distefam 😊. It is already supported in the form of a The tooling around it is still a little lacking, but with a few bash aliases I think you can hack up a good solution in no time.
That's great! 😁Haskell is a real pleasure to work with, you won't regret it. On how to best start: Lets say the opinions differ 😅. I really enjoyed "Learn You A Haskell for Great Good", but I already had some exposure to Haskell, because a friend of mine was pitching it to me constantly 😂. If you're completely new to purely functional programming (the purely is important), then I actually feel like the best way to get started is to learn Elm first (https://elm-lang.org/). It is basically a subset of Haskell without any of the archaic trip ups, with the best error messages of any programming language, an awesome online getting started guide (https://guide.elm-lang.org/), and a gread online IDE (https://ellie-app.com/), which means you can get started without having to install anything. Once you've learned this it's much easier to make the jump to Haskell. (And on the way you've learned - what is in my opinion - the best way to build webapps currently). Have fun! 😁(and feel free to come back to me if you need help with anything!) |
That's great, thank you for letting me know and updating the docs to explain it better. I've looked into it and I am considering writing a tool dedicated to using an existing task database with the Pomodoro method.
I think that decoupling these two tools makes a lot of sense, not only from a Unix-philosophy standpoint, but also because it will work better. What I have in mind is that TaskLite would be the task management tool and read/write from the database of tasks while a separate pomodoro tool would write to another table in the same database with an entry for each pomodoro completed and a relationship to a task in the Tasklite table. This would nicely decouple things and also allow for more robust reporting. I have to think of this a bit more before I commit to it but that's where my thoughts are leading me at the moment.
Thank you for the feedback regarding Haskell, Elm, and purely functional programming. I'll dive in when I get the chance!
…On Sat, Feb 8, 2020, at 1:16 PM, Adrian Sieber wrote:
Thanks you for the kind words @distefam <https://github.com/distefam> 😊.
It is already supported in the form of a `metadata` field! I just added some documentation for it to the website: https://tasklite.org/usage/cli.html#metadata
The tooling around it is still a little lacking, but with a few bash aliases I think you can hack up a good solution in no time.
> You've inspired me. I've always written CLI apps in Python but was considering something else for my next side-project. Is Learn You A Haskell for Great Good still the best learning resource?
That's great! 😁Haskell is a real pleasure to work with, you won't regret it. On how to best start: Lets say the opinions differ 😅. I really enjoyed "Learn You A Haskell for Great Good", but I already had some exposure to Haskell, because a friend of mine was pitching it to me constantly 😂. If you're completely new to purely functional programming (the purely is important), then I actually feel like the best way to get started is to learn Elm first (https://elm-lang.org/). It is basically a subset of Haskell without any of the archaic trip ups, with the best error messages of *any* programming language, an awesome online getting started guide (https://guide.elm-lang.org/), and a gread online IDE (https://ellie-app.com/), which means you can get started without having to install anything. Once you've learned this it's much easier to make the jump to Haskell. (And on the way you've learned - what is in my opinion - the best way to build webapps currently). Have fun! 😁(and feel free to come back to me if you need help with anything!)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2?email_source=notifications&email_token=AAAQAI33LNGHJNSEYYMJUWDRB4OMBA5CNFSM4IV56KJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELF33CI#issuecomment-583777673>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAQAI7MCSQQL6OCNK3Z73LRB4OMBANCNFSM4IV56KJQ>.
|
Sounds like a great idea @distefam . This is exactly the kind of extensions I was hoping to foster with the modular and extendable architecture of TaskLite 😁. I also want to allow first class subcommands like git does: $ cat /usr/local/bin/git-grin
#! /usr/bin/env bash
echo '😁'
$ git grin
😁 Created an issue for it: #9 |
Do you have any way you'd prefer extensions to be architected? I only see the "Haskell API" bit on the docs page, which is a bit sparse. Quick and dirty would be to just build a CLI tool in Python (I'm already familiar with writing CLI tools with Python-click) that would access the existing database and write to a separate table but I don't think this is what you had in mind with "modular and extendable architecture of Tasklite". Happy to follow your lead, even (especially?) if it means an opportunity to learn a new language 😁. |
Well, originally my idea was to implement all core features in SQLite and build the Haskell CLI only has a wrapper to make using it easier. However, I wasn't aware how limited SQLite is, so by now a few core algorithms are implemented in Haskell. Yet, I still consider the database schema etc. part of the public API of TaskLite. So building a CLI tool in Python accessing the existing database is actually a way of doing it I'd like to support.
Implementing the hook system would be the most important next step for enabling extensions! Any PRs for this are very welcome 😁 |
@ad-si @distefam I think it makes sense for extensions to use the same database, but as far as creating new tables goes, there should probably be a standard naming scheme so different extensions don't accidentally become incompatible by using the same tables (e.g. two different extensions both try to create a "Comments" table). |
Good point. Changing or extending the schema should be governed by some rules. Most obvious being: existing fields must not be changed. New tables and fields must be namespaced with the name of the extension |
Having been playing with TaskLite a bit recently, I think it would be nice if notes could be read from stdin if no text is provided. It would allow for stuff like:
The same is possible currently but it's a lot less pretty and a lot easier to mess up:
|
So, I also went on a quest once I had tried and lost trust in taskwarrior: https://github.com/xerus2000/howtodo But now that I finally started using tasklite I see problems similar to my issues with taskwarrior:
|
Thanks for your feedback @xerus2000! My thoughts on it:
|
I already have far too many shell aliases. I think that quickly gets cluttered. Also, native support enables tighter integration. I am still trying to flesh out the details, but here's the gist of what I'm thinking of: https://github.com/xerus2000/howtodo/blob/master/plans.md#commands |
@ad-si @xerus2000 Could always create a wrapper script to introduce aliases without polluting your shell aliases. That worked pretty well for me while I was still using Taskwarrior. It also allows commands to be complete scripts/programs instead of simple aliases, which is pretty handy. Not sure what you mean by tighter integration, though. This may or may not help towards that goal. |
@robwhitaker you mean creating a |
@xerus2000 Yeah, basically. Could be a simple shell script, e.g.: if [[ "$1" = "watch" ]]; then
tl ... # run a more complex tasklite command
elif [[ "$1" = "read" ]]; then
echo "Unknown command: read" # "delete" the read command
elif [[ "$1" = "fire_the_missiles" ]]; then
missiles --fire # run a completely separate program
else
tl "$@" # pass all other commands directly to tasklite
fi What case does native support cover better than a simple wrapper script like the above? |
Hi, @ad-si, I explain more the priority workflow I am considering here: xeruf/nodal#2 |
Thanks everyone for your ideas and feedback! 😊 |
Hey @ad-si
I am excited to see this project. I was thinking myself of re-implementing taskwarrior in a more safe language (Rust was on my mind) so this project makes me very curious. I am particularly interested in some architectural/design decisions.
What is your plan for sync between different devices? Is it planned? How do you plan to perform merging and conflict-resolution? Is it going to be client-server or p2p?
What is your plan about mobile devices? An app like this would benefit greatly from being present not only on desktop/web but on android (and maybe even iOS :) This is my main dissatisfaction with taskwarrior - absence of a supported mobile client. (And also a story around provisoning certs for mobile - PITA).
My knowledge of Haskell is near-zero (sadly), how is it suitable for mobile development? If it is not very well suited I'd imagine that you will need to write a separate client in different language and probably port the data structures (things like protobuf come to mind)...
The text was updated successfully, but these errors were encountered: