https://kotlinlang.org logo
Title
t

thomasnield

01/14/2022, 2:25 AM
Does anybody know how hard it is to configure a notebook to run both Python and Kotlin? Been having a good time writing Kotlin notebooks for a customer but occasionally I want to show Python sidebars too.
i

Ilya Muradyan

01/14/2022, 5:33 AM
Do you need to share the state between Kotlin and Python parts?
t

thomasnield

01/14/2022, 12:40 PM
Currently, no : )
i

Ilya Muradyan

01/14/2022, 12:54 PM
If no, it's possible to achieve it with Jython library (https://www.jython.org/) and Kotlin kernel code preprocessing (see https://github.com/Kotlin/kotlin-jupyter/issues/223#issuecomment-839812237). I'd say it's rather easy)
t

thomasnield

01/14/2022, 3:24 PM
Okay thank you I'll look into this...
h

holgerbrandl

01/15/2022, 10:51 AM
I'd love to see this type of language-interop as well. I'm more interested in R though, which is still my preferred choice for statistical visualzation. In particular since kotlin needs to catch up with more established data science language, good interop would certainly help to build a bridge.
👍 1
a

altavir

01/17/2022, 8:57 AM
Beakerx allows to mix python, R and kotlin cells, but is has quite outdated kotlin kernel. It is possible to create a super-kernel, that allows different languages, but in general, common state is very hard to implement.
I think it should be also possible with GraalVM Trufle interpreter, but it is not yet available on all platforms.