Calva REPL does not work properly from second time on

Hello All,

I was thrilled to use Calva in my VSCode, when I start Joyride for this first time, everything works fine, from the second time on in the project when I close it and reopen it even fundamental things like Math/PI does not work as shown:

I did toggle between clj and cljs, but still it won’t. Any help would be useful.

Joyride is powered by sci which is really ClojureScript, not Clojure, so I wouldn’t expect it to know about the Java Math class. You would need to jack-in to a Clojure REPL instead of Joyride, but you will probably also need to structure your project so your .clj files are in a src folder because that’s the usual convention.

1 Like

Hi there! Calva and Joyride maintainer here. Super happy you are exploring Joyride!

As @seancorfield notes, Math/PI is not a thing in Joyride, which is running in the node instance of VS Code. JavaScript ”things” are reached via the js namespace. js/Math.PI should work, in this case.

I wonder about what you mean ”start the first time" and ”second time”. Can you describe the steps you take? (It does look to be working, judging from the screenshot, so maybe it is just the expectations of Math/PI that bit you here.)

Also curious if hacking VS Code is your goal, or if Joyride is more of a tool to explore Clojure? Or something else?

2 Likes

I don’t know what I did exactly, I will explore. May be my mind thought for the first time Math/PI worked.

It’s a tool to explore Clojure. I have started to learn Clojure after many failed starts and discovered this excellent stuff.