joyride

pez 2022-12-06T09:49:42.311579Z

New release out, dear Joyriders, v0.0.27: • https://github.com/BetterThanTomorrow/joyride/issues/115`src`https://github.com/BetterThanTomorrow/joyride/issues/115https://github.com/BetterThanTomorrow/joyride/issues/117 These are quite cool and changes, if I may say so myself. • Now you can put your library code in src and reserve scripts for, well, scripts, making the Scripts menus easier to navigate as your scripts library grows. No more z_joylib prefixing needed, and still littering down those menus. See Joyride Examples at the repo for how the new structure can look like. • It turns out you have all this time been able to script using JavaScript. But now that's official and to suger it some we have made it so that you can reload your JavaScript code without restarting the VS Code window. You can actually hack pretty interactively with JavaScript this way. Maybe not so compelling, generally. But if you are going to solve Advent of Code problems with the help of ChatGPT, for instance, then JavaScript will work much better. See https://github.com/PEZ/joyride-aoc-2022 for a setup of using JavaScript to solve AOC problems. (I've not automated asking ChatGPT things and pasting it's answers, but I am considering that too 😄.)

borkdude 2022-12-06T09:50:31.012729Z

And you can create functions in JavaScript if you need extra performance that SCI can't live up to currently and use them from SCI :)

borkdude 2022-12-06T09:50:46.908449Z

kind of like writing Java for extra perf in Clojure

1
2022-12-06T17:37:17.455459Z

hey all - still trying to figure out a way to de-emphasize comment blocks - curious if there’s a way to toggle opacity of commentFormType live from joyride? (basicallly toggle the settings calva.highlight.commentFormStyle

2022-12-06T17:37:28.290629Z

would love to have a shortcut that let’s me set opacity to 1 or 0.1

pez 2022-12-06T18:05:25.736219Z

You can update settings via the vscode api. And I think those settings are css. But I could be confusing that with something else.

2022-12-06T20:46:53.164499Z

thanks, will give it a try

2022-12-06T21:15:10.636039Z

I’m trying something like this but I keep getting maximum call stack exceeded - any ideas:

(defn toggle-comment-opacity []
  (. (.getConfiguration vscode/workspace) update
     "calva.highlight.commentFormStyle.opacity"
     0.5
     true))

pez 2022-12-06T21:16:25.994719Z

Does the setting change? I think the error is something with when Joyride tries to print the return value.

2022-12-06T21:19:02.824619Z

I think it did one time - I’m not able to do it again though, maybe I need to have settings.json closed when I do it

2022-12-06T21:20:02.056059Z

no it’s not changing anymore - I thought it did one time but can’t seem to get it to do it right now

2022-12-06T21:21:18.503909Z

oh wait - it does work if I do it this way (which makes sense)

2022-12-06T21:21:19.326019Z

(.update (.getConfiguration vscode/workspace) “calva.highlight.commentFormStyle” #js {:fontStyle “italic” :opacity “1”} true)

pez 2022-12-06T21:24:54.822489Z

Cool!

pez 2022-12-06T21:28:17.490229Z

It updates the workspace settings, right?

2022-12-06T21:31:47.378269Z

I think if you set the final arg to true it updates the user settings

2022-12-06T21:32:00.431269Z

I need to figure out how to reload the windows - it doesn’t seem to run it consistenly every time

2022-12-06T21:32:35.049679Z

I need to trigger some kind of update - seems like almost any user action causes it to reparse that file but just setting the config doesn’t always do it

pez 2022-12-06T21:45:43.487689Z

Yeah, it probably is a bit cool about re-rendering. See if editing the file and then undoing the edit works. Not saying that's a solution, just that it might work. 😃

2022-12-06T22:26:21.799989Z

This is awesome! My eMacs cofounder said it’s the first thing that’s made him VS Code envious :) - de emphasizing comments is huge for improving cognitive scan ability

pez 2022-12-06T22:28:36.485459Z

Would be great with a demo!

2022-12-07T03:46:50.404939Z

Here’s a loom of how it works - I just press ctrl-alt-cmd-c to toggle comments being a bit darker. Makes scanning a file and seeing key symbols much easier: https://www.loom.com/share/5258a750bdc14a41a2264d4fbf2de425

2022-12-07T03:47:08.471839Z

Thanks for making these two awesome things!