Hacker News new | ask | show | jobs
by phronmophobic 2274 days ago
If you're interested in desktop alternatives for clojure, check out https://github.com/phronmophobic/membrane. It's different from javafx in that all the event handling code is pure clojure. For graphics, it uses skia, https://skia.org/.
1 comments

Love the example with the spacer, guess we're back to building UIs with tables soon as well!

  (defn counter [num]
    (horizontal-layout
     (on :mouse-down (fn [[mouse-x mouse-y]]
                       (swap! counter-state inc)
                       nil)
         (button "more!"))
     (spacer 5 0)
     (label num (ui/font nil 19))))

Otherwise, haven't heard about Skia before, so thanks for sharing that, looks really nifty.
Thanks! More complicated layout strategies are easy to integrate, but spacer works really well for examples since most people can intuit what the result will look like.

Skia has worked well so far. Since it's used by Chrome, Android, and Firefox under the hood, it means that I can reach a lot of platforms "for free".