membrane

leinfink 2023-01-15T16:02:45.082799Z

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?

leinfink 2023-01-15T17:46:56.217329Z

https://clojurians.slack.com/archives/CVB8K7V50/p1669886869230149 I think I found the topic, will check this out.

phronmophobic 2023-01-15T19:35:28.090719Z

Yea, hopefully that addresses your needs. I would love any feedback. good, bad or ugly!

leinfink 2023-01-15T22:21:14.220629Z

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)
  ,)

🎉 1
chromalchemy 2023-01-15T19:34:38.161409Z

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.

🆒 1
phronmophobic 2023-01-15T19:46:40.372159Z

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.

👍 1