joyride

Ferdinand Beyer 2022-05-09T07:13:38.486579Z

Hey! Is it necessary for Joyride to “greet” me on start? Whenever I open a project, it opens the “output” panel with output like:

🟢 Joyride VS Code with Clojure. 🚗
User activate script: ~/.config/joyride/scripts/activate.cljs
  No User activate script present
Workspace activate script: .joyride/scripts/activate.cljs
  No Workspace activate script present
This is a bit distracting and I would prefer it to stay in the background

pez 2022-05-09T07:22:15.443829Z

We can consider this. However, it is also a way to inform about what's going on, especially in the beginning of this project when things change around a bit...

pez 2022-05-09T07:23:45.799519Z

I've just push a PR which stops this channel from popping up on every script invokation, and that also gives scripts access to the channel, so that they can show it at will. Here's an example use:

(doto (joyride/get-output-channel)
  (.show true)
  (.append "Writing to the ")
  (.appendLine "Joyride output channel.")
  (.appendLine (str "Joyride extension path: "
                    (-> (joyride/get-extension-context)
                        .-extension
                        .-extensionPath)))
  (.appendLine (str "joyride/*file*: " joyride/*file*))
  (.appendLine (str "Invoked script: " (joyride/get-invoked-script)))
  (.appendLine "🎉"))

🙌 1
Ferdinand Beyer 2022-05-09T07:25:48.648339Z

Thanks! I understand it makes sense for “active users” to see what’s going on. I installed it to give a try one day and did not get around to it yet, so I’m probably a different user group 🙂

pez 2022-05-09T07:28:53.522989Z

I'm thinking this could be used in the following way to implement a ”setting” for if the channel should pop up at start or not: • We add a default User scripts activate.cljs when Joyride is installed. • This script has (.show (joyride/get-output-channel) true) in it. Then you can edit this script to get the behaviour you want. And you would be activated as a Joyrider while doing so. Moahahaha!

🤣 1
Ferdinand Beyer 2022-05-09T07:33:46.791179Z

Sneaky! I like it 🙂

seancorfield 2022-05-09T16:11:24.628419Z

I am getting to the point where I was probably going to ask for a way to turn this off in the next week or so -- glad to see it already being requested and a potential solution being considered! 🙂

Ferdinand Beyer 2022-05-13T13:08:13.009379Z

User activate script: /Users/fbeyer/.config/joyride/scripts/activate.cljs.  Running...
Welcome Joyrider! This is your User activation script speaking.
Tired of this message popping up? It's the script doing it. Edit it away!
Thanks! ❤️

😂 1
Max 2022-05-09T17:13:35.499669Z

Finally getting into joyride! I’m running into an issue with the https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/scripts/activate.cljs though, when I try to evaluate the file I get Could not resolve symbol: joyride/extension-context. I see that there’s a joyride/get-extension-context, but if I try to run that I get:

; Extension 'betterthantomorrow.joyride' CANNOT use API proposal: extensionRuntime.
; Its package.json#enabledApiProposals-property declares: [] but NOT extensionRuntime.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api betterthantomorrow.joyride
Is there a setup step I missed?

pez 2022-05-09T18:33:23.467069Z

The examples are out of sync with what is released, unfortunately. Do you get that error message when you evaluate the call?

Max 2022-05-09T18:34:42.463489Z

https://clojurians.slack.com/archives/C03DPCLCV9N/p1652120691016889?thread_ts=1652120324.988989&cid=C03DPCLCV9N, the issue appears only when trying to print the context. If you just def it there’s no error

Max 2022-05-09T18:34:59.313019Z

Thanks for making Joyride! I’m having fun playing with it

1
pez 2022-05-09T18:50:30.899059Z

Cool. That’s what I was trying to figure out. We should write something about that.

borkdude 2022-05-09T18:18:30.473589Z

@max.r.rothman This var has been renamed on master, the old one is still get-extension-context

borkdude 2022-05-09T18:18:44.988989Z

this will change on the next release though (sorry, still work in progress)

Max 2022-05-09T18:20:14.074959Z

no worries, I saw the WIP warning 😛 Any idea why running get-extension-context is failing?

borkdude 2022-05-09T18:24:51.016889Z

@max.r.rothman It fails if you print the result, just don't print it, but (def x (get-extension-context)) should work. This probably needs some docs though

Max 2022-05-09T18:25:06.320079Z

aaaah, got it, thanks!