joyride

Stephan Renatus 2023-02-09T19:28:04.856769Z

clojurescript beginner question — how would I get the names of my terminal windows in joyride? vscode/window.terminals starts with

#js {:name "left", :processId #<Promise[~]>, ....
and I’d like to retrieve that name, like, of all my terminal windows. I’ve tried (map #(.name %) vscode/window.terminals) but it gives me
; Function.prototype.apply was called on left, which is a string and not a function
I’m a bit lost 😳

borkdude 2023-02-09T19:31:52.182349Z

@stephan.renatus You're close: (map #(.-name %) ...)

💡 1
borkdude 2023-02-09T19:32:24.694909Z

You can also convert the JS value to CLJS first and then process it

borkdude 2023-02-09T19:32:46.726139Z

with #(js->clj % :keywordize-keys true)

Stephan Renatus 2023-02-09T19:33:02.238199Z

thank you!

Stephan Renatus 2023-02-09T19:33:34.972229Z

lol now that I know the answer it was easy to find https://cljs.github.io/api/syntax/dot 😄

Stephan Renatus 2023-02-09T19:34:10.882929Z

> (.foo bar) => bar.foo() and that’s why I got the apply-of-string error.

👍 2
fs42 2023-02-09T22:49:45.235419Z

Would it make sense to think about a "joyride" for Logseq? Could it reuse much of the code?

borkdude 2023-02-09T23:10:55.199049Z

@fs42 fyi: https://github.com/logseq/nbb-logseq

❤️ 1
1
1