r/Clojure • u/HotSpringsCapybara • Jun 10 '25
Clojure for desktop widgets & GUI tools?
Keeping it short: I'm looking into developing a bunch of desktop tools, strictly for personal use. I use the term "widgets" here to signify that they're intended to be simple (mostly single-purpose) pieces of software, with GUIs that integrate with the (Linux) desktop. Subsequently: they need to launch with minimal latency, and ideally use GTK or Qt, though this is not at all a strict requirement.
Naturally, my first instinct is to use some variant of Clojure, simply because that's what gives me joy. Is it really the right tool for the job though? I can't really think of any combination of runtime & libraries that fulfills my criteria.
ClojureDart may well be it, but I've been a little reluctant to reach out for it since I'm not familiar with the Dart+Flutter world. The sheer size of Flutter SDK had me wondering if this wasn't too ambitious a tool for my humble use-case.
Another option would be to use Common Lisp instead. It seems like a feasible fit since it produces fast binaries and offers the necessary UI bindings. I have a very shallow grasp of that language & ecosystem though.
What do you think? I'll be grateful for any advice.
EDIT: I'd like to thank you for all of your suggestions. I thought I'd be grasping at straws but instead it seems there are numerous very compelling options to consider.
View all comments
Show parent comment
1
u/HotSpringsCapybara Jun 11 '25
It's hard to say, but ideally it should seem instant... so probably under 100ms? It's GUI stuff, so it will feel sluggish unless you get a (perceptually) immediate feedback. I don't know if it's possible to achieve this without Graal. Running something like:
Takes >200ms from a cold start - and this is a beefy machine.
I had no luck at all trying to create a native image with seesaw, but that was a few years ago, so as you said - maybe it's possible these days...
I suppose one could alternatively run a persistent "server" service a la emacs, but that is also a bit of a crutch and poorly suited for small, ad-hoc programs I had in mind.