This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-01
Channels
- # announcements (10)
- # aws (1)
- # babashka (19)
- # beginners (104)
- # calva (50)
- # cider (17)
- # cljs-dev (135)
- # cljsrn (56)
- # clojure (240)
- # clojure-dev (4)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (22)
- # conjure (2)
- # css (1)
- # cursive (10)
- # data-science (1)
- # datomic (60)
- # emacs (2)
- # events (2)
- # exercism (1)
- # figwheel-main (3)
- # fulcro (13)
- # graalvm (5)
- # gratitude (1)
- # inf-clojure (4)
- # introduce-yourself (5)
- # jobs-discuss (21)
- # lsp (36)
- # malli (6)
- # meander (8)
- # missionary (12)
- # off-topic (14)
- # pathom (13)
- # pedestal (10)
- # polylith (42)
- # re-frame (5)
- # reagent (12)
- # reitit (3)
- # releases (8)
- # sci (10)
- # shadow-cljs (37)
- # sql (5)
- # tools-deps (6)
Hi, I have a Java project that has been leveraging the clojure RT object to use edn as config, in turn the edn may have clojure functions as values and other goodies, we were looking at throwing Graal at our project, and thinking we could switch out direct use of clojure RT and using sci to interpret instead. I am just having trouble finding the core entrypoint to bootstrap sci .. so that I could eventually call
sci.core$eval_string_STAR_.invokeStatic(sciCtx, code) or sci.core$eval_string(code)
hidden behind a Java facade.
Is this possible ?Check out Clojure’s Java API: https://clojure.github.io/clojure/javadoc/
I think it’s also possible to make one function in Clojure to do your SCI config and then use genclass to make it available to Java
@gmercer note that you can also make clojure.lang.RT
available in SCI, I'm not sure why you were using that
but programming against clojure.lang.RT
is not recommended, as its basically an implementation detail of Clojure, not intended as an API
@borkdude probably old school stackoverflow examples .. unfortunately, I am still getting Graal defining class from bytecodes not supported, desperately combining over babashka to see how it is done 😉