membrane

2021-07-19T22:14:43.010700Z

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

phronmophobic 2021-07-19T22:15:29.011200Z

what's the question?

phronmophobic 2021-07-19T22:16:55.012400Z

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!

2021-07-19T22:19:02.012700Z

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

2021-07-19T22:19:30.012900Z

of course I mean terminal and tui

phronmophobic 2021-07-19T22:20:18.013300Z

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

2021-07-19T22:20:33.013600Z

https://github.com/vadimdemedes/ink

2021-07-19T22:21:19.013900Z

ink is a tragic name by the way

phronmophobic 2021-07-19T22:23:37.014400Z

cool, let me see if I can make an example

phronmophobic 2021-07-19T22:24:10.015100Z

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

2021-07-19T22:24:10.015200Z

I wouldn't want to get you too involved

2021-07-19T22:24:47.015500Z

no

2021-07-19T22:25:39.016400Z

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

phronmophobic 2021-07-19T22:26:07.016900Z

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

2021-07-19T22:27:15.017100Z

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

2021-07-19T22:27:19.017300Z

: P

phronmophobic 2021-07-19T22:27:31.017700Z

😄

2021-07-19T22:28:20.018Z

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

2021-07-19T22:28:59.018200Z

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

2021-07-19T22:29:33.018400Z

for example https://github.com/Rigellute/spotify-tui

phronmophobic 2021-07-19T22:30:48.019700Z

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.

phronmophobic 2021-07-19T22:31:00.020100Z

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

2021-07-19T22:32:16.020400Z

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

2021-07-19T22:34:48.021100Z

will probably test membrane in the near future

phronmophobic 2021-07-19T22:40:35.021500Z

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

2021-07-19T22:47:42.022Z

I hate you

2021-07-19T22:48:11.022200Z

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

🤣 1
2021-07-19T22:48:15.022400Z

🙃

2021-07-19T22:49:18.022700Z

and I have to rewrite the application from cljs to clj

2021-07-19T22:50:55.023100Z

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

2021-07-19T22:51:11.023300Z

is repl friendly?

phronmophobic 2021-07-19T22:51:40.023500Z

not yet

2021-07-19T22:52:46.024200Z

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

phronmophobic 2021-07-19T22:52:47.024300Z

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

2021-07-19T22:53:07.024800Z

cider ❤️

phronmophobic 2021-07-19T22:53:21.025100Z

nice. Let me try a simple setup for that

2021-07-19T22:53:51.025300Z

you've already become my hero

1