nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
borkdude 2020-12-14T14:34:32.067300Z

https://blog.djy.io/alda-and-the-nrepl-protocol/

❤️ 1
flowthing 2020-12-14T15:35:13.067500Z

Certainly matches my experience of implementing an nREPL client. I did appreciate how easy it was. (Wonder why they're moving away from Clojure for Alda v2, though.)

borkdude 2020-12-14T15:44:11.067700Z

I think he could have used GraalVM + Clojure to make things run fast for startup.

borkdude 2020-12-14T15:44:39.067900Z

@dave

dave 2020-12-14T15:51:01.068500Z

graalvm + clojure was definitely on my radar at the time when i was making the decision (~2 years ago or so), but it's not something i spent a whole lot of time looking into the most important factor for me was that whatever i chose, it had to be able to create 100% static, cross-platform executables for linux, macos and windows. of the things i tried, go seemed to be the best at doing that

flowthing 2020-12-14T15:51:56.068700Z

Makes sense — Go definitely fits the bill there. :thumbsup::skin-tone-2:

flowthing 2020-12-14T15:52:52.068900Z

I guess GraalVM can do that too these days?

dave 2020-12-14T15:53:46.069100Z

i wouldn't be surprised if it can! i think a couple years ago, i was maybe feeling nervous about investing in graalvm. i wasn't sure about windows support and whatnot

flowthing 2020-12-14T15:57:52.069300Z

Well, @borkdude would know best. 🙂 I believe it's come a long way in a couple of years.

borkdude 2020-12-14T16:02:33.069500Z

I've distributed several cross platform native binary over the years with GraalVM: clj-kondo and babashka being the most well known ones.

dave 2020-12-14T16:59:53.069700Z

as i suspected. maybe at some point i'll get tired of go and rewrite it again in clojure + graalvm 😄

dave 2020-12-14T17:00:01.069900Z

i could probably reuse 99% of the alda v1 code

borkdude 2020-12-14T17:03:14.070100Z

Learning new things is always nice :)

flowthing 2020-12-14T17:05:29.070300Z

I'd certainly find a blog post on the topic of "Writing Go & Kotlin after Clojure" very interesting. 🙂

dave 2020-12-14T17:11:15.070600Z

that's good to hear! i've actually been thinking about jotting down some notes about that at some point. i'm just not quite sure how to frame it

dave 2020-12-14T17:11:27.070800Z

maybe an interesting way of putting it is that "go is more similar to clojure than you think" 🙂

borkdude 2020-12-14T17:13:12.071Z

I want to read it too!

flowthing 2020-12-14T17:14:23.071200Z

> maybe an interesting way of putting it is that "go is more similar to clojure than you think" That sounds like an interesting approach. At least to someone like me, who's never written a line of Go.

borkdude 2020-12-14T17:15:26.071400Z

Brandon Bloom has also said this on Twitter

borkdude 2020-12-14T17:16:33.071700Z

On the border of Clojure and Go: babashka supports a protocol similar to nREPL which allows you to talk to other binary programs using JSON (or EDN). Someone made a Go binary which can be used from babashka: https://github.com/tzzh/pod-tzzh-aws But the Go code is generated using Clojure (bb) itself :)

dave 2020-12-14T17:38:46.072100Z

wow, interesting!

borkdude 2020-12-14T17:39:33.072300Z

@dave I think Alda could also become a babashka pod, so you can control it from a bb script

dave 2020-12-14T17:41:27.072500Z

oh, that's cool i wonder how that would compare to the approach i've taken in https://github.com/daveyarwood/alda-clj ? the approach i've been taking is to use clojure.java.shell/sh to create a subprocess where i run alda with programmatically generated command line args

dave 2020-12-14T17:42:02.072800Z

i guess the thing about that is that it's JVM clojure, so there is a startup cost

dave 2020-12-14T17:42:10.073Z

alda-clj is more of a REPL-oriented library

borkdude 2020-12-14T17:43:03.073200Z

@dave it is a similar approach to shelling out, but babashka has instant startup and a pod is also intended to have instant startup, so you pay only the added startup times which is still nearly instant

dave 2020-12-14T17:43:25.073400Z

that sounds promising. i may dig into that at some point

borkdude 2020-12-14T17:44:49.073600Z

and the fun thing about pods is that they can be implemented in totally different languages than Clojure

borkdude 2020-12-14T17:45:12.073800Z

e.g. go :)

borkdude 2020-12-14T17:45:41.074Z

If you ever want to work on it and have questions, don't hesitate to reach out

dave 2020-12-14T18:07:18.074200Z

thanks! this sounds like it'd be a lot of fun to play with