Fork me on GitHub
#nrepl
<
2020-12-14
>
flowthing15:12:13

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.)

borkdude15:12:11

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

dave15:12:01

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

flowthing15:12:56

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

flowthing15:12:52

I guess GraalVM can do that too these days?

dave15:12:46

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

flowthing15:12:52

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

borkdude16:12:33

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

dave16:12:53

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

dave17:12:01

i could probably reuse 99% of the alda v1 code

borkdude17:12:14

Learning new things is always nice :)

flowthing17:12:29

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

dave17:12:15

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

dave17:12:27

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

borkdude17:12:12

I want to read it too!

flowthing17:12:23

> 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.

borkdude17:12:26

Brandon Bloom has also said this on Twitter

borkdude17:12:33

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 :)

dave17:12:46

wow, interesting!

borkdude17:12:33

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

dave17:12:27

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

dave17:12:02

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

dave17:12:10

alda-clj is more of a REPL-oriented library

borkdude17:12:03

@U0AHJUHJN 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

dave17:12:25

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

borkdude17:12:49

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

borkdude17:12:41

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

dave18:12:18

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