I've been playing with taskwarrior source code and was thinking about how it'd be great if I could have taskwarrior with me everywhere. Particularly with a Chromebook.
I've been working with emscripten compiling taskwarrior into asm.js and have been successful so far. I have it running in the browser, synchronizing the in-memory files with Google Files, saving them to indexdb, and have a little interactive shell. (using hterm.js) I plan on releasing this as open source at some point. (My employer has a process.)
There's a lot of little nuances, of course, and have had to turn off all confirmation in taskwarrior (no working stdin).
So far I haven't had to make any changes to taskwarrior source code except one somewhat major one: the global context.
In the asm.js context, I use the main() function as if it was a library and keep calling it again and again. This causes issues with the global context being already-initialised.
My solution:
- Remove it as a global, and have a global "registry" of the current context.
- main() has its own context on its stack. It then registers this as the current context when it starts.
- All calls to context gets the "current context".
This has proved remarkably successful, including having all of the tests pass.
So my question:
Would taskwarrior entertain such a patch? Or a patch which would achieve a similar outcome? There may be other more elegant solutions, of course.
This is a bit off-the-wall I realize...
Thanks!
Mark
--
You received this message because you are subscribed to a topic in the Google Groups "taskwarrior-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taskwarrior-dev/hiX7nKb6wrA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taskwarrior-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> To unsubscribe from this group and stop receiving emails from it, send an email to taskwarrior-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "taskwarrior-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taskwarrior-dev/hiX7nKb6wrA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taskwarrior-dev+unsubscribe@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "taskwarrior-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taskwarrior-dev/hiX7nKb6wrA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taskwarrior-d...@googlegroups.com.