membrane 2021-07-19

I'm getting lost in the membrane documentation, hence the question

what's the question?

Also, the documentation is currently in need of an update so if you have anything you'd like to see, I can add it to the list!

Basically all I need is something similar to ink, something that can do a bordered box with title + flex.

of course I mean terminal and tui

do you have a link to ink handy? my google-fu is failing me

ink is a tragic name by the way

cool, let me see if I can make an example

currently, I've only tried "full-screen" terminal UI. Does that matter for you?

I wouldn't want to get you too involved

I'm currently remaking ink in my own fashion, but I'd much rather use clj than cljs

I'm also curious as to why a terminal UI over a regular windowed UI. I thought the terminal UIs were cool, but now it seems just as easy to make a regular UI that can show images/colors/etc

I'm that weird case who uses i3wm and doesn't go outside of emacs anywhere except to the terminal.

tui are experiencing a renaissance by the way, probably as a counterbalance to electron

especially there is a boom among people writing in go and rust

I guess if people like that stuff, I think membrane+graalvm could be a nice option. It's not currently very well supported, but I think adding a few more creature comforts wouldn't be too much work.

I was surprised out easy it was to make the minimal todo app

clojure+grallvm imho is great for this. the amount of lines of code needed in relation to the effect is staggering

will probably test membrane in the near future

ok, making bordered box+title isn't very hard:

(defn bordered-box [title body]
  (let [body (ui/padding 1 1
                         body)
        [w h] (ui/bounds body)]
    
    [(rectangle (inc w) (inc h))
     (ui/translate 2 0 (label title))
     body]))

(def example-text
  "(defn bordered-box [title body]
  (let [body (ui/padding 1 1
                         body)
        [w h] (ui/bounds body)]
    
    [(rectangle w h)
     (ui/translate 2 0 (label title))
     (ui/translate 1 1
                   body)]))")

(defn example []
  (bordered-box "Title"
                (label example-text)))

the hours I spent on the ink are just going in the trash

🤣 1

and I have to rewrite the application from cljs to clj

Last question @smith.adriane, does it have a hot-reload?

not yet

but it doesn't sound like something difficult, it should even be able to rudely force the terminal to rerender

do you use cider/nrepl? I think I can just start a nrepl

nice. Let me try a simple setup for that

you've already become my hero

1