Fork me on GitHub
#joyride
<
2022-12-06
>
pez09:12:42

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 😄.)

borkdude09:12:31

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 :)

borkdude09:12:46

kind of like writing Java for extra perf in Clojure

metal 1
David Yang17:12:17

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

David Yang17:12:28

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

pez18:12:25

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

David Yang20:12:53

thanks, will give it a try

David Yang21:12:10

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))

pez21:12:25

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

David Yang21:12:02

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

David Yang21:12:02

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

David Yang21:12:18

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

David Yang21:12:19

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

pez21:12:17

It updates the workspace settings, right?

David Yang21:12:47

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

David Yang21:12:00

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

David Yang21:12:35

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

pez21:12:43

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. 😃

David Yang22:12:21

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

pez22:12:36

Would be great with a demo!

David Yang03:12:50

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

David Yang03:12:08

Thanks for making these two awesome things!