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.)
I think he could have used GraalVM + Clojure to make things run fast for startup.
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
Makes sense — Go definitely fits the bill there. :thumbsup::skin-tone-2:
I guess GraalVM can do that too these days?
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
Well, @borkdude would know best. 🙂 I believe it's come a long way in a couple of years.
I've distributed several cross platform native binary over the years with GraalVM: clj-kondo and babashka being the most well known ones.
as i suspected. maybe at some point i'll get tired of go and rewrite it again in clojure + graalvm 😄
i could probably reuse 99% of the alda v1 code
Learning new things is always nice :)
I'd certainly find a blog post on the topic of "Writing Go & Kotlin after Clojure" very interesting. 🙂
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
maybe an interesting way of putting it is that "go is more similar to clojure than you think" 🙂
I want to read it too!
> 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.
Brandon Bloom has also said this on Twitter
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 :)
wow, interesting!
@dave I think Alda could also become a babashka pod, so you can control it from a bb script
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
i guess the thing about that is that it's JVM clojure, so there is a startup cost
alda-clj is more of a REPL-oriented library
@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
that sounds promising. i may dig into that at some point
and the fun thing about pods is that they can be implemented in totally different languages than Clojure
e.g. go :)
If you ever want to work on it and have questions, don't hesitate to reach out
thanks! this sounds like it'd be a lot of fun to play with