Fork me on GitHub
#clojure-europe
<
2022-01-31
>
dharrigan07:01:30

Good Morning!

simongray08:01:38

Feels like you’re slowly fast approaching the holy grail here.

simongray08:01:22

It would be nice if the interop was completely smooth, though. I wonder how far you can get with a couple of macros or maybe just a magic namespace à la js/ but for java. Like maybe you could just (def system j/java.lang.System) etc.

Mno08:01:28

rnorning

borkdude10:01:37

About the 😎 ^ : Trying to come up with a neat use case for this. Browser testing is one of the killer use cases for #nbb. And with Polyglot you're able to reach into the business logic of your backend JVM at the same time, while also being able to use the full Playwright and other NPM deps in Node. Could be interesting for e.g. testing applications that only have a Clojure backend and the front-end is written in JS/TS or so.

👌 1
borkdude10:01:43

Here is a REPL session in which clojure on the JVM is called from nbb on graalvm Node.js: https://gist.github.com/borkdude/c8537c6a4d6cdb399cf3bcf92b6b4a74

mkvlr10:01:36

:thinking_face: that’s the next level Clerk integration tests

mkvlr10:01:12

calling Clerk JVM to figure out what the assertion of a certain result should be

borkdude10:01:39

@U5H74UNSF But aren't we testing if the JVM impl was right? So if the JVM impl is wrong, aren't we just testing the wrong answer?

mkvlr10:01:06

no, I’d see that as a test of the JMV->browser pipeline, so given the assumption the JVM answer is correct

mkvlr10:01:27

a wrong JVM answer can be easily tested in the JVM alone

zane02:02:23

Even just a unified test runner that doesn’t need to rely on ws (as Kaocha used to) would be pretty great. (Not sure if more recent Kaocha versions still use ws.)

borkdude10:01:28

Imagine that we could run Visual Studio code with GraalVM Node.js + polyglot and then we would be able to write extensions in JVM Clojure. I think that should be possible.

borkdude12:01:12

Oh btw, you can also call Python from #nbb on graalvm polyglot :) https://twitter.com/borkdude/status/1488128831097651202

🐍 4
zane02:02:04

The main limiter here, at least for me, is that still that Graal Python isn’t fully compatible yet. Hopefully soon!