Fork me on GitHub
#graalvm
<
2020-12-17
>
borkdude15:12:18

$ ./reply --attach localhost:63307 <<< '(+ 1 2 3)'
REPL-y 0.4.4, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.8+10
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (+ 1 2 3)
6
user=> Bye for now!

lukasz15:12:43

@borkdude what is that? where can I get this? it solves like 3 problems for me right now :-)

borkdude15:12:16

that is the reply nREPL client compiled to native-image. it's not open source, just something I fiddled with, see #nrepl

borkdude15:12:47

I'd love to hear what your 3 problems are

lukasz15:12:31

1. ad-hoc debugging of a live system, atm we have to pull in a container with lein inside and run it from a box 2. running db migrations - similar case, it requires a bit of a build process on our side, with a light-weight one-off nrepl trigger we could just ship the code and trigger the migrations when ready 3. can't think of it - but I remember that our internal docs have some several processes listed depending on a nrepl connection

borkdude15:12:23

@lukaszkorecki for ad-hoc one-shot invocations you can already use bb for this: https://book.babashka.org/#_interacting_with_an_nrepl_server

borkdude15:12:01

I'm using that on our CI to trigger things like clearing caches on production

lukasz15:12:20

I need to check out the book for real, looks like I missed a lot of cool stuff

borkdude15:12:06

this example was in the README of bb before. the nREPL integration is done using bencode, so it's more or less "implement your own nREPL client" but the example is showing that it's not hard.

lukasz15:12:24

Yeah, that's enough for what I need

lukasz15:12:44

This is so cool - bb completely replaced all the usecases I had for CHICKEN scheme

lukasz15:12:35

I mean, chicken is cool, but productivity boost stemming from the same language (ish) cannot be dismissed

borkdude15:12:15

right, familiarity, use what you already know

lukasz15:12:24

btw, have you seen this branch of cognited-labs/aws-api? https://github.com/cognitect-labs/aws-api/pull/121 - the title is a bit misleading as it also includes Graal support apparently

borkdude16:12:00

I've heard Jeroen mention it. I'm not using AWS myself a lot (yet) so I haven't been actively looking at this

borkdude16:12:24

If I would be an AWS user, I probably would have made a pod already

borkdude16:12:28

I would experiment with AWS maybe more if I wasn't afraid of blowing my credit card accidentally

lukasz16:12:08

Yeah, there's no such thing as cost control in AWS, really

lukasz16:12:32

Sadly I don't have enough time to look into this - most likely I'll go with the pod approach based on the AWS CLI v2

borkdude16:12:10

which is an entirely reasonable approach