r/Clojure • u/Alarmed-Skill7678 • Aug 04 '25
ANSI code based UI library in Clojure
Hi,
I am trying to build a TUI for my Clojure app that can even run on Termux. So I was searching for such a library in Clojure but found only Clojure Lanterna and nothing other useful.
Can anyone please help me with some leads?
10
Upvotes
View all comments
Show parent comment
6
u/p-himik Aug 04 '25
"Deliberating pros and cons" is not the same as "deciding whether it's suitable for me". I'm sure that if I compare my car to a bazillion other models, there will be a myriad flaws in mine. But I don't care as it still suits me - it fits my requirements, I already have it, and there's basically no opportunity cost as any conceivable improvement would not cover the cost of replacing the car, even in the long term.
Same here - if Lanterna has all the features you need and doesn't have any flaws that affect you, just use it.
On the other hand, it does seem that it's just a very thin wrapper around a Java library. So if you prefer to avoid using wrappers, just use some Java library directly.
Performance is rarely a concern. Thin wrappers are simply not that useful as compared to interop, and they often hide things that should be visible and invent things that shouldn't exist.
Maybe precisely because it's not that difficult to just use the codes? Or some Java library that names all the constants and makes things reasonable convenient.