cljfx

https://github.com/cljfx/cljfx
michaelb 2020-05-07T17:46:02.080800Z

really love the examples, about 1/3 of the way through so far

vlaaad 2020-05-07T17:48:08.081Z

Yay!

michaelb 2020-05-07T17:50:15.082200Z

btw, it was the post on HN re: the reader app that originally caught my attention, and the suggestion that maybe graal native-image could help w/ size of distributable that got me pursuing this

michaelb 2020-05-07T17:50:56.083Z

well, that, and a few days later the team I’m part of got unexpectedly re-tasked to making a Desktop app (major shift from what we were doing)

michaelb 2020-05-07T17:52:25.084700Z

I’m exploring the cljfx route, others are exploring Nim + Qt, and there’s also an effort to adapt an exisiting mobile app that’s built with React Native + cljs re-frame by developing a custom QT backend for React Native

michaelb 2020-05-07T17:53:22.085700Z

I really like the idea of cljfx, seems the least hacky (proven, stable tech underneath — jvm, javafx, clojure)

michaelb 2020-05-07T17:54:23.086400Z

and the architecture is conceptually similar to the mobile app’s re-frame codebase

vlaaad 2020-05-07T17:54:59.087100Z

yeah, cljfx was influenced by re-frame, although all re-frame-like stuff is made opt-in

vlaaad 2020-05-07T17:55:43.088300Z

hmm, have you considered electron with cljs? seems like a popular option..

michaelb 2020-05-07T17:55:51.088600Z

electron is not an option for us

michaelb 2020-05-07T17:56:01.088900Z

security problems

vlaaad 2020-05-07T17:56:29.089400Z

hmm, interesting!

michaelb 2020-05-07T17:57:16.090300Z

have you ever thought about declarative state machines? I’m impressed with what the xstate project is doing, but have never had an opportunity to more than toy around with it. I wonder if a re-frame inspired approach could be further enhanced if you can build the state machines of the app declaratively

michaelb 2020-05-07T17:57:52.091100Z

…well, I guess you can do that already, sort of, the declarative events and co-effects already go in that direction

vlaaad 2020-05-07T18:00:07.092200Z

hmm, I played with state machines long ago when I was game developer, but didn't really have problems where state machines were a fitting solution

michaelb 2020-05-07T18:00:37.092500Z

were they simple ones, or full-on Harel statecharts?

vlaaad 2020-05-07T18:00:50.092800Z

simple 🙂

michaelb 2020-05-07T18:02:51.094500Z

statecharts (hierarchical state machines) are neat because they have a concept of parallel regions (concurrent states), and embodiments like xstate and scxml allow you to invoke external services

michaelb 2020-05-07T18:03:46.095600Z

mainly I like that you can sketch out a complete behavioral description of a component/app and visualize it, walk through its evolution, w/o causing side-effects

michaelb 2020-05-07T18:04:04.096Z

but it’s such a different mental-model, tough sell for a lot of people

michaelb 2020-05-07T18:06:18.097200Z

anyway, later on I might try to experiment with how statecharts might work with cljfx but for now will use the techniques shown in the advanced examples