Loop Habits Terminal

dev clojure blog react

published 2023-06-16 20:14

updated 2023-06-17 16:40

Since at least 2019 I've been trying to write a desktop habit tracker that is compatible with Loop Habits, since that's what I currently use to track my habits and have come to rely on it quite a lot.

Last month I was writing about this crazy stack I tried to use to build a Habit Tracker. I've finally succeeded. At least enough for me to move on from it for a while (We'll get back to that later).

The Stack

It runs on the most insane stack you've ever seen. I find this particularly confronting because of my thoughts about Permacomputing.

It runs on Nodejs in the terminal through a library called Ink. But it's written in Clojure using an interpreter that can transpile it to javascript. Ink allows you to use React in the terminal, but Clojure has it's own "flavour" of React called Reagent, which is what I use with Ink. It's not particularly fast, it's not accessible (can TUIs even be accessible? I don't know), I haven't attempted to package it with Nix yet (or really at all), and it's incredibly brittle software.

The Future

I'm drawn to complexity. I'm stubborn. In this case I particularly wanted to write in Clojure. However, not finding a suitable terminal UI library, and not wanting to write one from scratch, I found this a reasonable middle ground. Developer productivity coming in front of any other meaningful metric for software development. To be fair, it's not even complete. It provides enough of a framework for me to build on should Loop Habits develop some sort of sever software. Alternatively my dreams of an DIY e-ink pda come true, and I develop server software for it myself. In the latter scenario, I'd also consider rewriting it in a more sane stack. Something like Go and Bubbletea (Despite my aversion to that language because of it's Corporate Overlords). Until one of these other blockers get resolved though, my motivation to work on it has plummeted. I accomplished enough of what I set out to do to make me happy.

A screenshot of the Terminal Interface

If you'll excuse me, I have other projects to attend to.