This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-27
Channels
- # babashka (24)
- # beginners (169)
- # cider (3)
- # clara (2)
- # clojars (1)
- # clojure (198)
- # clojure-europe (2)
- # clojure-nl (6)
- # clojure-spec (29)
- # clojure-uk (21)
- # clojurescript (21)
- # clojurewerkz (1)
- # core-async (6)
- # cryogen (2)
- # datomic (4)
- # duct (1)
- # fulcro (26)
- # graalvm (1)
- # malli (1)
- # reitit (5)
- # spacemacs (21)
@deleted-user yes macros are supported, but if you need to see the expansion with macroexpand you can do that in a normal Clojure REPL for now. I’ll make an issue to add it
Anyone know of a spec like way of desctructuring data compatible with Babashka/GraalVM?
I would like to do something like
(s/conform (s/cat :a string? :b integer? :c (s/? integer?) :d string?) data)
Thanks! I just had a look. It fails on derive
:
export BABASHKA_CLASSPATH="$(clojure -Sdeps '{:deps {malli {:git/url "" :sha "07c8c61c5f469769291bd6cf5c938a3a0e94d41d"}}}' -Spath)"
bb -e
Babashka v0.0.49 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.
user=> (require '[malli.core :as m])
Could not resolve symbol: derive [at /Users/jeroen/.gitlibs/libs/borkdude/sci/29c6ab20416b8662296f64f3ce92fdbd826bc286/src/sci/impl/utils.cljc, line 5, column 2]
sci.impl.utils=>
Will try something different for now
Looking at the code of mali it is probably something more than just derive
. I see defprotocol etc.
I have to rethink my approach :)
But good to know it works with GraalVM at least
yeah I can imagine
I'm guessing you ported deps.clj for internal use in Babashka as well?
I ported the clojure bash script to clojure to see how far I could get it to run with babashka, but now it runs with it
but then I thought: if I have it in clojure anyway, I might as well produce binaries from it
it's not used internally by babashka, it's just a script that you can run with both JVM clojure and babashka
also a reason for it is that installing clojure on Windows is not trivial. but now you can just download one single file and it will do the rest for you
I remember writing a custom clojure installer for macOS CI, because the linux script didn't work there. also one thing I won't have to do anymore
Very cool 🙂