This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-29
Channels
- # admin-announcements (1)
- # announcements (3)
- # babashka (18)
- # beginners (35)
- # cider (4)
- # clj-kondo (52)
- # cljs-dev (2)
- # clojure (92)
- # clojure-spec (18)
- # clojurescript (17)
- # conjure (11)
- # core-async (1)
- # datomic (11)
- # emacs (5)
- # fulcro (11)
- # graalvm (10)
- # helix (21)
- # kaocha (6)
- # malli (1)
- # membrane (37)
- # off-topic (110)
- # re-frame (1)
- # reagent (12)
- # reitit (5)
- # rewrite-clj (1)
- # sci (1)
- # shadow-cljs (40)
- # vim (21)
- # vrac (17)
Is it possible to run shell exec in babashka? I'd like to parse edn parameters and than start interactive psql.
@maxp the closest thing to that is to use ProcessBuilder with inheritIO + wait + System/exit
See http://book.babashka.org for some examples. Deps.clj uses this to start a REPL
bb '(-> (doto (ProcessBuilder. ["clj"]) (.inheritIO)) (.start) (.waitFor) (System/exit))'
In other news, babashka and sci are being sponsored this quarter by CT: https://www.clojuriststogether.org/news/q3-2020-funding-announcement/
I added the org.httpkit.server/run-server function to babashka in a branch (see #babashka_circleci_builds), just to experiment. It only adds 0.5MB to the binary.
(require '[org.httpkit.server :as srv]
'[clojure.java.browse :as browse])
(defn app [{:keys [:request-method :uri]}]
(case [request-method uri]
[:get "/"] {:body "Welcome!"
:status 200}
[:get "/foo"] {:body "Foo!"
:status 200}))
(srv/run-server app {:port 8080})
(println "8080")
(browse/browse-url "")
@(promise)
OK, if you have more ideas about this, I made an issue here: https://github.com/borkdude/babashka/issues/556
I guess it could also be implemented as a pod first. Not entirely sure how that would work.
@maxp, you might want to also look at https://github.com/babashka/babashka.process
I can't seem to find the editor integration documentation on the github repo anymore. Can someone please point me to the right spot?
@chase-lambert What do you mean, for babashka nREPL?
Omg, I'm losing my mind. I am reinstalling all your great tools and was thinking of clj-kondo. Lol! Nothing to see here, people!
I suspected it :) Here's the page: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md