graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
borkdude 2020-12-17T15:16:18.215900Z

$ ./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!

lukasz 2020-12-17T15:31:43.216300Z

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

borkdude 2020-12-17T15:32:16.216900Z

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

borkdude 2020-12-17T15:33:47.217400Z

I'd love to hear what your 3 problems are

lukasz 2020-12-17T15:47:31.220200Z

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

borkdude 2020-12-17T15:49:23.220600Z

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

lukasz 2020-12-17T15:49:48.220900Z

oh

borkdude 2020-12-17T15:50:01.221400Z

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

lukasz 2020-12-17T15:50:20.221800Z

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

lukasz 2020-12-17T15:50:30.222100Z

thanks!

borkdude 2020-12-17T15:51:06.222800Z

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.

lukasz 2020-12-17T15:51:24.223300Z

Yeah, that's enough for what I need

lukasz 2020-12-17T15:51:44.223700Z

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

borkdude 2020-12-17T15:51:56.223900Z

:-D

lukasz 2020-12-17T15:52:35.224600Z

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

borkdude 2020-12-17T15:53:15.224900Z

right, familiarity, use what you already know

lukasz 2020-12-17T15:59:24.225700Z

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

borkdude 2020-12-17T16:07:00.226300Z

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

borkdude 2020-12-17T16:07:24.226700Z

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

borkdude 2020-12-17T16:09:28.227100Z

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

lukasz 2020-12-17T16:15:08.227400Z

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

lukasz 2020-12-17T16:15:32.228Z

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

borkdude 2020-12-17T16:16:10.228300Z

which is an entirely reasonable approach