joyride

2024-02-21T06:49:29.794529Z

How can I write async js functions with joyride?

2024-02-21T06:52:08.372319Z

Got it. I just invoked it at the top level

2024-02-21T06:59:56.697799Z

Another question, how to make joyride.runUserScript take argument? Currently, looks like it only accepts a single path argument.

pez 2024-02-21T08:10:54.161839Z

Iirc it only takes the script path. To call something with arguments you need to use runCode.

2024-02-21T08:11:18.696799Z

right, but that's only available for cljs file

pez 2024-02-21T08:16:00.734159Z

Ah, yes. You’d need to use some cljs file that requires the JS and has functions for calling in to it or something.

pez 2024-02-21T08:16:57.756069Z

I’m not sure what running a script with arguments would mean. Happy to discuss it. Is there prior art in the Emacs world, maybe?

2024-02-21T08:17:54.201079Z

like, "runScript", "moveFiles.js {up|down}",

2024-02-21T08:18:23.477469Z

but I now created two files, moveFilesUp.js, moveFilesDown.js sparately, so problem solved.

pez 2024-02-21T08:18:57.797519Z

Any particular reason you use JavaScript instead of ClojureScript?

2024-02-21T08:19:28.555329Z

I use half half. Now I tend to use js because of code completion.

pez 2024-02-21T08:19:49.743239Z

Yeah, code completion. We should improve that.

2024-02-21T08:20:42.333999Z

You've already done a great job to improve the ecosystem.

🙏 1
pez 2024-02-21T08:23:20.390589Z

There’s an extension for exploring the VS Code API from the nodejs prompt. I used that a while to give myself some poor mans code completion. But then CoPilot came and I tend to get pretty good help there.

2024-02-21T08:23:49.712749Z

Aha, right, copilot.

borkdude 2024-02-21T08:24:18.515609Z

The nrepl server has completion though?

pez 2024-02-21T08:27:42.874669Z

Yes, there is completion from nREPL, sometimes it beats the JS completion, sometimes it doesn’t. And since Calva is stupid about only allowing one REPL, it can get a bit inconvenient to use the Joyride repl.