joyride

Leaf Garland 2022-04-28T01:51:12.465699Z

@leafgarland has joined the channel

lemuel 2022-04-28T04:23:05.027499Z

@mail188 has joined the channel

Daniel Slutsky 2022-04-28T04:54:20.735699Z

@daslu has joined the channel

2022-04-28T06:26:20.576199Z

2022-04-28T06:34:12.921539Z

codeasone 2022-04-28T06:50:45.270549Z

@codeasone has joined the channel

pez 2022-04-28T06:51:58.220929Z

Joyride v0.0.2 just released. (Some fixes, haha). Also, Joyride is now available on Open-VSX. (So that it can be installed by various VS Code clones, including Gitpod, where I think it will come in handy for Calva's Getting Started REPL. https://open-vsx.org/extension/betterthantomorrow/joyride

borkdude 2022-04-28T07:00:30.389189Z

I think the nrepl console logging can be turned off as well

borkdude 2022-04-28T07:01:09.161849Z

Do we need to enable the GitHub plugin in this channel? People can subscribe to issues on GitHub if they want to see those?

pez 2022-04-28T07:03:24.790159Z

I guess not.

borkdude 2022-04-28T07:04:01.308809Z

Either way is fine with me but some people may find it too noisy

pez 2022-04-28T07:04:01.626649Z

When I added it I was still thinking we would be preparing the release a bit more than we did. 😃

borkdude 2022-04-28T07:04:45.216639Z

Even then, I'm watching the repo so I'm now getting notified three times :)

pez 2022-04-28T07:05:03.688509Z

The nrepl console logging is default off now. And there's a command for enabling it.

pez 2022-04-28T07:06:18.312589Z

Do you see these messages?

borkdude 2022-04-28T07:08:07.178789Z

Yes

pez 2022-04-28T07:08:19.912869Z

Funny. But then you know 😃

borkdude 2022-04-28T07:08:39.987959Z

Know what?

pez 2022-04-28T07:09:48.713949Z

That I unsubscribed to github updates. But now I deleted the messages.

pez 2022-04-28T07:11:09.485049Z

I think nrepl message logging enabledment should be a setting instead of commands. But commands were easiest, so will have to do for now.

borkdude 2022-04-28T07:11:29.947969Z

Sure

pez 2022-04-28T07:15:36.698599Z

Dear Joyriders, Joyride has the potential to reach outside the Clojure community. It is a hope we have for it that it will become a vehicle for Clojure #community-development. Please consider giving it a solid foundation of 5-star ratings. Non-clojurians might struggle a bit with the concepts at first and some might blame Joyride in that situation, I fear. Here is where you can read and submit reviews: https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.joyride&ssr=false#review-details

borkdude 2022-04-28T08:45:52.225839Z

Someone posted joyride on Hacker News: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=joyride%20clojure&sort=byDate&type=all Feel free to upvote it! 🤩

Daniel Slutsky 2022-04-28T08:48:50.804139Z

We're looking into organizing a Joyride study session at the #visual-tools group: https://clojurians.slack.com/archives/C02V9TL2G3V/p1651130654080509 Thoughts and comments would help.

2
borkdude 2022-04-28T08:59:01.566239Z

@daslu It might be interesting to play around with vscode/window.createWebviewPanel - perhaps even scittle etc could be used inside there

Daniel Slutsky 2022-04-28T09:05:13.984709Z

Fantastic. Yes, these are the kinds of hopes I am having for the Scittle-related tool, so it is encouraging to hear that you think it is worth trying.

borkdude 2022-04-28T09:10:09.290649Z

See below in the channel

👍 1
borkdude 2022-04-28T09:09:57.320689Z

Here is a demo of a webview with scittle 🎉

(ns scittle-demo
  (:require ["fs" :as fs]
            ["path" :as path]
            ["vscode" :as vscode]))

