This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-11
Channels
- # announcements (6)
- # architecture (14)
- # babashka (26)
- # beginners (22)
- # calva (11)
- # clj-kondo (2)
- # clj-on-windows (1)
- # cljsrn (10)
- # clojure (116)
- # clojure-europe (5)
- # clojure-uk (1)
- # clojurescript (5)
- # cursive (9)
- # datomic (21)
- # depstar (1)
- # events (1)
- # fulcro (2)
- # graalvm (17)
- # graalvm-mobile (28)
- # helix (3)
- # introduce-yourself (2)
- # jobs (2)
- # lsp (4)
- # meander (1)
- # off-topic (4)
- # pathom (5)
- # polylith (6)
- # practicalli (5)
- # reagent (67)
- # reitit (1)
- # releases (2)
- # shadow-cljs (24)
- # tools-deps (23)
Just added an example that let's you script UIs using a sci repl, https://github.com/phronmophobic/mobiletest#membrane-example. Feedback welcome! Here's an example of a simple counter:
(require '[membrane.ui :as ui])
(require '[com.phronemophobic.mobiletest.membrane :refer
[main-view]])
(def my-count (atom 0))
(defn counter-view []
(ui/translate 50 100
(ui/on
:mouse-down
(fn [pos]
(swap! my-count inc)
nil)
(ui/label (str "the count "
@my-count)
(ui/font nil 42)))))
(add-watch my-count ::update-view (fn [k ref old updated]
(reset! main-view (counter-view))))
(reset! my-count 0)
I've done a little bit more research into what objc interop would look like, but it's still a work in progress.
I wish the Apple ecosystem wasn't so closed down. Not sure what the best way to make it easy for other people to try things out.
Perhaps publish a thing that people can try via this thing, what was it, TestFlight?
yea, I can look into that if people are interested
yea, there's a main-view
atom. just reset its value and it will get redrawn
in addition to test-flight, I guess there's probably some CI system that could build everything for you if given the right provisioning profile
I know Apple has frowned upon apps with scripting capabilities before, but maybe it's less restrictive now?
I think you could let users point to their gist to import a certain UI configuration (using scripting). Don't know what the app itself would do, perhaps a 4clojure app (now that the site is closing down) or a SCI REPL?
perhaps "docstring of the day", an app which shows you info about a particular clojure function
yea, it's more fun if you can script against the Apple platform apis
otherwise, you might as well make a web app
@smith.adriane I wonder, have you ever had the stalling problem again since we made the initialize-at-build-time fix? > If it gets stuck directly after setup and doesn't reach the clinit phase within 3-4 minutes, try stopping the script and restarting ./scripts/compile-shared.
I haven't
good find! maybe it's time to remove the warning from the docs
Perhaps it's possible to record your screen on the phone as post this as an animated gif in the repo
yea, shouldn't be too hard