Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
kwrooijen 2020-08-08T13:26:44.130800Z

Is this possible in GraalVM?

(eval '(defmacro testing [] 123))
  (println (macroexpand '(testing)))
I'm getting
Exception in thread "main" Syntax error macroexpanding clojure.core/defmacro at (36:10).
	at clojure.lang.Compiler.checkSpecs(
	at clojure.lang.Compiler.macroexpand1(
	at clojure.lang.Compiler.macroexpand(
	at clojure.lang.Compiler.eval(
	at clojure.lang.Compiler.eval(
	at clojure.core$eval.invokeStatic(core.clj:3216)
	at clojure.core$eval.invoke(core.clj:3212)
	at some_project.main$_main.invokeStatic(main.clj:36)
	at some_project.main$_main.doInvoke(main.clj:35)
	at clojure.lang.RestFn.applyTo(
	at some_project.main.main(Unknown Source)
Caused by: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.
	at clojure.lang.RT.load(
	at clojure.lang.RT.load(
	at clojure.lang.Compiler.ensureMacroCheck(
	at clojure.lang.Compiler.checkSpecs(

kwrooijen 2020-08-08T13:27:16.131100Z

Currently running [org.clojure/clojure "1.10.2-alpha1"]

kwrooijen 2020-08-08T13:40:02.131400Z

Sci does manage to do it. Not sure how though

borkdude 2020-08-08T13:42:43.132400Z

Not possible in GraalVM. Sci works around it by being an interpreter.

kwrooijen 2020-08-08T13:43:05.132700Z

Ahh ok, got it

kwrooijen 2020-08-08T13:43:37.133500Z

I guess I could try to use sci in that case

kwrooijen 2020-08-08T13:51:40.133700Z

Awesome, that works

kwrooijen 2020-08-08T13:54:47.134Z

Guess I'll be using Sci afterall ๐Ÿ˜›

lread 2020-08-08T14:44:21.135Z

I donโ€™t think we talk about runtime evaluation in our clj-graal-docs, Iโ€™ll add a tip.

lread 2020-08-08T14:55:53.135400Z


iirc the story behind babashka is intimately related to this point, a train ride and jet...or something

lread 2020-08-09T16:26:44.138600Z

Thanks for the nudge, listed babashka as the a great example of evaluating Clojure code.