Fork me on GitHub
#cljfx
<
2022-09-25
>
vlaaad12:09:07

Check it out!

🙌 2
ericdallo14:09:07

I always found cljfx amazing! Amazing work vlaaad! Lately I thought about creating a app to store copy pastes similar to https://maccy.app/, would you think would be possible via cljfx? I wonder if the app startup (JVM) would be a issue

ericdallo14:09:35

Some time ago I researched about using cljfx with graal, but seems graal still doesn't support javafx

nate22:09:51

wonder if you could do something with https://xbarapp.com/and babashka to watch the clipboard

ericdallo23:09:40

I actually managed to make the CLI work with Graal :) https://github.com/ericdallo/clipure

🚀 1
ericdallo23:09:33

I just need now to create a GUI wrapping that

Mike Hearn14:09:12

native images do support JavaFX. Look at how Gluon do it. They have a Maven plugin.

ericdallo14:09:29

Yeah, I saw that, but have no idea how to make gluon work with clojure, I'd need to debug the maven plugin

Mike Hearn14:09:16

I guess you could write a one-file Java app that just loads and executes your Clojure app, then depend on it as a fat jar.

Mike Hearn14:09:44

That said - is your app startup time genuinely a problem, especially if you use AppCDS? I found that for simple apps it made little difference. That was Java though, not Clojure.

ericdallo14:09:02

Good point, maybe native compiled javaFx wouldn't be that fast, but yeah, I'm not sure startup is that important, it'd be a similar to a desktop app, so fast startup is good, but not that critical

Mike Hearn14:09:15

The nice thing about using the regular JVM is that you can then cross-build all the packages your users need using Conveyor (https://conveyor.hydraulic.dev/), which makes doing a new release possible just on your laptop. With native-image you have to build on each platform you're targeting. It can be done with CI but is just less convenient. At least, it's worth shipping a hotspot version first, and then you can always upgrade people to native images later if you feel it's a good enough upgrade.

ericdallo14:09:40

Yeah, I have all those CI headaches on clojure-lsp because of graal 😂 Agreed, I'll probably research a little bit more about just using JVM, I'd like to create a fancy app as beautiful as https://maccy.app/, so not sure if javafx or awt would provide components similar, maybe flutter would be better just using the clojure graal compiled binary of clipure

Mike Hearn14:09:34

There's AtlantaFX. Check out the JavaFX sample app on the page I just linked - it's a really nice modern theme for JavaFX with a selection of nicely done widgets. Supports dark mode, nord colors, and more. https://github.com/mkpaz/atlantafx

ericdallo14:09:25

Looks quite nice! will include on my research, thank you!

Mike Hearn14:09:37

You're welcome.