zlacker

Clojure Desktop UI Framework

submitted by duckte+(OP) on 2024-08-24 08:01:39 | 277 points 134 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
1. roenxi+oa7[view] [source] 2024-08-27 02:09:34
>>duckte+(OP)
Really could use a link to the API docs in the README.md, it is a bit hard to judge when the "documentation" such as they have so far is sparse. But it is nice to see a newish UI project.

I will say I've found Clojure to be a success story for doing GUI work. Projects like Dave Ray's seesaw (https://github.com/clj-commons/seesaw) are an amazing demo of how one man can rearchitect an API like Swing into something that is deceptively fun to use. High hopes that this project goes somewhere that is similarly enjoyable.

◧◩
5. vips7L+re7[view] [source] [discussion] 2024-08-27 03:09:48
>>roenxi+oa7
There's a lot of languages that just work better for doing declarative ui than Java. Booth Groovy and Scala have wrappers that just make it that much easier.

http://groovy-lang.org/dsls.html#swingbuilder https://github.com/scala/scala-swing

8. kpw94+4h7[view] [source] 2024-08-27 03:53:02
>>duckte+(OP)
I'm sure Clojure is a great language for some tasks...

But, looking at the examples (picked the Wordle one since I know that game): https://github.com/HumbleUI/HumbleUI/blob/main/dev/examples/...

I find it extremely hard to read. Even small snippets, say line 56 to 74 which define this "color", "merge-colors" and "colors"... then the "field" one lines 76 to 117 is even harder.

is it more natural read for people familiar with writing functional programs? (am I permanently "broken" due to my familiarity with imperative programing?)

I wonder what the same Wordle example would look like in, say pure Flutter.

Also wonder how would that code look with external dependencies (say hitting a server to get the word of the day), and navigation (with maintaining state in between those pages)

◧◩
12. mattha+vi7[view] [source] [discussion] 2024-08-27 04:15:53
>>kpw94+4h7
Hickey talks about readability of Clojure in this talk (timestamp at 6m40s) https://www.youtube.com/watch?v=SxdOUGdseq4#t=6m40
14. michae+6l7[view] [source] 2024-08-27 04:59:31
>>duckte+(OP)
Cljfx is also worth a look!

https://github.com/cljfx/cljfx

◧◩
37. askono+wK7[view] [source] [discussion] 2024-08-27 11:12:43
>>Baculu+MJ7
Doesn't have to be: see https://jank-lang.org/, https://babashka.org/
◧◩◪◨
66. troupo+Wf8[view] [source] [discussion] 2024-08-27 14:52:09
>>novaga+m28
If you follow common UI patterns, your app will look like Apple or MS app, and there's nothing wrong with that. For a long laundry list of reasons: >>41368184
67. dig1+rh8[view] [source] 2024-08-27 14:59:40
>>duckte+(OP)
Clojure and Flatlaf [1] tick all the boxes for me. If I want declarative-ish UI, I can always throw in Seesaw [2]. Everything else I find cumbersome, pulls tons of unnecessary dependencies and (usually) ends up abandoned in a year or two. With Swing, I know it is well-documented and will work for the next 30 years. But YMMV and I'm hoping that HumbleUI could be an exception.

[1] https://www.formdev.com/flatlaf/

[2] https://github.com/clj-commons/seesaw

68. cess11+Kj8[view] [source] 2024-08-27 15:11:02
>>duckte+(OP)
What does it bring that https://github.com/cljfx/cljfx does not?
◧◩
71. tonsky+5o8[view] [source] [discussion] 2024-08-27 15:33:50
>>Dansvi+Rw7
We have workshop planned for the middle of September, after that, I hope things will start to stabilize a bit. I already started documenting some stuff in examples app, sort of self-documenting integration tests. Will have normal docs too, of course

https://s.tonsky.me/share/Screenshot%202024-08-27%20at%2017....

◧◩◪
111. vips7L+aF9[view] [source] [discussion] 2024-08-27 22:01:31
>>iamcal+WW8
I haven't worked with FX or Swing lately but I could have sworn they delivered hidpi support. Maybe in this JEP? https://openjdk.org/jeps/263
◧◩◪◨⬒⬓⬔⧯▣
113. xyc+aQ9[view] [source] [discussion] 2024-08-27 23:15:07
>>Pet_An+oo9
Not really. VS Code does have some performance optimizations where even the web browser optimization wouldn't suffice, for example it implements its own scroll bar instead of using the web native scroll bar. But for the most part the browser render optimizations is the crucial factor. After years of optimization you can't easily beat a web browser.

Native app is just another set of layers of abstractions. As a comparison, SwiftUI doesn't render 500 items quickly enough (https://www.reddit.com/r/swift/comments/18dlgv0/improving_pe...), which is a tiny number for web.

[go to top]