This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-15
Channels
- # babashka (13)
- # beginners (37)
- # calva (19)
- # cider (15)
- # clj-kondo (2)
- # clojure (152)
- # clojure-norway (1)
- # clojure-sweden (10)
- # clr (5)
- # emacs (19)
- # honeysql (1)
- # introduce-yourself (19)
- # joyride (1)
- # lsp (4)
- # malli (5)
- # membrane (6)
- # off-topic (11)
- # pathom (18)
- # polylith (13)
- # practicalli (3)
- # releases (4)
- # shadow-cljs (38)
Hi, just found out about this project, it's super cool! I'm trying out the Lanterna backend - is there a way to get the size of the terminal? Or rather, my goal is to stick something to the bottom (and update on resize, i guess), is that possible?
https://clojurians.slack.com/archives/CVB8K7V50/p1669886869230149 I think I found the topic, will check this out.
Yea, hopefully that addresses your needs. I would love any feedback. good, bad or ugly!
Yeah, that was very simple, worked well!
(defn run [container-info]
(let [[_ cols] (:container-size container-info)]
(ui/translate 0 (- cols 1)
(ui/with-color [1 1 1]
(label "Hi!")))))
(comment
(do
(def close-ch (async/chan))
(lanterna/run #'run
{:in membrane.lanterna/in
:out membrane.lanterna/out
:include-container-info true}))
(async/close! close-ch)
,)
Have you ever seen this library https://github.com/pleasetrythisathome/bardo ? Could it be useful for UI graphics interpolation, tweening, etc? Or is that kind of stuff usually handled by runtime functions (for performance), like in Skia or alternatives.
I don't quite have enough use cases to have strong opinions one way or the other. For most cases, it seems like doing animations in userland via libraries should be find. I've also thought about ways to add support inside of membrane to make animations more efficient, but haven't implemented anything yet.