cljfx

vlaaad 2022-09-25T12:52:07.892859Z

Check it out!

🙌 2
ericdallo 2022-09-25T14:20:07.214229Z

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

ericdallo 2022-09-25T14:20:35.829159Z

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

nate 2022-09-25T22:57:51.948329Z

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

ericdallo 2022-09-25T23:13:40.078239Z

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

🚀 1
ericdallo 2022-09-25T23:14:33.496559Z

I just need now to create a GUI wrapping that

Mike Hearn 2022-09-28T14:09:12.649089Z

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

ericdallo 2022-09-28T14:31:29.987459Z

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

Mike Hearn 2022-09-28T14:39:16.771719Z

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 Hearn 2022-09-28T14:39:44.337359Z

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.

ericdallo 2022-09-28T14:41:02.245649Z

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 Hearn 2022-09-28T14:43:15.832449Z

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.

ericdallo 2022-09-28T14:47:40.499879Z

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 Hearn 2022-09-28T14:48:34.395759Z

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

ericdallo 2022-09-28T14:49:25.644359Z

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

Mike Hearn 2022-09-28T14:49:37.244419Z

You're welcome.