Fork me on GitHub
#membrane
<
2021-07-19
>
ribelo22:07:43

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

phronmophobic22:07:29

what's the question?

phronmophobic22:07:55

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!

ribelo22:07:02

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

ribelo22:07:30

of course I mean terminal and tui

phronmophobic22:07:18

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

ribelo22:07:19

ink is a tragic name by the way

phronmophobic22:07:37

cool, let me see if I can make an example

phronmophobic22:07:10

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

ribelo22:07:10

I wouldn't want to get you too involved

ribelo22:07:39

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

phronmophobic22:07:07

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

ribelo22:07:15

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

ribelo22:07:20

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

ribelo22:07:59

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

phronmophobic22:07:48

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.

phronmophobic22:07:00

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

ribelo22:07:16

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

ribelo22:07:48

will probably test membrane in the near future

phronmophobic22:07:35

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

ribelo22:07:42

I hate you

ribelo22:07:11

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

2
ribelo22:07:18

and I have to rewrite the application from cljs to clj

ribelo22:07:55

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

ribelo22:07:11

is repl friendly?

ribelo22:07:46

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

phronmophobic22:07:47

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

ribelo22:07:07

cider ❤️

phronmophobic22:07:21

nice. Let me try a simple setup for that

ribelo22:07:51

you've already become my hero

bananadance 2