(def panel
  (vscode/window.createWebviewPanel "Hello Scittle!" "Reagent"
                                    vscode/ViewColumn.One
                                    #js {:enableScripts true}))

(def html (fs/readFileSync (path/join vscode/workspace.rootPath ".joyride" "scripts" "page.html")))

(set! (.. panel -webview -html) (str html))

🤯 1
Daniel Slutsky 2022-04-28T09:13:27.519779Z

This is huge, opening so many possibilities. I'll try this practice with the clay scittle tool during the weekend. 🙏

1
borkdude 2022-04-28T09:19:11.045619Z

I committed the example here now: https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/scripts/webview/example.cljs You can open the examples directory directly in vscode and then choose Joyride: run workspace script

🙏 1
borkdude 2022-04-28T09:19:33.475429Z

@pez I intend to keep the examples directory structured and clean with easy to find examples which you can open in your editor (the playground directory seems a bit messy and seems to be for development?)

pez 2022-04-28T10:25:00.077589Z

Yeah, I haven't moved my example from the playground because I'm not satisfied with it yet.

pez 2022-04-28T10:26:19.803299Z

BTW. There's a debug launch target which opens up the dev extension host with the playground folder. In case you weren't aware. I should document that.

pez 2022-04-28T10:27:58.225079Z

Your demo blows my mind, @borkdude!

littleli 2022-04-28T09:33:14.360619Z

@ales.najmann has joined the channel

🎉 2
leifericf 2022-04-28T12:39:13.073489Z

@leif.eric.fredheim has joined the channel

leifericf 2022-04-28T12:41:51.579979Z

Please help spread the word about Joyride on LinkedIn 🙂

👍 1
nbardiuk 2022-04-28T13:16:20.319009Z

@nbardiuk has joined the channel

🎉 1
Max 2022-04-28T13:29:27.799049Z

@max.r.rothman has joined the channel

Cora (she/her) 2022-04-28T15:09:09.520499Z

ooooh I just realized I could use joyride to change my fonts and font sizes based on needs in different scenarios

💡 1
Cora (she/her) 2022-04-28T15:09:24.488309Z

like I pair with someone with a much smaller screen and need to bump up the size when I pair with him

Cora (she/her) 2022-04-28T15:09:33.586349Z

and I use a certain font on macos but another on linux

borkdude 2022-04-28T15:12:10.729989Z

🎉

borkdude 2022-04-28T15:12:43.950909Z

@corasaurus-hex I'd love to see a PR with an example of that into the examples dir

Cora (she/her) 2022-04-28T15:14:14.844039Z

cooool

pez 2022-04-28T15:16:12.843159Z

Awesome usecase!

borkdude 2022-04-28T15:46:49.315989Z

@corasaurus-hex It appears to me that it's not possible to set the font size... or maybe it is possibly by programmatically changing a settings.json file

Cora (she/her) 2022-04-28T15:47:01.391679Z

maaaaybe

borkdude 2022-04-28T16:07:13.542199Z

@corasaurus-hex sorry, I beat you to it: https://twitter.com/borkdude/status/1519709769157775360

👀 1
1
Cora (she/her) 2022-04-28T16:53:30.089729Z

oooooh!!

Cora (she/her) 2022-04-28T16:53:39.673899Z

thanks!!

Cora (she/her) 2022-04-28T16:54:00.717839Z

can you store functions for later use so you can call them from anywhere?

Cora (she/her) 2022-04-28T16:54:13.699339Z

like from the in-editor joyride repl

borkdude 2022-04-28T16:54:18.557359Z

yes, just add them in your scripts directory and require them

Cora (she/her) 2022-04-28T16:54:21.577649Z

cooool

Cora (she/her) 2022-04-28T17:08:43.699099Z

prediction: there will eventually be a joyride stdlib

3
pez 2022-04-28T17:17:03.358199Z

Yes, if we dog food this a while, we might come up with something good in that area. I guess we have a lot of stuff in Calva utilities.ts that are candidates.

👍 1
leifericf 2022-04-28T17:28:12.680099Z

I wonder if something like Emacs’ “Org Mode” could be implemented only using Joyride 😅

Cora (she/her) 2022-04-28T18:17:13.508299Z

oh dear

😂 1
borkdude 2022-04-28T18:18:35.042159Z

@leif.eric.fredheim I think you maybe could but I don't know if you should :) I think it makes a lot of sense that when you implement an org-mode extension, that you export functions so you can control it from joyride

👍 1
💡 1
seancorfield 2022-04-28T18:44:23.839349Z

Has anyone created an example script with joyride driving some API inside Calva? I don't know much about VS Code's APIs around extensions so I'm looking for some "starter code" for me to try to drive some of Clover... Like if a joyride script could cause a code snippet to be eval'd into the REPL, for example 🙂

👍 1
seancorfield 2022-04-28T18:45:03.604569Z

(if not, I may try to dig into this on Friday night/Saturday while my wife is away judging a cat show)

4
bringe 2022-04-28T19:03:56.543099Z

Do you have a cat in the show?

seancorfield 2022-04-28T19:39:29.096969Z

Not this show. She's just flying up to Seattle on her own. Our cats cannot compete on days she is judging. We took our show cat to Las Vegas at the beginning of April (Jay judged Saturday morning, he competed Saturday afternoon and Sunday).

bringe 2022-04-28T20:56:29.339329Z

Awesome! What’s he look like? I’m curious now 😄

seancorfield 2022-04-28T21:09:42.005579Z

I wonder if we have any public photos of him...

seancorfield 2022-04-28T21:21:10.717369Z

https://photos.app.goo.gl/gZM2duvVjEPQmXDP6 -- not really a very good photo but it's recent 🙂

seancorfield 2022-04-28T21:22:19.432749Z

He's a retired stud cat at this point, but he was an international winning kitten and young adult about six years ago. Then he went off to Texas to breed, now he's back as an "alter" (neutered) pet/show cat 🙂

seancorfield 2022-04-28T21:24:21.940679Z

That's a much better photo of him as a youngster -- with his Supreme Grand Champion celebration cake.

seancorfield 2022-04-28T21:24:49.918779Z

(it's two different photos blended together)

seancorfield 2022-04-28T21:25:13.629259Z

Leopardcats Tao Tao of Bangles

bringe 2022-04-28T23:38:15.502269Z

Wow, he’s beautiful!

bringe 2022-04-28T23:39:06.546779Z

We’ve got a couple of kitties. A female muted tortie and a large long-haired male (I think a Maine Coon mix).

seancorfield 2022-04-28T23:42:42.591339Z

We used to breed as well as show -- all Bengals -- but we stopped breeding about 11 years ago now and so we have a mostly aged population left, including two girls that are over 19. Tao came from Germany originally (Leopardcats cattery, we're Bangles Bengals) as part of our agreement with a friend in Texas to show her cats, because she loved breeding but hated showing (and we loved showing but had stopped breeding).

seancorfield 2022-04-28T23:44:15.335309Z

We work with a couple of purebred rescue groups as well, fostering cats for rehoming -- so we get them from shelters and the rescue groups find new "forever homes" for them. We've fostered a couple of Savannahs and a Bengal so far, since the middle of last year.

bringe 2022-04-28T23:44:52.590529Z

Oh interesting. I’ve watched a doc on cat showing but that’s about as much as I know about it. That sounds like fun, and a good deed.

bringe 2022-04-28T23:45:03.608809Z

The fostering

seancorfield 2022-04-28T23:47:20.158179Z

Well, now we have a lot fewer cats of our own, we have space to foster others and still keep them all isolated from each other. We used to have to keep each intact (breeding) male in his own "space" and all of those spaces have freed up. And we have three big outdoor runs, fully-enclosed, attached to indoor facilities -- and everyone comes in at night (mostly to keep the noise down for our neighbors, since Bengals can be very loud and vocal).

bringe 2022-04-28T23:54:37.697469Z

Oh wow

bringe 2022-04-28T23:54:43.711359Z

They’ve got the life over there

seancorfield 2022-04-29T00:04:00.735029Z

They also have one of these to run on: https://onefastcat.com/products/cat-exercise-wheel?msclkid=ce8ddc71c74f11ec9ae1d9872d090fc7&variant=31140866523159 🙂

bringe 2022-04-29T00:04:42.486989Z

Oh nice. Got their own gym too. 😄

borkdude 2022-04-28T18:46:33.501679Z

@seancorfield this requires Calva to export functions that you can use from its extension

borkdude 2022-04-28T18:47:30.988719Z

Currently these are the only two things Calva exports:

borkdude 2022-04-28T19:01:40.643029Z

So currently it's not so interesting what you can do with Calva-specific things from joyride, it needs some API love there

borkdude 2022-04-28T19:02:14.660869Z

But perhaps if you're feeling audacious you could run Calva in develop mode, export things and try them out in joyride and then suggest them in a PR for Calva ;)

💡 1
pez 2022-04-28T19:06:01.080139Z

I think what @seancorfield wants to do is quite possible without the API. I'll make an example.

pez 2022-04-28T19:07:23.930839Z

As far as Calva is concerned. I haven't looked closely enough at Clover to know if the necessary glue is there.

zimablue 2022-04-28T19:31:15.903089Z

thanks for this! I will install this week and change my life

zimablue 2022-04-28T19:31:33.781089Z

stupid question: why does it use SCI?

borkdude 2022-04-28T19:33:01.747019Z

Do you mean, opposed to self-hosted CLJS or, why does it use SCI at all?

zimablue 2022-04-28T19:33:11.299169Z

yeah instead of cljs

borkdude 2022-04-28T19:38:53.476869Z

I have more experience with making scripting in CLJS work with SCI than self-hosted CLJS. SCI works with advanced compilation, making the extension quite small (200kb). SCI is pretty flexible and can be adapted to various environments, e.g. in #nbb it is used to create a scripting environment on Node.js with full support for ES6 modules. The startup time is better with SCI (because the JS bundle is much smaller). But feel free to give self-hosted a try and see what it yields, it would be pretty interesting to compare both approaches.

zimablue 2022-04-28T19:39:29.184949Z

it wasn't a criticism I am far too ignorant for it to be that, more for my own education

zimablue 2022-04-28T19:39:32.785999Z

thanks for your answer

borkdude 2022-04-28T19:41:01.211609Z

Another thing is that macros are first class in SCI, they run similar to how Clojure on the JVM works, without limitations.

zimablue 2022-04-28T19:41:47.790349Z

is clojurescript still limited in this way if you ship the bootstrapped compiler like you now can?

borkdude 2022-04-28T19:44:46.203029Z

$ plk
ClojureScript 1.10.914
cljs.user=> (defmacro def-something [x] `(def ~x))
#'cljs.user/def-something
cljs.user=> (def-something my-var)
                           ^
WARNING: Use of undeclared Var cljs.user/my-var at line 1
(def nil)
cljs.user=> my-var
            ^
WARNING: Use of undeclared Var cljs.user/my-var at line 1
nil

borkdude 2022-04-28T19:45:22.119149Z

self-hosted CLJS is designed to compile CLJS code within a JS environment, but that CLJS still has the same limitations as JVM-compiled CLJS

zimablue 2022-04-28T19:55:41.353879Z

this blog post seems to imply that bootstrapped cljs can do macros, I'm slightly confused now: https://blog.fikesfarm.com/posts/2016-01-05-clojurescript-macros-calling-functions.html

borkdude 2022-04-28T19:58:55.290669Z

It can do macros, but the way how you write macros is specific to CLJS.

borkdude 2022-04-28T19:59:16.468379Z

E.g. the above macro I showed you has to live in .clj file to properly work for some reason

zimablue 2022-04-28T20:00:52.630439Z

so bootstrapped cljs => first-class macros but now your code is boostrapped-cljs only, SCI => first-class macros + vanilla clj/cljs compatible code? (SCI subset of clj/s)?

borkdude 2022-04-28T20:16:50.474039Z

sounds about right, but again I'm not an export on self-hosted CLJS. One thing that is better about it is performance since compiled code is generally more performant than interpreted.

seancorfield 2022-04-28T19:47:18.291899Z

OK, trying out joyride for the first time with Calva. I started the Joyride nREPL Server. How exactly do I connect Calva to that? (I've never used Calva's nREPL stuff)

borkdude 2022-04-28T19:47:59.201549Z

@seancorfield the way I do it currently: connect to repl in project, nbb, then enter the port.

borkdude 2022-04-28T19:48:19.945289Z

@pez may be able to explain why you need to select nbb and enter the port although there is an .nrepl-port file :)

seancorfield 2022-04-28T19:48:41.081049Z

I don't have nbb installed (I don't have node installed, at least not intentionally)

😅 1
leifericf 2022-04-28T19:54:52.020249Z

LOL at the “not intentionally” part 😂

borkdude 2022-04-28T19:49:03.297939Z

you don't need nbb installed, but the nREPL server in joyride is similar to nbb (so Calva will work with that)

borkdude 2022-04-28T19:49:32.740829Z

Calva will probably get a joyride option sooner or later

👍 1
pez 2022-04-28T19:50:00.119919Z

Probably sooner. The Ux right now is horrible.

👍 1
seancorfield 2022-04-28T19:50:17.726079Z

And how do I discover the port that the joyride server is running on? The popup went away ages ago...

borkdude 2022-04-28T19:50:56.457869Z

🙈

pez 2022-04-28T19:51:19.312619Z

That will also be fixed soon. But for now you can click the icon where the popup came from and it will be shown again.

seancorfield 2022-04-28T19:51:31.784289Z

(the joyride output panel doesn't display that information 🙂 )

borkdude 2022-04-28T19:51:37.762629Z

or open the .nrepl-port file that was created on disk

pez 2022-04-28T19:51:38.295309Z

Also .joyride/.nrepl-port

borkdude 2022-04-28T19:52:40.561949Z

this is awful and will be improved. thanks for trying Sean :)

seancorfield 2022-04-28T19:53:16.132599Z

There's no .nrepl-port file.

pez 2022-04-28T19:53:24.962869Z

> the joyride output panel doesn't display that information That's a thing we haven't properly discussed in the Joyride team, @borkdude likes to popup messages. 😃 But the real problem here is that Calva isn't looking for an nrepl-port correctly.

seancorfield 2022-04-28T19:53:25.828279Z

Oh, in .joyride...

pez 2022-04-28T19:53:53.887949Z

Yeah, we don't want to overwrite any port file created by the project repl.

seancorfield 2022-04-28T19:55:49.030749Z

OK, and what Calva command do I use to eval code into that nREPL session?

pez 2022-04-28T19:56:23.817209Z

But shown popup messages are also here:

seancorfield 2022-04-28T19:56:25.755569Z

I tried "evaluate current block of code" and Calva says there's no REPL connected.

pez 2022-04-28T19:56:48.461619Z

Calva has no such command. That is probably Clover.

seancorfield 2022-04-28T19:56:50.921189Z

(even tho' I have a REPL icon at the bottom that says it's connected to joyride)

pez 2022-04-28T19:57:24.399439Z

Evaluate Current Form or Selection ctrl+enter

seancorfield 2022-04-28T19:57:51.445949Z

Oops, misread the pallette... yeah, got it now...

borkdude 2022-04-28T19:58:01.246919Z

I use:

{
        "key": "ctrl+x ctrl+e",
        "command": "calva.evaluateSelection",
        "when": "calva:connected"
    },
(same keybindings as in emacs :))

pez 2022-04-28T19:58:13.776149Z

I can recommend Fire up the Getting Started REPL.

seancorfield 2022-04-28T19:58:35.269399Z

😛 I'm not using nREPL for anything other than joyride

seancorfield 2022-04-28T19:58:49.477879Z

I have confirmed that Clover exports nothing 😞

pez 2022-04-28T19:59:41.470479Z

But it seems to have the command evaluate current block of code , which you can execute via Joyride.

seancorfield 2022-04-28T20:01:05.213019Z

Ah, interesting... and of course I could run a task, and nearly all my VS Code/Clover stuff is done via tasks (defined in Clover's config.cljs which also uses sci)...

seancorfield 2022-04-28T20:01:11.927739Z

Feels a bit inception-ish...

pez 2022-04-28T20:05:55.729689Z

I think @mauricio.szabo is much closer to expose a proper API than we are with Calva. Since there already is a SCI API. But until you have an API, you can use the commands.

(vscode/commands.executeCommand "paredit.backwardUpSexp")
Executes Calva's command for backing the cursor up out of a list.

pez 2022-04-28T20:13:44.917429Z

Check the contributions tab of Clover to see a list of its commands. You'll have to check the source code to know what arguments they accept, though.

seancorfield 2022-04-28T20:20:21.191269Z

I mostly have those overridden with tasks defined in my config.cljs but knowing I can invoke those tasks easily is useful. That also means I can use the task-based API for Clover to be able to send text from Joyride to Clover's Socket REPL 🙂

seancorfield 2022-04-28T20:23:07.223079Z

For example:

{
        "key": "ctrl+; shift+d",
        "command": "workbench.action.tasks.runTask",
        "args": "Clover: Tap def var"
    },
But I guess I'd need to know how to invoke runTask and not only tell it what to task to run but be able to pass additional arguments to that task...

pez 2022-04-28T20:24:33.736969Z

FYI: I think you should try to find another name than tasks describing these. Tasks has a specific meaning in VS Code.

pez 2022-04-28T20:26:08.276069Z

Clover tasks or something. 😃

seancorfield 2022-04-28T20:26:23.004949Z

Not sure what you mean -- that is the API that Clover exposes to be able to run functions in config.cljs

seancorfield 2022-04-28T20:26:46.734819Z

That runs tap-def-var in config.cljs

pez 2022-04-28T20:27:07.670549Z

Yeah, but when I have been checking out your config repo it has confused me a lot because I can't find any tasks there (I was looking for VS Code tasks).

seancorfield 2022-04-28T20:27:28.489069Z

Talk to @mauricio.szabo about that 🙂

seancorfield 2022-04-28T20:28:01.348799Z

The functions in config.cljs get exposed to VS Code as tasks -- hence the workbench.action.tasks.runTask command being invoked.

pez 2022-04-28T20:28:26.076249Z

Haha, yeah, but you can help the reader of your config repo as well. Maybe just establish early what task refer to in the rest of the text.

seancorfield 2022-04-28T20:28:26.292869Z

They are dynamically added to VS Code as "tasks" as I understand it.

seancorfield 2022-04-28T20:28:53.122979Z

😛 The repo assumes folks are using Clover and have read that repo's docs 🙂

pez 2022-04-28T20:28:59.141939Z

Oh, maybe they are. I don't see why they would be, though.

mauricio.szabo 2022-04-28T20:29:03.583759Z

@pez tasks in Clover are LITERALLY VSCode tasks 😄

😮 1
pez 2022-04-28T20:29:20.596839Z

Roger!

pez 2022-04-28T20:29:26.264849Z

TIL.

seancorfield 2022-04-28T20:29:27.557519Z

@mauricio.szabo Can I pass additional arguments to those tasks?

mauricio.szabo 2022-04-28T20:29:28.430449Z

They need to be because it's the only API that VSCode offers that allows definition of custom commands and for these commands to have a keystroke

mauricio.szabo 2022-04-28T20:29:53.453189Z

@seancorfield not right now, but I hope by next week you'll be able to 🙂

seancorfield 2022-04-28T20:30:23.948569Z

Or perhaps have Clover export the editor abstraction so it can be called from joyride?

seancorfield 2022-04-28T20:30:41.918129Z

(so joyride could call editor/eval-and-render, for example)

pez 2022-04-28T20:30:59.620659Z

Hmmm, can you show an example of such a custom command, @mauricio.szabo? Could be something Joyride should be doing as well.

mauricio.szabo 2022-04-28T20:31:03.147259Z

I need to study how, and if, VSCode tasks allow for custom commands. A second option could be to define a mutable var that I can export from Clover

pez 2022-04-28T20:32:07.001079Z

> Or perhaps have Clover export the editor abstraction so it can be called from joyride? Yes, much better to expose this in the extension API.

mauricio.szabo 2022-04-28T20:32:24.392819Z

@pez sure, look at the README: https://gitlab.com/clj-editors/clover#custom-commands. TL;DR; - Clover is customizable with SCI, so you can defn something with no arguments and it'll become a Clover task

seancorfield 2022-04-28T20:32:36.985919Z

Exporting that editor abstraction somehow would be super, super helpful...

seancorfield 2022-04-28T20:33:03.444179Z

(I know you had to expose it via that fancy p/let macro but...)

mauricio.szabo 2022-04-28T20:33:10.720669Z

@seancorfield will look at it for sure! 👍

pez 2022-04-28T20:34:03.554299Z

Calva will do so as well, but as I said before, we're not really close to being able to. Whereas Clover's API is already defined.

pez 2022-04-28T20:38:04.544579Z

Also, Calva has a lot of commands. 😃

pez 2022-04-28T20:53:51.629689Z

@mauricio.szabo I don't see anything on that page that couldn't be achieved by Clover having a command, say, clover.run and let users bind shortcuts to that. Like we do in Joyride with the joyride.runWorkspaceScript command. Here are my current bindings:

{
        "key": "cmd+f1",
        "command": "joyride.runWorkspaceScript",
        "args": "ignore_form.cljs"
    },
    {
        "key": "cmd+alt+,",
        "command": "joyride.runWorkspaceScript",
        "args": {
            "script": "ignore_form.cljs",
            "args": [
                1,
                2,
                3
            ]
        }
    },
    {
        "key": "cmd+alt+.",
        "command": "joyride.runWorkspaceScript"
    },
The cmd+alt+, one is just a test, I received that map as the argument when I tested it. However, there is probably still something I don't understand about Clover tasks. 😃

mauricio.szabo 2022-04-28T21:35:56.780319Z

How do I run this "custom command" with the command pallete? Do I have to type the args?

mauricio.szabo 2022-04-28T21:37:19.304939Z

(There's always the possibility that I didn't know about "args" params on keybindings too... 😄)

pez 2022-04-28T21:45:24.441909Z

That's probably where the solutions differ... This binding of the command does not appear in the command palette. Only the last one will. On that one I haven't configured arguments, which will make Joyride pop up a menu with the scripts found.

seancorfield 2022-04-28T21:49:29.300169Z

When you say "I received that map as the argument when I tested it." -- how exactly are the arguments passed into the command script?

seancorfield 2022-04-28T21:50:30.549819Z

@mauricio.szabo keybindings for Clover tasks:

{
        "key": "ctrl+; shift+d",
        "command": "workbench.action.tasks.runTask",
        "args": "Clover: Tap def var"
    },

pez 2022-04-28T22:03:07.419519Z

VS Code calls the command, which is a function in Joyride and passes whatever arguments are specified in args. In that experimental case, a JSON object. So if I catch it in the function and then press cmd+alt+, , and then inspect:

pez 2022-04-28T19:58:51.510679Z

You should be able to connect Clover to Joyride.

seancorfield 2022-04-28T19:59:36.454009Z

True, but its nREPL support is less solid than Calva's 😆

mauricio.szabo 2022-04-28T20:07:57.035049Z

For now omnious soundtrack starts 😄

🎸 1
borkdude 2022-04-28T19:59:44.828819Z

We know you are a proud non-nREPL user Sean ;)

pez 2022-04-28T19:59:51.336779Z

lolz

mauricio.szabo 2022-04-28T20:12:21.999609Z

> I have confirmed that Clover exports nothing 😞 That's sad... also, I have no idea what you folks are talking about 😄. How do I export things on the plug-in? I'm really open to export anything that I can, the same as I do in Chlorine, to have a fully customizable experience 👍

borkdude 2022-04-28T20:14:04.956769Z

@mauricio.szabo If I'm not mistaking this is what Calva currently exports: https://github.com/BetterThanTomorrow/calva/blob/c5fc70b534febb505166504d9c9941a7e9435a19/src/extension.ts#L645

borkdude 2022-04-28T20:14:25.233159Z

I think you can export any function there and you can then use this from joyride

pez 2022-04-28T20:15:19.726269Z

@mauricio.szabo Return a map at the end of activate and that will be Clover's VS Code Extension API.

1
pez 2022-04-28T20:16:08.735679Z

We should probably figure what API Joyride should return there. 😃

seancorfield 2022-04-28T20:34:03.597429Z

So joyride scripts could run joyride's own functions? 😱 🤯

🤯 2
pez 2022-04-28T20:34:35.101089Z

Yes. That would let us relax about a lot of feature requests, I think.

😆 1
mauricio.szabo 2022-04-28T21:33:52.251229Z

Well, that was why I added customization on Clover/Chlorine too 😄

1
borkdude 2022-04-28T20:52:11.906949Z

@seancorfield if you're looking for some stuff to play with, here are some examples: https://github.com/BetterThanTomorrow/joyride/tree/master/examples/.joyride/scripts (I'm figuring out stuff still and any time I learn something, I try to put an example there)

seancorfield 2022-04-28T21:08:31.031449Z

Yeah, that's where I started...

emccue 2022-04-28T22:39:13.334409Z

it feels like SCI has started a wild cascade

2
3