https://kotlinlang.org logo
Title
r

roman.belov

04/30/2020, 9:23 PM
Hi folks! We’ve just released an update to the Kotlin kernel for Jupyter! Now it supports a proper completion and compilation errors detection on the fly. Just like in IDEA ;) More details here: https://blog.jetbrains.com/kotlin/2020/05/kotlin-kernel-for-jupyter-notebook-v0-8/
👍 18
j

jimn

05/01/2020, 2:24 PM
@roman.belov how does one add thier data manipulation library to the kotlin-kernel-for-jupyter library preloads? hiding the classpath details seems to be a significant consideration in cmdline kotlinc
i see the prior PR's in kotlin-jupyter. I will test and submit similar
m

Michal Harakal

05/02/2020, 9:23 AM
Hi, I am trying kotlin+jupyter for the first times and having issue with running krangl sample. I I am getting error
Failed to process '%use krangl' command. Unknown library 'krangl'
I can admit that I lack basic understanding e.g. how the lib can be installed. Playing around on Mac with conda.
Its working fine with
@file:Repository(“<https://repo1.maven.org/maven2>”)
@file:DependsOn(“de.mpicbg.scicomp:krangl:0.11")
r

roman.belov

05/02/2020, 1:39 PM
@Michal Harakal please try to restart the kernel. Will it help?
m

Michal Harakal

05/02/2020, 5:34 PM
@roman.belov I have tried to switch it off and on and “magic” is still not working .
I still don’t understand who and how is responsible for the installation of libraries. I have seen “recipes” in libraries folder, but have no clue who and how should install/import them into my anaconda installation … https://github.com/Kotlin/kotlin-jupyter/tree/master/libraries
r

roman.belov

05/03/2020, 7:58 AM
@Michal Harakal with Kotlin kernel you don’t need to install libraries locally. They are automatically downloaded by providing maven coordinates. It basically means that notebooks are kind of self-contained and all dependencies are described right in the text of the notebook. Syntax for this exactly like you’ve mentioned above:
@file:Repository("<https://repo1.maven.org/maven2>")
@file:DependsOn("de.mpicbg.scicomp:krangl:0.11")
To simplify this boilerplate code for popular libraries we’ve added
%use
magics which work like short aliases for libraries. You may create such alias locally by adding a corresponding json file or even contribute it to our repository and it will be available for everyone. Also json file supports initializing code, conversions of the results and some other handy feature. It’s really strange that
%use
magics don’t work for you, I have no idea what could happen. @Anatoly Nikitin probably you can advice here?
👍 1
i

Ilya Muradyan

05/03/2020, 8:11 AM
@Michal Harakal Does the problem with
%use
persist? If yes, could you please share the log which kernel produces when you execute the cell with %use? It might be very helpful.
m

Michal Harakal

05/03/2020, 8:35 AM
@Ilya Muradyan
%use
yes still doesn’t work, I have posted logs via DM
i

Ilya Muradyan

05/03/2020, 8:40 AM
I reproduced the problem, trying to fix it now
@Michal Harakal Seems to be fixed. Hopelessly, kernel update is needed. Please, update to the latest version
0.8.0.25
👍 1
m

Michal Harakal

05/03/2020, 8:54 AM
I can confirm that update fixes the problem. Thank you very much @Ilya Muradyan
👍 1
i

Ilya Muradyan

05/03/2020, 8:55 AM
Thanks for reporting!
j

jimn

05/05/2020, 9:06 PM
@roman.belov does this @ and %use bring in transitive deps ?
r

roman.belov

05/05/2020, 9:18 PM
yes, they do
x

XQDD

05/06/2020, 9:14 AM
How to set a http proxy for it (%use xxx) ?
m

Marian Schubert

06/22/2020, 2:40 PM
Is there some easy way to start playing with Jupyter Notebooks + Kotlin kernel locally? (e.g., Docker?)
m

Michal Harakal

06/22/2020, 2:46 PM
On my on linux and mac machines with anaconda by following readme on the github page it worked out of the box like a charm. https://github.com/Kotlin/kotlin-jupyter I was also thinking about dockerizing, but I hav just started with DS, so I have to get python version running first. @Marian Schubert do you have a particular jupyter docker image on mind ?wich could be taken as base for extending with kotlin?
a

altavir

06/22/2020, 3:06 PM
Just install it with anaconda and play away. If you do not have it and don't want to install it, you can use an image with anaconda and install an environment in a user space.
m

Marian Schubert

06/22/2020, 3:42 PM
Oh, so I just run (on my clean system without jyputer)
conda install kotlin-jupyter-kernel -c jetbrains
and I'll get working Jupyter Notebooks with Kotlin kernel? I'll try that out
a

altavir

06/22/2020, 3:42 PM
yes, it works out of the box if you have installed anaconda
c

Chris Saunders

07/10/2020, 2:09 PM
conda is great - you can also just use pip to install