an urbit interval timer.
evenly space out time for focus with time for rest.
receive a "wrap up" call for each period.
run through as many repititions as you wish.
I built this to time out my work sessions, meditations, and exercises.
a publicaly visible version lives at extra.howm.art/focus.
on urbit, anyone will be able to install %focus from ~havdys-nordus-mocwyl.
*make your %focus app publicly visible, by running this in your urbit's dojo: :focus &focus-command [%public &]
this app was built entirely with the hoon language for urbit in participation of the 2022 end of the year hackathon.
while the backend is obviously written in hoon, the frontend is completely written in hoon as well. focus uses the domain-specific language sail to create html in concert with the rudder framework for routing & serving simple web frontends.
the very helpful sailbox taught me much of this approach, alongside the thoroughly annotated rudder library and examples.
writing basically in 100% hoon, is a wonderful experiece. using hoon for scripting with sail and rudder can get you really far without javascript. but there are some difficult problems to solve. hopefully there are a few decent ideas within focus for these sticky situations in a fullstack hoon app.
most difficult challenges
-
managing state for manipulating the pages rudder facilitates.
because of the rapidly growing need for state for the frontend, I ended up nesting a larger state-p into my state-0. -
page refreshing +on-arvo or trigged from anywhere other than an http post.
for the behn wake gift of my timers to have effects I brought rudder into +on-arvo, with limited success. -
inacting animations/changes after the page load.
this is where my 3 lines of javascript come in, but maybe I could have done that with css or scss.
still building...
- viable backend and frontend built dec 20-22
- frontend and aesthetics crafted jan 2-6
- submitted for the hackathon jan 8
- finish v1.0.0 jan 19
- finish v1.2.0 apr 19 - adding goals integration and a pause functionality
- future: considering advanced settings for an ease-in pre-timer and a big rest for bundling multiple sessions
anyone upgrading from v1.0.0 to v1.2.0, will experience weird changes. when focus first opens. a line will appear on the bottom of the screen, the new goals toggle will already be set to “on”, and the wrap setting will be at “50%”.
but it's all reversable by resetting the wrap slider and turning the goals toggle off and back on. if goals isn't installed an ugly stack trace and helpful message will appear explaining how to download it.
newly installed focus apps won't experience this.