Environment of Kotlin for Beginner

in #dev6 years ago (edited)

I have been studying kotlin. When I start new programming language, I like to study with the REPL Env of it. Although Kotlin provides REPL(Kotlinc.sh), It is uncomportable because It is a CLI(Command Line Interface) tool on terminal.

I have found better environment satisfied with following conditions.

  • a comfortable and easy REPL env with Jupyter.
  • complete separation between Kotlin and Java9

I think beakerx is the best environment for beginner of kotlin.
Beaker is Docker image. so If docker is installed in your computer, Just you can have perfect development environment with one command. If you want to install beakerx in your computer with docker engine, you need to run the following command

docker pull beakerx/beakerx

the following is log of the previous command.

Using default tag: latest
latest: Pulling from beakerx/beakerx
22dc81ace0ea: Already exists
1a8b3c87dba3: Already exists
91390a1c435a: Already exists
07844b14977e: Already exists
b78396653dae: Already exists
7b21c7c4b0cc: Already exists
daf4b703e422: Already exists
ba8964e0b44c: Pull complete
c8dc03fc2971: Pull complete
94ecdf222f55: Pull complete
ae5a433d9181: Pull complete
e5614ee28714: Pull complete

After completing the docker command, You can start beakerx with the following command.

docker run -p 8888:8888 beakerx/beakerx

The following is log of the docker run Command

Execute the command
[I 23:15:00.526 NotebookApp] Writing notebook server cookie secret to /home/beakerx/.local/share/jupyter/runtime/notebook_cookie_secret
[W 23:15:00.555 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 23:15:00.569 NotebookApp] [beakerx] enabled
[I 23:15:00.601 NotebookApp] JupyterLab beta preview extension loaded from /opt/conda/envs/beakerx/lib/python3.6/site-packages/jupyterlab
[I 23:15:00.602 NotebookApp] JupyterLab application directory is /opt/conda/envs/beakerx/share/jupyter/lab
[I 23:15:00.678 NotebookApp] Serving notebooks from local directory: /home/beakerx
[I 23:15:00.678 NotebookApp] 0 active kernels
[I 23:15:00.678 NotebookApp] The Jupyter Notebook is running at:
[I 23:15:00.678 NotebookApp] http://[all ip addresses on your system]:8888/?token=d7a6490ff29d3ab2ab4f6d2e21b393fb5b7003750d400dab
[I 23:15:00.678 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 23:15:00.678 NotebookApp]
 
     Copy/paste this URL into your browser when you connect for the first time,
     to login with a token:
         http://localhost:8888/?token=d7a6490ff29d3ab2ab4f6d2e21b393fb5b7003750d400dab
 [I 23:15:10.080 NotebookApp] 302 GET /?token=d7a6490ff29d3ab2ab4f6d2e21b393fb5b7003750d400dab (172.17.0.1) 0.77ms
 [I 23:15:22.441 NotebookApp] Creating new notebook in
 [I 23:15:22.452 NotebookApp] Writing notebook-signing key to /home/beakerx/.local/share/jupyter/notebook_secret
 [I 23:15:22.954 NotebookApp] Kernel started: 3968764f-363c-4b1b-923b-11a82f61fda4
 [I 23:15:29.230 NotebookApp] Adapting to protocol v5.1 for kernel 3968764f-363c-4b1b-923b-11a82f61fda4

you can access jupyter with url in log

스크린샷 2018-04-26 08.31.57.png

the beakerx supports other language as well as kotlin.

  • clojure
  • grovvy
  • Java
  • kotlin
  • python 3
  • sql
  • scala

If you can access Jupyter URL after installing beakerx in your computer, Now is the time to dive into kotlin.

스크린샷 2018-04-26 08.38.38.png

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 63645.37
ETH 3067.90
USDT 1.00
SBD 3.81