Live data from Hacker News

Show HN: Joyride: script VSCode like Emacs but using Clojure

news.ycombinator.com

11–20 of 46 posts

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#11
post #9

That looks promising, but I have a feeling that vscode doesn't offer as much options to hook into the editor as emacs does. E.g., one of the first emacs scripts I wrote added the next number to the current line. It contains something like (insert (number-to-string (setq counter (+ 1 counter)))) Is that kind of thing possible too?

This is possible, but it's a bit more code. Watch the introductory video that PEZ made where he does something similar.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#12
post #9

That looks promising, but I have a feeling that vscode doesn't offer as much options to hook into the editor as emacs does. E.g., one of the first emacs scripts I wrote added the next number to the current line. It contains something like (insert (number-to-string (setq counter (+ 1 counter)))) Is that kind of thing possible too?

Sure it is. You could use a cljs closure over an atom.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#13
post #9

That looks promising, but I have a feeling that vscode doesn't offer as much options to hook into the editor as emacs does. E.g., one of the first emacs scripts I wrote added the next number to the current line. It contains something like (insert (number-to-string (setq counter (+ 1 counter)))) Is that kind of thing possible too?

You mean whether VSCode extensions (1) can insert into the current line; and (2) have state? The answer should be rather obvious, yes.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#14
Wow, really excited by this! The Calva extension gave us a really nice editing and REPL experience for Clojure code. Now we get to interactively configure VSCode with Clojure code which is pretty dope. I used Spacemacs at my old workplace for some time, but never got into making custom configuration. I never got into the emacs lisp library or the syntax peculiarities. Though I suspect the minor syntax differences would be the least problematic to learn. Now I use VSCode Calva and will definitely check out Joyride as it uses SCI and allows me to use the Clojure library that I already know and love.

People who like this should consider sponsoring both Borkdude and PEZ on GitHub. They do amazing work for the Clojure ecosystem.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#15
post #9

That looks promising, but I have a feeling that vscode doesn't offer as much options to hook into the editor as emacs does. E.g., one of the first emacs scripts I wrote added the next number to the current line. It contains something like (insert (number-to-string (setq counter (+ 1 counter)))) Is that kind of thing possible too?

This is possible, but it's a bit more code. Watch the introductory video that PEZ made where he does something similar.

I made a rough example here which insert the increment number at cursor by looking at the last number in the line:

https://gist.github.com/borkdude/08ec3ae2af5963a4a03cd8e0873...

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#17
post #3

As the co-creator here I'd like to add that Joyride is taking the very first baby steps here. We hope a lot of people want to try it and provide feedback to inform our next steps. NB: The video has a target audience of people who know Clojure and its strengths. Especially how the REPL is used. I hope HN will see beyond the parens. =) It should make some sense anyway. Especially if you have some Emacs scripting experi…

Do you ever sleep? Seriously; your productivity is insane.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#18
post #4

Nice! I really wish we could have a CLJS -> JS compiler in pure JS (something like TypeScript) and no need for JVM or JVM libs.

I thought Lumo was this, tough that project might be dead. ShadowCljs is pretty close.

Lumo is one instance of what you can do with self-hosted CLJS and yes, the project is unfortunately dead.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#19
post #13
post #9

That looks promising, but I have a feeling that vscode doesn't offer as much options to hook into the editor as emacs does. E.g., one of the first emacs scripts I wrote added the next number to the current line. It contains something like (insert (number-to-string (setq counter (+ 1 counter)))) Is that kind of thing possible too?

You mean whether VSCode extensions (1) can insert into the current line; and (2) have state? The answer should be rather obvious, yes.

I assumed the point is whether you can do this from the repl? This is something Emacs is good at, but VSCode doesn't seem to be; in Emacs, you can do something like M-: (insert "FRED") RET and you'll see FRED appear in the current buffer. For good or (more rarely) for ill, the repl runs in the same context as the editing environment. You can use this to interactively develop extensions or just drive the editor from code as a one-off.

Re: Show HN: Joyride: script VSCode like Emacs but using Clojure

#20
post #3

As the co-creator here I'd like to add that Joyride is taking the very first baby steps here. We hope a lot of people want to try it and provide feedback to inform our next steps. NB: The video has a target audience of people who know Clojure and its strengths. Especially how the REPL is used. I hope HN will see beyond the parens. =) It should make some sense anyway. Especially if you have some Emacs scripting experi…

Do you ever sleep? Seriously; your productivity is insane.

Tbh, the last nights have been less about sleep and more about hacking on Joyride. =)

But usually I do get sleep. The question we should ask is if borkdude sleeps? He's doing about 100X as much as I do. Maybe there are hundreds of borkdudes.

Post reply on HN